Commit graph

2406 commits

Author SHA1 Message Date
Sreerenj Balachandran
d7bd0a4c10 build: Add gmodule dependency for libgstvaapi_egl
https://bugzilla.gnome.org/show_bug.cgi?id=756259
2015-11-30 13:03:04 +01:00
Sreerenj Balachandran
52eaafcd6c patches/videoparsers: h264: Disable passthorugh mode enabling
This is a quick fix for regression introduced by the upstream
commit e8908f5aee in h264 videoparser.

The patch is disabling the passthrough mode, otherwise it will
break multi-layer mvc stream parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=758656
2015-11-27 14:24:55 +02:00
Víctor Manuel Jáquez Leal
fd73557d2c build: add gsth265parse patches conditionally
As gsth265parse was added in GStreamer 1.4, and gstreamer-vaapi still support
GStreamer 1.2, the patching of gsth265parse must be conditional to the target
GStreamer version.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=755525
2015-11-25 15:12:53 +02:00
Víctor Manuel Jáquez Leal
d38d4c617c build: declare correctly parse lib built files
This is a continuation of commit fc8a0d12

When declaring BUILT_SOURCES, those files should not be distributed. This
patch avoids the distribution of the generated source code.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=755525
2015-11-25 15:11:28 +02:00
Sreerenj Balachandran
e111ad4574 build: libvpx: Add missing source file 2015-11-24 17:14:20 +02:00
Sreerenj Balachandran
0f3e813956 vaapipostproc: Correctly detect the caps change
This is a quick fix for regression introuduced by the
commit 757833230b

With out this, the gst_vaapipostproc_create() will
never get invoked.

https://bugzilla.gnome.org/show_bug.cgi?id=758543
2015-11-23 17:21:23 +02:00
Víctor Manuel Jáquez Leal
f355e62170 build: libvpx: update the sources lists
`make dist` broke since commit f06798 (libvpx: Update the submodule to
libvpx-1.4.0) because the sources.frag does not contain all the module
sources.

This patch updates thoroughly the sources.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=755525
2015-11-19 12:37:23 +01:00
Víctor Manuel Jáquez Leal
757833230b vaapipostproc: don't set caps change at first set
When the source caps change, the filter is destroyed and recreated.
Nonetheless, this happens every time the vaapipostproc starts, since the caps
change detection algorithm does not take in consideration when the caps are
set by first time.

This patch intents to be an optimization, to avoid a useless filter
destroy-creation cycle when the sources caps are set for first time.

The new helper function video_info_update() is a refactorization to avoid
duplicated code.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=758007
2015-11-19 12:23:22 +01:00
Víctor Manuel Jáquez Leal
fc958520c3 vaapipostproc: params video_info_changed() callers
The signature is video_info_changed(old_vip, new_vip). Nonetheless the callers
swapped the the order. This didn't raise problems since the comparison of both
structures were not affected by its semantics.

But still it would be better to fix this to keep the coherence of the code.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=758007
2015-11-19 12:23:22 +01:00
Víctor Manuel Jáquez Leal
fc8a0d121c build: declare real built files
When runnig the `make dist` target from a clean tree, it fails because
if could not find the copied files from codecparsers submodule.

They weren't copied because they weren't declared as built sources.

This patch removes the stamp mechanism and use the actual file list to copy
as the built sources. Also it fixes the duplication of the parser files.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=755525
2015-11-18 20:56:44 +01:00
Sreerenj Balachandran
a24918037d decoder: vp9: Fix last/golden/altref frame index setting
Always fill VADecPictureParameterBufferVP9 last/golden/altref indices
based on what ever reference frame indices encoded in frame header.
2015-11-17 19:37:07 +02:00
Víctor Manuel Jáquez Leal
e267e167db debian: remove custom parallel compilation
In order to build a debian package with upstream source, the user should
do

  ./autogen.sh
  cp -a debian.upstream debian
  debuild -eDEB_BUILD_OPTIONS="parallel=8" -us -uc -b

The environment variable DEB_BUILD_OPTIONS="parallel=8" is the canonical
way to make a parallel build (-j8 in this case).

This commit removes the script in debian/rules that detects the number of
cpus, requested by the environment variable DEBIAN_BUILD_NCPUS, which is not
official in debian.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=754087
2015-11-16 18:25:08 +01:00
Sreerenj Balachandran
2855682bd3 decoder: vp9: Fix PTS calculation of cloned frames 2015-11-16 18:22:55 +02:00
Sreerenj Balachandran
9a314a2430 decoder: vp9: Avoid unnecessary show_frame flag checking while doing picture output
We always set GST_VAAPI_PICTURE_FLAG_SKIPPED for DECODE_ONLY frames and the
gstvaapidecoder base calss is reponsible for handling those frames later on.
No need for explicit verification of frame header's show_frame in order to
do picture outputing.
2015-11-16 18:22:33 +02:00
Sreerenj Balachandran
26f895f4a8 decoder: vp9: Fix ref picture update while doing repeat frame
Don't try to do frame decoding and reference picture update
while receiving a vp9 frame having show_existing_frame flag
set as TRUE.
2015-11-16 18:22:14 +02:00
Sreerenj Balachandran
247896884b decoder: vp9: Add repeat-frame display handling
If vp9 frame header come up with show_existing_frame flag set,
we should duplicate the existing decoded frame as current frame to
be displayed.
2015-11-16 18:21:56 +02:00
Víctor Manuel Jáquez Leal
ac8d19dab4 vaapidecodebin: add me as element co-author
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757957
2015-11-16 16:07:07 +01:00
Víctor Manuel Jáquez Leal
7c71ffccc0 vaapidecodebin: try to get display from decoder
Rather than create a dummy display, if none has propagated as a context, we
should try to get the one from vaapidecode.

As the bin is already in READY state, the vaapidecode should be also in that
state. That means that the contexts have been negotiated, and it should have
already a display.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757957
2015-11-16 16:07:07 +01:00
Víctor Manuel Jáquez Leal
bd4395ce9f vaapidecodebin: add postprocessor dynamically
The former approach to left the bin unfinished has some problems: the context
cannot be shared because the vaapidecode is unlinked in many cases, leading to
creating a VADisplay twice.

Initially the bin is fully functional, constructed as

(-----------------------------------)
|            vaapidecodebin         |
|   (-------------)    (-------)    |
|<--| vaapidecode |--->| queue |--->|
|   (-------------)    (-------)    |
(-----------------------------------)

When the context is shared and the VADisplay has VPP capabilities, before
changing to READY state, the bin is reconfigured dynamically, adding the
vaapipostproc element afeter the queue:

(--------------------------------------------------------)
|                       vaapidecodebin                   |
|   (-------------)    (-------)    (---------------)    |
|<--| vaapidecode |--->| queue |--->| vaapipostproc |--->|
|   (-------------)    (-------)    (---------------)    |
(--------------------------------------------------------)

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757957
2015-11-16 16:07:07 +01:00
Víctor Manuel Jáquez Leal
ce3d1a6203 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
2015-11-16 16:07:07 +01:00
Sreerenj Balachandran
8ee23ffd96 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
2015-11-13 19:46:01 +02:00
Sreerenj Balachandran
a48eebefd6 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.
2015-11-13 19:23:05 +02:00
Sreerenj Balachandran
4aa523f8b4 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.
2015-11-13 18:58:33 +02:00
Sreerenj Balachandran
b9feff206f vaapidecode: Add comments for corner case fixes and fix couple of indentations. 2015-11-13 18:51:27 +02:00
Sreerenj Balachandran
9b885c65ca decoder: vp9: Set lossless flag from frame header 2015-11-13 18:41:53 +02:00
Sreerenj Balachandran
66bfe9bad7 codecparsers: Update to gst-vaapi-branch d9f25
d9f2527: codecparsers: vp9: Set lossless flag in frame header
2015-11-13 18:40:52 +02:00
Víctor Manuel Jáquez Leal
57b69d36f2 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
2015-11-11 19:18:52 +01:00
Sreerenj Balachandran
3d9efa7572 codecparsers: Update to gst-vaapi-branch da251bb
da251bb: codecparsers: vp9: Optimize the memory allocation
f5759f4: codecparsers: vp9: Fix the wrong memcpy of probability arrays
2015-11-10 19:00:22 +02:00
Víctor Manuel Jáquez Leal
1efe569639 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
2015-11-09 16:18:44 +01:00
Víctor Manuel Jáquez Leal
ea802072d1 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
2015-11-09 16:18:44 +01:00
Víctor Manuel Jáquez Leal
75e7a0a36c 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
d69f747d09 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
b2707c8eec 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
28c366a003 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
ed280f5b84 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
ef3fb4afaf 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
b45089f0f7 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
959c13933d 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
5d0ab36924 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
7e9ee7f66d 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
c20318d198 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
1e96fae94c 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
2015-11-09 16:18:19 +01:00
Víctor Manuel Jáquez Leal
4fc8769761 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>
2015-11-09 16:14:56 +01:00
Víctor Manuel Jáquez Leal
a2611b7f35 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
2015-11-09 15:50:14 +01:00
Víctor Manuel Jáquez Leal
f182fcfb37 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
2015-11-09 15:12:31 +01:00
Sreerenj Balachandran
bf046cd0b6 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
2015-11-06 19:18:54 +02:00
Sreerenj Balachandran
6722c541a1 VP9: plugins: Add VP9 decoder 2015-11-06 15:19:38 +02:00
Sreerenj Balachandran
db877e015d VP9: libgstvaapi: Add VP9 decoder 2015-11-06 15:12:51 +02:00
Sreerenj Balachandran
a3d63724dd VP9: gstvaapiprofile: Add profile definitions 2015-11-06 14:57:00 +02:00
Sreerenj Balachandran
608a045ba1 VP9: build: Check availability of vp9 decoder APIs 2015-11-06 14:39:22 +02:00