Commit f8a42d4f authored by Steve Lhomme's avatar Steve Lhomme Committed by Diego Biurrun

dxva2: Make ff_dxva2_get_surface() static and drop its name prefix

Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 9026ec8a
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "dxva2_internal.h" #include "dxva2_internal.h"
void *ff_dxva2_get_surface(const AVFrame *frame) static void *get_surface(const AVFrame *frame)
{ {
return frame->data[3]; return frame->data[3];
} }
...@@ -38,7 +38,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, ...@@ -38,7 +38,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
const AVDXVAContext *ctx, const AVDXVAContext *ctx,
const AVFrame *frame) const AVFrame *frame)
{ {
void *surface = ff_dxva2_get_surface(frame); void *surface = get_surface(frame);
unsigned i; unsigned i;
for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) { for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {
...@@ -158,14 +158,14 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame, ...@@ -158,14 +158,14 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
if (D3D11VA_CONTEXT(ctx)->context_mutex != INVALID_HANDLE_VALUE) if (D3D11VA_CONTEXT(ctx)->context_mutex != INVALID_HANDLE_VALUE)
WaitForSingleObjectEx(D3D11VA_CONTEXT(ctx)->context_mutex, INFINITE, FALSE); WaitForSingleObjectEx(D3D11VA_CONTEXT(ctx)->context_mutex, INFINITE, FALSE);
hr = ID3D11VideoContext_DecoderBeginFrame(D3D11VA_CONTEXT(ctx)->video_context, D3D11VA_CONTEXT(ctx)->decoder, hr = ID3D11VideoContext_DecoderBeginFrame(D3D11VA_CONTEXT(ctx)->video_context, D3D11VA_CONTEXT(ctx)->decoder,
ff_dxva2_get_surface(frame), get_surface(frame),
0, NULL); 0, NULL);
} }
#endif #endif
#if CONFIG_DXVA2 #if CONFIG_DXVA2
if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD)
hr = IDirectXVideoDecoder_BeginFrame(DXVA2_CONTEXT(ctx)->decoder, hr = IDirectXVideoDecoder_BeginFrame(DXVA2_CONTEXT(ctx)->decoder,
ff_dxva2_get_surface(frame), get_surface(frame),
NULL); NULL);
#endif #endif
if (hr != E_PENDING || ++runs > 50) if (hr != E_PENDING || ++runs > 50)
......
...@@ -91,8 +91,6 @@ typedef union { ...@@ -91,8 +91,6 @@ typedef union {
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator) #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator)
#endif #endif
void *ff_dxva2_get_surface(const AVFrame *frame);
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
const AVDXVAContext *, const AVDXVAContext *,
const AVFrame *frame); const AVFrame *frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment