vaapi:sree-gstreamer-vaapi.git
5 years agoh264: fix conflicts during merge and set VASurfaceID appropriately.
Sreerenj Balachandran [Tue, 6 Nov 2012 12:22:43 +0000 (14:22 +0200)]
h264: fix conflicts during merge and set VASurfaceID appropriately.

VASurface allocation happens only when the first buffer reaches
for decoding.VASurfaceID should be assigen correclty to
VAPictureParameterBufferH264->VAPictureH264->picture_id after the
surface allocation.

5 years agoMerge branch 'gwe_master' into 1.0
Sreerenj Balachandran [Mon, 5 Nov 2012 15:41:43 +0000 (17:41 +0200)]
Merge branch 'gwe_master' into 1.0

Conflicts:
Makefile.am
gst-libs/gst/vaapi/gstvaapidecoder.c
gst-libs/gst/vaapi/gstvaapidecoder_h264.c
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
gst/vaapi/gstvaapidecode.c
gst/vaapi/gstvaapidecode.h

5 years agoFix conflict in cherry-pic commit 388e881ba9143.. : vaapidecoder_mpeg2
Sreerenj Balachandran [Mon, 5 Nov 2012 10:19:40 +0000 (12:19 +0200)]
Fix conflict in cherry-pic commit 388e881ba9143.. : vaapidecoder_mpeg2

5 years agompeg2: add decode_packet() helper function.
Gwenole Beauchesne [Wed, 10 Oct 2012 07:45:03 +0000 (09:45 +0200)]
mpeg2: add decode_packet() helper function.

Split decode_buffer() into the core infrastructure that determines
the packets contained in the adapter and the actual function that
decodes the packet data.

Conflicts:
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c

5 years agoFix cherry-pic conflict: vaapidecoder_mpeg2
Sreerenj Balachandran [Mon, 5 Nov 2012 09:52:40 +0000 (11:52 +0200)]
Fix cherry-pic conflict: vaapidecoder_mpeg2

5 years agompeg2: fix memory leak of empty packets.
Gwenole Beauchesne [Tue, 9 Oct 2012 13:40:49 +0000 (15:40 +0200)]
mpeg2: fix memory leak of empty packets.

Fix memory leakage of empty packets, i.e. packets that only contain
the start code prefix. In particular, free empty user-data packets.

Besides, the codec parser will already fail gracefully if the packet
to parse does not have the minimum required size. So, we can also
completely drop the block of code that used to handle packets of size 4
(including the start code).

Conflicts:
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c

5 years agodebian: fix make dist for packaging.
Gwenole Beauchesne [Fri, 5 Oct 2012 11:36:27 +0000 (13:36 +0200)]
debian: fix make dist for packaging.

5 years agowayland: cosmetics (remove tabs).
Gwenole Beauchesne [Fri, 5 Oct 2012 10:06:27 +0000 (12:06 +0200)]
wayland: cosmetics (remove tabs).

5 years agowayland: add support for windowed mode.
Rob Bradford [Thu, 4 Oct 2012 16:39:52 +0000 (17:39 +0100)]
wayland: add support for windowed mode.

Rather than always making the surface fullscreen instead implement the
set_fullscreen vfunc on GstVaapiWindow and then set the shell surface
fullscreen on not depending on that.

Reviewed-by: Joe Konno <joe.konno@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agovaapisink: make sure that the subpicture blending happens only after Gstreamer-vaapi_1.0__0.4
Sreerenj Balachandran [Fri, 2 Nov 2012 21:11:39 +0000 (23:11 +0200)]
vaapisink: make sure that the subpicture blending happens only after
 finishing the yuv data upload to surface (if the memory has been mapped before:vaapiupload)

5 years agovaapisink: add GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE to query
Sreerenj Balachandran [Fri, 2 Nov 2012 21:11:15 +0000 (23:11 +0200)]
vaapisink: add GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE to query

5 years agoAllow subpicture blending:
Sreerenj Balachandran [Fri, 2 Nov 2012 21:09:10 +0000 (23:09 +0200)]
Allow subpicture blending:
--- added  GstVaapiSurfaceMetaTrasform() to gstvaapisurfacemeta.c
 ,,,,,this allows to copy surface_buffers, but won't copy any surface_memory
--- added relevant fixes to  gst_vaapi_subpicture_new_from_overlay_rectangle()
--- sample: gst-launch-1.0 filesrc location=h264.mp4 ! decodebin ! textoverlay text="Overlay" ! vaapisink
--- Fixme:  context missing in case of  propogate_context==TRUE:
 gst_vaapi_surface_set_subpictures_from_composition()

5 years agoh264: minor clean-ups.
Gwenole Beauchesne [Wed, 31 Oct 2012 15:37:14 +0000 (16:37 +0100)]
h264: minor clean-ups.

Move DPB flush up if the current picture to decode is an IDR. Besides,
don't bother to check for IDR pictures in dpb_add() function since an
explicit DPB flush was already performed in this case.

5 years agoh264: simplify reference picture marking process.
Gwenole Beauchesne [Wed, 31 Oct 2012 13:24:09 +0000 (14:24 +0100)]
h264: simplify reference picture marking process.

... to build the short_ref[] and long_ref[] lists from the DPB, instead
of maintaining them separately. This avoids refs/unrefs while making it
possible to generate the list based on the actual picture structure.

This also ensures that the list of generated ReferenceFrames[] actually
matches what reference frames are available in the DPB. i.e. short_ref[]
and long_ref[] entries are implied from the DPB, so there is no risk of
having "dangling" references.

5 years agoh264: introduce per-field POC in GstVaapiPictureH264.
Gwenole Beauchesne [Wed, 31 Oct 2012 10:52:03 +0000 (11:52 +0100)]
h264: introduce per-field POC in GstVaapiPictureH264.

Use the POC member available in the GstVaapiPicture base class and
get rid of the dependency on the local VAPictureH264 TopFieldOrderCnt
and BottomFieldOrderCnt. Rather, use a simple field_poc[] array
initialized to INT_MAX, so that to simplify picture POC calculation
for non frame pictures.

5 years agoh264: introduce GST_VAAPI_PICTURE_{SHORT,LONG}_TERM_REFERENCE flags.
Gwenole Beauchesne [Wed, 31 Oct 2012 10:45:14 +0000 (11:45 +0100)]
h264: introduce GST_VAAPI_PICTURE_{SHORT,LONG}_TERM_REFERENCE flags.

Further get rid of GstVaapiPictureH264-local VAPictureH264.flags for
reference bits, thus simplifying the reference picture marking process
to only track a single set of reference flags. Also introduce a new
long_term_frame_idx member.

5 years agoh264: introduce GST_VAAPI_PICTURE_FLAG_IDR flag.
Gwenole Beauchesne [Wed, 31 Oct 2012 10:33:40 +0000 (11:33 +0100)]
h264: introduce GST_VAAPI_PICTURE_FLAG_IDR flag.

5 years agoh264: fill in GstVaapiPicture structure.
Gwenole Beauchesne [Wed, 31 Oct 2012 09:56:15 +0000 (10:56 +0100)]
h264: fill in GstVaapiPicture structure.

... and get rid of local VAPictureH264.flags fields in GstVaapiPictureH264.

5 years agoh264: add vaapi_fill_picture() helper.
Gwenole Beauchesne [Wed, 31 Oct 2012 10:07:48 +0000 (11:07 +0100)]
h264: add vaapi_fill_picture() helper.

Add vaapi_fill_picture() helper function to convert GstVaapiPictureH264
to VAPictureH264 structure. This is preparatory work to get rid of the
local VAPictureH264 member in GstVaapiPictureH264.

5 years agovaapicontext: SCRATCH_SURFACE_COUNT is back to it's original value 4.
Sreerenj Balachandran [Tue, 30 Oct 2012 14:13:34 +0000 (16:13 +0200)]
vaapicontext: SCRATCH_SURFACE_COUNT is back to it's original value 4.
--no more hard-coding of ref-frames count: sync with gstreamer-vaapi-0.10
--setting the max-buffer to 24 which allows to enlarge surfacepool as per requirement.

5 years agovaapidecoder: release all the surface_proxys after the seek(post-seek semantics reset)
Sreerenj Balachandran [Tue, 30 Oct 2012 13:08:10 +0000 (15:08 +0200)]
vaapidecoder: release all the surface_proxys after the seek(post-seek semantics reset)

5 years agoFix some of the Fixme:
Sreerenj Balachandran [Tue, 30 Oct 2012 12:28:59 +0000 (14:28 +0200)]
Fix some of the Fixme:
---merge gst_vaapi_decoder_get_surface() and gst_vaapi_decoder_get_surface_proxy()
   if gvd_get_surface() is calling with VideoFrame==NULL, it will just pop out the
   pending surface_proxys which are ready to display.

5 years agodeinterlacing:
Sreerenj Balachandran [Mon, 29 Oct 2012 14:02:17 +0000 (16:02 +0200)]
deinterlacing:
         This is a hack: vaapipostproc is sacrificing for the deinterlace element.
 The playbin is autoplugging the deinterlace element and which is doing the
 deinterlacing (in AUTO mode) if the incoming caps has "interlace-mode != progressive".
 But when vaapi elements autoplug in to the pipeline, vaapidecode o/p is not intended to
 deinterlace with the deinterlace element. For now "va-interlace-mode",
(which is a parameter setting by the vaapidecode in caps) is helping to resolve this issue

5 years agoh264: fix activation order of picture and sequence parameters.
Gwenole Beauchesne [Fri, 26 Oct 2012 14:12:05 +0000 (16:12 +0200)]
h264: fix activation order of picture and sequence parameters.

Delay ensure_context() until we actually need a VA context for allocating
new VA surfaces, and then GstVaapiPictures, but also when a real activation
of a new picture parameter set occurs, thus also implying an activation
of the related sequence parameter set.

The most important thing was to drop the global pps and sps pointers since
they may not have matched the currently activated picture parameter or
sequence parameter sets at the specified decode point.

Anoter positive side-effect is that this cleans up all occurrences of
decode_current_picture() to only keep those useful in decode_picture(),
before a new picture is allocated, or in decode_sequence_end() when
an end-of-stream or end-of-sequence condition occurred.

5 years agoh264: fix scaling list generation.
Gwenole Beauchesne [Fri, 26 Oct 2012 11:17:43 +0000 (13:17 +0200)]
h264: fix scaling list generation.

... aka fix regression from efaab79. In particular, ScalingList8x8[]
array was partially copied to the VAIQMatrixBufferH264. While we are
at it, also improve bounds checking and avoid copying 8x8 scaling
lists if transform_8x8_mode_flag is set to 0.

5 years agoRemove a large set of unused APIs and structures from the following files:
Sreerenj Balachandran [Thu, 25 Oct 2012 14:27:50 +0000 (17:27 +0300)]
Remove a large set of unused APIs and structures from the following files:
---- gstvaapicontext.*
---- gstvaapidecoder.*
---- gstvaapidecoder_objects.*
---- gstvaapisurfaceproxy.*
Also renamed the api gst_vaapi_decoder_get_surface2() to gst_vaapi_decoder_get_surface().

5 years agoEach of the GstVaapiCodecObjects(GstVaapiPicture, GstVaapiSlice etc) are separately
Sreerenj Balachandran [Thu, 25 Oct 2012 11:23:47 +0000 (14:23 +0300)]
Each of the GstVaapiCodecObjects(GstVaapiPicture, GstVaapiSlice etc) are separately
initializing with gst_mini_object_init(), since there is no more subclassing for GstMiniObject.
GstVaapiCodecObject structure will get freed once the refcount of  sub-objects like
GstVaapiPicture, GstVaapiSlice etc.. become zero. (need a better solution??)

5 years agoh264: fix detection of picture boundaries.
Gwenole Beauchesne [Wed, 24 Oct 2012 16:23:09 +0000 (18:23 +0200)]
h264: fix detection of picture boundaries.

Strictly follow the standard (7.4.1.2.4) to detect the first VCL NAL
unit of a primary coded picture.

5 years agoh264: optimize handling of scaling lists.
Gwenole Beauchesne [Tue, 23 Oct 2012 12:50:14 +0000 (14:50 +0200)]
h264: optimize handling of scaling lists.

Don't copy scaling lists twice to an intermediate state. Rather, directly
use the scaling lists from GstH264PPS since they would match those provided
by SPS header, if necessary. i.e. if PPS-specific scaling lists are not
available in the bitstream.

5 years agoFix the segfault: use g_getenv() instead of getenv().
Sreerenj Balachandran [Wed, 24 Oct 2012 08:04:27 +0000 (11:04 +0300)]
Fix the segfault: use g_getenv() instead of getenv().
---Thanks to Jan Steffens <jan.steffens@gmail.com>

5 years agodrop unused APIs : Remove gstvaapiimagepool.* and gstvaapiimagememory.*
Sreerenj Balachandran [Tue, 23 Oct 2012 13:02:34 +0000 (16:02 +0300)]
drop unused APIs : Remove gstvaapiimagepool.* and gstvaapiimagememory.*
--- single surfacepool together with surfacemeta is able to handle all use cases of imagepool

5 years agoRemove vaapiupload and vaapidownload:
Sreerenj Balachandran [Tue, 23 Oct 2012 12:37:34 +0000 (15:37 +0300)]
Remove vaapiupload and vaapidownload:
--- buffers outtputting from vadecode is directly accessable for other gstreamer elements. (no more vaapidownload)
--- s/w decoders are pluggable with vaapisink (no more vaapiupload)

5 years agoRemove all gstvaapivideobuffer* files:
Sreerenj Balachandran [Tue, 23 Oct 2012 11:14:32 +0000 (14:14 +0300)]
Remove all gstvaapivideobuffer* files:
--- no more buffer subclassing in 1.0 .And there is no reason for these APIs to exist in 1.0

5 years agovaapidecoder_mpeg2: signal caps change iff size/profile changed.
Sreerenj Balachandran [Tue, 23 Oct 2012 10:07:59 +0000 (13:07 +0300)]
vaapidecoder_mpeg2: signal caps change iff size/profile changed.

5 years agoh264: simplify code when MMCO is 5.
Gwenole Beauchesne [Tue, 23 Oct 2012 08:33:50 +0000 (10:33 +0200)]
h264: simplify code when MMCO is 5.

Remove exit_picture() and exit_picture_poc() since PicOrderCnt(CurrPic)
is now updated accordingly to the standard. Besides, MMCO = 5 specific
operations are moved up to exec_ref_pic_marking_adaptive_mmco_5().

5 years agoh264: fix MMCO-based reference picture marking process.
Gwenole Beauchesne [Mon, 22 Oct 2012 09:52:13 +0000 (11:52 +0200)]
h264: fix MMCO-based reference picture marking process.

Fix adaptive memory control decoded reference picture marking process
implementation for operations 2 to 6, thus also fixing support for
long-term reference pictures.

5 years agoh264: move MMCO handlers out of the loop (cosmetics).
Gwenole Beauchesne [Mon, 22 Oct 2012 08:50:29 +0000 (10:50 +0200)]
h264: move MMCO handlers out of the loop (cosmetics).

This change only splits each individual MMCO handler into several functions
dedicated for each operation. This is needed to perform further work later
on.

5 years agosome more ref handling to satisfy the intelaced-decoding. Gstreamer-vaapi-1.0__0.2
Sreerenj Balachandran [Thu, 18 Oct 2012 09:56:10 +0000 (12:56 +0300)]
some more ref handling to satisfy the intelaced-decoding.
--these stuffs needs to merge with GstVaapiSurfaceBufferMeta in an efficient way.

5 years agovaapicontext: any object holding ref to surface-buffer acquired from surface_pool...
Sreerenj Balachandran [Thu, 18 Oct 2012 08:45:56 +0000 (11:45 +0300)]
vaapicontext: any object holding ref to surface-buffer acquired from surface_pool should
unref the surface_buffer after usage instead of calling buffer_pool_release(),
becaues surface_buffer will return to surface_pool once the refcount reaches zero.

5 years ago gstvaapicontext: hold the ref to bufferpool during context creation
Sreerenj Balachandran [Thu, 18 Oct 2012 08:04:01 +0000 (11:04 +0300)]
 gstvaapicontext: hold the ref to bufferpool during context  creation
  and relase it when context is finalizing or resetting.

5 years agodebian: fix make dist for packaging.
Gwenole Beauchesne [Wed, 17 Oct 2012 13:49:23 +0000 (15:49 +0200)]
debian: fix make dist for packaging.

bzip2 tarballs are now used, so update the deb.upstream dependencies
to include dist-bzip2 instead of plain old dist, and use the correct
tar extract options to handle that format.

5 years agoconfigure: generate bzip2 tarballs in ustar format by default.
Gwenole Beauchesne [Wed, 17 Oct 2012 13:42:17 +0000 (15:42 +0200)]
configure: generate bzip2 tarballs in ustar format by default.

5 years agoconfigure: bump glib required version to 2.31.2.
Gwenole Beauchesne [Wed, 17 Oct 2012 13:38:14 +0000 (15:38 +0200)]
configure: bump glib required version to 2.31.2.

Use new Thread API. In particular, g_mutex_init() and g_cond_init()
rather than g_mutex_new() and g_cond_new() respectively.

5 years agovaapidecode: adopt non-deprecrated glib locking primitive pattern.
Rob Bradford [Thu, 4 Oct 2012 16:39:53 +0000 (17:39 +0100)]
vaapidecode: adopt non-deprecrated glib locking primitive pattern.

The use of heap allocated GMutex/GCond is deprecated. Instead place them
inside the structure they are locking.

These changes switch to use g_mutex_init/g_cond_init rather than the heap
allocation functions.

Because we cannot test for a NULL pointer for the GMutex/GCond we must
initialise inside the GObject _init function and clear inside the _finalize
which is guaranteed to only be called once and after the object is no longer
in use.

5 years agovaapidecode: fix compiler warnings.
Gwenole Beauchesne [Wed, 17 Oct 2012 12:52:35 +0000 (14:52 +0200)]
vaapidecode: fix compiler warnings.

Don't care of the return value for gst_vaapi_decoder_put_buffer()
during destruction of the element. Don't print out (uninitialised)
error code when allocation of video buffer failed.

5 years agogstvaapidecoder: handling downstream allocated pools.
Sreerenj Balachandran [Wed, 17 Oct 2012 11:10:29 +0000 (14:10 +0300)]
gstvaapidecoder: handling downstream allocated pools.
---decide_allocation query may contain pool from vasink or from some other elemetns(eg:xvimagesink).The decoder should create new pool if there is no VaSurfaePool in the query or query has different caps than the current pool using by decoder.

5 years agoh264: add flag to compile with strict DPB ordering mode.
Gwenole Beauchesne [Tue, 16 Oct 2012 14:52:04 +0000 (16:52 +0200)]
h264: add flag to compile with strict DPB ordering mode.

Allow build with strict DPB ordering mode whereby evicted entries
are replaced by the next entries, in order instead of optimizing
it away with the last entry in the DPB.

This is only useful for debugging purpose, against a reference SW
decoder for example.

5 years agoh264: drop extra code covered by built-in codecparsers.
Gwenole Beauchesne [Tue, 16 Oct 2012 14:46:17 +0000 (16:46 +0200)]
h264: drop extra code covered by built-in codecparsers.

GstH264SliceHdr.n_emulation_prevention_bytes is bound to exist now that
a newer version of codecparsers/ are used if the system provided one is
now recent enough to have those required extensions.

5 years agocodecparsers: fix generation of symlinks.
Gwenole Beauchesne [Tue, 16 Oct 2012 14:43:43 +0000 (16:43 +0200)]
codecparsers: fix generation of symlinks.

Try to improve dependencies while generating symlinks to externally
maintained copy of codecparsers (derived from upstream git master
tree).

5 years agogstvaapisurfacememory: release GstVaapiImage during surface_memory freeing.
Sreerenj Balachandran [Sun, 14 Oct 2012 14:13:41 +0000 (17:13 +0300)]
gstvaapisurfacememory: release GstVaapiImage during surface_memory freeing.

5 years agompeg2: move the dummy picture allocation procedure to decode_buffer() since the buffe...
Sreerenj Balachandran [Sat, 13 Oct 2012 22:23:10 +0000 (01:23 +0300)]
mpeg2: move the dummy picture allocation procedure to decode_buffer() since the bufferpool is only allocating after decide allocation.

5 years agovaapidecoder_objects: GstVaapiPicture doesn't need to keep the reference to bufferpool.
Sreerenj Balachandran [Sat, 13 Oct 2012 20:58:55 +0000 (23:58 +0300)]
vaapidecoder_objects: GstVaapiPicture doesn't need to keep the reference to bufferpool.

5 years agogstvaapisurfacemeta: remove extra ref of GstVaapiSurface and GstVaapiImage.
Sreerenj Balachandran [Fri, 12 Oct 2012 11:25:17 +0000 (14:25 +0300)]
gstvaapisurfacemeta: remove extra ref of GstVaapiSurface and GstVaapiImage.
---- surfacemeta has a pointer to GstVaapiSurfaceMemory
---- providing separate APIs for accessing GstVaapiSurface and GstVaaapiImage from GstVaapiSurfaceMeta

5 years agoRemove explicit typecasting of buffer meta to GstVaapiSurfaceMeta
Sreerenj Balachandran [Fri, 12 Oct 2012 09:43:19 +0000 (12:43 +0300)]
Remove explicit typecasting of buffer meta to GstVaapiSurfaceMeta
--- use gst_buffer_get_vaapi_surface_meta() to get the surface meta data.

5 years agoAdd api to map GstVaapiImage to GstVaapiImageRaw
Sreerenj Balachandran [Thu, 11 Oct 2012 22:31:08 +0000 (01:31 +0300)]
Add api to map GstVaapiImage to GstVaapiImageRaw
--- no more extra memcpy

5 years agoBasic merging of vaapiupload with vaapisink:
Sreerenj Balachandran [Thu, 11 Oct 2012 20:51:11 +0000 (23:51 +0300)]
Basic merging of vaapiupload with vaapisink:
---- s/w decoders or any plugins outputting yuv data is pluggable with vaapisink now
---- fixme: vaapisink template caps format is hard-coded to NV12 to satisfy the autoplug
---- fixme: add proper videometa , to support custom stride
---- fixme: vaDeriveImage optimization path is not yet added

5 years agovc1: use framerate information from bitstream parser.
Gwenole Beauchesne [Thu, 11 Oct 2012 13:04:12 +0000 (15:04 +0200)]
vc1: use framerate information from bitstream parser.

5 years agovc1: use pixel-aspect-ratio from bitstream parser.
Simon Farnsworth [Thu, 27 Sep 2012 17:05:46 +0000 (18:05 +0100)]
vc1: use pixel-aspect-ratio from bitstream parser.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agompeg2: use pixel-aspec-ratio information from bitstream parser.
Simon Farnsworth [Thu, 27 Sep 2012 17:05:46 +0000 (18:05 +0100)]
mpeg2: use pixel-aspec-ratio information from bitstream parser.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agocodecparsers: h264: use submodule sources.
Gwenole Beauchesne [Thu, 11 Oct 2012 11:49:14 +0000 (13:49 +0200)]
codecparsers: h264: use submodule sources.

Use newer sources from the codecparsers/ submodule for
- GstH264SliceHdr.n_emulation_prevention_bytes: EPBs;
- GstH264VUIParams.{par_n,par_d}: pixel-aspect-ratio.

5 years agocodecparsers: jpeg: use submodule sources.
Gwenole Beauchesne [Thu, 11 Oct 2012 11:23:02 +0000 (13:23 +0200)]
codecparsers: jpeg: use submodule sources.

5 years agoAdd codecparsers submodule.
Gwenole Beauchesne [Thu, 11 Oct 2012 08:03:14 +0000 (10:03 +0200)]
Add codecparsers submodule.

5 years ago.gitignore: updates.
Gwenole Beauchesne [Thu, 11 Oct 2012 12:17:12 +0000 (14:17 +0200)]
.gitignore: updates.

5 years agoautogen: fix check for gtkdocize and autoreconf.
Gwenole Beauchesne [Thu, 11 Oct 2012 11:40:37 +0000 (13:40 +0200)]
autogen: fix check for gtkdocize and autoreconf.

If gtkdocize or autoreconf programs were not found, then the autogen.sh
script would fail to report that correctly because test -z was not passed
any argument (empty string "" in this case).

5 years agovaapidecoder, vaapidecode: signal the interlacing property in caps
Sreerenj Balachandran [Thu, 11 Oct 2012 07:54:41 +0000 (10:54 +0300)]
vaapidecoder, vaapidecode: signal the interlacing property in caps
----the field is called "interlace-mode" mode now and is a string.
----Fix: set/hard-coded the mode to "progressive" for now to satisfy the "deinterlace" element which is autoplugging in playbin.

5 years agoFix the typecast warnings:
Sreerenj Balachandran [Wed, 10 Oct 2012 13:23:44 +0000 (16:23 +0300)]
Fix the typecast warnings:

5 years agoMoving VaSurfacePool Creation to vaapisink:
Sreerenj Balachandran [Wed, 10 Oct 2012 10:04:57 +0000 (13:04 +0300)]
Moving VaSurfacePool Creation to vaapisink:
--- implement propose_allocation in vaapisink, this is the needed feature for merging vaapiupload  with vaapisink
--- vacontext creation should happen only after checking the availability of downstream allocated pool
--- decoder is creating pool, iff the vaapisink is not providing one
--- many other trivial fixes

5 years agoh264: use pixel-aspect-ratio from SPS header.
Simon Farnsworth [Thu, 27 Sep 2012 17:05:46 +0000 (18:05 +0100)]
h264: use pixel-aspect-ratio from SPS header.

Propagate pixel-aspect-ratio determined by the GStreamer codecparser
from the sequence headers.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoh264: add decode_nalu() helper function.
Gwenole Beauchesne [Wed, 10 Oct 2012 08:35:20 +0000 (10:35 +0200)]
h264: add decode_nalu() helper function.

Split decode_buffer() into the core infrastructure that determines
the NAL units contained in the adapter and the actual function that
decodes the NAL unit.

5 years agoh264: fix end-of-stream conditions (flush).
Gwenole Beauchesne [Wed, 10 Oct 2012 08:31:39 +0000 (10:31 +0200)]
h264: fix end-of-stream conditions (flush).

Decode pending data in the adapter prior to processing the actual
code for end-of-stream.

5 years agompeg2: add decode_packet() helper function.
Gwenole Beauchesne [Wed, 10 Oct 2012 07:45:03 +0000 (09:45 +0200)]
mpeg2: add decode_packet() helper function.

Split decode_buffer() into the core infrastructure that determines
the packets contained in the adapter and the actual function that
decodes the packet data.

5 years agompeg2: fix end-of-stream conditions (flush).
Gwenole Beauchesne [Tue, 9 Oct 2012 13:34:18 +0000 (15:34 +0200)]
mpeg2: fix end-of-stream conditions (flush).

Decode pending data in the adapter prior to processing the actual
code for end-of-stream. Initial code from Feng Yuan.

5 years agompeg2: fix memory leak of empty packets.
Gwenole Beauchesne [Tue, 9 Oct 2012 13:40:49 +0000 (15:40 +0200)]
mpeg2: fix memory leak of empty packets.

Fix memory leakage of empty packets, i.e. packets that only contain
the start code prefix. In particular, free empty user-data packets.

Besides, the codec parser will already fail gracefully if the packet
to parse does not have the minimum required size. So, we can also
completely drop the block of code that used to handle packets of size 4
(including the start code).

5 years agompeg2: fix return value for "no-data" conditions.
Gwenole Beauchesne [Tue, 9 Oct 2012 13:01:38 +0000 (15:01 +0200)]
mpeg2: fix return value for "no-data" conditions.

Fix return value when the second scan for start code fails. This means
there is not enough data to determine the full extents of the current
packet and the function shall return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA
in this case, instead of GST_VAAPI_DECODER_STATUS_SUCCESS.

5 years agodecoder: refine semantics of gst_vaapi_decoder_put_buffer().
Gwenole Beauchesne [Tue, 9 Oct 2012 12:48:00 +0000 (14:48 +0200)]
decoder: refine semantics of gst_vaapi_decoder_put_buffer().

Improve the semantics for gst_vaapi_decoder_put_buffer() when an empty
buffer is passed on. An empty buffer is a buffer with a NULL data pointer
or with a size equals to zero. In this case, that buffer is simply
skipped and the function returns TRUE. A NULL buffer argument still
marks the end-of-stream.

5 years agodecoder: drop unused functions.
Gwenole Beauchesne [Tue, 9 Oct 2012 12:40:00 +0000 (14:40 +0200)]
decoder: drop unused functions.

5 years agovaapidecode: flush buffers when receiving EOS.
Wind Yuan [Mon, 27 Aug 2012 02:29:04 +0000 (22:29 -0400)]
vaapidecode: flush buffers when receiving EOS.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agodebian: fix make dist for packaging.
Gwenole Beauchesne [Fri, 5 Oct 2012 11:36:27 +0000 (13:36 +0200)]
debian: fix make dist for packaging.

5 years agowayland: cosmetics (remove tabs).
Gwenole Beauchesne [Fri, 5 Oct 2012 10:06:27 +0000 (12:06 +0200)]
wayland: cosmetics (remove tabs).

5 years agowayland: add support for windowed mode.
Rob Bradford [Thu, 4 Oct 2012 16:39:52 +0000 (17:39 +0100)]
wayland: add support for windowed mode.

Rather than always making the surface fullscreen instead implement the
set_fullscreen vfunc on GstVaapiWindow and then set the shell surface
fullscreen on not depending on that.

Reviewed-by: Joe Konno <joe.konno@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
5 years agoadd videometa:just defaults for now
Sreerenj Balachandran [Thu, 4 Oct 2012 12:15:41 +0000 (15:15 +0300)]
add videometa:just defaults for now

5 years agosurfacepool: no need to ref the display
Sreerenj Balachandran [Thu, 4 Oct 2012 11:50:33 +0000 (14:50 +0300)]
surfacepool: no need to ref the display

5 years agoNo more vaapidownload: buffer_map will return the the copy of client side mapped...
Sreerenj Balachandran [Wed, 3 Oct 2012 19:35:50 +0000 (22:35 +0300)]
No more vaapidownload: buffer_map will return the the copy of client side mapped memory of the vasurface. So "vaapidecode ! videoconvert ! xvimagesink" will work like usual pipeline.
.... playbin autoplugging needs the fix in videobalace element in upstream(NV12 support in videobalance)

5 years agoSetting the default format to NV12 since it is the default derive image format for...
Sreerenj Balachandran [Tue, 2 Oct 2012 21:23:53 +0000 (00:23 +0300)]
Setting the default format to NV12 since it is the default derive image format for vaapiimage

5 years agoMerge branch '0.10_basevideodec' into 1.0
Sreerenj Balachandran [Mon, 1 Oct 2012 11:18:41 +0000 (14:18 +0300)]
Merge branch '0.10_basevideodec' into 1.0

Conflicts:
configure.ac

5 years agoMerge branch 'gwe_master' into 0.10_basevideodec
Sreerenj Balachandran [Mon, 1 Oct 2012 11:10:28 +0000 (14:10 +0300)]
Merge branch 'gwe_master' into 0.10_basevideodec

Conflicts:
gst-libs/gst/vaapi/gstvaapidecoder_h264.c

5 years agoMake vaapiupload and vaapidownload to work with new vaapisurfacememory and vaapisurfa...
Sreerenj Balachandran [Mon, 1 Oct 2012 10:54:22 +0000 (13:54 +0300)]
Make vaapiupload and vaapidownload to work with new vaapisurfacememory and vaapisurfacemeta..
..these two elements will merge to vaapidecode in the next set of patches...

5 years agoAdd missing files: gstvaapisurfacemeta.c and gstvaapisurfacemeta.h
Sreerenj Balachandran [Mon, 1 Oct 2012 10:15:32 +0000 (13:15 +0300)]
Add missing files: gstvaapisurfacemeta.c and gstvaapisurfacemeta.h

5 years agoBump version for development.
Gwenole Beauchesne [Mon, 1 Oct 2012 07:21:03 +0000 (09:21 +0200)]
Bump version for development.

5 years agoMake the VaapiSurfaceMemory allocator more reliable:sync with vdpau-1.0 port by Edward.
Sreerenj Balachandran [Fri, 28 Sep 2012 22:12:27 +0000 (01:12 +0300)]
Make the VaapiSurfaceMemory allocator more reliable:sync with vdpau-1.0 port by Edward.
... buffer_map will return the mapped memory of vasurface(not implemented yet)
... a fully accelerated pipleline ("vaapidecode ! vaaapisink") will use the VaapiSurfaceMeta
... many other fixes

5 years agoFix and document build dependencies better.
Gwenole Beauchesne [Fri, 28 Sep 2012 15:54:03 +0000 (17:54 +0200)]
Fix and document build dependencies better.

5 years agodebian: fix GStreamer build dependencies.
Gwenole Beauchesne [Fri, 28 Sep 2012 15:41:42 +0000 (17:41 +0200)]
debian: fix GStreamer build dependencies.

5 years agodebian: fix Wayland build dependencies.
Gwenole Beauchesne [Fri, 28 Sep 2012 15:39:43 +0000 (17:39 +0200)]
debian: fix Wayland build dependencies.

5 years agodebian: fix conditional build of packages.
Gwenole Beauchesne [Fri, 28 Sep 2012 15:38:17 +0000 (17:38 +0200)]
debian: fix conditional build of packages.

Make it still possible to build package even if one of the build dependencies
for a specific video backend is not available.

5 years agovaapidecoder_h264: handle the case of context reset
Sreerenj Balachandran [Thu, 27 Sep 2012 12:02:23 +0000 (15:02 +0300)]
vaapidecoder_h264: handle the case of context reset
,,,,need more fixes like merging ensure_context and reset_context

5 years agoutils: drop unused GLX helpers.
Gwenole Beauchesne [Thu, 27 Sep 2012 09:08:58 +0000 (11:08 +0200)]
utils: drop unused GLX helpers.

Remove helpers for GL_ARB_fragment_program and GL_ARB_multitexture
extensions since they are not used throughout gstreamer-vaapi.

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.

5 years agoconfigure: update VA-API version requirements.
Gwenole Beauchesne [Wed, 26 Sep 2012 14:33:16 +0000 (16:33 +0200)]
configure: update VA-API version requirements.

VA/DRM and VA/Wayland API are now promoted to VA-API 0.33.0 (libva 1.1.0).

5 years agoInitial Set of patches which allows the buffer pool allocation from decide_allocation.
Sreerenj Balachandran [Wed, 26 Sep 2012 14:01:43 +0000 (17:01 +0300)]
Initial Set of patches which allows the buffer pool allocation from decide_allocation.
,,, previously it was allocating during parsing. cleanups follows,,,

5 years agoRevert "vaapicontext: re-enable :- use the ref_pic count parsed from the stream to...
Sreerenj Balachandran [Wed, 26 Sep 2012 12:13:44 +0000 (15:13 +0300)]
Revert "vaapicontext: re-enable :- use the ref_pic count parsed from the stream to calculate the size of surfacepool"
,,,revering becaues still noticed some flickering with h264 decoder when using less surfaces in pool
This reverts commit e3721c0081c4a63938b94e290c5b5679e693d5d1.