From c2d1e5f3a28a8421599a01d36aadb596e7048c1d Mon Sep 17 00:00:00 2001 From: rboy1 <3846367+rboy1@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:47:08 -0400 Subject: [PATCH] Added support for AV1 CUVID and DXVA2 decoding Add support for CUVID and DXVA2 AV1 decoding --- mpeg2dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpeg2dec.c b/mpeg2dec.c index 3caa63c..dc6f53f 100755 --- a/mpeg2dec.c +++ b/mpeg2dec.c @@ -1685,6 +1685,7 @@ int stream_component_open(VideoState *is, int stream_index) if (codecPar->codec_id == AV_CODEC_ID_MPEG4) codec_hw = avcodec_find_decoder_by_name("mpeg4_dxva2"); if (codecPar->codec_id == AV_CODEC_ID_VC1) codec_hw = avcodec_find_decoder_by_name("vc1_dxva2"); if (codecPar->codec_id == AV_CODEC_ID_HEVC) codec_hw = avcodec_find_decoder_by_name("hevc_dxva2"); + if (codecPar->codec_id == AV_CODEC_ID_AV1) codec_hw = avcodec_find_decoder_by_name("av1_dxva2"); } if (use_vdpau && !codec_hw) { @@ -1701,6 +1702,7 @@ int stream_component_open(VideoState *is, int stream_index) if (codecPar->codec_id == AV_CODEC_ID_HEVC) codec_hw = avcodec_find_decoder_by_name("hevc_cuvid"); if (codecPar->codec_id == AV_CODEC_ID_MPEG4) codec_hw = avcodec_find_decoder_by_name("mpeg4_cuvid"); if (codecPar->codec_id == AV_CODEC_ID_VC1) codec_hw = avcodec_find_decoder_by_name("vc1_cuvid"); + if (codecPar->codec_id == AV_CODEC_ID_AV1) codec_hw = avcodec_find_decoder_by_name("av1_cuvid"); } // If decoding in hardware try if running on a Raspberry Pi and then use it's decoder instead.