GNOME Bugzilla – Bug 783023
[KBL/APL/SLK][media/libva][AVC Encode CBR Multi-Slice] the output bitrate compare to the input target bitrate bigger than 10% by using gstreamer as tool.
Last modified: 2017-05-26 02:13:00 UTC
System Environment ======= 1), HW: SKL CPU: Dual core; Genuine Intel(R) CPU @ 1.10GHz GPU: PCI ID 8086:191e Memory: 4G 2), SW Libva 1.8.2.pre1 Libva- intel-driver 1.8.2.pre1 Libdrm 2.4.68 xf86-video-intel 2.99.917 Kernel Linux kernel - 4.10.0-rc2 OS 14.04 libyami 1.1.0 Regression? No ======= Bug detailed description ======= most of mulit-sclies test cases: encoded (output bitstream bps - input bitstream bps)/input bitstreamer bps are bigger than 10% Reproduce Steps ============== 1, To run avc ipb encode with multi-slices=2 on SKL platforms; #CBR #gst-launch-1.0 -v filesrc location=stockholm_1280x720_604.yuv '!' videoparse format=i420 width=1280 height=720 '!' vaapih264enc rate-control=cbr bitrate=1000 keyframe-period=30 num-slices=1 max-bframes=2 '!' filesink location=./stockholm_1280x720_604.yuv-1000-2-cbr-gop30-slice2.h264 2, To check whether the (output bitstream bps - input bitstream bps)/(input bitstreamer bps) * 100% < 10% Expected Result ============= All test cases were executed and encoded (output bitstream bps - input bitstream bps)/input bitstreamer bps are successfully controlled in 10% Actual Result =========== almost of encoded bitstream by using gstreamer are bigger than 10%
IIUC, your test scripts using calculations based on the assumption that framerate is 30 which is not the cause unless you set it in videoparse. Use the below pipeline: gst-launch-1.0 -v filesrc location=stockholm_1280x720_604.yuv '!' videoparse format=i420 width=1280 height=720 framerate=30/1 '!' vaapih264enc rate-control=cbr bitrate=1000 keyframe-period=30 num-slices=1 max-bframes=2 '!' filesink location=./stockholm_1280x720_604.yuv-1000-2-cbr-gop30-slice2.h264 Or use framerate 25 in your calculation. I have tested the same file and no issue.
BTW, please use "rawvideoparse" instead of "videoparse" since the videoparse element has been deprecated.
framerate should be set as 30 through cmd, it's the incorrect cmd caused this issue. So this is not a issue and close it.