]> git.sesse.net Git - ffmpeg/commitdiff
swscale: Remove duplicated code
authorLauri Kasanen <cand@gmx.com>
Sun, 24 Mar 2019 11:00:39 +0000 (13:00 +0200)
committerLauri Kasanen <cand@gmx.com>
Wed, 27 Mar 2019 07:00:06 +0000 (09:00 +0200)
In this function, the exact same clamping happens both in the if and unconditionally.

libswscale/output.c

index d7c53e60d9fb02769229072bde577233b1cc78a1..d3401f0cd1e19236b2d0c6861df9737207204dc0 100644 (file)
@@ -853,11 +853,6 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
                 V  = av_clip_uint8(V);
             }
 
-            Y1 = av_clip_uint8(Y1);
-            Y2 = av_clip_uint8(Y2);
-            U  = av_clip_uint8(U);
-            V  = av_clip_uint8(V);
-
             output_pixels(i * 4, Y1, U, Y2, V);
         }
     } else {
@@ -875,11 +870,6 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
                 V  = av_clip_uint8(V);
             }
 
-            Y1 = av_clip_uint8(Y1);
-            Y2 = av_clip_uint8(Y2);
-            U  = av_clip_uint8(U);
-            V  = av_clip_uint8(V);
-
             output_pixels(i * 4, Y1, U, Y2, V);
         }
     }