Skip to content
Snippets Groups Projects
Commit d5343a50 authored by James Almer's avatar James Almer
Browse files

avcodec/libaomdec: remove duplicate code


Signed-off-by: default avatarJames Almer <jamrial@gmail.com>
parent 673604e0
No related branches found
No related tags found
No related merge requests found
...@@ -95,17 +95,6 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img) ...@@ -95,17 +95,6 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
switch (img->fmt) { switch (img->fmt) {
case AOM_IMG_FMT_I420: case AOM_IMG_FMT_I420:
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->profile = FF_PROFILE_AV1_MAIN;
return 0;
case AOM_IMG_FMT_I422:
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
avctx->profile = FF_PROFILE_AV1_PROFESSIONAL;
return 0;
case AOM_IMG_FMT_I444:
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
avctx->profile = FF_PROFILE_AV1_HIGH;
return 0;
case AOM_IMG_FMT_I42016: case AOM_IMG_FMT_I42016:
if (img->bit_depth == 8) { if (img->bit_depth == 8) {
avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->pix_fmt = AV_PIX_FMT_YUV420P;
...@@ -122,6 +111,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img) ...@@ -122,6 +111,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
} else { } else {
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
case AOM_IMG_FMT_I422:
case AOM_IMG_FMT_I42216: case AOM_IMG_FMT_I42216:
if (img->bit_depth == 8) { if (img->bit_depth == 8) {
avctx->pix_fmt = AV_PIX_FMT_YUV422P; avctx->pix_fmt = AV_PIX_FMT_YUV422P;
...@@ -138,6 +128,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img) ...@@ -138,6 +128,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct aom_image *img)
} else { } else {
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
case AOM_IMG_FMT_I444:
case AOM_IMG_FMT_I44416: case AOM_IMG_FMT_I44416:
if (img->bit_depth == 8) { if (img->bit_depth == 8) {
avctx->pix_fmt = AV_PIX_FMT_YUV444P; avctx->pix_fmt = AV_PIX_FMT_YUV444P;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment