Skip to content

Commit 060d785

Browse files
author
jianfeng.zheng
committed
vaapi: add vaapi_avs2 support
see intel/libva#738 [Moore Threads](https://www.mthreads.com) (short for Mthreads) is a Chinese GPU manufacturer. All our products, like MTTS70/MTTS80/.. , support AVS2 8bit/10bit HW decoding at max 8k resolution. Signed-off-by: jianfeng.zheng <[email protected]>
1 parent 7786263 commit 060d785

19 files changed

+2450
-27
lines changed

configure

+7
Original file line numberDiff line numberDiff line change
@@ -2464,6 +2464,7 @@ HAVE_LIST="
24642464
zlib_gzip
24652465
openvino2
24662466
va_profile_avs
2467+
va_profile_avs2
24672468
"
24682469

24692470
# options emitted with CONFIG_ prefix but not available on the command line
@@ -3204,6 +3205,7 @@ wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel"
32043205
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
32053206
wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
32063207
cavs_vaapi_hwaccel_deps="vaapi va_profile_avs VAPictureParameterBufferAVS"
3208+
avs2_vaapi_hwaccel_deps="vaapi va_profile_avs2 VAPictureParameterBufferAVS2"
32073209

32083210
# hardware-accelerated codecs
32093211
mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer"
@@ -7189,6 +7191,11 @@ if enabled vaapi; then
71897191
test_code cc va/va.h "VAProfile p1 = VAProfileAVSJizhun, p2 = VAProfileAVSGuangdian;" &&
71907192
enable va_profile_avs
71917193
enabled va_profile_avs && check_type "va/va.h va/va_dec_avs.h" "VAPictureParameterBufferAVS"
7194+
7195+
disable va_profile_avs2 &&
7196+
test_code cc va/va.h "VAProfile p1 = VAProfileAVS2Main, p2 = VAProfileAVS2Main10;" &&
7197+
enable va_profile_avs2
7198+
enabled va_profile_avs2 && check_type "va/va.h va/va_dec_avs2.h" "VAPictureParameterBufferAVS2"
71927199
fi
71937200

71947201
if enabled_all opencl libdrm ; then

libavcodec/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ OBJS-$(CONFIG_BRENDER_PIX_DECODER) += brenderpix.o
285285
OBJS-$(CONFIG_C93_DECODER) += c93.o
286286
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
287287
cavsdata.o
288+
OBJS-$(CONFIG_AVS2_DECODER) += avs2.o avs2dec.o avs2dec_headers.o
288289
OBJS-$(CONFIG_CBD2_DECODER) += dpcm.o
289290
OBJS-$(CONFIG_CCAPTION_DECODER) += ccaption_dec.o ass.o
290291
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
@@ -1056,6 +1057,7 @@ OBJS-$(CONFIG_VP9_VDPAU_HWACCEL) += vdpau_vp9.o
10561057
OBJS-$(CONFIG_VP9_VIDEOTOOLBOX_HWACCEL) += videotoolbox_vp9.o
10571058
OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec.o
10581059
OBJS-$(CONFIG_CAVS_VAAPI_HWACCEL) += vaapi_cavs.o
1060+
OBJS-$(CONFIG_AVS2_VAAPI_HWACCEL) += vaapi_avs2.o
10591061

10601062
# Objects duplicated from other libraries for shared builds
10611063
SHLIBOBJS += log2_tab.o reverse.o

libavcodec/allcodecs.c

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ extern const FFCodec ff_bmv_video_decoder;
7676
extern const FFCodec ff_brender_pix_decoder;
7777
extern const FFCodec ff_c93_decoder;
7878
extern const FFCodec ff_cavs_decoder;
79+
extern const FFCodec ff_avs2_decoder;
7980
extern const FFCodec ff_cdgraphics_decoder;
8081
extern const FFCodec ff_cdtoons_decoder;
8182
extern const FFCodec ff_cdxl_decoder;

0 commit comments

Comments
 (0)