mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libvpxdec: apply RGB to 444P16 instead of 422P16.
This commit is contained in:
parent
9b10ae5727
commit
02064d6b7b
@ -112,20 +112,10 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
|
||||
case VPX_IMG_FMT_I42216:
|
||||
avctx->profile = FF_PROFILE_VP9_3;
|
||||
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;
|
||||
#endif
|
||||
return 0;
|
||||
} 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;
|
||||
#endif
|
||||
return 0;
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
@ -146,10 +136,20 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
|
||||
case VPX_IMG_FMT_I44416:
|
||||
avctx->profile = FF_PROFILE_VP9_3;
|
||||
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_YUV444P10LE;
|
||||
#else
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV444P10LE;
|
||||
#endif
|
||||
return 0;
|
||||
} 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_YUV444P12LE;
|
||||
#else
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV444P12LE;
|
||||
#endif
|
||||
return 0;
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Loading…
Reference in New Issue
Block a user