[FFmpeg-devel] [PATCH 4/4] dxva2: allow an empty array of ID3D11VideoDecoderOutputView
Steve Lhomme
robux4 at gmail.com
Tue Jan 10 12:19:30 EET 2017
We can pick the correct slice index directly from the ID3D11VideoDecoderOutputView
casted from data[3].
---
libavcodec/dxva2_internal.h | 4 ++--
libavcodec/version.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index e5322ef..dfff4d6 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -78,7 +78,7 @@ typedef union {
#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))
+ (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD || ctx->dxva2.surface_count))
#elif CONFIG_DXVA2
#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->dxva2.workaround)
#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->dxva2.surface_count)
@@ -98,7 +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)
+#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg)
#endif
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index c5a8f55..7f1b0a4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 71
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
--
2.10.1.windows.1
More information about the ffmpeg-devel
mailing list