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 784318 - [gstreamer-vaapi-master][SKL/APL/KBL] 13 vaapiencode_h264 subcases failed on SKL/APL/KBL
[gstreamer-vaapi-master][SKL/APL/KBL] 13 vaapiencode_h264 subcases failed on ...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
P1
Depends on:
Blocks:
 
 
Reported: 2017-06-29 04:05 UTC by zj,wang
Modified: 2017-08-09 05:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
failed case (4.92 KB, text/plain)
2017-06-29 04:05 UTC, zj,wang
Details

Description zj,wang 2017-06-29 04:05:42 UTC
Created attachment 354665 [details]
failed case

Test Env:
============================================
Platform:               SKL/APL/KBL
Arch:          		x86_64
Kernel:			4.10.0-rc2-mainline
libva			b9a72b9d8ca14e159a67c368d966ed6276f49bc9 (1.8.4 pre1)
libva-intel		c3110dc5a57f1fa174b5605ea6e36fdae3c7333c (1.8.4 pre1)
gst-vaapi		9397cd7d4d487141346dbe28e1c21897960862b0


Reproduce Steps:
============================================
Take 720p5994_parkrun_ter.yuv-4-2-cqp for example:
inputfile: 720p5994_parkrun_ter.yuv-4-2-cqp
tmpqpbr=cqp
YUVFILENAME=720p5994_parkrun_ter.yuv
j=720p5994_parkrun_ter.yuv
QPVALUE=4
targetbitrate=4
MODE=2
intra_period=30
b_frame_num=2

1. Setup gstreamer env and export them:
export PATH LD_LIBRARY_PATH PKG_CONFIG_PATH GST_PLUGIN_PATH
2. Encoding raw yuv to 264 file by the commands:
gst-launch-1.0 -v filesrc location=/media/encoderbitstreams/720p5994_parkrun_ter.yuv '!' videoparse format=i420 width=1280 height=720 '!' vaapih264enc rate-control=cqp init-qp=4 keyframe-period=30 max-bframes=2 cabac=true '!' qtmux faststart=true '!' filesink location=/home/work.dir/AVC_encoding/720p5994_parkrun_ter.yuv.enc.mp4
3. Decoding the output 264 file by ffmpeg:
cd /home/work.dir/AVC_encoding/
/opt/X11R7/ffmpeg/bin/ffmpeg -i 720p5994_parkrun_ter.yuv.enc.mp4 720p5994_parkrun_ter.yuv.jm.dump.yuv
4. Compute psnr between original .yuv and the loop-dumped .yuv.dump.yuv:
YSNR=`/GFX/Test/Infrastructure/infrastructure/tests/media_tools/encoder/metrics_calc_lite.ia32e -i1 /media/encoderbitstreams/720p5994_parkrun_ter.yuv -i2 720p5994_parkrun_ter.yuv.jm.dump.yuv -w 1280 -h 720 -nopfm psnr y |awk -F '<' '{printf $2}' |awk -F '>' '{printf $2}'`
YSNR=' 42.93544'
 echo 720p5994_parkrun_ter.yuv 1280 720 604 4 42.93544 56.45263 56.64170 197555

5. Compute corresponding psnr from that of windows driver by calculus of interpolation:
lin_bitrate=202296320.0
winx0=176782124.0
winx1=138841163.0
winx2=104478226.0
winy0=54.4707
winy1=50.83775
winy2=47.35079
winy1=9.5752714329e-08
winy2=-7.91344861697e-17
winy=56.7856342091
lin_psnr=42.93544

6. Got FAIL by PASS standard winy-lin_psnr<=3db:
winy-lin_psnr>3db


Media_Enc_AVC_Gstreamer_CQP_I/720p5994_parkrun_ter.yuv-4-0-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/720p5994_parkrun_ter.yuv-4-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/720p5994_parkrun_ter.yuv-8-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/720p5994_parkrun_ter.yuv-12-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/720p5994_parkrun_ter.yuv-16-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/1080p_blue_sky.yuv-4-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/1080p_blue_sky.yuv-8-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/1080p_blue_sky.yuv-12-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/MOBILE_352x288_30_orig_01.yuv-4-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/MOBILE_352x288_30_orig_01.yuv-8-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/stockholm_1280x720_604.yuv-4-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/stockholm_1280x720_604.yuv-8-2-cqp    FAIL
Media_Enc_AVC_Gstreamer_CQP_IPB/stockholm_1280x720_604.yuv-12-2-cqp    FAIL
Comment 1 Hyunjun Ko 2017-07-19 07:46:16 UTC
I suspect a regression in the driver regarding quality level.

Current default of quality level is 4 and it results in poor quality.
If I set 1(the highest quality) to quality-level in vaapih264enc, its quality gets better. But still not statisfied the PASS standard.

And I revert the commit 481ec15[1] in the driver, the quality is much better to get passed enough.

IMO, someone in the intel driver should look into this.
Comment 2 Hyunjun Ko 2017-07-21 07:23:40 UTC
I filed this to https://github.com/01org/intel-vaapi-driver/issues/233
Comment 3 Fei 2017-08-09 05:17:40 UTC
From Focus's analyze, even the psnr dropped, but the encoded stream file also get smaller. That means with the low bitrate stream, the psnr dropped a little can be acceptable. So we will close this issue, and update our reference psnr.

@zhanjun, pls update our psnr and close this issue. tks.
Comment 4 zj,wang 2017-08-09 05:35:54 UTC
psnr has been updated, so close this issue.