aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-04-04 01:47:12 -0300
committerJames Almer <jamrial@gmail.com>2018-04-04 02:13:40 -0300
commit2accdd3871a1f8c6ce0cf3f0e89fb04c47cc7148 (patch)
treeec90042edd5b860bd19aff6ecc123d5a647f4f31 /libavcodec
parenta866cc3ad3fba0b47268f7f5256dde8fc67045c4 (diff)
downloadffmpeg-2accdd3871a1f8c6ce0cf3f0e89fb04c47cc7148.tar.gz
avcodec/libaomdec: fix broken pix_fmt changes from the previous commit
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libaomdec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
index 9991af96c8..6a2de6d47a 100644
--- a/libavcodec/libaomdec.c
+++ b/libavcodec/libaomdec.c
@@ -103,11 +103,13 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
avctx->profile = FF_PROFILE_AV1_MAIN;
return 0;
} else if (img->bit_depth == 10) {
- avctx->pix_fmt = AV_PIX_FMT_YUV420P10;
+ avctx->pix_fmt = img->monochrome ?
+ AV_PIX_FMT_GRAY10 : AV_PIX_FMT_YUV420P10;
avctx->profile = FF_PROFILE_AV1_MAIN;
return 0;
} else if (img->bit_depth == 12) {
- avctx->pix_fmt = AV_PIX_FMT_YUV420P12;
+ avctx->pix_fmt = img->monochrome ?
+ AV_PIX_FMT_GRAY12 : AV_PIX_FMT_YUV420P12;
avctx->profile = FF_PROFILE_AV1_PROFESSIONAL;
return 0;
} else {
@@ -116,8 +118,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
case AOM_IMG_FMT_I422:
case AOM_IMG_FMT_I42216:
if (img->bit_depth == 8) {
- avctx->pix_fmt = img->monochrome ?
- AV_PIX_FMT_GRAY10 : AV_PIX_FMT_YUV420P10;
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P;
avctx->profile = FF_PROFILE_AV1_PROFESSIONAL;
return 0;
} else if (img->bit_depth == 10) {
@@ -134,8 +135,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
case AOM_IMG_FMT_I444:
case AOM_IMG_FMT_I44416:
if (img->bit_depth == 8) {
- avctx->pix_fmt = img->monochrome ?
- AV_PIX_FMT_GRAY12 : AV_PIX_FMT_YUV420P12;
+ avctx->pix_fmt = AV_PIX_FMT_YUV444P;
avctx->profile = FF_PROFILE_AV1_HIGH;
return 0;
} else if (img->bit_depth == 10) {