History

avcodec/cuviddec: add av1 support

Roman Arzumanyan committed 6 years ago

Commit b23e6ae1 parent b7f51424 files · +16 −1Browse files

Unified · Split

4 files
  1. configure +1 −0
  2. libavcodec/allcodecs.c +1 −0
  3. libavcodec/cuviddec.c +13 −0
  4. libavcodec/version.h +1 −1
configure+1−0
@@ -3052,6 +3052,7 @@ nvenc_encoder_deps="nvenc" · 3051 unmodified lines
3052 3052
3053aac_mf_encoder_deps="mediafoundation"3053aac_mf_encoder_deps="mediafoundation"
3054ac3_mf_encoder_deps="mediafoundation"3054ac3_mf_encoder_deps="mediafoundation"
3055av1_cuvid_decoder_deps="cuvid"
3055h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m"3056h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m"
3056h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m"3057h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m"
3057h264_amf_encoder_deps="amf"3058h264_amf_encoder_deps="amf"
libavcodec/allcodecs.c+1−0
@@ -769,6 +769,7 @@ extern AVCodec ff_idf_decoder; · 768 unmodified lines
769 * above is available */769 * above is available */
770extern AVCodec ff_aac_mf_encoder;770extern AVCodec ff_aac_mf_encoder;
771extern AVCodec ff_ac3_mf_encoder;771extern AVCodec ff_ac3_mf_encoder;
772extern AVCodec ff_av1_cuvid_decoder;
772extern AVCodec ff_h263_v4l2m2m_encoder;773extern AVCodec ff_h263_v4l2m2m_encoder;
773extern AVCodec ff_libaom_av1_decoder;774extern AVCodec ff_libaom_av1_decoder;
774/* hwaccel hooks only, so prefer external decoders */775/* hwaccel hooks only, so prefer external decoders */
libavcodec/cuviddec.c+13−0
@@ -42,6 +42,10 @@ · 41 unmodified lines
42#define cudaVideoSurfaceFormat_YUV444_16Bit 342#define cudaVideoSurfaceFormat_YUV444_16Bit 3
43#endif43#endif
44 44
45#if NVDECAPI_CHECK_VERSION(11, 0)
46#define CUVID_HAS_AV1_SUPPORT
47#endif
48
45typedef struct CuvidContext49typedef struct CuvidContext
46{50{
47 AVClass *avclass;51 AVClass *avclass;
@@ -939,6 +943,11 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx) · 891 unmodified lines
939 case AV_CODEC_ID_VC1:943 case AV_CODEC_ID_VC1:
940 ctx->cuparseinfo.CodecType = cudaVideoCodec_VC1;944 ctx->cuparseinfo.CodecType = cudaVideoCodec_VC1;
941 break;945 break;
946#endif
947#if CONFIG_AV1_CUVID_DECODER && defined(CUVID_HAS_AV1_SUPPORT)
948 case AV_CODEC_ID_AV1:
949 ctx->cuparseinfo.CodecType = cudaVideoCodec_AV1;
950 break;
942#endif951#endif
943 default:952 default:
944 av_log(avctx, AV_LOG_ERROR, "Invalid CUVID codec!\n");953 av_log(avctx, AV_LOG_ERROR, "Invalid CUVID codec!\n");
@@ -1134,6 +1143,10 @@ static const AVCodecHWConfigInternal *cuvid_hw_configs[] = { · 189 unmodified lines
1134 .wrapper_name = "cuvid", \1143 .wrapper_name = "cuvid", \
1135 };1144 };
1136 1145
1146#if CONFIG_AV1_CUVID_DECODER && defined(CUVID_HAS_AV1_SUPPORT)
1147DEFINE_CUVID_CODEC(av1, AV1, NULL)
1148#endif
1149
1137#if CONFIG_HEVC_CUVID_DECODER1150#if CONFIG_HEVC_CUVID_DECODER
1138DEFINE_CUVID_CODEC(hevc, HEVC, "hevc_mp4toannexb")1151DEFINE_CUVID_CODEC(hevc, HEVC, "hevc_mp4toannexb")
1139#endif1152#endif
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29 29
30#define LIBAVCODEC_VERSION_MAJOR 5830#define LIBAVCODEC_VERSION_MAJOR 58
31#define LIBAVCODEC_VERSION_MINOR 11131#define LIBAVCODEC_VERSION_MINOR 111
32#define LIBAVCODEC_VERSION_MICRO 10032#define LIBAVCODEC_VERSION_MICRO 101
33 33
34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
35 LIBAVCODEC_VERSION_MINOR, \35 LIBAVCODEC_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t