📄 framebuf.c
字号:
int c_color4 = 0x483A483A;
int c_color5 = 0xB8C6B8C6;
int c_color6 = 0x64D464D4;
int c_color7 = 0xD490D490;
int c_color8 = 0x80808080;
m = MEM_BIDIR_LUMA_DEF;
n = MEM_BIDIR_CHROMA_DEF;
if(n <= m)
n = 512;
//fillPattern(363, 462,0x23232323);
testx = 0;
testy = 0;
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 3; i++)
dma_buf.w[i] = l_color1;
for(i = 3; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 6; i++)
dma_buf.w[i] = l_color2;
for(i = 6; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 1; i++)
dma_buf.w[i] = l_color3;
for(i = 1; i < 8; i++)
dma_buf.w[i] = l_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 4; i++)
dma_buf.w[i] = l_color4;
for(i = 4; i < 8; i++)
dma_buf.w[i] = l_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 7; i++)
dma_buf.w[i] = l_color5;
for(i = 7; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = l_color6;
for(i = 2; i < 8; i++)
dma_buf.w[i] = l_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 5; i++)
dma_buf.w[i] = l_color7;
for(i = 5; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
m = MEM_BIDIR_CHROMA_DEF;
n = 512;
if(n <= m)
n = 512;
/*fillPattern(462, 512, 0xd472d472);*/
testx = 0;
testy = 0;
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 3; i++)
dma_buf.w[i] = c_color1;
for(i = 3; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 6; i++)
dma_buf.w[i] = c_color2;
for(i = 6; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 1; i++)
dma_buf.w[i] = c_color3;
for(i = 1; i < 8; i++)
dma_buf.w[i] = c_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 4; i++)
dma_buf.w[i] = c_color4;
for(i = 4; i < 8; i++)
dma_buf.w[i] = c_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 7; i++)
dma_buf.w[i] = c_color5;
for(i = 7; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = c_color6;
for(i = 2; i < 8; i++)
dma_buf.w[i] = c_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 5; i++)
dma_buf.w[i] = c_color7;
for(i = 5; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#endif
}
#endif
#if 0
void SetupColorBarBackground_SDRAM(void)
{
#if 0 //bondy reduce
int m, n, i, j;
int testx, testy;
int l_color1 = 0xEBEBEBEB;
int l_color2 = 0xA2A2A2A2;
int l_color3 = 0x83838383;
int l_color4 = 0x70707070;
int l_color5 = 0x54545454;
int l_color6 = 0x41414141;
int l_color7 = 0x23232323;
int l_color8 = 0x10101010;
int c_color1 = 0x80808080;
int c_color2 = 0x2C8E2C8E;
int c_color3 = 0x9C2C9C2C;
int c_color4 = 0x483A483A;
int c_color5 = 0xB8C6B8C6;
int c_color6 = 0x64D464D4;
int c_color7 = 0xD490D490;
int c_color8 = 0x80808080;
m = MEM_BIDIR_LUMA_DEF;
n = MEM_BIDIR_CHROMA_DEF;
if(n <= m)
n = 512;
//fillPattern(363, 462,0x23232323);
testx = 0;
testy = 0;
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = l_color1;
dma_buf.w[++i] = l_color2;
dma_buf.w[++i] = l_color1;
for(i = 4; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 6; i++)
dma_buf.w[i] = l_color2;
for(i = 6; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 1; i++)
dma_buf.w[i] = l_color3;
for(i = 1; i < 8; i++)
dma_buf.w[i] = l_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 4; i++)
dma_buf.w[i] = l_color4;
for(i = 4; i < 8; i++)
dma_buf.w[i] = l_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 7; i++)
dma_buf.w[i] = l_color5;
for(i = 7; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = l_color6;
for(i = 2; i < 8; i++)
dma_buf.w[i] = l_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 5; i++)
dma_buf.w[i] = l_color7;
for(i = 5; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
m = MEM_BIDIR_CHROMA_DEF;
n = 512;
if(n <= m)
n = 512;
/*fillPattern(462, 512, 0xd472d472);*/
testx = 0;
testy = 0;
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = c_color1;
dma_buf.w[++i] = c_color2;
dma_buf.w[++i] = c_color1;
for(i = 4; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 6; i++)
dma_buf.w[i] = c_color2;
for(i = 6; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 1; i++)
dma_buf.w[i] = c_color3;
for(i = 1; i < 8; i++)
dma_buf.w[i] = c_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 4; i++)
dma_buf.w[i] = c_color4;
for(i = 4; i < 8; i++)
dma_buf.w[i] = c_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 7; i++)
dma_buf.w[i] = c_color5;
for(i = 7; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 2; i++)
dma_buf.w[i] = c_color6;
for(i = 2; i < 8; i++)
dma_buf.w[i] = c_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 5; i++)
dma_buf.w[i] = c_color7;
for(i = 5; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#endif
}
#endif
#if 0
void SetupColorBarBackground_256(void)
{
#if 0 //bondy reduce
int m, n, i, j;
int testx, testy;
int l_color1 = 0xEBEBEBEB;
int l_color2 = 0xA2A2A2A2;
int l_color3 = 0x83838383;
int l_color4 = 0x70707070;
int l_color5 = 0x54545454;
int l_color6 = 0x41414141;
int l_color7 = 0x23232323;
int l_color8 = 0x10101010;
int c_color1 = 0x80808080;
int c_color2 = 0x2C8E2C8E;
int c_color3 = 0x9C2C9C2C;
int c_color4 = 0x483A483A;
int c_color5 = 0xB8C6B8C6;
int c_color6 = 0x64D464D4;
int c_color7 = 0xD490D490;
int c_color8 = 0x80808080;
m = MEM_BIDIR_LUMA_DEF;
n = MEM_BIDIR_CHROMA_DEF;
if(n <= m)
n = 512;
//fillPattern(363, 462,0x23232323);
testx = 0;
testy = 0;
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color7;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -