Message info
 
To:Xiang, Haihao From:Gwenole Beauchesne Subject:Re: [Libva] [PATCH] mpeg2: fix incorrect slice_vertical_position from codec layers. Date:Thu, 29 Mar 2012 09:01:55 +0200
 

Hi,

2012/3/29 Xiang, Haihao <haihao.xiang@intel.com>:
>
>> + vpos = slice_param->slice_vertical_position;
>> + if (vpos >= mb_height || vpos == last_vpos + 2)
>> + return 1;
>
> Why is the workaround applied for vpos == last_vpos + 2 ? I think it is
> right that vpos = 0, 2, 4, ... for top field and vpos = 1, 3, 5, .. for
> bottom field.

No, this is wrong, and that was the bug. The codec layer passed wrong
info. The bitstream really has linearly increasing
slice_vertical_position, and this is what is expected by PVR: the
original bitstream info. Of course, we could have fixed PVR, but if
this is for all drivers to have the same workaround, that's a bit
silly. Let's use the proper way. Besides, some other PVR drivers can't
be fixed. Besides, this is extra computation we don't need. The Gen HW
also computes the target line correctly, based on TFF and first field.

> I still met GPU hang issue when playing some mpeg2 conformance tests
> such as sony-ct1.bits. The root cause is that the codec layers pass
> wrong parameters to the driver. I think a safe way to avoid GPU hang
> issue is not to decode the stream.

sony-ct1.bits works well, both with mplayer and gstreamer. For the
former, you need 2 patches I posted to the ffmpeg/libav dev lists. It
seems this also fixes support for DXVA along the way on Windows. :)

You also need master or v1.0-branch of the Gen driver.

Regards,
Gwenole.
_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libva