[SCM] libav/experimental: fic: Remove redundant clips

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:02:56 UTC 2014


The following commit has been merged in the experimental branch:
commit 7596fc3d4b616318ac42a6cc011fe20f3ff7aaa9
Author: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Date:   Wed Apr 23 12:18:36 2014 -0400

    fic: Remove redundant clips
    
    The equations can't overflow or underflow anyway.
    
    Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 0f9f798..45f56b9 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -209,9 +209,9 @@ static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y)
 
     /* Convert to YUVA444. */
     for (i = 0; i < 1024; i++) {
-        planes[0][i] = av_clip_uint8((( 25 * ptr[0] + 129 * ptr[1] +  66 * ptr[2]) / 255) + 16);
-        planes[1][i] = av_clip_uint8(((-38 * ptr[0] + 112 * ptr[1] + -74 * ptr[2]) / 255) + 128);
-        planes[2][i] = av_clip_uint8(((-18 * ptr[0] + 112 * ptr[1] + -94 * ptr[2]) / 255) + 128);
+        planes[0][i] = (( 25 * ptr[0] + 129 * ptr[1] +  66 * ptr[2]) / 255) + 16;
+        planes[1][i] = ((-38 * ptr[0] + 112 * ptr[1] + -74 * ptr[2]) / 255) + 128;
+        planes[2][i] = ((-18 * ptr[0] + 112 * ptr[1] + -94 * ptr[2]) / 255) + 128;
         planes[3][i] = ptr[3];
 
         ptr += 4;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list