[FFmpeg-devel] [PATCH] lavc/dxva2: add ffmpeg calling dxva2 APIs
Michael Niedermayer
michaelni at gmx.at
Mon Jul 22 22:36:16 CEST 2013
On Mon, Jul 22, 2013 at 08:02:45PM +0200, fenrir at elivagar.org wrote:
> On Tue, Jul 16, 2013 at 03:40:48PM +0800, weixuan wang wrote:
[...]
> > > > > +static av_cold int dxva2dec_init(AVCodecContext *avctx)
> > > > > +{*
> >
> > *
> > > > > + DXVA2_DecoderContext *ctx = (DXVA2_DecoderContext
> > > > *)avctx->priv_data;*
> >
> > *> > > + dxva2_context *dxva2_ctx = (dxva2_context *)(&ctx->dxva2_ctx);
> > > > > + AVCodec *hwcodec, *codec;
> > > > > + int ret;
> > > > > + ctx->initialized = 0;
> > > > > + get_hw_soft_codec(avctx,ctx);
> > > > > + hwcodec = ctx->hwcodec;
> > > > > + codec = ctx->codec;
> > > > > + /* init pix_fmts of codec */
> > > > > + if (!hwcodec->pix_fmts) {
> > > > > + hwcodec->pix_fmts = dxva2_pixfmts;
> > > > > + }
> > > > I don't know how that works, could someone double check ?
> > > > *
> >
> > *> Sorry, do you mean does the code can run? I tested on my computer, it can
> > > run.*
> >
> > *I mean that it seems weird and may break some (but not all) valids way
> > to use libavcodec. But I don't have the knowledge to be sure.*
> >
> > *I have already tried to modify the code of the hwcodec and the codec. But
> > the code was necessary and can`t be removed.*
>
> Maybe it would be cleaner to use a new AVCodecContext, someone from the ffmpeg project
> could have a look.
I suspect a seperate AVCodecContext would be cleaner
[...]
--
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: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130722/d118d3c2/attachment.asc>
More information about the ffmpeg-devel
mailing list