summaryrefslogtreecommitdiff
path: root/libavcodec/fic.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-04-23 12:18:36 -0400
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-04-23 12:40:39 -0400
commit7596fc3d4b616318ac42a6cc011fe20f3ff7aaa9 (patch)
tree678e25f2bf99b00d4d5b0caa05943b226fd8d154 /libavcodec/fic.c
parente299cb2cd37330bf58225d45b06dc179f8dd8dac (diff)
fic: Remove redundant clips
The equations can't overflow or underflow anyway. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/fic.c')
-rw-r--r--libavcodec/fic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 0f9f798e43..45f56b9558 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;