1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/av1dec: bit_depth cannot be another values than 8,10,12

Fixes: CID1544265 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-01 13:10:57 +02:00
parent f9218e4d52
commit fd7d24fa3f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -493,7 +493,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12) else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV444P12; pix_fmt = AV_PIX_FMT_YUV444P12;
else else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); av_assert0(0);
} else if (seq->color_config.subsampling_x == 1 && } else if (seq->color_config.subsampling_x == 1 &&
seq->color_config.subsampling_y == 0) { seq->color_config.subsampling_y == 0) {
if (bit_depth == 8) if (bit_depth == 8)
@ -503,7 +503,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12) else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV422P12; pix_fmt = AV_PIX_FMT_YUV422P12;
else else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); av_assert0(0);
} else if (seq->color_config.subsampling_x == 1 && } else if (seq->color_config.subsampling_x == 1 &&
seq->color_config.subsampling_y == 1) { seq->color_config.subsampling_y == 1) {
if (bit_depth == 8) if (bit_depth == 8)
@ -513,7 +513,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12) else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV420P12; pix_fmt = AV_PIX_FMT_YUV420P12;
else else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); av_assert0(0);
} }
} else { } else {
if (bit_depth == 8) if (bit_depth == 8)
@ -523,7 +523,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12) else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_GRAY12; pix_fmt = AV_PIX_FMT_GRAY12;
else else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n"); av_assert0(0);
} }
return pix_fmt; return pix_fmt;