Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: data size of ADV202 is bigger than expected

$
0
0

Thanks, DaveD

 

The setup is as followed:

 

(A) Programming the ADV202 for HIPI mode :

   1. Write 0x0008h to the PLL_HI register, 0x0004 to the PLL_LO register.

   2. Wait for 20us to allow for the PLL to settle.

   3. Write 0x008A to the BOOT register. This boot mode is used for applications where the firmware has to be loaded into the part as opposed to having the firmware stored in the ADV202’s ROM.

  1. 4.Wait for 20us

   5. Write 0x000A to BUSMODE.This sets the host control data width to 32-bits and the DMA data width to 32-bits.

   6. Write 0x000A to MMODE. This sets the indirect data access width and indirect address step size to 32-bits.

   7. Set the start of the program memory in writing 0x00050000 to IADDR.

   8. Load the program into the memory.

      This is achieved by writing every 32-bit value of the firmware to IDATA.

      Firmware file for encode is <encode_2_7v2.sea>.

  1. 1. Write 0x00057F00 to IADDR. This sets the start address for the encode parameters, which will be loaded into the ADV202.

      2. Write 0x04000603 to IDATA.

     [refer to Table 3 in the “ Getting Started with the ADV202” application note for more detail]

     In this example:

      04 = Custom Specific video format

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

      05 = 6 Levels of Wavelet transforms

      03 = Ignored in HIPI mode, default to uni-polar component polarity

   3. Write 0x02000000 to IDATA for both encode or decode mode.

      01 = Codeblock size 64x64

      00 = Irreversible 9x7 using fixed table

      00 = Skip no fields

      00 = Do not output attribute data.

   4. For HIPI encode:

     Write 0x01000D00 to IDATA

      01 = Target Size per video field

      0D00 =Target Size factor for Rate Control

   5. Write 0x00000001 to IDATA

      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 = J2C Format     

  1. 9. Initiate a reboot by writing 0x008D to the BOOT register. This initiates program execution
  2. 0. Wait for 20us
  3. 11. Write 0x000A to BUSMODE.
  4. 12.Write 0x000A to MMODE.

(B) Pre-initialization Routine for ADV202  

  1. The following register values will apply to encode mode. These values are used to program the ADV202 to accept the format of the input file and to activate HIPI mode.

In this example a total resolution of  320x256, Y, 8-bit data is used.

It is recommended to use a format with an even number of pixels per line.

     Write 0xFFFF0400 to IADDR (0xb); select PMODE register

     Write 0x00140000 to IDATA (0xc); 8-bit  YSingle Component

     Write 0xFFFF040C to IADDR (0xb); XTOT

     Write 0x01400000 to IDATA (0xc); 320

     Write 0xFFFF0410 to IADDR (0xb); YTOT

     Write 0x01000000 to IDATA (0xc); 256

     Write 0xFFFF0448 to IADDR (0xb); PMODE2

     Write 0x00300000 to IDATA (0xc); Y Unipolar, C Unipolar

     Write 0xFFFF044C to IADDR (0xb); VMODE

     Write 0x00120000 to IDATA (0xc), Host mode enabled for HIPI encode mode.    

(C) Post-Initialization Routine to configure DMA channel 0 for pixel input

   1. Write 0xFFFF1408 to IADDR.

   2. Write 0x00080000 to IDATA.

This configures DMA channel Single transfer DMA modeof 32-bit words, assigned to the Pixel data FIFO

(D) Post-Initialization Routine to configure DMA channel 1 for compressed data output

   1. Write 0xFFFF140C to IADDR.

   2. Write 0x00120000 to IDATA.

This configures DMA channel 0 to 32 bursts of 32-bit words, assigned to the Compressed data/Code-block data FIFO

  1. 1. Write 0xFFFF141C to IADDR.

   2. Write 0x00010000 to IDATA.

(E) Read Application ID to ensure the program has correctly initialized

  1. 1. Write to 0x0400 to EIRQIE to unmask SWIRQ0.
  2. 2. Wait for 1us

Read Application ID to ensure the program has correctly initialized. Here : 0xFF82 for encode.

 

can you tell me the max data size we would get?


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>