Oops, it's based on a patch I never submitted. I'll redo them in the proper order.
On Sat, Dec 3, 2016 at 1:26 PM, Steve Lhomme <[email protected]> wrote: > From: Steve Lhomme <[email protected]> > > --- > libavcodec/dxva2.c | 8 ++++---- > libavcodec/dxva2_internal.h | 2 -- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c > index 12acfd2..960a957 100644 > --- a/libavcodec/dxva2.c > +++ b/libavcodec/dxva2.c > @@ -31,7 +31,7 @@ > > #define DEBUG_CONTEXT_LOCK 0 > > -void *ff_dxva2_get_surface(const AVFrame *frame) > +static inline void *get_surface(const AVFrame *frame) > { > return frame->data[3]; > } > @@ -40,7 +40,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext > *avctx, > const AVDXVAContext *ctx, > const AVFrame *frame) > { > - void *surface = ff_dxva2_get_surface(frame); > + void *surface = get_surface(frame); > unsigned i; > > for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) { > @@ -179,14 +179,14 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, > AVFrame *frame, > #endif /* DEBUG_CONTEXT_LOCK */ > } > hr = > ID3D11VideoContext_DecoderBeginFrame(D3D11VA_CONTEXT(ctx)->video_context, > D3D11VA_CONTEXT(ctx)->decoder, > - > ff_dxva2_get_surface(frame), > + get_surface(frame), > 0, NULL); > } > #endif > #if CONFIG_DXVA2 > if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) > hr = IDirectXVideoDecoder_BeginFrame(DXVA2_CONTEXT(ctx)->decoder, > - ff_dxva2_get_surface(frame), > + get_surface(frame), > NULL); > #endif > if (hr != E_PENDING || ++runs > 50) > diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h > index f0fe3d6..766af0b 100644 > --- a/libavcodec/dxva2_internal.h > +++ b/libavcodec/dxva2_internal.h > @@ -95,8 +95,6 @@ typedef union { > #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) > (ctx->d3d11va.cfg->ConfigResidDiffAccelerator) > #endif > > -void *ff_dxva2_get_surface(const AVFrame *frame); > - > unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, > const AVDXVAContext *, > const AVFrame *frame); > -- > 2.9.1 > _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
