[FFmpeg-devel] [PATCH] VAAPI: Fix MPEG-4 decoding of video clips with B-frames
Michael Niedermayer
michaelni
Tue Apr 13 14:25:28 CEST 2010
On Tue, Apr 13, 2010 at 09:12:06AM +0200, Gwenole Beauchesne wrote:
> Hi,
>
> This patch fixes MPEG-4 decoding of video clips with B-frames. This works
> on NVIDIA HW but GMA500 seems to require this addition, which looks weird
> to me:
>
> --- a/libavcodec/vaapi_mpeg4.c
> +++ b/libavcodec/vaapi_mpeg4.c
> @@ -91,9 +91,11 @@ static int vaapi_mpeg4_start_frame(AVCodecContext
> *avctx, av_unused const uint8_
> pic_param->TRB = s->pb_time;
> pic_param->TRD = s->pp_time;
>
> - if (s->pict_type == FF_B_TYPE)
> - pic_param->backward_reference_picture =
> ff_vaapi_get_surface_id(&s->next_picture);
> - if (s->pict_type != FF_I_TYPE)
> + if (s->pict_type == FF_B_TYPE) {
> + pic_param->forward_reference_picture =
> ff_vaapi_get_surface_id(&s->next_picture);
> + pic_param->backward_reference_picture =
> ff_vaapi_get_surface_id(&s->last_picture);
> + }
> + else if (s->pict_type != FF_I_TYPE)
> pic_param->forward_reference_picture =
> ff_vaapi_get_surface_id(&s->last_picture);
patch mangled
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100413/6332476c/attachment.pgp>
More information about the ffmpeg-devel
mailing list