User's Manual

Table Of Contents
CAMERA INTERFACE S3C2450X RISC MICROPROCESSOR
23-28
If ( SRC_Height >= 64 × DST_Height ) { Exit(-1); /* Out Of Vertical Scale Range */ }
else if (SRC_Height >= 32 × DST_Height) { PreVerRatio_xx = 32; V_Shift = 5; }
else if (SRC_Height >= 16 × DST_Height) { PreVerRatio_xx = 16; V_Shift = 4; }
else if (SRC_Height >= 8 × DST_Height) { PreVerRatio_xx = 8; V_Shift = 3; }
else if (SRC_Height >= 4 × DST_Height) { PreVerRatio_xx = 4; V_Shift = 2; }
else if (SRC_Height >= 2 × DST_Height) { PreVerRatio_xx = 2; V_Shift = 1; }
else { PreVerRatio_xx = 1; V_Shift = 0; }
PreDstHeight_xx = SRC_Height / PreVerRatio_xx;
MainVerRatio_xx = ( SRC_Height << 8 ) / ( DST_Height << V_Shift);
SHfactor_xx = 10 – ( H_Shit + V_Shift);
Caution! In preview path, Pre-scaled H_width must be the less than 720. (The maximum size of preview
path scaler’s horizontal line buffer is 720.)
Example 1. Source image horizontal size : SRC_Width = 1280, Target image horizontal size : DST_Width = 480
(SRC_Width >= 2 × DST_Width) -> PreHorRatio_xx = 2
PreDstWidth_xx = SRC_Width / PreHorRatio_xx = 1280/2 = 640
PreDstWidth_xx = 640 <= 640(The maximum size of preview path scaler’s horizontal line buffer)
Scaling is success.
Example 2. Source image horizontal size : SRC_Width = 800, Target image horizontal size : DST_Width = 480
(SRC_Width < 2 × DST_Width) PreHorRatio_xx = 1
PreDstWidth_xx = SRC_Width / PreHorRatio_xx = 800/1 = 800
PreDstWidth_xx = 800 > 720(The maximum size of preview path scaler’s horizontal line buffer)
Scaling is failed.
Caution! In Zoom-In case, you should check the next equation.
((SourceHsize - (WinHorOfst + WinHorOfst2)) / PreHorRatio_Pr) <= 720
Caution! In preview memory data input path, you should not use Zoom-In, crop and image effect function.
(External camera input path use Zoom-In , crop and image effect function)