Commit be4488dc authored by Vitor Sessak's avatar Vitor Sessak

Simplify rotate_block()

Originally committed as revision 13167 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 177fa453
......@@ -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;
}
}
......
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