mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 09:35:22 +00:00
Simplify rotate_block()
Originally committed as revision 13167 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
177fa453db
commit
be4488dcbe
@ -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;
|
||||
int i=0, k=0;
|
||||
const short *ptr1 = source + BUFFERSIZE - offset;
|
||||
|
||||
while (target < end) {
|
||||
*(target++) = *(ptr3++);
|
||||
while (i<BLOCKSIZE) {
|
||||
target[i++] = ptr1[k++];
|
||||
|
||||
if (ptr3 == ptr2)
|
||||
ptr3 = ptr1;
|
||||
if (k == offset)
|
||||
k = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user