[FFmpeg-devel] [PATCH 09/16] lavc/hevcdec: support all color formats in videotoolbox hwaccel
James Almer
jamrial at gmail.com
Mon Nov 22 23:04:18 EET 2021
On 11/22/2021 5:53 PM, rcombs wrote:
> ---
> libavcodec/hevcdec.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index 3e19f4ebed..47c551237f 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -401,6 +401,10 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
> CONFIG_HEVC_VDPAU_HWACCEL)
> enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
>
> +#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
> + *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
Same, I'd rather keep the lines below and add one per new supported
bitdepth.
> +#endif
> +
> switch (sps->pix_fmt) {
> case AV_PIX_FMT_YUV420P:
> case AV_PIX_FMT_YUVJ420P:
> @@ -419,9 +423,6 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
> #endif
> #if CONFIG_HEVC_NVDEC_HWACCEL
> *fmt++ = AV_PIX_FMT_CUDA;
> -#endif
> -#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
> - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
> #endif
> break;
> case AV_PIX_FMT_YUV420P10:
> @@ -435,9 +436,6 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
> #if CONFIG_HEVC_VAAPI_HWACCEL
> *fmt++ = AV_PIX_FMT_VAAPI;
> #endif
> -#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL
> - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
> -#endif
> #if CONFIG_HEVC_VDPAU_HWACCEL
> *fmt++ = AV_PIX_FMT_VDPAU;
> #endif
>
More information about the ffmpeg-devel
mailing list