[FFmpeg-devel] [PATCH] lavc/dxva2: add ffmpeg calling dxva2 APIs

Michael Niedermayer michaelni at gmx.at
Sun Jul 7 17:04:45 CEST 2013


On Sun, Jul 07, 2013 at 02:52:59PM +0200, fenrir at elivagar.org wrote:
> Hi,
> 
> On Mon, Jun 24, 2013 at 08:20:08PM +0800, Wei Gao wrote:
> > Thanks for your reply, some questions are as follows
[...]
> > > > +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 cant say it with 100% certainity without reviewing the whole patch
but i also think the code is wrong



[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20130707/649bdf1e/attachment.asc>


More information about the ffmpeg-devel mailing list