AnsweredAssumed Answered

problem for adv212 using irreversible 5/3 wavelet transform

Question asked by zhangmengjie on May 8, 2012
Latest reply on May 11, 2012 by DaveD

I am using ADV212 to compress still image using HIPI mode.

Image Parameter : image width = 2048, Image hight = 64, Image precision = 12-bit, image input rate = 20MSPS.

 

I use encode_2_13_0.sea firmware to Program the ADV212 sucessfully.

 

Here is the various parameter setting:

0x00057F00      0x04000503

//    04 = Custom Specific video format

//    00 = Ignored in HIPI mode, default to 8-bit precision

//    05 = Number of Wavelet Transform Levels

//    03 = Ignored in HIPI mode, YC uni-polar component polarity

 

0x00057F04      0x03020000

//    03 = Codeblock Dimensions : 128x32

//    02 = Wavelet Kernel and Quantization factor : Irreversible 5x3 [lossy]

//    00 = Skip no fields

//    00 = Do not output attribute data.

 

0x00057F08      0x01006000

//    01 = Target Size per video field/image within 5% of RCVAL

//    006000 = Target Size

 

0x00057F0C      0x00000001

//    00 = JPEG2000 Progressive Style : LRCP

//    00 = ignored in HIPI mode. Sync and clk polarities and selection between HVF and EAV/SAV

//         are not selectable in HIPI mode.

//    00 = Quantization factor is 1x

//    01 = Output Code Stream Format : J2C

 

PMODE1          0xFFFF0400     0x02180000

//     02 = 12-bit precision

//     18 = 32-bit 2x16-bit Packed Single Component

 

XTOT               0xFFFF040C     0x08000000

//      0800 = Total samples per line : 2048

 

YTOT               0xFFFF0410     0x00400000

//      0040 = Total lines per frame : 64

 

PMODE2          0xFFFF0448     0x00310000

//      Y Unipolar on

//      C Unipolar on

 

VMODE            0xFFFF044C     0x00120000

//      Slave, Encode, HOST MODE, PRGRSV_SCN off

 

configure DMA channel 0 for pixel input

configure DMA channel 1 for compressed data output

 

 

Above parameter write to adv212 correctly, and ADV212 start to work. Three is no buffer overflow during ADV212 Compression, and ADV212 seems to work and compress correctly. Next I use data acquire card to acquire the ADV212 codestream and store in my PC hard disk, and use kdu software to decompress the codestream, finding that the decompressed image is not same to original, it is wrong. file named j2k2048x64i53 in attachment is this j2c file.

 

 

Next I use Irreversible 9x7 using fixed table [lossy] Wavelet Kernel to compress the same image and other parameter is same, decompressed image is same to original, the result is correct, file named j2k2048x64i97 in attachment is this j2c file.

Here is the modified parameter setting

0x00057F04      0x03000000

//    03 = Codeblock Dimensions : 128x32

//    00 = Wavelet Kernel and Quantization factor : Irreversible 9x7 using fixed table [lossy]

//    00 = Skip no fields

//    00 = Do not output attribute data.

 

 

Also I use Reversible 5x3 [lossless] Wavelet Kernel to compress the same image and other parameter is same, the result is correct too.

 

Also setting image width to 1024 or 512. Only Irreversible 5x3 [lossy] parameter setting the decompressed image is not same to original.

 

Only difference in  Wavelet Kernel parameter setting, that Irreversible 5x3 [lossy] parameter setting not work correctly, while  Irreversible 9x7 using fixed table [lossy] or Reversible 5x3 [lossless] work correctly.

 

I hope the solution, Thanks.

Outcomes