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 796528 - vaapih264enc: negotiation with cabac=true stopped working after 794306
vaapih264enc: negotiation with cabac=true stopped working after 794306
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.14.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-07 11:24 UTC by Viktor Richter
Modified: 2018-06-07 15:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Viktor Richter 2018-06-07 11:24:16 UTC
Problem:

After the changes made to fix Bug 794306 negotiation with cabac=true and h264parse stopped working. When cabac is set to false, the pipeline works.

Reproduce:

Working: gst-launch-1.0 -v videotestsrc ! vaapipostproc ! vaapih264enc cabac=false ! h264parse ! fakesink dump=true num-buffers=1

Not Working: gst-launch-1.0 -v videotestsrc ! vaapipostproc ! vaapih264enc cabac=true ! h264parse ! fakesink dump=true num-buffers=1

stdout: https://github.com/GStreamer/gstreamer-vaapi/files/2079804/out.log
stderr: https://github.com/GStreamer/gstreamer-vaapi/files/2079805/err.log

The builds are from 1.14 branches of the github repos.
The pocessors tested: 
* Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
* Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz
* Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
Comment 1 Víctor Manuel Jáquez Leal 2018-06-07 12:57:01 UTC
with commit 1f1e9eef the negotiation behavoir changed to select the lowest profile intersected. The consequence of this, in your pipeline, is profile constrained-baseline is selected, but that profile doesn't support cabac.

The normal/new way, should be selecting the main or high profile:

gst-launch-1.0 -v videotestsrc ! vaapipostproc ! vaapih264enc ! video/x-h264, profile=main ! h264parse ! fakesink dump=true num-buffers=1

But you are right, I shouldn't have changed the behavoir for the stable release. Now there's a commit that reverts that new behavoir for 1.14: 

https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/commit/?h=1.14&id=dbe30f3459b98d6136f7cfdbd0a226f81e76e429 

The new way is preserved in master.
Comment 2 Víctor Manuel Jáquez Leal 2018-06-07 12:57:56 UTC
closing as fixed. Please, reopen if it doesn't work.
Comment 3 Viktor Richter 2018-06-07 13:26:09 UTC
Thank You :-)

Just for my understanding:

Would not it be right to choose the lowest profile that supports cabac when it is enabled - or is this information not available at this point of execution?
Comment 4 Víctor Manuel Jáquez Leal 2018-06-07 15:02:23 UTC
that would be an enhancement, yes.

what I'm afraid of is that all the possible configurations might be combination explosion, so the code would be simpler if we just give the decision power to a single element: in this case I would prefer the profile, which is less obscure than cabac.

Nonetheless I'm open to suggestions (and contributions :))