X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fimgconvert.c;h=a2bcdbcca79b10aad1c377369fad0a36c4320435;hb=e3fb8ac9564b6a3d86c5f60c940f2056a4faae56;hp=e872035e3940b01cca8b0699096a8491f4d857b0;hpb=5c43f3ddea40fc76264d647750f6986a9247aead;p=ffmpeg diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index e872035e394..a2bcdbcca79 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -113,7 +113,7 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, int src_color, dst_color; int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth; int ret, loss, i, nb_components; - int score = INT_MAX; + int score = INT_MAX - 1; if (dst_pix_fmt >= AV_PIX_FMT_NB || dst_pix_fmt <= AV_PIX_FMT_NONE) return ~0; @@ -148,7 +148,7 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, loss |= FF_LOSS_RESOLUTION; score -= 256 << dst_desc->log2_chroma_h; } - // dont favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side + // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 && dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) { score += 512;