diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-05-15 18:42:05 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-05-15 18:42:05 +0000 |
commit | be4488dcbe76a98a83e00be4d53a3b6d5214f039 (patch) | |
tree | b0002ff06f17c42fa778fa3bb204fbb8c4e41a0d /libavcodec/ra144.c | |
parent | 177fa453dbdd1ce5fdd2d83861bb251479b63d60 (diff) | |
download | ffmpeg-be4488dcbe76a98a83e00be4d53a3b6d5214f039.tar.gz |
Simplify rotate_block()
Originally committed as revision 13167 to svn://svn.ffmpeg.org/ffmpeg/trunk
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; } } |