[FFmpeg-devel] [PATCH]VDPAU patch for MPEG1/2 decoding, round 6

Carl Eugen Hoyos cehoyos
Mon Jan 12 23:14:03 CET 2009


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > @@ -1218,7 +1219,12 @@
> >  
> >      if(avctx->xvmc_acceleration)
> >          return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420);
> > -    else{
> > +    else if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){
> 
> > +        if(avctx->sub_id == 1)
> 
> does a check for codec_id work too? if so i would prefer it

Yes.
Does your question mean that libavcodec is expected to change avctx->codec_id?
I had the impression that Reimar doubts this.

[...]

> > +AVCodec mpeg_vdpau_decoder = {
> > +    "mpegvideo_vdpau",
> > +    CODEC_TYPE_VIDEO,
> > +    CODEC_ID_MPEGVIDEO_VDPAU,
> 
> why actually is this not the normal CODEC_ID_MPEG1/2VIDEO ?
> This would simplify some code ...

So how should the calling application / MPlayer ask for hardware acceleration,
in your oppinion?

Carl Eugen






More information about the ffmpeg-devel mailing list