[FFmpeg-devel] [PATCH]Remove CODEC_ID_H264_VDPAU

Michael Niedermayer michaelni
Fri Jan 16 04:41:36 CET 2009


On Fri, Jan 16, 2009 at 05:17:30AM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch removes CODEC_ID_H264_VDPAU from libavcodec.
>
> Please comment, Carl Eugen

> Index: libavcodec/h264.c
> ===================================================================
> --- libavcodec/h264.c	(revision 16579)
> +++ libavcodec/h264.c	(working copy)
> @@ -2189,7 +2189,7 @@
>  
>      if(avctx->codec_id == CODEC_ID_SVQ3)
>          avctx->pix_fmt= PIX_FMT_YUVJ420P;
> -    else if(avctx->codec_id == CODEC_ID_H264_VDPAU)
> +    else if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
>          avctx->pix_fmt= PIX_FMT_VDPAU_H264;
>      else
>          avctx->pix_fmt= PIX_FMT_YUV420P;

this isnt exactly pretty but i think reimar already said so ...
maybe we should consider ivans suggestion to use a new value of
AVCodecContext.xvmc_acceleration to identify VDPAU
but then maybe this isnt so easy, i dont know ...

[...]

> +                    if(h->is_avc) {
>                      static const uint8_t start_code[] = {0x00, 0x00, 0x01};
>                      ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code));
>                      ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed );
> +                    }else
> +                        ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed - 3], consumed + 3);
>                  }else
>                      context_count++;
>              }

hmm


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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/20090116/96bb7331/attachment.pgp>



More information about the ffmpeg-devel mailing list