Commit c68faca6 authored by Mickaël Raulet's avatar Mickaël Raulet Committed by Michael Niedermayer

hevc: fix transform_skip which is only valid for 4x4(cherry picked from commit...

hevc: fix transform_skip which is only valid for 4x4(cherry picked from commit 740e5a71e5121dbf3fabdc4fec97829c18ecc2d8)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1c8de4dd
...@@ -109,7 +109,6 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri ...@@ -109,7 +109,6 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri
{ {
pixel *dst = (pixel*)_dst; pixel *dst = (pixel*)_dst;
ptrdiff_t stride = _stride / sizeof(pixel); ptrdiff_t stride = _stride / sizeof(pixel);
int size = 4;
int shift = 13 - BIT_DEPTH; int shift = 13 - BIT_DEPTH;
#if BIT_DEPTH <= 13 #if BIT_DEPTH <= 13
int offset = 1 << (shift - 1); int offset = 1 << (shift - 1);
...@@ -117,39 +116,12 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri ...@@ -117,39 +116,12 @@ static void FUNC(transform_skip)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stri
int offset = 0; int offset = 0;
#endif #endif
int x, y; int x, y;
switch (size){
case 32: for (y = 0; y < 4*4; y+=4) {
for (y = 0; y < 32*32; y+=32) { for (x = 0; x < 4; x++) {
for (x = 0; x < 32; x++) { dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift));
dst[x] = av_clip_pixel(dst[x] + ((coeffs[y + x] + offset) >> shift)); }
} dst += stride;
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;
} }
} }
......
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