Samsung S5PC110 Manual page 1753

Risc microprocessor
Table of Contents

Advertisement

S5PC110_UM
12.6.11 JPEG COMPRESSION FLOW
This is a pseudo instruction set that indicates the write or read on specific registers. It is assumed that the
Huffman and quantization tables were written already.
// JPEG encoder initialization
Write SW_RESET
Write JPGCLKCON
Write JPGCMOD
Write JPGMOD
Write JPGDRI
Write QTBL
tables.
Write JPGY_U
Write JPGY_L
Write JPGX_U
Write JPGX_L
Write IMGADR
Write JPGADR
Write COEF1
Write COEF2
Write COEF3
// Encoding start.
Write JSTART
// After interrupt is detected, clear the pending register
Read JPGCNT_U
Read JPGCNT_M
Read JPGCNT_L
Read JPGINTST
Write JPGCOM
Read JPGOPR
0x1
0x1
0x20
// Mode selection
0x1
// Encoding and YCbCr4:2:2
0x0
// No DRI if 0. Set an appropriate value.
0x0
// Choose the appropriate table index for Huffman & Quantization
0x0
// Vertical resolution Upper byte
0x0
// Vertical resolution Lower byte
0x0
// Horizontal resolution Upper byte
0x0
// Horizontal resolution Lower byte
0x1000_0000
// Address for an image to compress
0x1001_0000
// Address for the compressed JPEG file
0x4D_971E
// Color converter coefficients
0x2c_5783
// Color converter coefficients
0x83_6e13
// Color converter coefficients
0x1
// Read the file size in bytes
// Read the file size in bytes
// Read the file size in bytes
// It must be read 0x40.
0x4
// Clear interrupt
// It must be read zero.
12 11BJPEG
12-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents