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 722238 - encoder: h264: low psnr value when encoding 1080p_blue_sky.yuv
encoder: h264: low psnr value when encoding 1080p_blue_sky.yuv
Status: VERIFIED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 719412
 
 
Reported: 2014-01-15 03:40 UTC by zhenxiang.li
Modified: 2014-01-23 01:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description zhenxiang.li 2014-01-15 03:40:45 UTC
Environment:
--------------
Libva:          
(master)73a11b3e249da35ede92560eb089239252721351
Libva_intel_driver:             
(master)54cb60f3d973ce6a908ea57f5aa7481803fe653a
Gstreamer10:            
(1.0)4e880d4d1e151ea64f83c28b5c3e1bbc06c57903
Gst_plugins_base10:             
(1.0)2dd3f028c1e6dea799d7496639f5322081
Gst_plugins_good10:             
(1.0)643d425f51f81b56deec16c01162637546
Gst_plugins_bad10:              
(1.0)0587ab41b4f9979e9cfc11011ed5c97056
Gst_plugins_ugly10:             
(1.0)c7c911b8320576429e4a4234a1e29ec743

Gst_plugins_vaapi10:            
(master)a674d9eff2665327fa534c2edbcb2cb8ed71d815

Command line:
--------------
gst-launch-1.0 -v filesrc location=/root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv '!' videoparse format=i420 width=1920 height=1080 '!' vaapiencode_h264 rate-control=cqp init-qp=20 keyframe-period=1 max-bframes=0 '!' qtmux faststart=true '!' filesink location=/root/media_tools/encoder/encoderbitstreams/1080p_blue_sky.yuv.enc.mp4

Summary:
--------------
For example, when qp equals 20, Y-PSNR is alomost 10.5,
filename H W framecount qp Y U V bitrate:
1080p_blue_sky.yuv 1920 1080 217 20 10.53262 12.01507 12.02345 84901
Normally, it may like that
1080p_blue_sky.yuv 1920 1080 217 20 44.07730 36.77887 39.90847 84901
Comment 1 Gwenole Beauchesne 2014-01-15 04:56:32 UTC
Hi,

I did not apply the other part of Wind's patch yet to fixup slice_qp_delta. Anyhow, what do you compare against? JM reference encoder?

For CQP mode, I'd indeed expect similar results. What value do we get in the generated stream?
Comment 2 zhenxiang.li 2014-01-15 05:49:49 UTC
Compared it with windows encoding data. 
And this data: 1080p_blue_sky.yuv 1920 1080 217 20 44.07730 36.77887 39.90847 84901 
is from PRC tree result.

Only this clip have this problem.
Thanks.
Comment 3 Gwenole Beauchesne 2014-01-15 14:19:49 UTC
Should be fixed in git master branch, frame cropping regression from another patch. I have verified that the resulting QP for each encoded I-frame is really set to 20.
Comment 4 zhenxiang.li 2014-01-17 05:25:51 UTC
Yeah, it has been fixed. (master)7e6f7f384a8c0c16219414403490e9148060aa5b
Comment 5 Gwenole Beauchesne 2014-01-21 22:12:53 UTC
commit 5f5df3f723a6ea4314e539c41e22c82da70b53e4
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Wed Jan 15 15:10:48 2014 +0100

    encoder: h264: really fix frame cropping rectangle calculation.
    
    Make frame cropping rectangle calculation future proof, i.e. exactly
    follow the specification (7-18) to (7-21), and subsampling definitions
    from Table 6-1.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722089
    https://bugzilla.gnome.org/show_bug.cgi?id=722238
Comment 6 zhenxiang.li 2014-01-23 01:25:18 UTC
It has been fixed