|
|
|
@ -76,6 +76,9 @@ typedef union { |
|
|
|
|
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigBitstreamRaw : ctx->dxva2.cfg->ConfigBitstreamRaw) |
|
|
|
|
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigIntraResidUnsigned : ctx->dxva2.cfg->ConfigIntraResidUnsigned) |
|
|
|
|
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigResidDiffAccelerator : ctx->dxva2.cfg->ConfigResidDiffAccelerator) |
|
|
|
|
#define DXVA_CONTEXT_VALID(avctx, ctx) (DXVA_CONTEXT_DECODER(avctx, ctx) && \ |
|
|
|
|
DXVA_CONTEXT_CFG(avctx, ctx) && \
|
|
|
|
|
DXVA_CONTEXT_COUNT(avctx, ctx)) |
|
|
|
|
#elif CONFIG_DXVA2 |
|
|
|
|
#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->dxva2.workaround) |
|
|
|
|
#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->dxva2.surface_count) |
|
|
|
@ -85,6 +88,7 @@ typedef union { |
|
|
|
|
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->dxva2.cfg->ConfigBitstreamRaw) |
|
|
|
|
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->dxva2.cfg->ConfigIntraResidUnsigned) |
|
|
|
|
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->dxva2.cfg->ConfigResidDiffAccelerator) |
|
|
|
|
#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->dxva2.decoder && ctx->dxva2.cfg && ctx->dxva2.surface_count) |
|
|
|
|
#elif CONFIG_D3D11VA |
|
|
|
|
#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->d3d11va.workaround) |
|
|
|
|
#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->d3d11va.surface_count) |
|
|
|
@ -94,6 +98,7 @@ typedef union { |
|
|
|
|
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->d3d11va.cfg->ConfigBitstreamRaw) |
|
|
|
|
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->d3d11va.cfg->ConfigIntraResidUnsigned) |
|
|
|
|
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator) |
|
|
|
|
#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg && ctx->d3d11va.surface_count) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, |
|
|
|
|