In this function, the exact same clamping happens both in the if and 
unconditionally.

Signed-off-by: Lauri Kasanen <c...@gmx.com>
---
 libswscale/output.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index d7c53e6..8441ddd 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -846,13 +846,6 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
             int U  = (ubuf0[i]       +64) >> 7;
             int V  = (vbuf0[i]       +64) >> 7;

-            if ((Y1 | Y2 | U | V) & 0x100) {
-                Y1 = av_clip_uint8(Y1);
-                Y2 = av_clip_uint8(Y2);
-                U  = av_clip_uint8(U);
-                V  = av_clip_uint8(V);
-            }
-
             Y1 = av_clip_uint8(Y1);
             Y2 = av_clip_uint8(Y2);
             U  = av_clip_uint8(U);
@@ -868,13 +861,6 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
             int U  = (ubuf0[i] + ubuf1[i]+128) >> 8;
             int V  = (vbuf0[i] + vbuf1[i]+128) >> 8;

-            if ((Y1 | Y2 | U | V) & 0x100) {
-                Y1 = av_clip_uint8(Y1);
-                Y2 = av_clip_uint8(Y2);
-                U  = av_clip_uint8(U);
-                V  = av_clip_uint8(V);
-            }
-
             Y1 = av_clip_uint8(Y1);
             Y2 = av_clip_uint8(Y2);
             U  = av_clip_uint8(U);
--
2.6.2

_______________________________________________
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".

Reply via email to