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

Michael Niedermayer michaelni
Tue Jan 13 19:37:50 CET 2009


On Mon, Jan 12, 2009 at 10:14:03PM +0000, Carl Eugen Hoyos wrote:
> 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.

libavcodec must correct codec_id in several cases, mpeg1/2 mp1/2/3 ac3/eac3
being some examples. Its possibly not done currently, and theres a bugreport
about the mp1/mp2/mp3 case
sub_id will be removed once it is not used anywere anymore.


> 
> [...]
> 
> > > +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?

through "mpegvideo_vdpau"
or through finding a CODEC_ID_MPEG1 that has the correct capability flags
set.

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- 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/20090113/df62b049/attachment.pgp>



More information about the ffmpeg-devel mailing list