mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/vaapi_hevc: Add vaapi profile parse support for SCC
Note that Screen-Extended Main 4:4:4 and 4:4:4 10 supports chroma_format_idc from 0, 1 or 3, hence both 420 and 444 are supported. Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
This commit is contained in:
parent
7373bb24f7
commit
fb1998f508
@ -410,7 +410,9 @@ static const struct {
|
||||
#endif
|
||||
#if VA_CHECK_VERSION(1, 2, 0) && CONFIG_HEVC_VAAPI_HWACCEL
|
||||
MAP(HEVC, HEVC_REXT, None,
|
||||
ff_vaapi_parse_hevc_rext_profile ),
|
||||
ff_vaapi_parse_hevc_rext_scc_profile ),
|
||||
MAP(HEVC, HEVC_SCC, None,
|
||||
ff_vaapi_parse_hevc_rext_scc_profile ),
|
||||
#endif
|
||||
MAP(MJPEG, MJPEG_HUFFMAN_BASELINE_DCT,
|
||||
JPEGBaseline),
|
||||
|
@ -591,9 +591,9 @@ static int ptl_convert(const PTLCommon *general_ptl, H265RawProfileTierLevel *h2
|
||||
}
|
||||
|
||||
/*
|
||||
* Find exact va_profile for HEVC Range Extension
|
||||
* Find exact va_profile for HEVC Range Extension and Screen Content Coding Extension
|
||||
*/
|
||||
VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx)
|
||||
VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx)
|
||||
{
|
||||
const HEVCContext *h = avctx->priv_data;
|
||||
const HEVCSPS *sps = h->ps.sps;
|
||||
@ -632,6 +632,16 @@ VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx)
|
||||
else if (!strcmp(profile->name, "Main 4:4:4 12") ||
|
||||
!strcmp(profile->name, "Main 4:4:4 12 Intra"))
|
||||
return VAProfileHEVCMain444_12;
|
||||
else if (!strcmp(profile->name, "Screen-Extended Main"))
|
||||
return VAProfileHEVCSccMain;
|
||||
else if (!strcmp(profile->name, "Screen-Extended Main 10"))
|
||||
return VAProfileHEVCSccMain10;
|
||||
else if (!strcmp(profile->name, "Screen-Extended Main 4:4:4"))
|
||||
return VAProfileHEVCSccMain444;
|
||||
#if VA_CHECK_VERSION(1, 8, 0)
|
||||
else if (!strcmp(profile->name, "Screen-Extended Main 4:4:4 10"))
|
||||
return VAProfileHEVCSccMain444_10;
|
||||
#endif
|
||||
#else
|
||||
av_log(avctx, AV_LOG_WARNING, "HEVC profile %s is "
|
||||
"not supported with this VA version.\n", profile->name);
|
||||
|
@ -22,6 +22,6 @@
|
||||
#include <va/va.h>
|
||||
#include "avcodec.h"
|
||||
|
||||
VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx);
|
||||
VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx);
|
||||
|
||||
#endif /* AVCODEC_VAAPI_HEVC_H */
|
||||
|
Loading…
Reference in New Issue
Block a user