6.4.2.2
X-scaler
The x-scaler allows up- and downscaling of a scanline.
The x scaling factor is determined by VInSCALING.MX[6:0] and is calculated as
x_scale = VInSCALING.MX[6:0] / 64
MX[6:0] > 64 performs an upscaling, MX < 64 a downscaling. If MX = 0, the x-
scaler is disabled.
Depending on the scaling factor MX/64 a certain number of weighted input pixel
Pyout[x] contribute to the output pixel Pxout[x] at location x:
Pxout[x] = w
1
• Pyout
1
+ w
2
• Pyout
2
+ ... + w
n
• Pyout
n
whereas the sum of all weighting factors w
n
for the input pixel Pyout
n
equals 1.
The below flow diagram describes the x-scaling process. The shown scaling
process is done for each of the three colour components R, G and B.
The x-scaling process is initialized and started with each new scanline.
Note
Pyout[xin] includes the three colour channels C, i.e. is R or G or B.
xadd + xsum
≥
1?
xremainder = 1 - xsum
xadd = xadd - xremainder
Cxout(xout) = Cxout[xout] + Cyout[xin]
•
xremainder
Cxout[xout] = Cxout[xout] + Cyout[xin]
•
xadd
xsum = xsum + xadd
Cxout[xout] = 0
xsum = 0
xadd = x_scale
Pyout[xin]
from y-scaler
next_pixel
to y-scaler
output Cxout[xout] to position xout
yes
no
no pixel output
pixel output
Pyout[xin] include the colour channels C
with C = R or G or B
Figure 6-6 Video Input x-scaler
6.4.2.3
Example
Example
In the above example the scaled image shall have a size of (600 x 225) pixels, thus
VInSCALEDWIDTH = 0000 0258
H
and VInSCALEDHEIGHT = 0000 00E1
H
.
The scaled image shall be generated by scaling a rectangle of the size (512 x 300)
pixels from the captured image. Therefore the x-scaling factor is 600/512 = 75/64
(VInSCALING.MX[6:0] = 75), and the y-scaling factor 300/225 = 48/64
(VInSCALING.MY[5:0] = 48). i.e. VInSCALING = 3040 4B40
H
. Note that the divisor
64 is fixed.
Video Input (Ravin-M only)
Chapter 6
Preliminary User's Manual S19203EE1V3UM00
163
Содержание uPD72257
Страница 39: ...Pin Functions Chapter 2 Preliminary User s Manual S19203EE1V3UM00 39...
Страница 44: ...Chapter 2 Pin Functions 44 Preliminary User s Manual S19203EE1V3UM00...
Страница 46: ...Chapter 2 Pin Functions 46 Preliminary User s Manual S19203EE1V3UM00...
Страница 49: ...Pin Functions Chapter 2 Preliminary User s Manual S19203EE1V3UM00 49...
Страница 52: ...Chapter 2 Pin Functions 52 Preliminary User s Manual S19203EE1V3UM00...
Страница 54: ...Chapter 2 Pin Functions 54 Preliminary User s Manual S19203EE1V3UM00...
Страница 331: ...External Memory Interface Controller Chapter 9 Preliminary User s Manual S19203EE1V3UM00 331...
Страница 343: ......