5 years agodisplay: query for supported display attributes.
Yan Yin [Tue, 31 Jul 2012 10:24:14 +0000 (18:24 +0800)]
display: query for supported display attributes.

Signed-off-by: Gwenole Beauchesne <>
(cherry picked from commit 8bd3070c51b3cee9900668c38282184e71b41ed1)

5 years agoutils: fix build with <GL/glext.h> version >= 85.
Gwenole Beauchesne [Thu, 27 Sep 2012 09:04:24 +0000 (11:04 +0200)]
utils: fix build with <GL/glext.h> version >= 85.

Mesa recently updated the <GL/glext.h> header version to Khronos version 85.
This caused the PFNGLMULTITEXCOORD2FPROC definition to be moved out of the
GL_VERSION_1_3_DEPRECATED block. However, since <GL/gl.h> also defines
GL_VERSION_1_3 to 1, the definitions in <GL/glext.h> are then not enabled,
thus leaving PFNGLMULTITEXCOORD2FPROC undefined as well.

Provide a PFNGLMULTITEXCOORD2FPROC replacement as an interim solution for
newer versions of the <GL/glext.h> header.
(cherry picked from commit 5db2e93d3c930fd8470cfdcd26f514d1cebc59a0)

5 years agoffmpeg: Fixed wrong picture size
Holger Kaelberer [Mon, 15 Oct 2012 13:29:00 +0000 (15:29 +0200)]
ffmpeg: Fixed wrong picture size

Use AVCodecContext.width/height instead of coded_width/coded_height
for picture caps. VA-API surfaces allocated for h264 clips, whose
height is not aligned to 16 pixel boundaries are (vertically) too big,
leading to an ugly streched last line.

6 years agobuild: check for global alpha support in GstVideoOverlayComposition
Holger Kaelberer [Fri, 20 Jul 2012 10:36:33 +0000 (12:36 +0200)]
build: check for global alpha support in GstVideoOverlayComposition

6 years agosubpicture: improve application of overlay compositions
Holger Kaelberer [Tue, 15 May 2012 08:34:31 +0000 (10:34 +0200)]
subpicture: improve application of overlay compositions

Avoid un-necessary associations/uploading of unchanged subpicture
data (gst_vaapi_context_apply_composition()). Check changed overlay
data per rectangle and re-upload only if there where changes of
render_rect or global_alpha in the underlying
GstVideoOverlayRectangle. Otherwise we don't have any benefit from
vaSetSubpictureGlobalAlpha() if supported by the libva backend.

6 years agosubpicture/imageformat: add support for global alpha
Holger Kaelberer [Tue, 15 May 2012 08:24:08 +0000 (10:24 +0200)]
subpicture/imageformat: add support for global alpha

Evaluates VA_SUBPICTURE_GLOBAL_ALPHA and add the necessary
fields and accessor functions to add global alpha support to
GstVaapiSubpicture and GstVaapiImageFormat.

Also catch up with global-alpha support in the
GstVideoOverlayComposition API in gst-plugins-base and make gst-vaapi
handle global-alpha by the libva backend if supported.

6 years agovaapidecode: workaround non-ffmpeg decoders not implementing flush() +
Holger Kaelberer [Wed, 11 Apr 2012 08:22:41 +0000 (10:22 +0200)]
vaapidecode: workaround non-ffmpeg decoders not implementing flush() +
keyframe detection

Temporary workaround to make non-ffmpeg decoders work with latest
seeking fixes

6 years agovaapidecode: fix seeking
Holger Kaelberer [Wed, 11 Apr 2012 08:09:02 +0000 (10:09 +0200)]
vaapidecode: fix seeking

Minimal changes necessary to make seeking work (with support from
backend decoder):
- Handle FLUSH_STOP events and call into gst_vaapi_decoder_flush()
- Evaluate keyframe property of surface proxy set by backend decoder

6 years agoffmpeg: implement keyframe detection and flush() vfunc
Holger Kaelberer [Wed, 11 Apr 2012 08:06:26 +0000 (10:06 +0200)]
ffmpeg: implement keyframe detection and flush() vfunc

This fixes seeking behaviour in ffmpeg backend decoder.

6 years agodecoder: add flush() vfunc
Holger Kaelberer [Wed, 11 Apr 2012 08:04:34 +0000 (10:04 +0200)]
decoder: add flush() vfunc

Add a flush() vfunc to be implemented by backend decoders for post
seeking processing.

6 years agosurfaceproxy: add keyframe property
Holger Kaelberer [Wed, 11 Apr 2012 08:03:18 +0000 (10:03 +0200)]
surfaceproxy: add keyframe property

6 years agompeg2: Make mpeg2 decoder update pixel-aspect-ratio from sequence
Holger Kaelberer [Tue, 10 Apr 2012 11:47:12 +0000 (13:47 +0200)]
mpeg2: Make mpeg2 decoder update pixel-aspect-ratio from sequence

6 years agoRename datatype for deinterlace mode in vaapisink.
Holger Kaelberer [Tue, 10 Apr 2012 11:41:23 +0000 (13:41 +0200)]
Rename datatype for deinterlace mode in vaapisink.

Avoid name conflict with vaapipostproc's datatype until merge with
upstream is complete.

6 years agoMerge git://
Holger Kaelberer [Tue, 10 Apr 2012 11:35:56 +0000 (13:35 +0200)]
Merge git://

6 years agompeg2: fix calculation of macroblock_offset.
Gwenole Beauchesne [Mon, 2 Apr 2012 16:42:12 +0000 (18:42 +0200)]
mpeg2: fix calculation of macroblock_offset.

Fix decoding of streams with extra slice() information before the first
macroblock(). e.g. this fixes from conformance test.

6 years agompeg2: fix interpolation of GOP TSN from new PTS.
Gwenole Beauchesne [Mon, 2 Apr 2012 16:09:21 +0000 (18:09 +0200)]
mpeg2: fix interpolation of GOP TSN from new PTS.

New GOP TSN base could be mis-calculated. In particular, this fixes
decoding of uruseiyatsura.vob from <>.

6 years agompeg2: fix decoding of high profile streams.
Gwenole Beauchesne [Mon, 2 Apr 2012 14:07:58 +0000 (16:07 +0200)]
mpeg2: fix decoding of high profile streams.

Allow MPEG-2 High profile streams only if the HW supports that profile
or no High profile specific bits are used, and thus Main profile could
be used instead. i.e. chroma_format is 4:2:0, intra_dc_precision is not
set to 11 and no sequence_scalable_extension() was parsed.

6 years agovaapidecode: report unsupported codec profiles.
Gwenole Beauchesne [Mon, 2 Apr 2012 12:51:06 +0000 (14:51 +0200)]
vaapidecode: report unsupported codec profiles.

Try to gracefully abort when the HW does not support the requested
profile. There is no fallback unless profiles are correctly parsed
and matched through caps beforehand.

6 years agovaapisink: don't resize a 'foreign' X-window.
Holger Kaelberer [Tue, 7 Feb 2012 14:23:22 +0000 (15:23 +0100)]
vaapisink: don't resize a 'foreign' X-window.

Don't forcibly resize foreign X windows. The user is responsible for
their size and vaapisink shall not change this.

Signed-off-by: Gwenole Beauchesne <>
6 years agovaapisink: recalculate render rect only if caps are negotiated.
Holger Kaelberer [Tue, 7 Feb 2012 14:21:05 +0000 (15:21 +0100)]
vaapisink: recalculate render rect only if caps are negotiated.

Fix gst_vaapisink_xoverlay_set_window_handle() when it is called before
caps got negotiated. Besides, when a foreign window is provided by the
user, so should the render rect.

Signed-off-by: Gwenole Beauchesne <>
6 years agoBump version for development.
Gwenole Beauchesne [Mon, 2 Apr 2012 11:07:34 +0000 (13:07 +0200)]
Bump version for development.

6 years ago0.3.6.
Gwenole Beauchesne [Mon, 2 Apr 2012 08:07:33 +0000 (10:07 +0200)]

6 years agoFix a few documentation issues.
Gwenole Beauchesne [Mon, 2 Apr 2012 10:52:54 +0000 (12:52 +0200)]
Fix a few documentation issues.

6 years agoUpdate introduction and changelog.
Gwenole Beauchesne [Mon, 2 Apr 2012 08:05:57 +0000 (10:05 +0200)]
Update introduction and changelog.

6 years agompeg2: allocate dummy picture for first field based I-frame.
Gwenole Beauchesne [Mon, 2 Apr 2012 09:29:53 +0000 (11:29 +0200)]
mpeg2: allocate dummy picture for first field based I-frame.

In P-pictures, prediction shall be made from the two most recently
decoded reference fields. However, when the first I-frame is a field,
the next field of the current picture could be a P-picture but only a
single field was decoded so far. In this case, create a dummy picture
with POC = -1 that will be used as reference.

Some VA drivers would error out if P-pictures don't have a forward
reference picture. This is true in general but not in this very specific
initial case.

6 years agompeg2: fix simple to main profile fallback.
Gwenole Beauchesne [Mon, 2 Apr 2012 08:43:30 +0000 (10:43 +0200)]
mpeg2: fix simple to main profile fallback.

Allow fallback from simple to main profile when the HW decoder does
not support the former profile and that no sequence_header_extension()
is available to point out this.

6 years agompeg4: improve error checking while decoding packets.
Wind Yuan [Fri, 30 Mar 2012 07:04:40 +0000 (03:04 -0400)]
mpeg4: improve error checking while decoding packets.

decode_picture() could return an error when an MPEG-4 profile is not
supported for example. In this case, the underlying VA context is not
allocated and no other proper action can be taken. Likewise on exit
from decode_slice().

Signed-off-by: Gwenole Beauchesne <>
6 years agodecoder: use POC to maintain the DPB.
Gwenole Beauchesne [Fri, 30 Mar 2012 15:03:28 +0000 (17:03 +0200)]
decoder: use POC to maintain the DPB.

Introduce a POC field in GstVaapiPicture so that to store simpler sequential
numbers. A signed 32-bit integer should be enough for 1 year of continuous
video streaming at 60 Hz.

Use this new POC value to maintain the DPB, instead of 64-bit timestamps.
This also aligns with H.264 that will be migrated to GstVaapiDpb infrastructure.

6 years agompeg2: rework generation of presentation timestamps.
Gwenole Beauchesne [Fri, 30 Mar 2012 14:23:33 +0000 (16:23 +0200)]
mpeg2: rework generation of presentation timestamps.

Always prefer PTS from the demuxer layer for GOP times. If this is invalid,
i.e. demuxer could not determine the PTS or the generated PTS is lower than
max PTS from past pictures, then try to fix it up based on the duration of
a frame.

For picture PTS, simply use the GOP PTS formerly computed then use TSN to
reconstruct a current time. Also now handle wrapped TSN correctly.

6 years agompeg2: ignore empty user-data packets.
Gwenole Beauchesne [Fri, 30 Mar 2012 15:07:39 +0000 (17:07 +0200)]
mpeg2: ignore empty user-data packets.

Fix tcela-8.bits conformance test.

6 years agompeg2: review and report errors accordingly.
Gwenole Beauchesne [Thu, 29 Mar 2012 09:13:20 +0000 (11:13 +0200)]
mpeg2: review and report errors accordingly.

Use GST_ERROR() to report real errors instead of hiding them into

6 years agompeg2: fix invalid interlaced frame in progressive sequence.
Gwenole Beauchesne [Wed, 28 Mar 2012 17:15:47 +0000 (19:15 +0200)]
mpeg2: fix invalid interlaced frame in progressive sequence.

Some streams, badly constructed, could have signaled an interlaced
frame while the sequence was meant to be progressive. Warn and force
frame to be progressive in this case.

6 years agompeg2: add support for interlaced streams.
Gwenole Beauchesne [Wed, 28 Mar 2012 14:08:29 +0000 (16:08 +0200)]
mpeg2: add support for interlaced streams.

Pictures are submitted to the HW for rendering only when both fields
are decoded or current picture is a full frame.

6 years agompeg2: add new decoded picture buffer infrastructure.
Gwenole Beauchesne [Wed, 28 Mar 2012 12:36:30 +0000 (14:36 +0200)]
mpeg2: add new decoded picture buffer infrastructure.

Decoded pictures are now maintained into DPB, similarly to H.264.
The same mechanism could be re-used for VC-1 and MPEG-4:2 codecs.

6 years agodecoder: add first-field flag to picture.
Gwenole Beauchesne [Wed, 28 Mar 2012 15:50:28 +0000 (17:50 +0200)]
decoder: add first-field flag to picture.

Add first-field (FF) flag to GstVaapiPicture, thus not requiring is_first_field
member in each decoder. Rather, when a GstVaapiPicture is created, it is considered
as the first field. Any subsequent allocated field will become the second field.

6 years agodecoder: allow pictures to be cloned for field decoding.
Gwenole Beauchesne [Wed, 28 Mar 2012 14:05:58 +0000 (16:05 +0200)]
decoder: allow pictures to be cloned for field decoding.

Add gst_vaapi_picture_new_field() function that clones a picture, while
preserving the parent picture surface. i.e. the surface proxy reference
count is increased and other fields copied as is. Besides, the picture
is reset into a "non-output" mode.

6 years agodecoder: rework picture field flags.
Gwenole Beauchesne [Wed, 28 Mar 2012 14:07:44 +0000 (16:07 +0200)]
decoder: rework picture field flags.

Add top-field-first (TFF) and interlaced flags to GstVaapiPicture so they
could be propagated to the surface proxy when it is pushed for rendering.
Besides, top and bottom fields are now expressed with picture structure flags
from GstVaapiSurfaceRenderFlags.

6 years agodecoder: add OUTPUT flag to pictures.
Gwenole Beauchesne [Wed, 28 Mar 2012 12:28:26 +0000 (14:28 +0200)]
decoder: add OUTPUT flag to pictures.

Allow pictures to be marked as output gst_vaapi_picture_output().

6 years agodecoder: fix semantics of SKIPPED pictures.
Gwenole Beauchesne [Wed, 28 Mar 2012 12:24:40 +0000 (14:24 +0200)]
decoder: fix semantics of SKIPPED pictures.

If GstVaapiPicture has flag SKIPPED set, this means gst_vaapi_picture_output()
will not push the underlying surface for rendering. Besides, VC-1 skipped P-frame
has nothing to do with rendering. This only means that the currently decoded
picture is just a copy of its reference picture.

6 years agovaapipostproc: get "interlaced" attribute from surface proxy.
Gwenole Beauchesne [Wed, 28 Mar 2012 13:16:17 +0000 (15:16 +0200)]
vaapipostproc: get "interlaced" attribute from surface proxy.

Add new "interlaced" attribute to GstVaapiSurfaceProxy. Use this in
vaapipostproc so that to handles cases where bitstream is interlaced
but almost only frame pictures are generated. In this case, we should
not be alternating between top/bottom fields.

6 years agovaapipostproc: add new element for video postprocessing.
Gwenole Beauchesne [Mon, 26 Mar 2012 12:37:24 +0000 (14:37 +0200)]
vaapipostproc: add new element for video postprocessing.

Add vaapipostproc element for video postprocessing. So far, only basic
bob deinterlacing is implemented. Interlaced mode is automatically
detected based on sink caps ("interlaced" field).

6 years agovideobuffer: add surface render flags.
Gwenole Beauchesne [Mon, 26 Mar 2012 10:01:36 +0000 (12:01 +0200)]
videobuffer: add surface render flags.

Allow rendering flags, as a combination of GstVaapiSurfaceRenderFlags,
to be set to the video buffer. In particular, this is mostly useful for
basic deinterlacing.

6 years agocompat: add compatibility glue with VA-API 0.34+ (WIP).
Gwenole Beauchesne [Fri, 23 Mar 2012 16:13:58 +0000 (17:13 +0100)]
compat: add compatibility glue with VA-API 0.34+ (WIP).

6 years agoh264: skip all Filler Data NALs.
Gwenole Beauchesne [Fri, 23 Mar 2012 16:11:18 +0000 (17:11 +0100)]
h264: skip all Filler Data NALs.

6 years agompeg4: check for decoder status prior to decoding packet.
Wind Yuan [Thu, 22 Mar 2012 07:28:22 +0000 (03:28 -0400)]
mpeg4: check for decoder status prior to decoding packet.

Make sure there is a VA surface free prior to decoding the current frame.

Signed-off-by: Gwenole Beauchesne <>
6 years agodecode: delay NEWSEGMENT event if vaapidecode element was not linked.
Wind Yuan [Thu, 15 Mar 2012 08:58:04 +0000 (04:58 -0400)]
decode: delay NEWSEGMENT event if vaapidecode element was not linked.

Rationale: playbin2 links all elements at run-time. Once vaapidecode
is created and a NEWSEGMENT event arrives, downstream element may not
be ready yet. So, delay this event until next element is chained in,
otherwise basesink could output "Received buffer without a new-segment.
Assuming timestamps start from 0".

Signed-off-by: Gwenole Beauchesne <>
6 years agompeg2: fix GOP timestamps when incorrect data is received.
Wind Yuan [Wed, 14 Mar 2012 00:33:41 +0000 (20:33 -0400)]
mpeg2: fix GOP timestamps when incorrect data is received.

Some streams have incorrect GOP timestamps, or nothing set at all.
i.e. GOP time is 00:00:00 for all GOPs. Try to recover in this case
from demuxer timestamps, which are monotonic.

Signed-off-by: Gwenole Beauchesne <>
6 years agompeg2: don't decode anything before the first sequence_header().
Wind Yuan [Tue, 13 Mar 2012 06:03:31 +0000 (02:03 -0400)]
mpeg2: don't decode anything before the first sequence_header().

Skip all pictures prior to the first sequence_header(). Besides,
skip all picture_data() if there was no prior picture_header().

Signed-off-by: Gwenole Beauchesne <>
6 years agoffmpeg: add support for interlaced streams.
Holger Kaelberer [Tue, 7 Feb 2012 14:57:14 +0000 (15:57 +0100)]
ffmpeg: add support for interlaced streams.

Evaluate interlaced stream properties.

Signed-off-by: Gwenole Beauchesne <>
6 years agovaapidecode: propagate interlaced and TFF properties downstream.
Holger Kaelberer [Tue, 7 Feb 2012 14:54:15 +0000 (15:54 +0100)]
vaapidecode: propagate interlaced and TFF properties downstream.

Propagate "interlaced" caps downstream and set "tff" buffer flag
appropriately to output buffers for interlaced pictures.

Signed-off-by: Gwenole Beauchesne <>
6 years agodecoder: maintain caps for interlaced streams.
Holger Kaelberer [Tue, 7 Feb 2012 14:54:15 +0000 (15:54 +0100)]
decoder: maintain caps for interlaced streams.

Extend GstVaapiDecoder base object to maintain caps with "interlaced"

Signed-off-by: Gwenole Beauchesne <>
6 years agosurfaceproxy: add TFF property.
Holger Kaelberer [Tue, 7 Feb 2012 14:54:15 +0000 (15:54 +0100)]
surfaceproxy: add TFF property.

Add TFF (top-field-first) property to GstVaapiSurfaceProxy.

Signed-off-by: Gwenole Beauchesne <>
6 years agoAUTHORS: update to match current authors.
Gwenole Beauchesne [Fri, 16 Mar 2012 13:21:36 +0000 (14:21 +0100)]
AUTHORS: update to match current authors.

6 years agompeg2: fix is_first_field calculation.
Gwenole Beauchesne [Tue, 28 Feb 2012 10:58:21 +0000 (11:58 +0100)]
mpeg2: fix is_first_field calculation.

Reset is_first_field for frame pictures. Factor out locations where
the flag is updated.

6 years agompeg2: catch incorrect picture_structure from bitstreams.
Gwenole Beauchesne [Fri, 24 Feb 2012 11:56:48 +0000 (12:56 +0100)]
mpeg2: catch incorrect picture_structure from bitstreams.

Assume "frame" picture structure if the syntax element was zero or if
progressive_frame is set.

6 years agompeg2: fix slice_vertical_position calculation (again).
Gwenole Beauchesne [Fri, 24 Feb 2012 11:53:30 +0000 (12:53 +0100)]
mpeg2: fix slice_vertical_position calculation (again).

VA-API expects slice_vertical_position as the initial position from the
bitstream. i.e. the direct slice() information. VA drivers will be fixed

6 years agoTFF is a per frame property, therefore move it to GstVaapiSurfaceProxy.
Holger Kaelberer [Tue, 13 Mar 2012 15:47:21 +0000 (16:47 +0100)]
TFF is a per frame property, therefore move it to GstVaapiSurfaceProxy.

6 years agoMerge git://
Holger Kaelberer [Tue, 6 Mar 2012 08:18:31 +0000 (09:18 +0100)]
Merge git://

6 years agoRevert "vaapidecode: fix another pad template ref leak" (Holger Kaelberer)
Gwenole Beauchesne [Fri, 2 Mar 2012 14:03:57 +0000 (15:03 +0100)]
Revert "vaapidecode: fix another pad template ref leak" (Holger Kaelberer)

This reverts commit 2f127d6af473afd647a2c88f75faafd1cd718437.

For gst_element_class_get_pad_template(), no unreferencing is necessary
according to the GStreamer documentation.

6 years agoh264: fix slice_data_bit_offset calculation.
Gwenole Beauchesne [Fri, 2 Mar 2012 12:41:16 +0000 (13:41 +0100)]
h264: fix slice_data_bit_offset calculation.

Unlike what VA-API documentation defines, the slice_data_bit_offset
represents the offset to the first macroblock in the slice data, minus
any emulation prevention bytes in the slice_header().

This fix copes with binary-only VA drivers that won't be fixed any
time soon. Besides, this aligns with the current FFmpeg behaviour
that was based on those proprietary drivers implementing the API

6 years agoh264: skip all Access Unit (AU) NALs.
Wind Yuan [Tue, 21 Feb 2012 07:11:20 +0000 (02:11 -0500)]
h264: skip all Access Unit (AU) NALs.

Signed-off-by: Gwenole Beauchesne <>
6 years agoh264: fix modification process of reference picture lists.
Wind Yuan [Wed, 29 Feb 2012 08:08:46 +0000 (03:08 -0500)]
h264: fix modification process of reference picture lists.

Construction of RefPicList0/1 could be off by one element.

Signed-off-by: Gwenole Beauchesne <>
6 years agompeg2: fix size calculation from sequence_extension().
Sreerenj Balachandran [Sun, 12 Feb 2012 09:21:52 +0000 (11:21 +0200)]
mpeg2: fix size calculation from sequence_extension().

Original values from sequence_header() are 12-bit and the remaining
2 most significant bits are coming from sequence_extension().

Signed-off-by: Gwenole Beauchesne <>
6 years agompeg2: fix slice_vertical_position calculation.
Gwenole Beauchesne [Thu, 23 Feb 2012 15:39:14 +0000 (16:39 +0100)]
mpeg2: fix slice_vertical_position calculation.

Make sure to adjust slice_vertical_position if picture structure
is a top or bottom field.

6 years agodecoder: add picture structure flags.
Gwenole Beauchesne [Thu, 23 Feb 2012 15:23:27 +0000 (16:23 +0100)]
decoder: add picture structure flags.

6 years agompeg2: fix decoding at end-of-sequence.
Gwenole Beauchesne [Thu, 23 Feb 2012 13:42:38 +0000 (14:42 +0100)]
mpeg2: fix decoding at end-of-sequence.

6 years agompeg2: fix slice_horizontal_position calculation.
Gwenole Beauchesne [Thu, 23 Feb 2012 13:17:34 +0000 (14:17 +0100)]
mpeg2: fix slice_horizontal_position calculation.

6 years agompeg2: drop useless mb_y and mb_height members.
Gwenole Beauchesne [Thu, 23 Feb 2012 15:14:02 +0000 (16:14 +0100)]
mpeg2: drop useless mb_y and mb_height members.

6 years agompeg2: fix decoding of multiple slices with same slice_vertical_position.
Gwenole Beauchesne [Thu, 23 Feb 2012 10:19:48 +0000 (11:19 +0100)]
mpeg2: fix decoding of multiple slices with same slice_vertical_position.

6.3.15 says that "some slices may have the same slice_vertical_position,
since slices may start and finish anywhere". So, we can't submit the current
picture to the HW right away since subsequent slices would be missing.

6 years agoimage: fix source stride in picture copy.
Gwenole Beauchesne [Wed, 15 Feb 2012 13:08:44 +0000 (14:08 +0100)]
image: fix source stride in picture copy.

6 years agodecoder: fix double buffer free with some VA drivers.
Gwenole Beauchesne [Mon, 13 Feb 2012 09:10:35 +0000 (10:10 +0100)]
decoder: fix double buffer free with some VA drivers.

vaRenderPicture() implicitly disposes VA buffers. Some VA drivers would
push the VA buffer object into a list of free buffers to be re-used. However,
reference pictures (and data) that was kept would explicitly release the VA
buffer object later on, thus possibly destroying a valid (re-used) object.

Besides, some other VA drivers don't support correctly the vaRenderPicture()
semantics for VA buffers disposal and would leak memory if there is no explicit
vaDestroyBuffer(). The temporary workaround is to explcitily destroy VA buffers
right after vaRenderPicture(). All VA drivers need to be aligned.

6 years agoh264: complete any current picture decoder before SPS / PPS change.
Gwenole Beauchesne [Wed, 8 Feb 2012 17:08:49 +0000 (18:08 +0100)]
h264: complete any current picture decoder before SPS / PPS change.

This ensures the VA context is clear when the encoded resolution
changes. i.e. make sure older picture is decoded with the older
VA context before it changes.

6 years agoh264: create VA context earlier when SPS is parsed.
Gwenole Beauchesne [Wed, 8 Feb 2012 17:07:14 +0000 (18:07 +0100)]
h264: create VA context earlier when SPS is parsed.

6 years agoh264: don't allocate too big data structures on stack.
Gwenole Beauchesne [Wed, 8 Feb 2012 16:57:29 +0000 (17:57 +0100)]
h264: don't allocate too big data structures on stack.

6 years agovaapidownload: Don't renegotiate src-caps arbitrarily if image format
Holger Kaelberer [Tue, 7 Feb 2012 15:05:43 +0000 (16:05 +0100)]
vaapidownload: Don't renegotiate src-caps arbitrarily if image format
could not be derived from surface (in

6 years agovaapisink: Added support for interlaced streams: new property
Holger Kaelberer [Tue, 7 Feb 2012 15:00:12 +0000 (16:00 +0100)]
vaapisink: Added support for interlaced streams: new property
interlace_mode PLUS necessary changes in calls to vaPutSurface() and
friends (_TOP/_BOTTOM_FIELD)

6 years agovaapidecoder_ffmpeg: Added support for interlaced streams, evaluate
Holger Kaelberer [Tue, 7 Feb 2012 14:57:14 +0000 (15:57 +0100)]
vaapidecoder_ffmpeg: Added support for interlaced streams, evaluate
interlaced stream properties

6 years agoAdded support for interlaced streams:
Holger Kaelberer [Tue, 7 Feb 2012 14:54:15 +0000 (15:54 +0100)]
Added support for interlaced streams:
  vaapidecoder: Extend vaapidecoder base object
  vaapidecode:  Set caps and buffer-flags for interlaced video

6 years agovaapisink: Don't resize a 'foreign' X-window
Holger Kaelberer [Tue, 7 Feb 2012 14:23:22 +0000 (15:23 +0100)]
vaapisink: Don't resize a 'foreign' X-window

6 years agovaapisink: Fixed gst_vaapisink_xoverlay_set_window_handle when called
Holger Kaelberer [Tue, 7 Feb 2012 14:21:05 +0000 (15:21 +0100)]
vaapisink: Fixed gst_vaapisink_xoverlay_set_window_handle when called
           before caps are negotiated

6 years agoglib: map deprecated API to glib >= 2.32 equivalents.
Gwenole Beauchesne [Tue, 7 Feb 2012 10:07:15 +0000 (11:07 +0100)]
glib: map deprecated API to glib >= 2.32 equivalents.

GStaticMutex and GStaticRecMutex are now replaced with GMutex and
GRecMutex, which no longer require any prior call to g_thread_init().

6 years agoglib: fix includes.
Gwenole Beauchesne [Tue, 7 Feb 2012 09:01:01 +0000 (10:01 +0100)]
glib: fix includes.

6 years agocosmetics: fix warnings (drop unused variables).
Gwenole Beauchesne [Tue, 7 Feb 2012 09:05:53 +0000 (10:05 +0100)]
cosmetics: fix warnings (drop unused variables).

6 years agovaapidecode: fix another pad template ref leak.
Gwenole Beauchesne [Mon, 6 Feb 2012 15:11:38 +0000 (16:11 +0100)]
vaapidecode: fix another pad template ref leak.

6 years agompeg2: fix crash when there is no free surface to decode into.
Gwenole Beauchesne [Mon, 6 Feb 2012 14:54:09 +0000 (15:54 +0100)]
mpeg2: fix crash when there is no free surface to decode into.

6 years agodisplay: skip profiles which have no entrypoints.
Zhao Halley [Tue, 31 Jan 2012 08:38:58 +0000 (16:38 +0800)]
display: skip profiles which have no entrypoints.

Signed-off-by: Gwenole Beauchesne <>
6 years agovaapiupload: use g_object_unref() for GstVaapiImage.
Gwenole Beauchesne [Sun, 5 Feb 2012 17:28:51 +0000 (18:28 +0100)]
vaapiupload: use g_object_unref() for GstVaapiImage.

6 years agoplugins: fix pad template ref leaks.
Gwenole Beauchesne [Sun, 5 Feb 2012 17:24:08 +0000 (18:24 +0100)]
plugins: fix pad template ref leaks.

6 years agoBump version for development.
Gwenole Beauchesne [Thu, 2 Feb 2012 08:23:15 +0000 (09:23 +0100)]
Bump version for development.

6 years ago0.3.4. 0.3.4
Gwenole Beauchesne [Wed, 1 Feb 2012 22:34:09 +0000 (23:34 +0100)]

6 years agoREADME: updates.
Gwenole Beauchesne [Wed, 1 Feb 2012 22:32:47 +0000 (23:32 +0100)]
README: updates.

Mention codecparsers-based decoders, FFmpeg is now optional. Update
list of support HW.

6 years agoNEWS: updates.
Gwenole Beauchesne [Wed, 1 Feb 2012 22:28:23 +0000 (23:28 +0100)]
NEWS: updates.

6 years agodecoder: allocate proxy surface earlier.
Gwenole Beauchesne [Tue, 31 Jan 2012 10:34:17 +0000 (11:34 +0100)]
decoder: allocate proxy surface earlier.

This simplifies gst_vaapi_picture_output() to only update the presentation
timestamp and submit the proxy to the decoder for output.

6 years agodecoder: fix memory leak of VA objects on exit.
Gwenole Beauchesne [Tue, 31 Jan 2012 10:26:37 +0000 (11:26 +0100)]
decoder: fix memory leak of VA objects on exit.

On sequence end, if the last decoded picture is not output for rendering,
then the proxy surface is not created. In this case, the original surface
must be released explicitly to the context.

6 years agompeg2: use GstAdapter to track input sequence.
Gwenole Beauchesne [Tue, 31 Jan 2012 09:47:36 +0000 (10:47 +0100)]
mpeg2: use GstAdapter to track input sequence.

This fixes possible memory leaks and improves performance by removing
some extra copies.

6 years agoAdd glib compatibility glue for older versions.
Gwenole Beauchesne [Mon, 30 Jan 2012 17:25:03 +0000 (18:25 +0100)]
Add glib compatibility glue for older versions.

6 years agoAdd header for system-dependent definitions.
Gwenole Beauchesne [Mon, 30 Jan 2012 17:12:59 +0000 (18:12 +0100)]
Add header for system-dependent definitions.

6 years agodecoder: optimize slice data buffers initialization.
Gwenole Beauchesne [Mon, 30 Jan 2012 09:15:32 +0000 (10:15 +0100)]
decoder: optimize slice data buffers initialization.

VA drivers may have a faster means to transfer user buffers to GPU
buffers than using memcpy(). In particular, on Intel Gen graphics, we
can use pwrite(). This provides for faster upload of bitstream and can
help higher bitrates.

vaapi_create_buffer() helper function was also updated to allow for
un-mapped buffers and pre-initialized data for buffers.

6 years agoh264: simplify RefPicList reconstruction.
Gwenole Beauchesne [Fri, 27 Jan 2012 16:28:50 +0000 (17:28 +0100)]
h264: simplify RefPicList reconstruction.

6 years agoh264: flush DPB when the end of the sequence is reached.
Gwenole Beauchesne [Fri, 27 Jan 2012 15:08:03 +0000 (16:08 +0100)]
h264: flush DPB when the end of the sequence is reached.