beautypg.com

Samsung S3C2440A User Manual

Page 495

background image

S3C2440A RISC MICROPROCESSOR

CAMERA INTERFACE

23-17

REGISTER SETTING GUIDE FOR CODEC SCALER AND PREVIEW SCALER

SRC_Width and DST_Width satisfy the word boundary constraints such that the number of horizontal pixel can be

represented to kn where n = 1,2,3, … and k = 1 / 2 / 8 for 24bppRGB / 16bppRGB / YCbCr420 image, respectively.

TargetHsize should not be larger than SourceHsize. Similarly, TargetVsize should not be larger than SourceVsize.

z–œ™ŠŒoš¡Œ

z–œ™ŠŒ}š¡Œ

{ˆ™ŽŒ›oš¡Œ†ŸŸ

{ˆ™ŽŒ›}š¡Œ†ŸŸ

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

zŠˆ“ŒGk–ž•

zŠˆ“ŒGk–ž•

zŠˆ“ŒGk–ž•

zŠˆ“ŒGk–ž•

z–œ™ŠŒoš¡Œ

z–œ™ŠŒ}š¡Œ

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

v™Ž•ˆ“Gp•—œ›

––”Gp•

––”Gp•

––”Gp•

––”Gp•

aG~•o–™vš›
aG~•}Œ™vš›

{ˆ™ŽŒ›oš¡Œ†ŸŸ

{ˆ™ŽŒ›}š¡Œ†ŸŸ

zyj†~‹›GGdGz–œ™ŠŒoš¡Œ

zyj†oŒŽ›GdGz–œ™ŠŒ}š¡Œ

{ˆ™ŽŒ›oš¡Œ†ŸŸGdG{ˆ™ŽŒ›oš¡Œ†j–G–™G{ˆ™ŽŒ›oš¡Œ†w™

kz{†~‹›GGdG{ˆ™ŽŒ›oš¡Œ†ŸŸ

kz{†oŒŽ›GdG{ˆ™ŽŒ›}š¡Œ†ŸŸ

{ˆ™ŽŒ›oš¡Œ†ŸŸGdG{ˆ™ŽŒ›oš¡Œ†j–G–™G{ˆ™ŽŒ›oš¡Œ†w™

kz{†~‹›GGdG{ˆ™ŽŒ›oš¡Œ†ŸŸ

kz{†oŒŽ›GdG{ˆ™ŽŒ›}š¡Œ†ŸŸ

zyj†~‹›GGdGz–œ™ŠŒoš¡ŒGTGOYGŸG~•o–™vš›P

zyj†oŒŽ›GGdGz–œ™ŠŒ}š¡ŒGTGOYGŸG~•}Œ™vš›P

.

Figure 23-12 Scaling Scheme

The other control registers of pre-scaled like image size, pre-scale ratio, pre-scale shift ratio and main scale ratio
are defined according to the following equations.

If ( SRC_Width >= 64 × DST_Width ) { Exit(-1); /* Out Of Horizontal Scale Range */ }

else if (SRC_Width >= 32 × DST_Width) { PreHorRatio_xx = 32; H_Shift = 5; }

else if (SRC_Width >= 16 × DST_Width) { PreHorRatio_xx = 16; H_Shift = 4; }

else if (SRC_Width >= 8 × DST_Width) { PreHorRatio_xx = 8; H_Shift = 3; }

else if (SRC_Width >= 4 × DST_Width) { PreHorRatio_xx = 4; H_Shift = 2; }

else if (SRC_Width >= 2 × DST_Width) { PreHorRatio_xx = 2; H_Shift = 1; }

else { PreHorRatio_xx = 1; H_Shift = 0; }

PreDstWidth_xx = SRC_Width / PreHorRatio_xx;

MainHorRatio_xx = ( SRC_Width << 8 ) / ( DST_Width << H_Shift);