diff options
author | Philip Langdale <philipl@overt.org> | 2018-10-06 20:20:58 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2019-02-16 08:47:36 -0800 |
commit | 83c7ac2e47efd96927127c1c385cdbb5fb53cb02 (patch) | |
tree | 81acf95f1623d5d1d15e4d282a4d15f472499b77 /libavcodec/nvdec_hevc.c | |
parent | e06ccfbe1d33c00d6f1df202a514219c7fdb7c03 (diff) |
avcodec/nvdec: Explicitly mark codecs that support 444 output formats
With the introduction of HEVC 444 support, we technically have two
codecs that can handle 444 - HEVC and MJPEG. In the case of MJPEG,
it can decode, but can only output one of the semi-planar formats.
That means we need additional logic to decide whether to use a
444 output format or not.
Diffstat (limited to 'libavcodec/nvdec_hevc.c')
-rw-r--r-- | libavcodec/nvdec_hevc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c index d11b5e8a38..590278ba04 100644 --- a/libavcodec/nvdec_hevc.c +++ b/libavcodec/nvdec_hevc.c @@ -299,7 +299,13 @@ static int nvdec_hevc_frame_params(AVCodecContext *avctx, { const HEVCContext *s = avctx->priv_data; const HEVCSPS *sps = s->ps.sps; - return ff_nvdec_frame_params(avctx, hw_frames_ctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1); + return ff_nvdec_frame_params(avctx, hw_frames_ctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1, 1); +} + +static int nvdec_hevc_decode_init(AVCodecContext *avctx) { + NVDECContext *ctx = avctx->internal->hwaccel_priv_data; + ctx->supports_444 = 1; + return ff_nvdec_decode_init(avctx); } const AVHWAccel ff_hevc_nvdec_hwaccel = { @@ -311,7 +317,7 @@ const AVHWAccel ff_hevc_nvdec_hwaccel = { .end_frame = ff_nvdec_end_frame, .decode_slice = nvdec_hevc_decode_slice, .frame_params = nvdec_hevc_frame_params, - .init = ff_nvdec_decode_init, + .init = nvdec_hevc_decode_init, .uninit = ff_nvdec_decode_uninit, .priv_data_size = sizeof(NVDECContext), }; |