Commit b00a8b4d authored by Guillaume Martres's avatar Guillaume Martres Committed by Michael Niedermayer

hevc: remove useless clip in FUNC(sao_band_filter)()

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.

This removes the code that was changed in 5856bca3
as the clip that was repositioned in that commit is removed
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c9fe0caf
......@@ -395,7 +395,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment