summaryrefslogtreecommitdiff
path: root/libavcodec/hevcdsp_template.c
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2014-01-11 22:46:25 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-01-21 11:58:52 +0100
commitfaf03ecba03155bb1f5416713bd01da043863b43 (patch)
treec599e411b308a2485bebfa9022508166e6835838 /libavcodec/hevcdsp_template.c
parenta246d06fe0dc6c2ea65e95327624b4537ff9bd0d (diff)
hevc: Remove useless clip
The src buffer should only contain values in the interval [0, (1 << BIT_DEPTH) - 1]. Since shift = (BIT_DEPTH - 5), src[x] >> shift must be in the interval [0, 31], so no clip is needed. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/hevcdsp_template.c')
-rw-r--r--libavcodec/hevcdsp_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 7ebe490cc4..104c1eb3df 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -393,7 +393,7 @@ static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src,
offset_table[(k + sao_left_class) & 31] = sao_offset_val[k + 1];
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++)
- dst[x] = av_clip_pixel(src[x] + offset_table[av_clip_pixel(src[x] >> shift)]);
+ dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]);
dst += stride;
src += stride;
}