Víctor Manuel Jáquez Leal [Wed, 11 Nov 2015 15:33:24 +0000 (16:33 +0100)]
vaapidecodebin: delay the bin configuration
Delay the bin configuration until changing to READY state. This is because we
should add the vaapipostproc element until the vaapidecode has emitted the
HAVE_CONTEXT message, so de gst_bin_add() could set the context set to
vaapipostproc.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
Sreerenj Balachandran [Fri, 13 Nov 2015 17:39:56 +0000 (19:39 +0200)]
decoder: vp9: Add crop rectangle support.
Set crop rectange if:
There is display_width and display_height which is different from actual width/height
or
The changed resolution is less than the actual configured dimension of surfaces
Sreerenj Balachandran [Fri, 13 Nov 2015 17:23:05 +0000 (19:23 +0200)]
decoder: vp9: Fix the context and surface pool reset for multi resolution video
Unlike other decoders, vp9 decoder doesn't need to reset the
whole context and surfaces for each resolution change. Context
reset only needed if resolution of any frame is greater than
what actullay configured. There are streams where a bigger
resolution set in ivf header or webm header but actual resolution
of all frames are less. Also it is possible to have inter-prediction
between these multi resolution frames.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:58:33 +0000 (18:58 +0200)]
decoder: vp9: Fill the VADecPictureParameterBufferVP9 width/height from frame header
Always fill width/height of VADecPictureParameterBufferVP9 from frame header.
Preliminary fix for supproting multi resolution video decode.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:51:27 +0000 (18:51 +0200)]
vaapidecode: Add comments for corner case fixes and fix couple of indentations.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:41:53 +0000 (18:41 +0200)]
decoder: vp9: Set lossless flag from frame header
Sreerenj Balachandran [Fri, 13 Nov 2015 16:40:52 +0000 (18:40 +0200)]
codecparsers: Update to gst-vaapi-branch d9f25
d9f2527: codecparsers: vp9: Set lossless flag in frame header
Víctor Manuel Jáquez Leal [Wed, 11 Nov 2015 18:16:16 +0000 (19:16 +0100)]
libs: vp9: remove unused symbols
clang complains about a couple variables and one label which were not
used. This patch removes them.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757958
Sreerenj Balachandran [Tue, 10 Nov 2015 17:00:22 +0000 (19:00 +0200)]
codecparsers: Update to gst-vaapi-branch da251bb
da251bb: codecparsers: vp9: Optimize the memory allocation
f5759f4: codecparsers: vp9: Fix the wrong memcpy of probability arrays
Víctor Manuel Jáquez Leal [Thu, 5 Nov 2015 11:58:52 +0000 (12:58 +0100)]
plugin: guard pointers to pad query functions
Since gstreamer 1.4 is not required to have pad query functions if the query
vmethods are used.
This patch guards out the pad query functions for gstreamer < 1.4
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757629
Víctor Manuel Jáquez Leal [Thu, 5 Nov 2015 11:39:55 +0000 (12:39 +0100)]
vaapiencode: use pad query vmethods
GstVideoEncoder, the base class of vaapiencode, added support for pad queries
as virtual methods since gstreamer 1.4. This patch enables those vmethods,
while keeps support for previous versions of gstreamer.
This patch is relevant since GstVideoEncoder takes care of other queries that
we are currently ignoring.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757629
Víctor Manuel Jáquez Leal [Wed, 28 Oct 2015 12:01:04 +0000 (13:01 +0100)]
vaapidecode: return pad's template caps if no display
A caps query can occur before the element has a display. In that case, the
element can return its pad's template. But when the element already has a
display, and the caps probe fails, the element shall return an empty caps, so
the auto-plug could try with another decoder.
If the element has a display and the caps probe works, then the computed caps
should be returned.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 28 Oct 2015 11:59:02 +0000 (12:59 +0100)]
plugins: don't create display at caps query
Caps query can happen before the element has a bus. The display creation should
be should occur on the context negotiation, when the bus is already configured.
Then at caps query no display should be created.
Instead of force the display creation, we graciously fail the allowed_caps()
creation.
This change only applies for vaapidecode and vaapisink. The vaapipostroc, as a
basetransform descendant, seems to be not affected by this, nor the encoders.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 20:38:42 +0000 (21:38 +0100)]
plugins: fix context query handling
The current context query handling design is flawed: the function
gst_vaapi_reply_to_query() returns FALSE either if the query is not a
GST_CONTEXT_QUERY of if the query could not be handled correctly. But the
pad query function should handle differently each case.
This patch changes the gst_vaapi_reply_to_query() for
gst_vaapi_handle_context_query() and changes it usage in all the vaapi plugins
to match the correct context query handling.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 19:37:05 +0000 (20:37 +0100)]
plugin: don't lose previous context at query
When processing the GST_CONTEXT_QUERY we should not lose the previous
context in the query, we should only add our display structure.
This patch copies the old context, if it is there, and stamp our display on
it. Otherwise, a new context is created.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 19:29:03 +0000 (20:29 +0100)]
vaapivideocontext: add gst_vaapi_video_context_set_display()
This function set the display to an already created context. This function is
going to be used later.
Also, gst_vaapi_video_context_new_with_display() now uses this function.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 11:27:16 +0000 (12:27 +0100)]
plugins: check if display is set in sync
Since the context messages are sync'ed, the display assignation happens in the
same thread, hence we can know if the display was found or not as soon we call
for it.
In order to take advantage of it, gst_vaapi_video_context_prepare() receives,
as a new parameter, the address of the plugin's display, and reports back if
the display was found and set.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 11:33:48 +0000 (12:33 +0100)]
plugins: set display through context
Instead of setting the display to the plugin directly after its creation, do
it through the gstreamer's context mechanism, avoiding double assignations.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 17:20:07 +0000 (18:20 +0100)]
vaapivideocontext: rename context structure
The context structure is named "display" which is too generic. The contrary
happens, for example, with GstGL, what uses the same name as the context, and
its logs make more sense.
This patch renames the context structure with the same name as the
context, thus GST_PTR_FORMAT can pretty print it.
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 18:02:34 +0000 (19:02 +0100)]
vaapivideocontext: refactor gst_vaapi_video_context_prepare()
First, refactorized run_context_query() into _gst_context_run_query(), adding
a new parameter: the pad direction, in order to simplify the code.
Second, added a new helper function: _gst_context_query(), which is a generic
context query function. It isolates the operation of running the query and
sets the context if found, also it enhances the logs.
_gst_context_query() is similar to the one used in GstGL. Perhaps, in the
future this helper function will be merged into the core libraries of
GStreamer.
Finally, gst_vaapi_video_context_prepare() was rewritten to use
_gst_context_query().
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 10:18:47 +0000 (11:18 +0100)]
vaapivideocontext: refactor context category debug
Refactor the extraction GST_CAT_CONTEXT logging using a only once
initializator, so we could get the debug category from different code
paths, safely.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 23 Oct 2015 09:17:01 +0000 (11:17 +0200)]
gstvaapivideocontext: fix indentation
gst-indent does not handle correctly some expression like function
declaration with attributes, breaking the following expressions.
This patch makes gst-indent to ignore the attributed function
declartion so the followed function definition is not mangled, such
as happened in commit b4154a
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 15:48:27 +0000 (16:48 +0100)]
plugin: chain up set_context() vmethod
Since Gstreamer 1.7, set_context() vmethod needs to be chained up with
the parent class in order to broadcast all its contexts when the element
is added into a bin:
http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=
d5ded1588920c4471eefe055d09095d9e5e989b5
There is no need to guard the call, because before GStreamer 1.7, the
set_context() vmethod was NULL in the element class, hence the conditional
call make it safe.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 6 Nov 2015 09:20:34 +0000 (10:20 +0100)]
tests: simple-encoder: remove dead code
The caps creation for codec state configuration is not used. Let's remove it.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 18:05:07 +0000 (19:05 +0100)]
vaapidecodebin: fix a leaked display instance
The display returned by gst_vaapi_video_context_get_display() increments the
references. Thus, we have to unref the returned display.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757595
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 15:50:44 +0000 (16:50 +0100)]
libs: remove unneeded headers
Since gstvaapidisplay_glx.h do not expose gl.h/glx.h structures, it is not
required to include them in the header. It is not also required to include
them in gstvaapidisplay_glx.c, since gstvaapiutils_glx.h includes them and
exposes their structures (e.g. GLXPixmap).
Nonetheless, glext.h neither glxext.h are required to include, they are
already included conditionally by gl.h and glx.h, respectively.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757577
Sreerenj Balachandran [Fri, 6 Nov 2015 17:18:54 +0000 (19:18 +0200)]
codecparsers: Update to gst-vaapi-branch 0ea6792
0ea6792: codecparsers: vp9: Add header comments
347ffc7: codecparsers: vp9: Use g_slice_free() for releasing memory allocated from the slice allocator
Sreerenj Balachandran [Fri, 6 Nov 2015 13:19:38 +0000 (15:19 +0200)]
VP9: plugins: Add VP9 decoder
Sreerenj Balachandran [Fri, 6 Nov 2015 13:12:51 +0000 (15:12 +0200)]
VP9: libgstvaapi: Add VP9 decoder
Sreerenj Balachandran [Fri, 6 Nov 2015 12:57:00 +0000 (14:57 +0200)]
VP9: gstvaapiprofile: Add profile definitions
Sreerenj Balachandran [Fri, 6 Nov 2015 12:39:22 +0000 (14:39 +0200)]
VP9: build: Check availability of vp9 decoder APIs
Sreerenj Balachandran [Fri, 6 Nov 2015 12:24:08 +0000 (14:24 +0200)]
VP9: Allow building vp9 codecparser internally
Sreerenj Balachandran [Fri, 6 Nov 2015 10:38:46 +0000 (12:38 +0200)]
codecparsers: Update to gst-vaapi-branch commit ac5dc1a
ac5dc1a: codecparsers: vp9: Add vp9 codec parser
e7d9217: codecparser: h264: initialize parsing structures
403d400: codecparser: h265: initialize parsing structures
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 14:37:34 +0000 (15:37 +0100)]
configure.ac: don't use an undefined variable
If the environment lacks of gstreamer development packages, this error will
be reported to the user: "gstreamer- was not found"
This is because we are using an undefined variable in the printed message. The
fix simple changes the variable for the hard-coded string "1.0".
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757283
Víctor Manuel Jáquez Leal [Fri, 16 Oct 2015 13:55:40 +0000 (15:55 +0200)]
vaapidecode: relax guards for memory:VASurface capsfeature
Though caps features are supported since GStreamer 1.2, there are some
issues with the features caps negotiation in that version. Nonetheless,
those issues are fixed in GStreamer 1.4. So, the memoy:VASurface caps
feature negotiation is relaxed for GStreamer 1.4.
The guard is the same as in vaapisink's caps template.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Thu, 15 Oct 2015 16:18:36 +0000 (18:18 +0200)]
vaapidecode: decide allocation doesn't update srccaps
The received caps query will bring the already negotiated caps, so they are
not expected to change.
This patch removes this verification which is dead code path.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Wed, 14 Oct 2015 18:30:30 +0000 (20:30 +0200)]
vaapidecode: use caps to check the features
Instead of calling gst_vaapi_find_preferred_caps_feature(), which is
expensive, we check the caps from the allocation query, to check the
negotiated feature.
In order to do this verification a new utility function has been implemented:
gst_vaapi_caps_feature_contains().
As this new function shared its logic with gst_caps_has_vaapi_surface(), both
have been refactorized.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Wed, 14 Oct 2015 18:22:43 +0000 (20:22 +0200)]
vaapidecode: set format before decide allocation
There is a regression from commit 3d8e5e. It was expected the buffer pool
allocation occur before the caps negotiation, but it is not.
This patch fixes this regression: the caps negotiation is done regardless the
allocation query from downstream.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Lim Siew Hoon [Fri, 16 Oct 2015 12:21:50 +0000 (20:21 +0800)]
build: check for patch and fix yasm check
Add configure checking for GNU patch tools and fixed configure
checking YASM to correct sequence.
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756690
Sreerenj Balachandran [Thu, 15 Oct 2015 16:20:21 +0000 (19:20 +0300)]
build: Remove disable-md5 option for libvpx build
The configure option --disable-md5 was provided in libvpx-1.3.0 which
has been removed in 1.4.0.
Sreerenj Balachandran [Thu, 15 Oct 2015 16:00:26 +0000 (19:00 +0300)]
libvpx: Update the submodule to libvpx-1.4.0
libvpx git commit:
c74bf6d889992c3cabe017ec353ca85c323107cd
Sreerenj Balachandran [Thu, 15 Oct 2015 07:59:08 +0000 (10:59 +0300)]
configure: mark support for GStreamer 1.2 as obsolete.
Support for GStreamer 1.2 is obsolete. i.e. it is no longer supported.
Our goal is to support the last two stable versions of GStreamer which
are 1.4 and 1.6 at the moment.
We still keep the 1.2 specific codes until the next gstreamer-vaapi-0.7
release and will get rid of those in 0.8.
Sreerenj Balachandran [Mon, 12 Oct 2015 11:13:03 +0000 (14:13 +0300)]
vaapidecode: Fix buffer copy assertion
Don't try to copy the NULL buffer-codec_data.
Víctor Manuel Jáquez Leal [Mon, 28 Sep 2015 12:57:33 +0000 (14:57 +0200)]
build: allow builds against GStreamer 1.7.x
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 23 Sep 2015 14:02:46 +0000 (16:02 +0200)]
gstcompat: add gst_buffer_copy_deep() if gst < 1.5
gst_buffer_copy_deep() was added in GStreamer 1.5. If want to use it we should
add an implementation if gstreamer-vaapi is linked to previous versions.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 23 Sep 2015 10:13:41 +0000 (12:13 +0200)]
vaapidecode: simplify copy of GstVideoCodecState
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:21:08 +0000 (19:21 +0200)]
patches/videoparsers: h265parser: more API fences
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:19:56 +0000 (19:19 +0200)]
patches/videoparsers: h265parser: rename patch keeping number
Refresh the patch and rename it in order to keep the patch number.
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: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>