mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02: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 */
|
/* rotate block */
|
||||||
static void rotate_block(const short *source, short *target, int offset)
|
static void rotate_block(const short *source, short *target, int offset)
|
||||||
{
|
{
|
||||||
short *end;
|
int i=0, k=0;
|
||||||
const short *ptr1;
|
const short *ptr1 = source + BUFFERSIZE - offset;
|
||||||
const short *ptr2;
|
|
||||||
const short *ptr3;
|
|
||||||
ptr2 = source + BUFFERSIZE;
|
|
||||||
ptr3 = ptr1 = ptr2 - offset;
|
|
||||||
end = target + BLOCKSIZE;
|
|
||||||
|
|
||||||
while (target < end) {
|
while (i<BLOCKSIZE) {
|
||||||
*(target++) = *(ptr3++);
|
target[i++] = ptr1[k++];
|
||||||
|
|
||||||
if (ptr3 == ptr2)
|
if (k == offset)
|
||||||
ptr3 = ptr1;
|
k = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user