summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-11 13:43:02 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-11 19:35:22 -0400
commit02064d6b7bb93d7e85309fb48ee1d2b25f59e452 (patch)
treeb9ae7505cf1c53c17a3bebc648797f3e3ac4f6d8 /libavcodec/libvpxdec.c
parent9b10ae5727c71c6a59c629cc2fd5b53d9fcfa38d (diff)
libvpxdec: apply RGB to 444P16 instead of 422P16.
Diffstat (limited to 'libavcodec/libvpxdec.c')
-rw-r--r--libavcodec/libvpxdec.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index eb05f267ea..7267590e01 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -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;