Mercurial > libavcodec.hg
comparison ra144.c @ 6831:5ea1c314fae9 libavcodec
Minor simplification of rotate_block()
author | vitor |
---|---|
date | Sat, 17 May 2008 14:42:55 +0000 |
parents | 13338d1e9d66 |
children | 9584a95fefcd |
comparison
equal
deleted
inserted
replaced
6830:13338d1e9d66 | 6831:5ea1c314fae9 |
---|---|
136 | 136 |
137 /* rotate block */ | 137 /* rotate block */ |
138 static void rotate_block(const short *source, short *target, int offset) | 138 static void rotate_block(const short *source, short *target, int offset) |
139 { | 139 { |
140 int i=0, k=0; | 140 int i=0, k=0; |
141 const short *ptr1 = source + BUFFERSIZE - offset; | 141 source += BUFFERSIZE - offset; |
142 | 142 |
143 while (i<BLOCKSIZE) { | 143 while (i<BLOCKSIZE) { |
144 target[i++] = ptr1[k++]; | 144 target[i++] = source[k++]; |
145 | 145 |
146 if (k == offset) | 146 if (k == offset) |
147 k = 0; | 147 k = 0; |
148 } | 148 } |
149 } | 149 } |