Signed-off-by: Nicolas George <geo...@nsup.org> --- libavutil/pixdesc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index f1898a6a13..967de7dcde 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2721,10 +2721,10 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components); for (i = 0; i < nb_components; i++) { - int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1); - if (src_desc->comp[i].depth - 1 > depth_minus1 && (consider & FF_LOSS_DEPTH)) { + int depth = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components + 1 : dst_desc->comp[i].depth; + if (src_desc->comp[i].depth > depth && (consider & FF_LOSS_DEPTH)) { loss |= FF_LOSS_DEPTH; - score -= 65536 >> depth_minus1; + score -= 131072 >> depth; } } -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".