AnsweredAssumed Answered

ADV212  COD_STYLE set

Question asked by ivan on Dec 20, 2011
Latest reply on Jun 29, 2012 by DaveD

In my design,I use ARM(PLC2214) to access ADV212 by 16-bit normal host mode。I am using version encode_2_18_3COMP_0.sea and decode_2_16_1.sea as encoding and decoding firmware。I set ADV212 in 16-bit Normal Host Mode Encode\Decode Routine With Threshold Mode,and can find 0xff82(encode)and 0xffa2(decode)in EIRQFLG REG,that is to say,I can load firm correctly. I use VDATA as video input(vdata[11:4]) port, and compressed data output by HDATA. I configure Fimware parameters as follows:

 

Encode side:

#define    VFORMAT            0x01              //0x00,PAL 4:2:2

#define    PREC            0x00              //0x01,8-bit

#define    XFORMLEV  0x05              //0x02,5 levels of wavelet transform

#define    UNI        0x03              //0x03,unipolar C,unipolar Y

#define    CBSIZE         0x00              //0x04,32*32

#define    WKERNEL           0x00              //0x05,irreversible 9*7,lossy

#define    STALLPAR    0x00              //0x06,skip 0 field

#define ATTRTYPE       0x00              //0x07,ouput format

 

#define    RCTYPE        0x02              //0x08,rate control

#define RCVAL_A        0x00              //0x09,target size

#define RCVAL_B         0x05              //0x0a,

#define RCVAL_C         0x00              //0x0b,

 

#define    J2KPROG             0x00              //0x0c,

#define    PICFG           0x01              //encode:0x0d

#define    QFACT          0x02              //0x0e,quantization factor

#define    COD_STYLE 0x00              //0x0f,output code stream format

 

(*((volatile uint16 *)(ADV212_ADDR | STAGE))) = 0x0005;

(*((volatile uint16 *)(ADV212_ADDR | IADDR))) = 0x7f00;

 

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0100;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0503;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0000;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0000;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0200;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0500;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0001;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0200;

 

Decode side:

#define    VFORMAT            0x01              //0x00,PAL 4:2:2

#define    PREC            0x00              //0x01,8-bit

#define    UNI        0x03              //0x03,unipolar C,unipolar Y

#define    PICFG           0x11              //decode:0x09

#define    DRES            0x00              //0x0a,

#define    COD_STYLE 0x00              //0x0b,output code stream format

 

(*((volatile uint16 *)(ADV212_ADDR | STAGE))) = 0x0005;

(*((volatile uint16 *)(ADV212_ADDR | IADDR))) = 0x7f00;

 

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0100;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0003;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0000;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0000;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0011;

(*((volatile uint16 *)(ADV212_ADDR | IDATA))) = 0x0000;

 

 

At encode side,When set COD_STYLE to 0x00,EIRQFLF[1] will be set, I can read data form CODE fifo. But When set COD_ STYLE to 0x01、0x02 or 0x03, EIRQFLF[1] will never be set, that is to say,adv212 encode doesn’t work, why?

 

When set COD_STYLE to 0x00(encode side),I input compressed data into adv212 decode, but no data ouput form VDATA. I don’t know why?

 

       Thanks!

Outcomes