diff options
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r-- | libavcodec/ra144.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 10a812b745..bf384b9d9d 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -141,19 +141,14 @@ static void do_output_subblock(Real144_internal *glob, const unsigned short *gs /* rotate block */ static void rotate_block(const short *source, short *target, int offset) { - short *end; - const short *ptr1; - const short *ptr2; - const short *ptr3; - ptr2 = source + BUFFERSIZE; - ptr3 = ptr1 = ptr2 - offset; - end = target + BLOCKSIZE; - - while (target < end) { - *(target++) = *(ptr3++); - - if (ptr3 == ptr2) - ptr3 = ptr1; + int i=0, k=0; + const short *ptr1 = source + BUFFERSIZE - offset; + + while (i<BLOCKSIZE) { + target[i++] = ptr1[k++]; + + if (k == offset) + k = 0; } } |