After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785706 - vaapipostproc: upstream caps negotiation fails
vaapipostproc: upstream caps negotiation fails
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.12.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-01 20:19 UTC by Tomas Rataj
Modified: 2018-11-03 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG=5 (324.58 KB, application/zip)
2017-08-01 20:19 UTC, Tomas Rataj
  Details
vaapipostproc: use scoped variable for return value (1.71 KB, patch)
2017-09-28 11:56 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapipostproc: removed unused parameter (1.45 KB, patch)
2017-09-28 11:56 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapipostproc: use scoped variable for return value (1.70 KB, patch)
2017-09-28 11:56 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Tomas Rataj 2017-08-01 20:19:56 UTC
Created attachment 356755 [details]
GST_DEBUG=5

Hi,

Following pipelines are not working:

gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! videorate ! vaapipostproc ! video/x-raw,format=NV12,framerate=10/1 ! fakesink

gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! videorate ! video/x-raw,framerate=10/1 ! vaapipostproc ! video/x-raw,format=NV12 ! fakesink

with warning:

WARN           basetransform gstbasetransform.c:1346:gst_base_transform_setcaps:<videorate0> transform could not transform video/x-raw, format=(string)BGRx, width=(int)1280, height=(int)1024, framerate=(fraction)20/1 in anything we support 

Pipeline with swapped vaapipostproc and videorate is working correctly:

gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! vaapipostproc ! videorate ! video/x-raw,format=NV12,framerate=10/1 ! fakesink
Comment 1 Víctor Manuel Jáquez Leal 2017-08-02 10:37:45 UTC
The problem is upstream caps negotiation is not fully implemented in vaapipostproc.
Comment 2 Víctor Manuel Jáquez Leal 2017-09-27 14:06:49 UTC
I've tested these pipelines on current master and 1.12 replacing appsrc with videotestsrc


(In reply to Tomas Rataj from comment #0)
> gst-launch-1.0 appsrc is-live=true
> caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" !
> videorate ! vaapipostproc ! video/x-raw,format=NV12,framerate=10/1 ! fakesink

This still fails. In my understanding it fails because videorate sets an already fixated caps by setting itself as passthrough.


> gst-launch-1.0 appsrc is-live=true
> caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" !
> videorate ! video/x-raw,framerate=10/1 ! vaapipostproc !
> video/x-raw,format=NV12 ! fakesink

But this one is working as expected.
Comment 3 Víctor Manuel Jáquez Leal 2017-09-28 11:56:18 UTC
Created attachment 360596 [details] [review]
vaapipostproc: use scoped variable for return value

Instead of reusing a parameter variable for the return value of
gst_vaapipostproc_fixate_caps(), this patch uses the function scoped
pointer. Thus, the code is cleaner.
Comment 4 Víctor Manuel Jáquez Leal 2017-09-28 11:56:23 UTC
Created attachment 360597 [details] [review]
vaapipostproc: removed unused parameter

Removed caps parameter from gst_vaapipostproc_transform_caps_impl()
helper function since the it is not used.
Comment 5 Víctor Manuel Jáquez Leal 2017-09-28 11:56:28 UTC
Created attachment 360598 [details] [review]
vaapipostproc: use scoped variable for return value

Instead of reusing a parameter variable for the return value of
gst_vaapipostproc_transform_caps(), this patch uses the function
scoped pointer. Thus, the code is cleaner.
Comment 6 Víctor Manuel Jáquez Leal 2017-09-28 11:59:37 UTC
These patches do not fix the problem. They are just a clean up of the code.

But I haven't found a way to fix this issue since vaapipostproc, when doing deinterlacing, it modifies the src caps framerate, thus I cannot figure out a way to set the sink caps framerate given the vaapipostproc src caps, since the media also has to be considere.
Comment 7 Víctor Manuel Jáquez Leal 2017-10-03 09:43:45 UTC
Attachment 360596 [details] pushed as bedaa13 - vaapipostproc: use scoped variable for return value
Attachment 360597 [details] pushed as d3732a7 - vaapipostproc: removed unused parameter
Attachment 360598 [details] pushed as bedaa13 - vaapipostproc: use scoped variable for return value
Comment 8 GStreamer system administrator 2018-11-03 15:51:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/64.