diff options
author | Fei Wang <fei.w.wang@intel.com> | 2024-06-14 16:28:54 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2024-07-30 13:40:21 +0800 |
commit | d30a9fdc809c90fa39549e7dc9f040824488999a (patch) | |
tree | e83b08f22f717a9e5d1f4cc66d5ab8d3bc589ae1 /libavcodec | |
parent | cf9c398fc1c4efc53c0fdd9cd6a8099b9b2d4012 (diff) | |
download | ffmpeg-d30a9fdc809c90fa39549e7dc9f040824488999a.tar.gz |
lavc/qsvdec: Add VVC decoder
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/allcodecs.c | 1 | ||||
-rw-r--r-- | libavcodec/qsv.c | 4 | ||||
-rw-r--r-- | libavcodec/qsvdec.c | 7 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 9598e0fea2..09385be4ee 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -887,6 +887,7 @@ extern const FFCodec ff_vp9_mediacodec_encoder; extern const FFCodec ff_vp9_qsv_decoder; extern const FFCodec ff_vp9_vaapi_encoder; extern const FFCodec ff_vp9_qsv_encoder; +extern const FFCodec ff_vvc_qsv_decoder; // null codecs extern const FFCodec ff_vnull_decoder; diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 0c6fbd0dc0..221c1b24e5 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -73,6 +73,10 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id) case AV_CODEC_ID_AV1: return MFX_CODEC_AV1; #endif +#if QSV_VERSION_ATLEAST(2, 11) + case AV_CODEC_ID_VVC: + return MFX_CODEC_VVC; +#endif default: break; diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index f2cd6ae05c..9ad3439991 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -933,7 +933,8 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, frame->pict_type = ff_qsv_map_pictype(aframe.frame->dec_info.FrameType); if (avctx->codec_id == AV_CODEC_ID_H264 || - avctx->codec_id == AV_CODEC_ID_HEVC) { + avctx->codec_id == AV_CODEC_ID_HEVC || + avctx->codec_id == AV_CODEC_ID_VVC) { if (aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR) frame->flags |= AV_FRAME_FLAG_KEY; else @@ -1300,3 +1301,7 @@ DEFINE_QSV_DECODER(vp9, VP9, NULL) #if CONFIG_AV1_QSV_DECODER DEFINE_QSV_DECODER(av1, AV1, NULL) #endif + +#if CONFIG_VVC_QSV_DECODER +DEFINE_QSV_DECODER(vvc, VVC, NULL) +#endif diff --git a/libavcodec/version.h b/libavcodec/version.h index 80e2ae630d..8b53586be1 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 10 +#define LIBAVCODEC_VERSION_MINOR 11 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |