Bug 64517

Summary: [Gst-vappi-0.4][IVB] Low PSNR value when transcoder with resolution changes
Product: libva Reporter: Liu Tienan <tienan.liu>
Component: intelAssignee: Jocelyn Li <jocelyn.li>
Status: VERIFIED FIXED QA Contact: Sean V Kelley <seanvk>
Severity: normal    
Priority: medium CC: gordon.jin, lianyuex.yang, ouping.zhang
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Liu Tienan 2013-05-13 07:00:27 UTC
System Environment:
----------------------------------------
Platform: IVB
Libva: staging branch 2b25c3439781f0b7162011627a8ad3bb6288d1bb
Intel-driver: staging branch 5bd630d4ea732818728b0a464f45739c86e08be3
Gst-vaapi: 0.4 branch dd40042d447a0b696a75172bd3ed6cd1bad23377


Reproduce steps:
---------------------------------
1.  xinit&

### hardware transformation  
2.  gst-launch-0.10 filesrc location=xxx.MP4 ! qtdemux ! vaapidecode ! vaapipostproc ! video/x-surface,width=720,height=576,type=vaapi,format=\(fourcc\)NV12 ! vaapiencodeh264 rate-control=cqp init-qp=26 intra-period=30 b-frame-num=2 ! qtmux faststart=true ! filesink location=HW.mp4

### software transformation
3.  gst-launch-0.10 filesrc location=xxx.MP4 ! qtdemux ! vaapidecode ! vaapidownload ! video/x-raw-yuv,format='(fourcc)'I420 ! videoscale ! video/x-raw-yuv,width=720,height=576,format='(fourcc)'I420 ! x264enc pass=4 quantizer=26 bframes=2 ! qtmux faststart=true ! filesink location=SW.mp4

###dump yuv file
4.  ffmpeg -i HW.mp4 HW.yuv
    ffmpeg -i SW.mp4 SW.yuv

###compute the PSNR value
5.  metrics_calc_lite -i1 HW.yuv -i2 SW.yuv -w 720 -h 576 -nopfm -st i420p i420p psnr all 

Actually result: 
Test cases      Y-psnr      U-psnr      V-psnr
Resolution	9.70018	    9.66433	9.66995
Comment 1 Liu Tienan 2013-05-17 05:51:21 UTC
System Environment:
----------------------------------------
Platform: IVB
Libva:          staging branch      1fcd8cda3ed4e8491963533ef4c0f047de25e814
Intel-driver:   staging branch      0a5cfdab47c788569feb0a3e4293906687523f88
Gst-vaapi:      73cc7dd0bdfda405cfeeb16a2d7b4cbf945b6d86

After updating Gst-vaapi, can't reproduce the bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.