Bug 58176

Summary: [gst-vaapi] gi4_video.bits decoding failed (MPEG2)
Product: libva Reporter: Du Yan <yanx.du>
Component: intelAssignee: Zhong Cong <congx.zhong>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: medium CC: bsreerenj, ouping.zhang, seanvk, xiaowei.a.li
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: This patch remove inverse zigzag in gstvaapi codecparser

Description Du Yan 2012-12-12 08:02:26 UTC
System Environment:
--------------------------
Platform:SGB IVB
Libva: staging
commit 8865fd148a4444b26c35197b3176f87fb2e85393
Intel-driver: staging
commit c0ef9d99df37ae45589fecb898727be495e50304
gst-vaapi: qa
commit 01c92b04b095be9163976a53ac2c4305c84fa274


Bug Info:
--------------------------
bits_conf_lep_11.bits 

Y SSIM extreme 0.94754
Y SSIM average 0.959471
U SSIM extreme 0.975124
U SSIM average 0.980161
V SSIM extreme 0.977071
V SSIM average 0.981093


Issue can be reproduced with following files:

att_mismatch_att.bits
bits_conf_lep_11.bits
gi4_video.bits
gi6_bit_stream
gi7_bit_stream
gi9_bit_stream
gi_from_tape_gi_stream
ibm-bw.BITS
mei_2stream.4f
mei_2stream.60f.new
nokia6_dual_60.bit
nokia6_dual.bit
nokia7_dual.bit
ntr_skipped_v3.bits
sony-ct1.bits
sony-ct2.bits
sony-ct3.bs
sony-ct4.bs
tceh_conf2.bits
tcela-10-killer.bits
tcela-14-bff-dp.bits
tcela-6-slices.bits
tcela-7-slices.bits
tcela-8-fp-dp.bits
tcela-9-fp-dp.bits
Tek-5.2-conf4.bit
Tek-5-long-conf4.bit
teracom_vlc4.bin
TI_c1_2.bits
toshiba_DPall-0.mpg
Comment 1 Du Yan 2012-12-20 06:48:57 UTC
Libva: (staging) b8d3cf092c9b07cfd909552a3c160b7db3b5a91d
Intel-driver: (staging) a6dfb8f7fb601f102b414ac0c9088b5b8e88060f
Gst-vaapi: (qa) 01c92b04b095be9163976a53ac2c4305c84fa274

Platform: HSW IVB

decoding fail with below files:

gi4_video.bits
Y SSIM extreme 0.952719	
Y SSIM average 0.96435	
U SSIM extreme 0.969502	
U SSIM average 0.972453	
V SSIM extreme 0.978941	
V SSIM average 0.980456


att_mismatch_att.bits
bits_conf_lep_11.bits
chroma_dct_type_1_test.mpg.mpg
gi4_video.bits
gi6_bit_stream
gi7_bit_stream
gi9_bit_stream
gi_from_tape_gi_stream
ibm-bw.BITS
mei_2stream.4f
mei_2stream.60f.new
nokia6_dual_60.bit
nokia6_dual.bit
nokia7_dual.bit
ntr_skipped_v3.bits
sony-ct1.bits
sony-ct2.bits
sony-ct3.bs
sony-ct4.bs
tceh_conf2.bits
tcela-10-killer.bits
tcela-14-bff-dp.bits
tcela-18-d-pict.bits
tcela-6-slices.bits
tcela-7-slices.bits
tcela-8-fp-dp.bits
tcela-9-fp-dp.bits
Tek-5.2-conf4.bit
Tek-5-long-conf4.bit
teracom_vlc4.bin
TI_c1_2.bits
toshiba_DPall-0.mpg
twilight_zone_mei_MEI2.stream17
twilight_zone_mei_MEI.stream17.long
Comment 2 Du Yan 2013-01-10 03:31:58 UTC
bits_conf_lep_11.bits
gi4_video.bits
gi6_bit_stream
gi7_bit_stream
mei_2stream.4f
mei_2stream.60f.new
nokia6_dual.bit
tceh_conf2.bits
tcela-6-slices.bits
Tek-5.2-conf4.bit
Tek-5-long-conf4.bit
TI_c1_2.bits
toshiba_DPall-0.mpg


Above cases test passed with mplayer but failed with gst-vaapi. This issue is caused by gst-vaapi layer, not our driver issue.
Comment 3 Zhong Cong 2013-01-23 01:03:35 UTC
Maybe parameters exist problem or data in some frame lost ,now try to find the frame which causes the problem.
Comment 4 Du Yan 2013-01-23 02:42:39 UTC
Test Passed with mplayer
e.g.
bits_conf_lep_11.bits    
Y SSIM extreme 0.999575	
Y SSIM average 0.99965	
U SSIM extreme 0.999201	
U SSIM average 0.999311	
V SSIM extreme 0.999116	
V SSIM average 0.999255
Comment 5 Zhong Cong 2013-01-30 09:19:00 UTC
Created attachment 73914 [details] [review]
This patch remove inverse zigzag in gstvaapi codecparser

gstvaapi codecparse handles the data with inverse zigzag, and the intel-driver alse asks for original data to inverse zigzag. Here comes the contradiction.This patch remove inverse zigzag in gstvaapi codecparser,and it can solve this issue.
Comment 6 Jocelyn Li 2013-01-31 02:25:22 UTC
We need Gwenole and Haihao's comments.
Comment 7 xiaowei 2013-01-31 02:40:23 UTC
In my opinion, firstly there is one codec paser's issue, when reading matrix from bitstream, it get the normal order matrix, but if not matrix in stream, the default matrix will be loaed, but it is zig order matrix, so the output format is not aligned in these two case.
Comment 8 sreerenj 2013-02-04 08:40:04 UTC
This issue has been tracking here in upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=693000
Comment 9 Gwenole Beauchesne 2013-02-06 13:26:52 UTC
Hi,

(In reply to comment #5)
> Created attachment 73914 [details] [review] [review]
> This patch remove inverse zigzag in gstvaapi codecparser
> 
> gstvaapi codecparse handles the data with inverse zigzag, and the
> intel-driver alse asks for original data to inverse zigzag. Here comes the
> contradiction.This patch remove inverse zigzag in gstvaapi codecparser,and
> it can solve this issue.

I pushed your patch with some minor changes (comments + indent) into gst-plugins-bad master branch. Thanks.

This issue is fixed in gstreamer-vaapi 0.4.3 release. I will update git master branch soon.
Comment 10 Du Yan 2013-02-25 02:32:34 UTC
Issue still can be reproduced.

Libva: (staging) bfa1553c18b7b12cf1c221cafdc1784672a7b4ac
Intel-driver: (staging) 04d459f88353a5be82724e648bb30ddb37286d26
Gst-vaapi: (qa) 205ae880b7696dbd76d5a2968bb858a9fa7c5958
Comment 11 Du Yan 2013-02-26 05:08:51 UTC
Below files are still failed by SSIM value < 0.99, and they are passed with mplayer.

bits_conf_lep_11.bits
gi4_video.bits
gi6_bit_stream
gi7_bit_stream
gi_from_tape_gi_stream
ibm-bw.BITS
nokia7_dual.bit
ntr_skipped_v3.bits
sony-ct1.bits
sony-ct2.bits
sony-ct4.bs
tceh_conf2.bits
tcela-10-killer.bits
tcela-6-slices.bits
tcela-7-slices.bits
tcela-8-fp-dp.bits
tcela-9-fp-dp.bits
Comment 12 Du Yan 2013-03-04 02:15:54 UTC
retest with the lastest gst-vaapi code, still some cases failed.

att_mismatch_att.bits
ibm-bw.BITS
sony-ct1.bits
sony-ct2.bits
Comment 13 Du Yan 2013-03-04 08:32:10 UTC
refer to #bug 61782

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.