Skip to content

Commit

Permalink
vaapi: add vaapi_avs2 support
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jianfeng.zheng committed Jan 19, 2024
1 parent 7786263 commit 53f6287
Show file tree
Hide file tree
Showing 20 changed files with 2,451 additions and 27 deletions.
7 changes: 7 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2464,6 +2464,7 @@ HAVE_LIST="
zlib_gzip
openvino2
va_profile_avs
va_profile_avs2
"

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

# hardware-accelerated codecs
mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer"
Expand Down Expand Up @@ -7189,6 +7191,11 @@ if enabled vaapi; then
test_code cc va/va.h "VAProfile p1 = VAProfileAVSJizhun, p2 = VAProfileAVSGuangdian;" &&
enable va_profile_avs
enabled va_profile_avs && check_type "va/va.h va/va_dec_avs.h" "VAPictureParameterBufferAVS"

disable va_profile_avs2 &&
test_code cc va/va.h "VAProfile p1 = VAProfileAVS2Main, p2 = VAProfileAVS2Main10;" &&
enable va_profile_avs2
enabled va_profile_avs2 && check_type "va/va.h va/va_dec_avs2.h" "VAPictureParameterBufferAVS2"
fi

if enabled_all opencl libdrm ; then
Expand Down
2 changes: 2 additions & 0 deletions libavcodec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ OBJS-$(CONFIG_BRENDER_PIX_DECODER) += brenderpix.o
OBJS-$(CONFIG_C93_DECODER) += c93.o
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
cavsdata.o
OBJS-$(CONFIG_AVS2_DECODER) += avs2.o avs2dec.o avs2dec_headers.o
OBJS-$(CONFIG_CBD2_DECODER) += dpcm.o
OBJS-$(CONFIG_CCAPTION_DECODER) += ccaption_dec.o ass.o
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
Expand Down Expand Up @@ -1056,6 +1057,7 @@ OBJS-$(CONFIG_VP9_VDPAU_HWACCEL) += vdpau_vp9.o
OBJS-$(CONFIG_VP9_VIDEOTOOLBOX_HWACCEL) += videotoolbox_vp9.o
OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec.o
OBJS-$(CONFIG_CAVS_VAAPI_HWACCEL) += vaapi_cavs.o
OBJS-$(CONFIG_AVS2_VAAPI_HWACCEL) += vaapi_avs2.o

# Objects duplicated from other libraries for shared builds
SHLIBOBJS += log2_tab.o reverse.o
Expand Down
1 change: 1 addition & 0 deletions libavcodec/allcodecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extern const FFCodec ff_bmv_video_decoder;
extern const FFCodec ff_brender_pix_decoder;
extern const FFCodec ff_c93_decoder;
extern const FFCodec ff_cavs_decoder;
extern const FFCodec ff_avs2_decoder;
extern const FFCodec ff_cdgraphics_decoder;
extern const FFCodec ff_cdtoons_decoder;
extern const FFCodec ff_cdxl_decoder;
Expand Down
1 change: 1 addition & 0 deletions libavcodec/avcodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,7 @@ typedef struct AVCodecContext {
#define FF_PROFILE_EVC_MAIN 1
#endif


/**
* Encoding level descriptor.
* - encoding: Set by user, corresponds to a specific level defined by the
Expand Down
Loading

0 comments on commit 53f6287

Please sign in to comment.