AnsweredAssumed Answered

Question about ADV212 Register Setting

Question asked by BlueOrange on May 20, 2015
Latest reply on May 28, 2015 by DaveD

Hi

We use ADV212 to compress still image to JP2 on Raw Pixel Mode.

 

Input data are 14bit. and we entered it 16bit with upper 2bit zero via VDATA port.

 

However, when we decoded JP2 files, decompressed image didn't matched original.

 

We think that only 12bit of data are effective and lower 4bit (VDATA[3:0]) may be lost.

 

According to ADV212 User's Guide, ADV212 permit 16bit input on raw pixel mode in 69 pages.

 

Please check our register setting to use 16bit input data on raw pixel mode.

 

Followings are our register setting values

 

1. Input video : 640 x 512 x 16bit (Gray scale)

2. Input Port : VDATA(15:0)

3. Output Port JDATA(7:0)

4. Firmware / Direct Register value

    

p_adv212->stage = 0x0005;

p_adv212->iaddr = 0x7f00;

p_adv212->idata = 0x0402;

p_adv212->idata = (reg02 << 8) | 0x0003;

p_adv212->idata = (reg04 << 8) | reg05;

p_adv212->idata = 0x0000;

p_adv212->idata = (reg08 << 8) | reg09_2;     //

p_adv212->idata = (reg09_1 << 8) | reg09_0;     //

p_adv212->idata = (reg0c << 8) | 0x0000;

p_adv212->idata = (reg0e << 8) | 0x0003;     // ADV212 Header

p_adv212->bmode = 0x0031;

p_adv212->mmode = 0x0009;

// 9. Set Indirect Register

p_adv212->stage = 0xffff;

p_adv212->iaddr = 0x0400;

p_adv212->idata = 0x0404;    // 0xFFFF0400 : PMODE1(16bit)

p_adv212->stage = 0xffff;

p_adv212->iaddr = 0x040c;

p_adv212->idata = 0x0280;    // 0xFFFF040C : XTOT

p_adv212->idata = 0x0200;    // 0xFFFF0410 : YTOT

p_adv212->idata = 0x0001;    // 0xFFFF0414 : F0_START

p_adv212->idata = 0x0200;    // 0xFFFF0418 : F1_START

p_adv212->idata = 0x0001;    // 0xFFFF041C : V0_START

p_adv212->idata = 0x0000;    // 0xFFFF0420 : V1_START

p_adv212->idata = 0x0200;    // 0xFFFF0424 : V0_END

p_adv212->idata = 0x0000;    // 0xFFFF0428 : V0_END

p_adv212->idata = 0x0001;    // 0xFFFF042C : PIXEL_START

p_adv212->idata = 0x0280;    // 0xFFFF042C : PIXEL_END

p_adv212->stage = 0xffff;

p_adv212->iaddr = 0x0448;

p_adv212->idata = 0x003F;

p_adv212->idata = 0x0022;

 

// 10. Set Bus Mode

p_adv212->bmode = 0x0031;

p_adv212->mmode = 0x0009;

 

// 11. Enable SWIRQ0

p_adv212->eirqie = 0x400;

p_adv212->stage = 0xffff;

p_adv212->iaddr = 0x1408;

p_adv212->idata = 0x061A;

 

while(1)

{

      if (p_adv212->eirqflg & 0x0400)

     {

           if((p_adv212->swflag & 0xffff)  == 0xff82) 

           {  
               break; 

            } 

     }

 

     for(i = 0; i< 100000; i++)

     {  ; }

}

 

 

// 12. DMA Register

p_adv212->stage = 0xffff;

p_adv212->iaddr = 0x1408;

p_adv212->idata = 0x061B;

 

// 13. Clear Flag

p_adv212->eirqflg = 0xffff;

p_adv212->bmode = 0x0031;

p_adv212->mmode = 0x0009;

 

Thanks in advance

Outcomes