summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-05legal: add Intel copyright on modified files.Gwenole Beauchesne22-0/+22
2013-01-28wayland: use a local event queue to avoid lock contention.Gwenole Beauchesne1-6/+20
2013-01-28wayland: fix thread-safe issues.Gwenole Beauchesne1-1/+9
The Wayland API is not fully thread-safe and client applications shall perform locking themselves on key functions. Besides, make sure to release the lock if the _render() function fails.
2013-01-28wayland: really wait until the pending redraw completed.Gwenole Beauchesne1-4/+24
Introduce gst_vaapi_window_wayland_sync() helper function to wait for the completion of the redraw request. Use it in _render() function to actually block until the previous draw request is completed.
2013-01-28wayland: fix frame_redraw callback.Gwenole Beauchesne1-5/+4
The redraw callback needs to be attached to the surface prior to the commit. Otherwise, the callback notifies the next surface repaint, which is not the desired behaviour. i.e. we want to be notified for the surface we have just filled. Another isse was the redraw_pending was reset before the actual completion of the frame redraw callback function, thus causing concurrency issues. e.g. the callback could have been called again, but with a NULL buffer.
2013-01-28wayland: fix display sharing.Gwenole Beauchesne1-6/+13
When the Wayland display is shared, we still have to create our own local shell and compositor objects, since they are not propagated from the cache. Likewise, we also need to determine the display size or vaapisink would fail to account for the display aspect ratio, and will try to create a 0x0 window.
2013-01-25h264: reset got_{sps,pps} when corrupted SPS/PPS headers are parsed.Zhao Halley1-2/+6
Reset got_{sps,pps} when corrupted SPS/PPS headers are parsed. This means that no frame will be decoded until valid SPS/PPS headers are parsed again. This also prevents from parsing slice headers with invalid data, and avoids potential crashes. https://bugs.freedesktop.org/show_bug.cgi?id=57902
2013-01-25vc1: handle CLOSED_ENTRY.Gwenole Beauchesne1-1/+5
When CLOSED_ENTRY == 0, and if the B pictures that follow an entry-point lack a reference anchor picture, these B pictures shall be discarded. https://bugs.freedesktop.org/show_bug.cgi?id=59505
2013-01-25vc1: fix decoding of WMV3 videos in AVI format.Wind Yuan1-0/+7
The AVI demuxer (avidemux) does not set a proper "format" attribute to the generated caps. So, try to recover the video codec format from the "wmvversion" property instead. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-01-25vc1: review and report errors accordingly.Gwenole Beauchesne1-12/+12
Use GST_ERROR() to report real errors instead of hiding them into GST_DEBUG().
2013-01-25vc1: cope with latest codecparser changes.Gwenole Beauchesne1-6/+7
Fix build with newer VC-1 codecparser where dqsbedge was renamed to dqbedge, and now represents either DQSBEDGE or DQDBEDGE depending on the actual value of DQPROFILE.
2013-01-25codecparsers: update to gst-vaapi-branch commit 35053b8.Gwenole Beauchesne1-0/+0
aeb898b vc1: fix bitplanes decoding (DIFF6 or NORM6 residual bytes) 63e3344 vc1: fix bitplanes decoding (DIFF6 or NORM6) b0a9372 vc1: add API to parse slice headers 773f3d1 vc1: fix bitplanes decoding 870e083 vc1: simplify GstVC1VopDquant structure bc0d65e vc1: fix VOPDQUANT parser for DQUANT == 2 dcd3abd vc1: fix calculation of ALTPQUANT 73ca0b7 vc1: fix parser for DQPROFILE in VOPDQUANT 8840c2d h264: zero-initialize SPS VUI parameters
2013-01-14codecparsers: update to gst-vaapi-rebased commit b47983a.Gwenole Beauchesne1-0/+0
b47983a h264: add inferred value for slice_beta_offset_div2
2012-12-18Bump version for development.Gwenole Beauchesne1-2/+2
2012-12-180.4.2.Gwenole Beauchesne2-3/+3
2012-12-17NEWS: updates.Gwenole Beauchesne1-1/+9
2012-12-17image: fix GstVaapiImage map and unmap.Gwenole Beauchesne1-8/+7
Fix gst_vaapi_image_map() to return TRUE and the GstVaapiImageRaw structure correctly filled in if the image was already mapped. Likewise, make gst_vaapi_image_unmap() return TRUE if the image was already unmapped.
2012-12-17mpeg4: fix decoding at end-of-stream.Wind Yuan1-14/+34
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-12-17mpeg4: fix size argument to gst_adapter_flush().Wind Yuan1-4/+4
Flush only consumed_size bytes from the GstAdapter. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-12-17tests: add test for MPEG-4:2 decoding.Gwenole Beauchesne4-1/+1715
2012-12-17h264: initialize VA context before allocating the first slice.Gwenole Beauchesne1-5/+29
Fix decode_slice() to ensure a VA context exists prior to creating a new GstVaapiSliceH264, which invokes vaCreateBuffer() with some VA context ID. i.e. the latter was not initialized, thus causing failures on Cedar Trail for example.
2012-12-17configure: install plugin elements in GST_PLUGIN_PATH, if set.Zhao Halley1-4/+8
If GST_PLUGIN_PATH environment variable exists and points to a valid directory, then use it as the system installation path for gst-vaapi plugin elements. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-12-17libs: only export gst_vaapi_*() symbols.Gwenole Beauchesne1-0/+1
This fixes symbol clashes between the gst-vaapi built-in codecparsers/ library and the system-provided one, mainly used by videoparses/. Now, only symbols with the gst_vaapi_* prefix will be exported, if they are not marked as "hidden" to libgstvaapi.
2012-12-17libs: fix compatibility with glib 2.28.Gwenole Beauchesne2-29/+70
Always prefer non deprecated APIs by default and provide compatibility glue for older glib versions when necessary.
2012-12-17libs: use glib >= 2.32 semantics for mutexes.Gwenole Beauchesne4-23/+20
Use glib >= 2.32 semantics for GMutex and GRecMutex wrt. initialization and termination. Basically, the new mutex objects can be used as static mutex objects from the deprecated APIs, e.g. GStaticMutex and GStaticRecMutex.
2012-12-17vaapidecode: adopt non-deprecrated glib locking primitive pattern.Rob Bradford2-32/+16
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.
2012-12-17videobuffer: fix memory leak for surface and image.Wind Yuan1-4/+2
Fix reference leak of surface and image in GstVaapiVideoBuffer wrapper, thus resulting on actual memory leak of GstVaapiImage when using them for downloads/uploads from VA surfaces and more specifically surfaces when the pipeline is shutdown. i.e. vaTerminate() was never called because the resources were not unreferenced, and thus not deallocated in the end. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-11-27Bump version for development.Gwenole Beauchesne1-2/+2
2012-11-27Mark release.Gwenole Beauchesne1-1/+1
2012-11-270.4.1.Gwenole Beauchesne1-2/+2
2012-11-19NEWS: updates.Gwenole Beauchesne1-2/+13
2012-11-19wayland: port to 1.0 version of the protocol.Rob Bradford4-25/+23
This patch updates to relect the 1.0 version of the protocol. The main changes are the switch to wl_registry for global object notifications and the way that the event queue and file descriptor is processed. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-11-19h264: fix picture size in macroblocks.Gwenole Beauchesne1-12/+15
The picture size signalled by sps->{width,height} is the actual size with cropping applied, not the original size derived from pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1. VA driver expects that original size, uncropped. There is another issue pending: frame cropping information needs to be taken care of.
2012-11-16h264: start decoding slices after first SPS/PPS activation.Gwenole Beauchesne1-0/+7
Only start decoding slices when at least one SPS and PPS got activated. This fixes cases when a source represents a substream of another stream and no SPS and PPS was inserted before the first slice of the generated substream.
2012-11-16h264: fix VAPictureParameterBufferH264.ReferenceFrames[] construction.Gwenole Beauchesne1-9/+16
... for interlaced streams. The short_ref[] and long_ref[] arrays may contain up to 32 fields but VA ReferenceFrames[] array expects up to 16 reference frames, thus including both fields.
2012-11-16h264: fix interlaced stream decoding with MMCO.Gwenole Beauchesne1-12/+20
Fix decoding of interlaced streams when adaptive_ref_pic_marking_mode_flag is equal to 1, i.e. when memory management control operations are used. In particular, when field_pic_flag is set to 0, the new reference flags shall be applied to both fields.
2012-11-16h264: add initial support for interlaced streams.Gwenole Beauchesne1-23/+232
Decoded frames are only output when they are complete, i.e. when both fields are decoded. This also means that the "interlaced" caps is not propagated to vaapipostproc or vaapisink elements. Another limitation is that interlaced bitstreams with MMCO are unlikely to work.
2012-11-16h264: split remove_reference_at() into finer units.Gwenole Beauchesne1-48/+80
Split remove_reference_at() into a function that actually removes the specified entry from the short-term or long-term reference picture array, and a function that sets reference flags to the desired value, possibly zero. The latters marks the picture as "unused for reference".
2012-11-16decoder: fix gst_vaapi_picture_new_field() object type.Gwenole Beauchesne1-1/+3
Fix gst_vaapi_picture_new_field() to preserve the original picture type. e.g. gst_vaapi_picture_new_field() with a GstVaapiPictureH264 argument shall generate a GstVaapiPictureH264 object.
2012-11-16h264: add picture structure for reference picture marking process.Gwenole Beauchesne1-13/+16
Introduce new `structure' field to the H.264 specific picture structure so that to simplify the reference picture marking process. That local picture structure is derived from the original picture structure, as defined by the syntax elements field_pic_flag and bottom_field_flag.
2012-11-16h264: introduce new frame store structure.Gwenole Beauchesne1-45/+215
The frame store represents a Decoded Picture Buffer entry, which can hold up to two fields. So far, the frame store is only used to hold full frames.
2012-11-16h264: minor clean-ups.Gwenole Beauchesne1-13/+5
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.
2012-11-16h264: simplify reference picture marking process.Gwenole Beauchesne1-58/+55
... 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.
2012-11-16h264: introduce per-field POC in GstVaapiPictureH264.Gwenole Beauchesne1-38/+29
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.
2012-11-16h264: introduce GST_VAAPI_PICTURE_{SHORT,LONG}_TERM_REFERENCE flags.Gwenole Beauchesne1-44/+56
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.
2012-11-16h264: introduce GST_VAAPI_PICTURE_FLAG_IDR flag.Gwenole Beauchesne1-13/+23
2012-11-16h264: fill in GstVaapiPicture structure.Gwenole Beauchesne1-57/+60
... and get rid of local VAPictureH264.flags fields in GstVaapiPictureH264.
2012-11-16h264: add vaapi_fill_picture() helper.Gwenole Beauchesne1-7/+44
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.
2012-11-16h264: fix activation order of picture and sequence parameters.Gwenole Beauchesne1-128/+160
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.
2012-11-16h264: fix detection of picture boundaries.Gwenole Beauchesne1-12/+92
Strictly follow the standard (7.4.1.2.4) to detect the first VCL NAL unit of a primary coded picture.