[Libva] [Bug 58176] [gst-vaapi] gi4_video.bits decoding failed (MPEG2)

Yuan, Feng feng.yuan at intel.com
Wed Jan 30 22:35:54 PST 2013


Thanks for Gwenole and Xiaowei's points.
It looks like the simplest way to fix this issue is that we need follow driver's behavior and make changes in gst-vaapi/codecparser.
There will be 2 options to fix this bug.
Option 1: 
       do 3 step-conversions on decoding, need gst-vaapi and codec parser change.
         a. codec-parser: Fix mpeg video parser bugs Xiaowei pointed, change the default zigzag order table to scanning order(replace intra Q-tables to 6.3.11 of ISO/IEC 13818-2 : 2000)
         b. gst-vaapi: Do an conversion from zigzag to scanning order (both mpeg2 and mpeg4)

Option 2:
       Only change codecparser: remove the conversion from zigzag to scanning order on explicit quantization tables(no change needed on default Q-table). Just like the patch Cong post in https://bugs.freedesktop.org/show_bug.cgi?id=58176

I'd prefer option 2.  How about your idea? BTW Jpeg also used the zigzag table passed through to driver.

Thanks,
Wind

> -----Original Message-----
> From: Gwenole Beauchesne [mailto:gb.devel at gmail.com]
> Sent: Thursday, January 31, 2013 1:37 PM
> To: Yuan, Feng
> Cc: Li, Jocelyn; Beauchesne, Gwenole; Xiang, Haihao;
> libva at lists.freedesktop.org; Zhong, CongX; Li, Xiaowei A
> Subject: Re: [Libva] [Bug 58176] [gst-vaapi] gi4_video.bits decoding failed
> (MPEG2)
> 
> Hi,
> 
> 2013/1/31 Yuan, Feng <feng.yuan at intel.com>:
> 
> >       Question is how to fill <xxx_intra_quantiser_matrix>, is it
> > zigzag ordered or scan ordered? Mpeg2 data store the quantization
> > table in zigzag order.
> 
> If the API is undefined, we have to cope with the driver that has the least
> chances to get updated, and that does depend on explicit quantization
> matrices. Define this as the expected order. Repeat and constrain this with
> all supported codecs to make a consistent behavior. So, if we chose scan
> order for MPEG-2, this also has to be the case for MPEG-4, etc.
> 
> Then, the second element to consider is to carry on the less operations
> possible. So, based on your comments, the intel-driver does perform a
> conversion too. However, there are two similar conversions happening in
> FFmpeg too. So, in the end, there are 3 conversion steps!
> Two of them are most likely useless.
> 
> >      Ffmpeg would fill the quantiser_matrix by zigzag order, do we
> > need to change gstreamer-codec-parse to read data into zigzag order?
> > Does any other package/lib already using
> > gstreamer-codec-parser(mpeg2)?  Which package should be the right role
> to do the conversion from zigzag to scanning order?
> 
> For performance reasons, only one conversion should happen. So, FFmpeg
> and intel-driver would need to change.
> 
> For compatibility reasons, we have to continue with any bad choices we
> made before. So, GStreamer (codecparser or gstreamer-vaapi) would need
> to change. Xiaowei also pointed out another issue with default matrices. I
> didn't have the time to look into it.
> 
> Please check the expected behavior against the EMGD driver for example.
> Based on the OSS PVR driver, it seems that we also perform a conversion in
> there. So, we may end up to still use the "triple conversions" (parser /
> codec / driver) scenario...
> 
> Regards,
> Gwenole.
> 
> > From: Li, Jocelyn
> > Sent: Thursday, January 31, 2013 10:24 AM
> > To: Beauchesne, Gwenole; Xiang, Haihao
> > Cc: Zhao, Halley; Yuan, Feng; Zhong, CongX
> > Subject: FW: [Bug 58176] [gst-vaapi] gi4_video.bits decoding failed
> > (MPEG2)
> >
> >
> >
> > Hi Gwenole and Haihao,
> >
> >
> >
> > We need your comments on the solution to fix this issue.
> >
> >
> >
> > Thanks,
> >
> > Jocelyn
> >
> >
> >
> > From: bugzilla-daemon at freedesktop.org
> > [mailto:bugzilla-daemon at freedesktop.org]
> > Sent: Wednesday, January 30, 2013 5:19 PM
> > To: Li, Jocelyn
> > Subject: [Bug 58176] [gst-vaapi] gi4_video.bits decoding failed
> > (MPEG2)
> >
> >
> >
> > Comment # 5 on bug 58176 from Zhong Cong
> >
> > 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.
> >
> > ________________________________
> >
> > You are receiving this mail because:
> >
> > You are watching the assignee of the bug.
> >
> >
> > _______________________________________________
> > Libva mailing list
> > Libva at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libva
> >
-------------- next part --------------
An embedded message was scrubbed...
From: "Li, Xiaowei A" <xiaowei.a.li at intel.com>
Subject: RE: [Bug 58176] [gst-vaapi] gi4_video.bits decoding failed (MPEG2)
Date: Thu, 31 Jan 2013 05:46:58 +0000
Size: 8321
URL: <http://lists.freedesktop.org/archives/libva/attachments/20130131/d9c9e9df/attachment.mht>


More information about the Libva mailing list