From 83c7ac2e47efd96927127c1c385cdbb5fb53cb02 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 6 Oct 2018 20:20:58 -0700 Subject: 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. --- libavcodec/nvdec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavcodec/nvdec.h') diff --git a/libavcodec/nvdec.h b/libavcodec/nvdec.h index 85a0fcf..09ae8c3 100644 --- a/libavcodec/nvdec.h +++ b/libavcodec/nvdec.h @@ -61,6 +61,8 @@ typedef struct NVDECContext { unsigned *slice_offsets; int nb_slices; unsigned int slice_offsets_allocated; + + int supports_444; } NVDECContext; int ff_nvdec_decode_init(AVCodecContext *avctx); @@ -72,7 +74,8 @@ int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size); int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, - int dpb_size); + int dpb_size, + int supports_444); int ff_nvdec_get_ref_idx(AVFrame *frame); #endif /* AVCODEC_NVDEC_H */ -- cgit v1.1