Preliminary
S3C2451X RISC MICROPROCESSOR
CAMERA INTERFACE
23-27
Preliminary product information describe products that are in development,
for which full characterization data and associated errata are not yet available.
Specifications and information herein are subject to change without notice.
SourceHsize
TargetHsize_xx
Original Input
Scale Down
SRC_Width = SourceHsize
SRC_Height = SourceVsize
TargetHsize_xx = TargetHsize_Co or TargetHsize_Pr
DST_Width = TargetHsize_xx
DST_Height = TargetVsize_xx
So
urc
e
V
s
iz
e
Targ
etVsiz
e_xx
SourceHsize
Original Input
Zoom In
: WinHorOfst, WinHorOfst2
: WinVerOfst, WinVerOfst2
TargetHsize_xx
TargetHsize_xx = TargetHsize_Co or TargetHsize_Pr
DST_Width = TargetHsize_xx
DST_Height = TargetVsize_xx
SRC_Width = SourceHsize - (WinH WinHorOfst2)
SRC_Height = SourceVsize - (WinV WinVerOfst2)
SourceVsi
z
e
T
a
rget
Vsize_
xx
3
1
4
2
1
2
3
4
Figure 23-17. Scaling scheme
The other control registers of pre-scaled 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);