抽出来了,四路,有点卡哦,有点瞬间移动的感觉!
for(;;)
{//00
for(i=0;i<4;i++) //第一路Y分量取值,分为上半部分和下半分两个大部分,每个大部分又分为上下两个小部分,即分为四个部分,每个部分为720*72字节
{//11
for(j=i*144;j<(i+1)*144;j+=2)//隔行取值[72行],存到临时空间
{
DAT_copy((void *)(capYbuffer1 + j * numPixels),
(void *)(tempSpace + ((j-i*144)/2)* numPixels), numPixels);
}
if(i<2)
{//12
for(j=i*72;j<(i+1)*72;j++)//临时空间数据移到显示区,一行一行的处理
for(k=0;k<720;k+=2)//隔列取值
{
*(Uint8 *)(disYbuffer +j *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
*(Uint8 *)(tepYbuffer1 +j *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
}
}//12
else
{ //13
for(j=144+i*72;j<144+(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +j *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
*(Uint8 *)(tepYbuffer1 +j *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
}
}//13
}//11
for(i=0;i<2;i++)//第一路Cb,Cr分量
{ //22
if(i<1)
{//55
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCbbuffer1 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCbbuffer1 +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCrbuffer1 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCrbuffer1 +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
}//55
else
{//44
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCbbuffer1 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCbbuffer1 +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCrbuffer1 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCrbuffer1 +j*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
}//44
}//22
for(i=0;i<4;i++) //第二路Y
{ //33
for(j=i*144;j<(i+1)*144;j+=2)
{
DAT_copy((void *)(capYbuffer2 + j * numPixels),
(void *)(tempSpace + ((j-i*144)/2)* numPixels), numPixels);
}
if(i<2)
{
for(j=i*72;j<(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +j *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
*(Uint8 *)(tepYbuffer2 +j *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
}
}
else
{
for(j=144+i*72;j<144+(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +j *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
*(Uint8 *)(tepYbuffer2 +j *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
}
}
}//33
for(i=0;i<2;i++) //第二路UV
{//44
if(i<1)
{
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCbbuffer2 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCbbuffer2 +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
for(j=0;j<288;j++)
{
DAT_copy((void *)(capCrbuffer2 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
j++;
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCrbuffer2 +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
}
else
{
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCbbuffer2 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCbbuffer2 +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCrbuffer2 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCrbuffer2 +j*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
}
}//44
for(i=0;i<4;i++) //第三路Y
{//55
for(j=i*144;j<(i+1)*144;j+=2)
{
DAT_copy((void *)(capYbuffer3 + j * numPixels),
(void *)(tempSpace + ((j-i*144)/2)* numPixels), numPixels);
}
if(i<2)
{
for(j=i*72;j<(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +(j+144) *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
*(Uint8 *)(tepYbuffer3 +(j+144) *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
}
}
else
{
for(j=144+i*72;j<144+(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +(j+144) *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
*(Uint8 *)(tepYbuffer3 +(j+144) *numPixels +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
}
}
}//55
for(i=0;i<2;i++) //第三路UV
{//66
if(i<1)
{
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCbbuffer3 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCbbuffer3 +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCrbuffer3 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCrbuffer3 +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
}
else
{
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCbbuffer3 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCbbuffer3 +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCrbuffer3 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCrbuffer3 +(j+144)*numPixels/2 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
}
} //66
for(i=0;i<4;i++) //第四路Y
{//77
for(j=i*144;j<(i+1)*144;j+=2)
{
DAT_copy((void *)(capYbuffer4 + j * numPixels),
(void *)(tempSpace + ((j-i*144)/2)* numPixels), numPixels);
}
if(i<2)
{
for(j=i*72;j<(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +(j+144) *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
*(Uint8 *)(tepYbuffer4 +(j+144) *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72)*numPixels+k);
}
}
else
{
for(j=144+i*72;j<144+(i+1)*72;j++)
for(k=0;k<720;k+=2)
{
*(Uint8 *)(disYbuffer +(j+144) *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
*(Uint8 *)(tepYbuffer4 +(j+144) *numPixels+360 +(k/2))= *(Uint8 *)(tempSpace+(j-i*72-144)*numPixels+k);
}
}
}//77
for(i=0;i<2;i++) //第四路UV
{//88
if(i<1)
{
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCbbuffer4 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCbbuffer4 +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
for(j=0;j<288;j+=2)
{
DAT_copy((void *)(capCrbuffer4 + j * numPixels/2),
(void *)(tempSpace + (j/2)* numPixels/2), numPixels/2);
}
for(j=0;j<144;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
*(Uint8 *)(tepCrbuffer4 +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+j*numPixels/2+k);
}
}
else
{
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCbbuffer4 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCbbuffer +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCbbuffer4 +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
for(j=288;j<576;j+=2)
{
DAT_copy((void *)(capCrbuffer4 + j * numPixels/2),
(void *)(tempSpace + ((j-288)/2)* numPixels/2), numPixels/2);
}
for(j=288;j<432;j++)
for(k=0;k<360;k+=2)
{
*(Uint8 *)(disCrbuffer +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
*(Uint8 *)(tepCrbuffer4 +(j+144)*numPixels/2+180 +(k/2))= *(Uint8 *)(tempSpace+(j-288)*numPixels/2+k);
}
}
} //88
}//00 |