| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Out-of-bounds reference pixel replication should take into account the frame
coding mode of the reference frame(s), not the frame coding mode of the
current frame.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
Interlace frame P and B pictures should ignore the FASTUVMC syntax element, as
stated in section 10.7.3.7 of VC-1 spec. Furthermore, prevent using the MVMODE
syntax element for interlace frame P and B pictures, as these picture types do
not include MVMODE or MVMODE2.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
| |
h2 is typo of h1
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
| |
Some VC1 clips might be marked interlaced but have fcm < 2, and the
wrong fcm will lead to undefined behavior, such as GPU hang.
This fixes https://github.com/01org/intel-vaapi-driver/issues/316
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
|
| |
Only gen6 needs mapping from input range to the hardware range for
the profile bitstream element. For gen7 and up there is no need for a
mapping as the hardware uses only one bit indicating simple/main profile
or advanced profile. Therefore, we can remove the mapping for gen7 and
clean up the code a bit.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
The picture size may vary within a VC-1 stream. We should calculate
the dmv buffer size from the size of the surface instead of the
size of the first picture that uses the surface. Subsequent pictures
may be larger, which could overflow the dmv buffer.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
| |
When frame-interlaced pictures are signalled to be intensity
compensated, we need to set the hardware to compensating both the top and
the bottom field.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
As stated in the PRM, the FastUVMCFlag field should be equal to the LSB
of the Motion Vector Mode field. This also conforms to VC-1 spec, as
FASTUVMC controls whether color difference motion vectors are
reconstructed with quarter of half pixel resolution.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
| |
Skipped pictures should not signal raw coded bitplanes as there are no
MBs encoded. Failure to do so results in decoding errors.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
Skipped pictures do not pass a bitplane buffer. We do, however,
locally encode a bitplane buffer with only the SKIPMB bit set. The
presence of this buffer must be passed through the BitplanePresentFlag
hardware field.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
| |
As stated in VC-1 spec, the direct MV buffer will be written when
decoding a P frame. Subsequently, the direct MV buffer is read when
decoding a B frame that backward references this P frame.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
Skipped pictures are equal to their reference frame and, therefore,
should not pass the loop filter. Although the loop filter was already
a null operation as all transform coefficients are zero for skipped
pictures, this may save some cyles in the decoder hardware.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
This mapping does not make sense. Unless the mapping is some workaround
for a hardware quirk, we should be able to safely remove it. If this
breaks things, we can always put it back accompanied with an explanation
in the code.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
|
|
| |
In genX_mfd_vc1_pic_state, the logic of picture_type is not very clear
as it is mapped from the input range to the hardware range. The mapping,
however, is an identity mapping that, effectively, only maps a skipped
picture to a P picture. By putting the skipped picture logic explicitly
in the ocde, we can remove the unnecessary mapping and make the logic
much more clear.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
| |
PRM states that for VC-1 the direct motion vector buffer may be scaled
with frame height but should not be scaled with frame width. Hardware
assumes frame width is fixed at 128 MBs.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
| |
Although the PRM does not state that this field must be zero for
non-JPEG, we might as well set it to zero as indicated in the comment
and to make its use more clear.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
|
|
| |
Bitplanes that are coded in raw mode are signalled through the
raw_coding flags in the VAPictureParameterBufferVC1 structure. The
absence of a bitplane does not necessarily imply that this bit is
encoded in raw mode. A progressive P picture in advanced profile, for
example, does not encode the SKIPMB bitplane nor does it encode this
bit in raw mode.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
Due to the union construct, unused bits in bitplane_present.value might
be uninitialized even when the used bits are all set to a value.
Masking the unused bits prevents spurious true values when all used
bits are unset, e.g. skipped pictures.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
| |
VC-1 skipped pictures do not encode a slice or MB layer, nor do they
encode any bitplanes. For a skipped picture, we should unconditionally
encode the bitplane buffer with only the SKIPMB bit set. Furthermore,
we optimize the static picture_type comparison out of the double loop.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
| |
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
|
|
|
|
|
|
|
| |
As stated in the PRM, VC-1 decoder hardware cannot handle the case
where the second 0x00 byte in the emulation prevention pattern
0x00 0x00 0x03 (0x00-0x03) coincides with the start of the
MB layer. Fixed by overwriting the 0x03 byte with the previous 0x00
byte and adjusting the MB layer byte offset accordingly.
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
|
|
|
| |
Intensity compensation was not present for B-frames, but only for P-frames. When a P-frame flags intensity compensation for its forward reference frame, all subsequent B-frames that use this reference frame as well, need to do intensity compensation as well.
|
|
|
|
|
|
| |
This fixes https://github.com/01org/intel-vaapi-driver/issues/10
Signed-off-by: Wang Tiantian <tiantian.wang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux coding style is used in the driver source code. Use the command
below to format/indent .c/.h files
$> astyle --style=linux -cnpUH -s4 -M120 <file>
A script of style_unify is added in the top-level directory to
handle all .c/.h files in the driver. There is no change to any
functionality
This fixes https://github.com/01org/intel-vaapi-driver/issues/99
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
| |
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
|
|
|
|
| |
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The calloc function maybe return NULL, it will causing
memory access violation if continue using NULL C structure.
Add assert function to do checking on its.
bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=91699
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Based on the H264 spec the macroblock pair should be used to calculate
the corresponding parameters under MBAFF.(mb-adaptive frame-field).
Otherwise the wrong parameter is sent to GPU HW.
Fix the GPU hang issue in https://bugs.freedesktop.org/show_bug.cgi?id=91207
Tested-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
| |
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
Tested-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
| |
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is the base of struct gen_avc_surface, and move frame_store_id
from gen_avc_surface to gen_codec_surface
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit fc7085d4930f0ceef8ced414af96a7c18cf4fe52)
Conflicts:
src/i965_decoder_utils.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HW requires driver to add a phantom slice when FirstMbX and FirstMbY are
not 0, in order to avc decoding error concealment. Otherwise, GPU may hang.
This patch is a workround for bug: https://bugs.freedesktop.org/show_bug.cgi?id=81447
v1->v2: Follow haihao's suggestion to use common funcion of gen6 phantom slice.
v2->v3: Remove an extraneous newline.
Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 9672c5ab17c32f25ce1bbdb883abda689440b116)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In strict MVC decoding mode, when only the necessary set of inter-view
reference pictures are passed to the ReferenceFrames array for decoding
the current picture, we should not re-use a frame store id that might
be needed for decoding another view component in the same access unit.
One way to solve this problem is to track when the VA surface in a
specified frame store id was last referenced. So, a "ref_age" field
is introduced to the GenFrameStore struct and is updated whenever
the surface is being referenced.
Additionally, the list of retired refs candidates (free_refs) is kept
ordered by increasing ref_age. That way, we can immediately know what
is the oldest frame store id to recycle.
Let deltaAge = CurrAge - RefAge:
If deltaAge > 1, we know for sure that the VA surface is gone ;
If deltaAge = 1, the surface could be re-used for inter prediction ;
If deltaAge = 0, the surface could be re-used for inter-view prediction.
The ref_age in each Frame Store entry is always current, i.e. it is
the same for all reference frames that intervened in the decoding
process of all inter view components of the previous access unit. The
age tracks access units.
v2: used a more correct representation of age, instead of POC [Yakui]
v3: minor optimization for detecting changes of access unit [Haihao]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 3b5eb0522fbfe1220dcd0c0bb093a93cfc25e22c)
|
|
|
|
|
|
|
|
|
|
| |
The optimization by which the VA surface storage is deallocated after
it is displayed and not used for reference or vaDeriveImage() purposes
cannot be implemented safely. We need to honour explicit lifetimes
defined by the upper codec layer.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 84926ace7a2c5b88df1ada167a1c273128469aad)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
H.264 MVC decoding support is defined as follows:
- Stereo High profile on Sandybridge and newer ;
- Multiview High profile on Haswell and newer.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 1f244834dedb7b46863b315a898d8649d01c5f58)
Conflicts:
src/i965_device_info.c
src/i965_drv_video.c
src/va_backend_compat.h
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fill and submit MFX_AVC_PICID_STATE commands to Gen7.5+ hardware.
This optimizes the management of the DPB as the binding array can
now contain entries in any order. This also makes it possible to
support H.264 MultiView High profiles, with any particular number
of views.
v2: added more comments for clarity, removed an assert [Yakui]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 8dfdf10612c726b60ecd5b61eee2b7d6a520bb33)
|
|
|
|
|
|
|
|
| |
Add new avc_find_picture() helper function to search for a VAPictureH264
struct based on the supplied VA surface id.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 3f4f9fc2893af24b7e88f44b6350a5a74d49f0c2)
|
|
|
|
|
|
|
| |
declaration
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 8b3945aa5df443e93a3f5e6e97dffb1574e2a936)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimize support for grayscale surfaces in two aspects: (i) space
by only allocating the luminance component ; (ii) speed by avoiding
initialization of the (now inexistent) chrominance planes.
Keep backward compatibility with older codec layers that only
supported YUV 4:2:0 and not grayscale formats properly.
v2: fix check for extra H.264 chroma formats [Haihao]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new avc_ensure_surface_bo() helper function to factor out the
allocatiion and initialization processes of the reconstructed VA
surface buffer stores.
Keep preferred native format (NV12) and initialize chroma values
to 0.0 (0x80) when needed for "fake" grayscale (Y800) surfaces
implemented on top of existing NV12.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
|
|
|
|
|
| |
This is helpful to avoid the typo error when using VA_FOURCC(A, B, C, D).
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit acea969011bceee36a57fe2c0e4ee96c0c5e79c7)
|