diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2013-10-21 12:44:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-22 08:41:14 +0200 |
commit | c68faca68e211d8725fc5a1a88850cc3544e7960 (patch) | |
tree | 69d310ffa82a7bfba466847da6e359e16294a424 | |
parent | 1c8de4dd949c8bec5e547693d3cac6b42462a953 (diff) | |
download | ffmpeg-c68faca68e211d8725fc5a1a88850cc3544e7960.tar.gz |
hevc: fix transform_skip which is only valid for 4x4(cherry picked from commit 740e5a71e5121dbf3fabdc4fec97829c18ecc2d8)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/hevcdsp_template.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index 6c4331a050..bda1dee757 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -109,7 +109,6 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri { pixel *dst = (pixel*)_dst; ptrdiff_t stride = _stride / sizeof(pixel); - int size = 4; int shift = 13 - BIT_DEPTH; #if BIT_DEPTH <= 13 int offset = 1 << (shift - 1); @@ -117,39 +116,12 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri int offset = 0; #endif int x, y; - switch (size){ - case 32: - for (y = 0; y < 32*32; y+=32) { - for (x = 0; x < 32; x++) { - dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); - } - dst += stride; - } - break; - case 16: - for (y = 0; y < 16*16; y+=16) { - for (x = 0; x < 16; x++) { - dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); - } - dst += stride; - } - break; - case 8: - for (y = 0; y < 8*8; y+=8) { - for (x = 0; x < 8; x++) { - dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); - } - dst += stride; - } - break; - case 4: - for (y = 0; y < 4*4; y+=4) { - for (x = 0; x < 4; x++) { - dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); - } - dst += stride; - } - break; + + for (y = 0; y < 4*4; y+=4) { + for (x = 0; x < 4; x++) { + dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); + } + dst += stride; } } |