mirror of https://git.ffmpeg.org/ffmpeg.git
lavc/h264dec: support all color formats in videotoolbox hwaccel
This commit is contained in:
parent
f0952f87bc
commit
caad1146e2
|
@ -811,6 +811,10 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
|
||||||
*fmt++ = AV_PIX_FMT_YUV420P9;
|
*fmt++ = AV_PIX_FMT_YUV420P9;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
|
#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL
|
||||||
|
if (h->avctx->colorspace != AVCOL_SPC_RGB)
|
||||||
|
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
|
||||||
|
#endif
|
||||||
if (CHROMA444(h)) {
|
if (CHROMA444(h)) {
|
||||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||||
*fmt++ = AV_PIX_FMT_GBRP10;
|
*fmt++ = AV_PIX_FMT_GBRP10;
|
||||||
|
@ -849,6 +853,10 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_H264_NVDEC_HWACCEL
|
#if CONFIG_H264_NVDEC_HWACCEL
|
||||||
*fmt++ = AV_PIX_FMT_CUDA;
|
*fmt++ = AV_PIX_FMT_CUDA;
|
||||||
|
#endif
|
||||||
|
#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL
|
||||||
|
if (h->avctx->colorspace != AVCOL_SPC_RGB)
|
||||||
|
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
|
||||||
#endif
|
#endif
|
||||||
if (CHROMA444(h)) {
|
if (CHROMA444(h)) {
|
||||||
if (h->avctx->colorspace == AVCOL_SPC_RGB)
|
if (h->avctx->colorspace == AVCOL_SPC_RGB)
|
||||||
|
@ -872,9 +880,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_H264_VAAPI_HWACCEL
|
#if CONFIG_H264_VAAPI_HWACCEL
|
||||||
*fmt++ = AV_PIX_FMT_VAAPI;
|
*fmt++ = AV_PIX_FMT_VAAPI;
|
||||||
#endif
|
|
||||||
#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL
|
|
||||||
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
|
|
||||||
#endif
|
#endif
|
||||||
if (h->avctx->codec->pix_fmts)
|
if (h->avctx->codec->pix_fmts)
|
||||||
choices = h->avctx->codec->pix_fmts;
|
choices = h->avctx->codec->pix_fmts;
|
||||||
|
|
Loading…
Reference in New Issue