Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:18:33 +0000 (19:18 +0200)]
patches/videoparsers: h264parser: more API fences and refresh
Add more API fences according with its version and refresh the patch.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:16:51 +0000 (19:16 +0200)]
patches/videoparsers: h264parser: fix description and refresh
Fix a typo in the patch description and refresh it in order to avoid the
creation of .orig files and break the distcheck target.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:15:18 +0000 (19:15 +0200)]
patches/videoparsers: h264parser: refresh patches
In order to avoid the creation of .orig files and break the distcheck target.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Tue, 15 Sep 2015 14:53:31 +0000 (16:53 +0200)]
build: link libgstvaapi_parse against codec parser
GST_CODEC_PARSER_* variables are defined if builtin codec parsers are disabled
when running configure.
Right now, libgstcodecparsers links only to libgstvaapi, but libgstvaapi_parse
need it if builtin codec parsers are disabled.
This patch adds GST_CODEC_PARSER_* variables to libgstvaapi_parse
compilation. If builtin codec parsers are enable, this variable is null, so it
should work using libgstvaapi, as normal.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Fri, 11 Sep 2015 14:35:30 +0000 (16:35 +0200)]
build: verify for H264 MVC and H265 SPS
Currently the H264 and H265 parsers look for MVC and SPS respectively, and
the required symbols for those were added in GStreamer 1.5
If we try to compile in GStreamer < 1.4, without enabling the builtin codec
parsers, the compilation fails, because the lack of those symbols.
This patch verifies if the installed H264 and H265 parsers have those symbols. If
they do not, the specific built in codec parsers are enabled and used.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Fri, 11 Sep 2015 14:49:16 +0000 (16:49 +0200)]
decoder: h264: initialize PPS's slice_group_id
When the GstVaapiParserInfoH264 is allocated, the memory is not initialized,
so it contains random data.
When gst_h264_parser_parse_pps() fails, the PPS structure keeps slice_group_id
pointer uninitialized, leading to a segmentation fault when the memory is
freed.
This patch prevents this by initializing the slice_group_id before the PPS
parsing.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Mark Nauwelaerts [Tue, 15 Sep 2015 08:01:29 +0000 (11:01 +0300)]
vaapidecode: proper numerator and denominator for forced latency framerate
https://bugzilla.gnome.org/show_bug.cgi?id=755040
Sreerenj Balachandran [Fri, 11 Sep 2015 17:51:42 +0000 (20:51 +0300)]
codecparsers: Update to gst-vaapi-branch commit f9e284b
dae1a84: h264parse/h265parse: Fix negotiation crash
45a9f8a: codecparsers: h265 : Fix default scaling list values
28eaaf5: codecparsers: h265: Fix the selection of Active Ref Pic Set
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Fri, 4 Sep 2015 19:19:55 +0000 (22:19 +0300)]
decoder: hevc: Don't flush dpb for EOS/EOB nal
Explicit flushing of dpb for EOS and EOB nal decoding is wrong,
the dpb_add() itself will handle the flusing(if needed) of dpb
for end of sequence and end of bitstream.
https://bugzilla.gnome.org/show_bug.cgi?id=754010
Sreerenj Balachandran [Fri, 4 Sep 2015 19:11:10 +0000 (22:11 +0300)]
decoder: hevc: Fix the dpb_add() based on C.5.2.3
Follow the spec as it is in C.5.2.3, add the decoded frame to dpb
just after the PicLatencyCnt setting of existing dpb frames.
https://bugzilla.gnome.org/show_bug.cgi?id=754010
Sreerenj Balachandran [Fri, 4 Sep 2015 19:02:55 +0000 (22:02 +0300)]
decoder: hevc: Fix the picture addition in dpb() based on spec H265 v3 (04/2015)
This fix is based on the V3 vesion of spec which was missing in older versions.
When the current picture has PicOutputFlag equal to 1, for each picture in the
DPB that is marked as "needed for output" and follows the current picture in output order,
the associated variable PicLatencyCount is set equal to PicLatencyCount + 1 (C.5.2.3).
https://bugzilla.gnome.org/show_bug.cgi?id=754010
Sreerenj Balachandran [Fri, 4 Sep 2015 19:00:36 +0000 (22:00 +0300)]
decoder: h265: Fix indentation
Jan Schmidt [Fri, 12 Jun 2015 15:39:31 +0000 (01:39 +1000)]
multiview: initial attempt at stereo/multiview support
Add support for marking caps and buffers for multiview or
stereoscopic output.
https://bugzilla.gnome.org/show_bug.cgi?id=750835
Víctor Manuel Jáquez Leal [Fri, 28 Aug 2015 15:12:12 +0000 (17:12 +0200)]
decoder: hevc: remove unused functions
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754250
Víctor Manuel Jáquez Leal [Mon, 31 Aug 2015 11:11:54 +0000 (13:11 +0200)]
vaapidecode: remove (another) unused variable
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Fri, 28 Aug 2015 15:10:40 +0000 (17:10 +0200)]
vaapidecode: remove unused variable
Thus silence the compilation warnings.
Víctor Manuel Jáquez Leal [Fri, 28 Aug 2015 14:06:08 +0000 (16:06 +0200)]
vaapidecode: compilation fix
gst_vaapi_decoder_state_changed() returns void. This patch fixes the
compilation where the toolchain uses restrictive flags as clang.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Fri, 28 Aug 2015 21:27:05 +0000 (00:27 +0300)]
vaapidecode: renegotiate if caps are not equal
The use of gst_caps_is_always_compatible() for this optimization may lead to
false positives. It is better to stick to gst_caps_is_strictly_equal() to know
if it is required a re-negotiation.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=750835
Sreerenj Balachandran [Fri, 28 Aug 2015 21:18:57 +0000 (00:18 +0300)]
vaapidecode: Rework the re-negotiation code to handle multi resoultion videos
Delaying the pool re-negotiation untill we push all decoded (and queued)
frames downstream. Otherwise for the multi-resolution videos, the
GstVideoVideoMemory will be having wrong resolution and which leads
to nasty behaviours, especially when using software renderers.
sample media file: RAP_B_Bossen_1.bin
case explained:
The first SPS Nal will report resoultion of 448x256 and having crop rectangles to
get the final resoultion 416x240.
Starting from 25 th frame, the resolution will change to 416x240. But parser
elements won't report this since the effective croped resolution is same in
both cases. Here the core libgstvaapi will detect this through it's internal
parsing and do all context/pool destory/reset stuffs. Also it will notify this
change to plugins in advance. But if the plugin try to do re-negotiaion of pool
immediately, this will not sync with the resolution of already decoded and queued
frames and which will lead to failure in gst_video_frame_map() in downstream(if we use the
software renderer). So we have to delay the pool renegotiation in vaapidecode,
untill we push all decoded frames downstream.
https://bugzilla.gnome.org/show_bug.cgi?id=753914
Sreerenj Balachandran [Fri, 28 Aug 2015 20:43:47 +0000 (23:43 +0300)]
vaapidecode: Always keep a copy of input codec state
Currently we are sharing the input GstVideoCodecState with
GstVaapiDecoder(gst-libs/gst/vaapi) by just doing ref and unref for
each caps change. This is troublesome in many cases, for eg: if
resoultion changes with in a singe stream. Because, when ever there
is a resolution change, GstVideoDecoder will first change the Codec_state->caps
fields with new resolution, but since we are using the same codecstate (ref)
in gstvaapidecode.c, the caps check for input caps change will always fail.
https://bugzilla.gnome.org/show_bug.cgi?id=753914
Sreerenj Balachandran [Wed, 26 Aug 2015 04:25:03 +0000 (07:25 +0300)]
decoder: hevc: Fix the scaling list scan order
The default scan order of scaling lists are up-right-diagonal
as per hevc specification. Use the newly implemented
uprightdiagonal_to_raster conversion codecparser APIs to
get the the scaling_list values in raster order, which is
what the VA intel driver requires.
Sreerenj Balachandran [Wed, 26 Aug 2015 04:20:09 +0000 (07:20 +0300)]
decoder: hevc: sync with the codecparser changes
The Tile Scanning Conversion process (spec 6-3 and 6-4) is implemented
in codecparsers now. Remove the duplication from gstvaapidecoder_h265
Sreerenj Balachandran [Wed, 26 Aug 2015 04:04:22 +0000 (07:04 +0300)]
patches/Videoparsers: update patch to fix build with older GStreamer 1.2 stacks
Sreerenj Balachandran [Wed, 26 Aug 2015 03:57:36 +0000 (06:57 +0300)]
codecparsers: Update to gst-vaapi-branch commit 69550f1
c207c6d: codecparsers: h265: Fix tile row and column parsing
47074c5: codecparsers: h265: Add APIs for up-right-diagonal/raster scan conversion
cd28b18: codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
1746bbe: videoparsers: Use gst_base_parse_merge_tags()
2f0932b: h264parse: Clear SPS info after processing
f57d6b0: videoparsers: enable accept-template flag
Víctor Manuel Jáquez Leal [Tue, 25 Aug 2015 15:38:42 +0000 (15:38 +0000)]
debian: add yasm as build dependency
As the compilation of libvpx (for vp8 parser) is enabled by default,
yasm is required by default too.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Lim Siew Hoon [Fri, 14 Aug 2015 11:21:04 +0000 (19:21 +0800)]
debian: remove --with-gstreamer-api option
It is no longer valid in gstreamer-vaapi.
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
[removed unused GST_API_VERSION variable]
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=753618
Víctor Manuel Jáquez Leal [Mon, 24 Aug 2015 17:22:14 +0000 (19:22 +0200)]
wayland: rename is_cancelled to sync_failed
Since commit
065a18a3, the semantics of the variable is_cancelled did not make
sense. This commit renames this variable to sync_failed.
Olivier Crete [Thu, 13 Aug 2015 19:12:44 +0000 (15:12 -0400)]
wayland: Don't return GST_FLOW_ERROR on flushing
Setting the sink to flushing causes gst_vaapi_window_wayland_sync() to
return FALSE which makes gst_vaapi_window_wayland_render() return
FALSE which ends up posting an ERROR message in
gst_vaapisink_show_frame_unlocked(). Solution is to just return TRUE
in the EBUSY case.
https://bugzilla.gnome.org/show_bug.cgi?id=753598
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2015 10:28:51 +0000 (12:28 +0200)]
Revert "Marking rank of vaapidecodebin as GST_RANK_MARGINAL for now."
This reverts commit
3ccb198b513dc6ad287fe44117d03bec4d6a966a.
Víctor Manuel Jáquez Leal [Mon, 6 Jul 2015 18:22:57 +0000 (20:22 +0200)]
vaapidecodebin: check for postproc instance
If the VPP's deinterlace-method is set, first we should check if the postproc
is already instanced to set it. Otherwise we just store it until the VPP is
added into the bin.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2015 16:48:13 +0000 (18:48 +0200)]
vaapidecodebin: ensure VPP before going to READY
There are sometimes that the VA-API display context is not shared among the
pipeline, but it is important to know it before going to READY state (when the
pipeline is already linked).
One instance of this case is this:
gst-launch-1.0 filesrc location=media ! decodebin ! vaapipostproc ! vaapisink
This patch adds a new function in gstvaapipluginutil called
gst_vaapi_create_test_display(). Its purpose is to create a disposable VA-API
display, which only will be used for verify if the VAEntrypointVideoProc is
available by the hardware. Afterwards, it should be unrefed.
If the vaapidecodebin is going to READY state, and the element still doesn't
know if VPP is available, the last resort is to create a new instance of the
VA-API display and test for it.
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2015 10:39:52 +0000 (12:39 +0200)]
vaapidecodebin: post an error message if fails
If the construction of the bin fails, post an error message in the bus.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2015 10:36:07 +0000 (12:36 +0200)]
vaapidecodebin: has_vpp as a tri-state variable
has_vpp can be UNKNOWN while the context message hasn't being received.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Víctor Manuel Jáquez Leal [Mon, 3 Aug 2015 14:33:02 +0000 (16:33 +0200)]
gstvaapivideomemory: native format with no derived image
If USE_NATIVE_FORMATS is defined we bail out before configuring the surface
info based on the derived image configuration.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Víctor Manuel Jáquez Leal [Thu, 23 Jul 2015 18:07:59 +0000 (20:07 +0200)]
surface pool config based on video info
First added the function gst_vaapi_video_format_get_best_native(), which
returns the best native format that matches a particular chroma type:
YUV 4:2:0 -> NV12, YUV 4:2:2 -> YUY2, YUV 4:0:0 -> Y800
RGB32 chroma and encoded format map to NV12 too.
That format is used to configure, initially, the surface's pool for the
allocator.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Víctor Manuel Jáquez Leal [Thu, 23 Jul 2015 14:03:43 +0000 (16:03 +0200)]
gstvaapivideomemory: refactor gst_vaapi_video_allocator_new()
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Victor Jaquez [Fri, 19 Jun 2015 13:51:07 +0000 (15:51 +0200)]
gstvaapiencoder: validate chroma according to the VA's RT format
Before, only YUV420 color space where supported. With this patch, the
encoder is queried to know the supported formats and admits YUV422
color space if its available.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Sreerenj Balachandran [Thu, 13 Aug 2015 02:07:52 +0000 (05:07 +0300)]
decoder: hevc: Add calculation of WpOffsetHalfRangeC
This is necessary for finding ChromaOffsetL0/ChromaOffsetL1
prediction weight table values with out using any hard coding.
Fixme: We don't have parser API for sps_range_extension, so
assumed zero value for high_precision_offsets_enabled_flag.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 13 Aug 2015 01:09:44 +0000 (04:09 +0300)]
decoder: hevc: Fix ChromaOffsetL0/ChromaOffsetL1 calculation
Based on ITU-T rec H265(4/2015): 7-56
This was a wrong equation in rec H265 (4/2013): 7-44...
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 13 Aug 2015 01:08:03 +0000 (04:08 +0300)]
decoder: hevc: Fix default value assignment of pred_weight_table
Sreerenj Balachandran [Thu, 13 Aug 2015 00:48:43 +0000 (03:48 +0300)]
decoder: hevc: Fix the value assigning for delta_chroma_log2_weight_denom
Assign only if ChromaArrayType != 0..
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 13 Aug 2015 00:06:32 +0000 (03:06 +0300)]
codecparsers: Update to gst-vaapi-branch commit 1c70432
8e98b41: codecparsers: h265: Fix the range of delta_chroma_log2_weight_denom
839c5bc: codecparsers: h265: Fix the parsing of ref_pic_lists_modification
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Tue, 11 Aug 2015 05:09:10 +0000 (08:09 +0300)]
codecparsers: Update to gst-vaapi-branch commit c18b8ad
8a03e67: videoparsers: h265: Avoid skipping of EOS and EOB nals
a033083: videoparsers: h265: Fix the frame start detection code
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Mon, 10 Aug 2015 02:50:50 +0000 (05:50 +0300)]
decoder: hevc: Add SEI parsing
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Fri, 7 Aug 2015 05:43:44 +0000 (08:43 +0300)]
decoder: hevc: Workaround to recognize wrongly encoded main profile streams
HACK: This is a work-around to identify some main profile streams having wrong profile_idc.
There are some wrongly encoded main profile streams(eg: ENTP_C_LG_3.bin) which doesn't
have any of the profile_idc values mentioned in Annex-A, instead general_profile_idc
has been set as zero and having general_profile_compatibility_flag[general_profile_idc]
is TRUE. Assuming them as MAIN profile for now.
https://bugzilla.gnome.org/show_bug.cgi?id=753226
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Fri, 7 Aug 2015 05:41:57 +0000 (08:41 +0300)]
patches/videoparsers: Fix the wrong source file path
This is something wrongly typed in commit 6d7b631
Sreerenj Balachandran [Fri, 7 Aug 2015 05:34:55 +0000 (08:34 +0300)]
codecparsers: Update to gst-vaapi-branch commit b8d8be4
ee7e81b: h264parse: Don't discard first AU delimiter
3690fb9: h264parse: Add more NAL types for debugging output
108d368: h265parse: Avoid checking for Non Mandatory VPS NAL
ace61048: h265parse: expose compatible profiles to downstream
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Víctor Manuel Jáquez Leal [Thu, 6 Aug 2015 11:07:53 +0000 (13:07 +0200)]
gstvaapivideocontext: remove unused parameter
gst_vaapi_video_context_prepare() received an unused parameter. This patch
removes it and the structure passed by the caller.
This a left over of "Removal of gstreamer-1.0 support" (commit
8b36e25f).
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sreerenj Balachandran [Thu, 6 Aug 2015 01:01:24 +0000 (04:01 +0300)]
decoder: hevc: Fix decoding of stream when it has temporal sublayers
We are calculating the dpb size based on max_dec_pic_buffering.
But if there are more than one temporal sublayers, we are supposed
to use the max_dec_pic_buffering[max_sub_layers_minus] for dpb
size calculation (Assuming HighestTid as max_sub_layers_minus).
Sample streams: TSCL_A_VIDYO_5.bin, TSCL_B_VIDYO_4.bin
https://bugzilla.gnome.org/show_bug.cgi?id=753226
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Víctor Manuel Jáquez Leal [Wed, 5 Aug 2015 12:11:12 +0000 (14:11 +0200)]
refactor vaapi caps strings for pad templates
Refactor the main vaapi caps strings into three macros:
GST_VAAPI_MAKE_SURFACE_CAPS, GST_VAAPI_MAKE_ENC_SURFACE_CAPS and
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS.
Those are in gstvaapipluginutil.h so all the elements could use them, instead
of re-declaring them every time.
No functional changes.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 5 Aug 2015 12:15:07 +0000 (14:15 +0200)]
gstvaapipostproc: fix code style
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sreerenj Balachandran [Wed, 5 Aug 2015 02:23:20 +0000 (05:23 +0300)]
decoder: hevc: Fix the decoding of dependent slice segment
Decoding process for reference picture list construction needs to be
invoked only for P and B slice and the value for slice_type of dependent slice
segment should be taken from the previous independent slice segment header
of the same pic.
https://bugzilla.gnome.org/show_bug.cgi?id=753226
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Victor Jaquez [Mon, 22 Jun 2015 15:38:41 +0000 (17:38 +0200)]
plugins: reduce the noise of warnings
Those messagse should be attached to the object, also the lack of
caps is not an error, in particular in the case of JPEG encoding.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Víctor Manuel Jáquez Leal [Tue, 23 Jun 2015 15:49:51 +0000 (17:49 +0200)]
gstvaapicontext: fix the JPEG encoder attribs value
When we query for the VAConfigAttribEncJPEG, we get a value which packs the
VAConfigAttribValEncJPEG structure, but we did not assign it. This patch
assigns the returned value to the attribute.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Victor Jaquez [Thu, 18 Jun 2015 15:37:46 +0000 (17:37 +0200)]
gstvaapiencoder: framerate 0/1 is valid too
Framerate 0/1 is valid, and it is particularly useful for picture
encoding, such as jpeg. This patch makes the encoder to admit that
framerate.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042
Víctor Manuel Jáquez Leal [Fri, 3 Jul 2015 07:35:16 +0000 (09:35 +0200)]
vaapipostroc: GLTextureUploadMeta in sink template
Advertise GLTextureUploadMeta in sink caps template.
https://bugzilla.gnome.org/show_bug.cgi?id=752130
Víctor Manuel Jáquez Leal [Thu, 23 Jul 2015 11:11:40 +0000 (13:11 +0200)]
remove gstvaapiuploader
Working on bug #744042 I realized that the gstvaapiuploader is practically not
used.
This patch removes the gstvaapiuploader and add the method
gst_vaapi_plugin_base_get_allowed_raw_caps () that returns the raw caps that
the system can handle, which is used by vaapisink and vaapipostproc.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=752777
Víctor Manuel Jáquez Leal [Mon, 27 Jul 2015 16:49:13 +0000 (18:49 +0200)]
vaapidecode: don't lost GLTextureUpload on seek
When seeking, the decoder is reset, but the buffer pool is not
re-negotiated, but in reset_full() the code forgets if the negotiated buffer
pool has the GLTextureUpload meta.
The decoder knows that GLTextureUpload meta was negotiated in
decide_allocation(), but this method is not called when seeking.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=752929
Víctor Manuel Jáquez Leal [Tue, 21 Jul 2015 16:45:56 +0000 (18:45 +0200)]
plugins: don't use gst_pad_get_allowed_caps()
gst_pad_get_allowed_caps() query the pad and the peer pad. In the case
decoders, that is OK, but in the case of the postproc might lead loops,
since the gst_base_transform_query_caps() forwards the query upstream
and forth.
Instead of gst_pad_get_allowed_caps() we only query the peer with
gst_pad_peer_query_caps() using the pad's template as filter.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=752558
Sreerenj Balachandran [Wed, 22 Jul 2015 09:40:19 +0000 (12:40 +0300)]
README: updates
Sreerenj Balachandran [Wed, 22 Jul 2015 06:45:26 +0000 (09:45 +0300)]
patches/videoparsers: h264parse: Disable 3D video support for GStremaer < 1.5
All API/ABI changes for S3D/MVC are added in 1.5, backporting
them to older verison is not recommended.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Wed, 22 Jul 2015 06:41:34 +0000 (09:41 +0300)]
patches/Videoparsers: update patch to fix build with older GStreamer 1.2 stacks
Sreerenj Balachandran [Wed, 22 Jul 2015 06:38:42 +0000 (09:38 +0300)]
decoder: jpeg: Align with new API/ABI changes in codecparser
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Wed, 22 Jul 2015 06:31:02 +0000 (09:31 +0300)]
codecparsers: Update to gst-vaapi-branch commit 800bdb2
ed13220: mpegvideometa: add meta transform function
18d5efd: codecparsers: jpeg: add some padding to ScanHdr struct
7a51722: codecparsers: jpeg: fix docs for table parsing functions
06b8ded: codecparsers: jpeg: fix validity checking of data parsed
387a39d: codecparsers: jpeg: fix up API
db9d6a9: codecparsers: jpeg: tweak API a little
bb6951e: codecparsers: jpeg: hide gst_jpeg_scan_for_marker_code()
f33c30c: codecparsers: jpeg: fix and optimize scan for next marker code
4658c30: codecparsers: jpeg: fix calculation of segment size
759bcb9: codecparsers: jpeg: fix default Huffman tables generation
b4811ee: codecparsers: jpeg: add JPEG bitstream parser
9422464: h264parse: fix typo in log message
9e793a0: h264parse: Move PAR calcs, and use them for stereoscopic half-aspect
77704ce: nalutils: trivial patch to check if
8bb9249: codecparsers: mpeg4: actually return full number of bits of resync marker
7862f95: Revert "codecparsers: remove ignored increment of return"
54017b1: h264parse: Add support for passing stereoscopic/multiview info
8667ee4: h264parse: Don't switch to passthrough on set_caps()
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Gwenole Beauchesne [Mon, 29 Jun 2015 12:27:56 +0000 (14:27 +0200)]
decoder: h264: track previous reference frames.
Improve closure of gaps in frame_num by strictly following and trying
to fill them with previous reference frames. So, they are now tracked
thus avoiding insertion of dummy ("greenish") frames.
Gwenole Beauchesne [Mon, 29 Jun 2015 11:16:09 +0000 (13:16 +0200)]
decoder: h264: fix integration of second field into the DPB.
If the new picture to be added to the DPB is not a first field, then
it shall be the second field of the previous picture that was added
before.
This removes the need for dpb_find_picture() now that we track the
immediately preceding decoded picture, in decode order.
Gwenole Beauchesne [Mon, 6 Jul 2015 12:38:26 +0000 (14:38 +0200)]
decoder: h264: fix closure of "other-field" gap.
When a dummy "other-field" is inserted, it is assumed to inherit the
reference flags from the first field, and the sliding window decoded
reference picture marking process is also executed so that corrupted
frames are moved out as early as possible.
While doing so, we also try to output frames that now contain a single
valid field picture, prior to inserting any other picture into the DPB.
Note: this may be superfluous currently based on the fact that dpb_add()
combines the two most recent pairable fields, but this process would be
further simplified later on.
Gwenole Beauchesne [Wed, 24 Jun 2015 11:58:17 +0000 (13:58 +0200)]
decoder: h264: track corrupted frames.
Mark the picture as "corrupted" if it is reconstructed from corrupted
references or if those references are fake, e.g. resulting from lost
frames.
This is useful for notifying the upper layer, or downstream elements,
that the decoded frame may contain artefacts.
https://bugzilla.gnome.org/show_bug.cgi?id=703921
Gwenole Beauchesne [Wed, 24 Jun 2015 11:48:46 +0000 (13:48 +0200)]
decoder: add initial infrastructure for marking corrupted output.
Add initial infrastructure in core codec library and vaapidecode to mark
corrupted frames as such. A corrupted frame is such a frame that was
reconstructed from invalid references for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=751434
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Sreerenj Balachandran [Wed, 15 Jul 2015 15:18:49 +0000 (18:18 +0300)]
Bump version for development
Sreerenj Balachandran [Wed, 15 Jul 2015 12:49:38 +0000 (15:49 +0300)]
0.6.0
Sreerenj Balachandran [Wed, 15 Jul 2015 12:49:19 +0000 (15:49 +0300)]
NEWS: updates
Víctor Manuel Jáquez Leal [Tue, 14 Jul 2015 17:39:20 +0000 (19:39 +0200)]
vaapidecoder: no wmv profiles gstreamer 1.4/1.2
This patch fix the auto-plugging problem in gstreamer 1.2 and gstreamer 1.4
Right now there is not a primary ranked parser for vc1 and the demuxers
delivers caps without specifying the profile. This situation is not an issue
for avdec_vc1 but for vaapidecode it is, which refuses to negotiate without a
explicit profile defined in the negotiated caps.
Nonetheless, in gstreamer 1.5 it seems not to be a problem since the
negotiation admits caps subsets try outs.
This patch solves the issue ignoring the profile negotiation in the caps. For
gstreamer < 1.5 the profile string is not handled, so the auto-plugging get
done without the vc1 parser, such as happens in gstreamer 1.5.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sreerenj Balachandran [Tue, 7 Jul 2015 17:57:20 +0000 (20:57 +0300)]
Marking rank of vaapidecodebin as GST_RANK_MARGINAL for now.
Unfortunately vaapidecodebin element is not seems to be stable
enough for autoplugging ahead of vaapidecode.
Lowering the rank for now (cosidering the immediate 0.6 release).
See this: https://bugzilla.gnome.org/show_bug.cgi?id=749554
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Tue, 7 Jul 2015 10:32:18 +0000 (13:32 +0300)]
build: Add missing CFLAGS to Makefile.am
Sreerenj Balachandran [Fri, 3 Jul 2015 12:07:02 +0000 (15:07 +0300)]
gstvaapifilter: Only register STE property if it supported by corresponding VA library
Fix the regression introduced in commit eb465fb.
VAProcFilterSkinToneEnhancement is avaialbe from VA >= 0.36.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Víctor Manuel Jáquez Leal [Thu, 2 Jul 2015 15:49:25 +0000 (17:49 +0200)]
vaapipostproc: no format convert on GL tex upload meta
When GL texture upload meta is negotiated, vaapipostproc shall not modify the
color format of the buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=748184
Sreerenj Balachandran [Fri, 3 Jul 2015 09:42:09 +0000 (12:42 +0300)]
gstvaapifilter: Add guard for VAProcFilterSkinToneEnhancement
VAProcFilterSkinToneEnhancement is avaialbe from VA >= 0.36.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 2 Jul 2015 18:57:38 +0000 (21:57 +0300)]
encoder:h265: Fix the check for packed-header support
Use VA_ENC_PACKED_HEADER_* definition for checking.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 2 Jul 2015 18:37:56 +0000 (21:37 +0300)]
encoder:h264: Fix the check for packed-header support
Use VA_ENC_PACKED_HEADER_* definition for checking.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Thu, 2 Jul 2015 18:00:14 +0000 (21:00 +0300)]
encoder: h264: submit SEI buffering_period() and picture_timing() messages for CBR mode
One buffering_period() SEI message shall be present in every IDR access unit
when NalHrdBpPresentFlag is inferred to be equal to 1. This is the case when we
use a non-CQP mode, e.g. CBR. In other words, when
nal_hrd_parameters_present_flag is set to 1.
One picture_timing() SEI messages shall be present in every access unit
if CpbDpbDelaysPresentFlag is equal to 1 or pic_struct_present_flag is equal to 1
https://bugzilla.gnome.org/show_bug.cgi?id=722734
https://bugzilla.gnome.org/show_bug.cgi?id=751831
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Víctor Manuel Jáquez Leal [Wed, 1 Jul 2015 12:16:50 +0000 (14:16 +0200)]
vaapidecodebin: notify if vpp is disabled
When the system is aware that VPP is not available by the VA driver,
it would be useful to notify to the user that the disable-vpp property
has changed.
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Víctor Manuel Jáquez Leal [Wed, 1 Jul 2015 12:17:17 +0000 (14:17 +0200)]
vaapidecodebin: enable vpp if it is available
Instead of creating and adding VPP into the bin at setup, we wait until
we are sure the VA driver supports it. We know that when the VA video
context is received by the bin. Afterwards, it is decided to instanciate
and link the VPP or not.
This is more efficient and safer than waiting the VPP to fail and then
disable it.
https://bugzilla.gnome.org/show_bug.cgi?id=749554
Sreerenj Balachandran [Thu, 2 Jul 2015 09:29:32 +0000 (12:29 +0300)]
tests: Fix compilation while enabling egl as the only renderer in build
Include missing header files gstvaapidisplay_egl.h and gstvaapiwindow_egl.h.
Sreerenj Balachandran [Thu, 2 Jul 2015 07:45:50 +0000 (10:45 +0300)]
configure: fix the build while enabling egl as the only renderer
Sreerenj Balachandran [Thu, 2 Jul 2015 07:25:25 +0000 (10:25 +0300)]
libs: Bump library major version
Sreerenj Balachandran [Tue, 30 Jun 2015 06:44:18 +0000 (09:44 +0300)]
gst/vaapi: Switch to upstreram like indentation.
gst-indent for all gst/vaapi/*.c source files
Sreerenj Balachandran [Tue, 30 Jun 2015 06:35:37 +0000 (09:35 +0300)]
vaapidecodebin: Add property to disable VPP
Adding a new propery "disable-vpp", enabling it will prevent
the insertion of vaapipostproc child element.
This is helpful in debugging, specifically to narrow-down the
vaapidecodebin/vaapipostproc related negotiation issues.
No support for run-time disabling for now.
https://bugzilla.gnome.org/show_bug.cgi?id=745901
Sreerenj Balachandran [Mon, 29 Jun 2015 10:35:59 +0000 (13:35 +0300)]
vaapipostproc: Fix wrong selection of passthrough mode.
The Current code path is falling back to passthorugh mode if there is no
vpp property set by the user explictily. But we should not use the
passthrough mode if the negotiated src pad caps have a differnt color space
format than sink pad caps (Even though the user didn't set the format property
explicitly).
https://bugzilla.gnome.org/show_bug.cgi?id=748184
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Mon, 29 Jun 2015 10:20:28 +0000 (13:20 +0300)]
vaapipostproc: prevent advanced-deinterlacing of non-native video formats.
This is a workaround to deal with the va-intel-driver for non-native
formats while doing advanced deinterlacing. The format of reference surfaces must
be same as the format used by the driver internally for motion adaptive
deinterlacing and motion compensated deinterlacing.
A permanent solution could be to do the color space conversion internally
for reference surfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=730925
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Simon Farnsworth [Mon, 29 Jun 2015 10:06:30 +0000 (13:06 +0300)]
Work around ABBA deadlock between vaapisink and vaapipostproc
vaapisink takes the display lock, then does a gst_buffer_replace which can
take the lock on the gst_vaapi_video_pool.
vaapipostproc asks the gst_vaapi_video_pool for a new surface. This takes
the lock on the gst_vaapi_video_pool; if you're unlucky, there are no free
surfaces, which means that gst_vaapi_surface_create is
called. gst_vaapi_surface_create takes the display lock.
If vaapisink and vaapipostproc are in different threads, and this happens,
you get a deadlock. vaapisink holds the display lock, and wants the
gst_vaapi_video_pool lock. vaapipostproc holds the gst_vaapi_video_pool lock
and wants the display lock.
Work around this by releasing the display lock in vaapisink around the
gst_buffer_replace.
https://bugzilla.gnome.org/show_bug.cgi?id=738249
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Jacobo Aragunde Pérez [Wed, 29 Apr 2015 14:34:07 +0000 (16:34 +0200)]
vaapidecodebin: expose deinterlace-method property from inner vaapipostproc
https://bugzilla.gnome.org/show_bug.cgi?id=745901
Víctor Manuel Jáquez Leal [Tue, 19 May 2015 09:24:10 +0000 (11:24 +0200)]
vaapipostproc: log negotiated caps
Víctor Manuel Jáquez Leal [Mon, 18 May 2015 12:30:22 +0000 (14:30 +0200)]
vaapipostproc: remove useless debug message
Víctor Manuel Jáquez Leal [Thu, 12 Feb 2015 11:31:57 +0000 (12:31 +0100)]
vaapidecode: log negotiated src/sink caps
Víctor Manuel Jáquez Leal [Thu, 7 May 2015 13:57:26 +0000 (15:57 +0200)]
vaapisink: error handling if rendering fails
This patch enhance the code path when an error is found when rendering a
buffer.
If the video meta doesn't contain a surface proxy or a surface, a warning
message is printed.
If the rendering backend fails, a error message is posted in the bus.
https://bugzilla.gnome.org/show_bug.cgi?id=749382
Sreerenj Balachandran [Thu, 18 Jun 2015 11:55:12 +0000 (14:55 +0300)]
vaapisink: Fix the conditional pad template creation.
Sreerenj Balachandran [Thu, 18 Jun 2015 10:19:26 +0000 (13:19 +0300)]
build: Don't build simple-encoder test program if there is no VA Encoding support
This will fix the build error against older VA-APIs <= 0.32
Sreerenj Balachandran [Thu, 18 Jun 2015 09:20:37 +0000 (12:20 +0300)]
Fix build error for older VA-API versions
Provide guards for VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM and
VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME which are only availble from
VA >= 0.36.
Sreerenj Balachandran [Wed, 17 Jun 2015 11:20:37 +0000 (14:20 +0300)]
vaapisink: Fix the capsfeature advertisement in padtemplate
This fixes the regression introduced in 64acc74.
If a pad supports multiple set of capsfeatures, it needs to add
multiple equal structures with different feature sets to the caps.
Because caps structures with the same name but with a non-equal
set of caps features are not compatible.
Without this patch, playbin will autoplug xvimagesink instead of vaapisink.
https://bugzilla.gnome.org/show_bug.cgi?id=750095