mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
libvpxdec: explicitly signal RGB.
This commit is contained in:
parent
4ecb8b4191
commit
10142f994a
@ -90,7 +90,12 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
|
|||||||
#endif
|
#endif
|
||||||
case VPX_IMG_FMT_I444:
|
case VPX_IMG_FMT_I444:
|
||||||
avctx->profile = FF_PROFILE_VP9_1;
|
avctx->profile = FF_PROFILE_VP9_1;
|
||||||
|
#if VPX_IMAGE_ABI_VERSION >= 3
|
||||||
|
avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ?
|
||||||
|
AV_PIX_FMT_GBRP : AV_PIX_FMT_YUV444P;
|
||||||
|
#else
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
|
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
|
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
|
||||||
case VPX_IMG_FMT_I42016:
|
case VPX_IMG_FMT_I42016:
|
||||||
@ -107,10 +112,20 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
|
|||||||
case VPX_IMG_FMT_I42216:
|
case VPX_IMG_FMT_I42216:
|
||||||
avctx->profile = FF_PROFILE_VP9_3;
|
avctx->profile = FF_PROFILE_VP9_3;
|
||||||
if (img->bit_depth == 10) {
|
if (img->bit_depth == 10) {
|
||||||
|
#if VPX_IMAGE_ABI_VERSION >= 3
|
||||||
|
avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ?
|
||||||
|
AV_PIX_FMT_GBRP10LE : AV_PIX_FMT_YUV422P10LE;
|
||||||
|
#else
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
|
avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
} else if (img->bit_depth == 12) {
|
} else if (img->bit_depth == 12) {
|
||||||
|
#if VPX_IMAGE_ABI_VERSION >= 3
|
||||||
|
avctx->pix_fmt = avctx->colorspace == AVCOL_SPC_RGB ?
|
||||||
|
AV_PIX_FMT_GBRP12LE : AV_PIX_FMT_YUV422P12LE;
|
||||||
|
#else
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE;
|
avctx->pix_fmt = AV_PIX_FMT_YUV422P12LE;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user