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 793829 - vaapih264enc: keyframe-perdiod incongruence between declaration and description
vaapih264enc: keyframe-perdiod incongruence between declaration and description
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal minor
: 1.12.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-26 02:49 UTC by Matteo Valdina
Modified: 2018-05-02 19:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for include to zero the periodic key frame. (1.10 KB, patch)
2018-02-26 02:54 UTC, Matteo Valdina
committed Details | Review

Description Matteo Valdina 2018-02-26 02:49:01 UTC
vaapih264enc and other encoder elements declare:

  keyframe-period     : Maximal distance between two keyframes (0: auto-calculate)
                        flags: readable, writable
                        Unsigned Integer. Range: 1 - 300 Default: 30 

But the valid ranges is 1 - 300 when the comment include the 0 case.
Comment 1 Matteo Valdina 2018-02-26 02:54:55 UTC
Created attachment 368915 [details] [review]
Patch for include to zero the periodic key frame.

Added a patch for extend to zero the valid range of keyframe-period.

Tested with this script:

~~~
#!/bin/bash

KEYFRAME_PERIOD=0
# generate a test stream.
gst-launch-1.0 videotestsrc pattern=18 num-buffers=300 ! \
              video/x-raw,framerate=15/1 ! \
              vaapih264enc keyframe-period=$KEYFRAME_PERIOD ! \
              video/x-h264,profile=baseline ! \
              filesink location=test.h264


ffprobe -select_streams v -show_frames -show_entries frame=pict_type test.h264 | grep pict_type > report.log


echo "I-frame $(cat report.log | grep I | wc -l)"
echo "P-frame $(cat report.log | grep P | wc -l)"

~~~

Changing the value of frame rate the ratio of I-frame/P-frame was the expected (1 frame each second).
Comment 2 Víctor Manuel Jáquez Leal 2018-02-26 16:09:36 UTC
Attachment 368915 [details] pushed as 02c7c1bc - libs: encoder: add zero as valid value for periodic keyframe.
Comment 3 Víctor Manuel Jáquez Leal 2018-05-02 19:19:13 UTC
backported to branch 1.12

* 08e95320 libs: encoder: add zero as valid value for periodic keyframe.