Skip to content

Commit

Permalink
lavc/qsvdec: Add VVC decoder
Browse files Browse the repository at this point in the history
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
  • Loading branch information
feiwan1 authored and xhaihao committed Jul 30, 2024
1 parent cf9c398 commit d30a9fd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ version <next>:
- perlin video source
- D3D12VA HEVC encoder
- Cropping metadata parsing and writing in Matroska and MP4/MOV de/muxers
- Intel QSV-accelerated VVC decoding


version 7.0:
- DXV DXT1 encoder
Expand Down
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3425,6 +3425,7 @@ vp9_vaapi_encoder_select="vaapi_encode"
vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9"
vp9_qsv_encoder_select="qsvenc"
vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m"
vvc_qsv_decoder_select="qsvdec"

# parsers
aac_parser_select="adts_header mpeg4audio"
Expand Down
2 changes: 1 addition & 1 deletion doc/decoders.texi
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Force to use a specific number of threads
@section QSV Decoders

The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
JPEG/MJPEG, VP8, VP9, AV1).
JPEG/MJPEG, VP8, VP9, AV1, VVC).

@subsection Common Options

Expand Down
1 change: 1 addition & 0 deletions libavcodec/allcodecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions libavcodec/qsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion libavcodec/qsvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion libavcodec/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down

0 comments on commit d30a9fd

Please sign in to comment.