]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/imgconvert.c
Merge commit '7520d9779c6d30b385df5a0a42da508238076192'
[ffmpeg] / libavcodec / imgconvert.c
index e872035e3940b01cca8b0699096a8491f4d857b0..a2bcdbcca79b10aad1c377369fad0a36c4320435 100644 (file)
@@ -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;