[FFmpeg-cvslog] cuvid: Pass bit depth information to decoder
Philip Langdale
git at videolan.org
Fri Sep 23 04:40:32 EEST 2016
ffmpeg | branch: master | Philip Langdale <philipl at overt.org> | Sat Sep 3 12:52:52 2016 -0700| [289a6bb8b11822aaea1b174d5d938a081e19a084] | committer: Philip Langdale
cuvid: Pass bit depth information to decoder
Although cuvid can only output 8bit, it can consume HEVC Main10 if
the bit depth is set properly. In cases where >8bit is not supported,
this change is still beneficial as the decoder will fail to be
created instead of plowing throw and decoding as 8bit.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=289a6bb8b11822aaea1b174d5d938a081e19a084
---
libavcodec/cuvid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 2570848..ddf8b72 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -181,6 +181,7 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
cuinfo.ulNumDecodeSurfaces = MAX_FRAME_COUNT;
cuinfo.ulNumOutputSurfaces = 1;
cuinfo.ulCreationFlags = cudaVideoCreate_PreferCUVID;
+ cuinfo.bitDepthMinus8 = format->bit_depth_luma_minus8;
if (format->progressive_sequence) {
ctx->deint_mode = cuinfo.DeinterlaceMode = cudaVideoDeinterlaceMode_Weave;
@@ -573,6 +574,7 @@ static int cuvid_test_dummy_decoder(AVCodecContext *avctx, CUVIDPARSERPARAMS *cu
cuinfo.ulNumDecodeSurfaces = MAX_FRAME_COUNT;
cuinfo.ulNumOutputSurfaces = 1;
cuinfo.ulCreationFlags = cudaVideoCreate_PreferCUVID;
+ cuinfo.bitDepthMinus8 = 0;
cuinfo.DeinterlaceMode = cudaVideoDeinterlaceMode_Weave;
More information about the ffmpeg-cvslog
mailing list