The in_625 file is attached below. Most everything on the 625 line side of the converter is in this file. I have tried to make it easy to change to a different output standard.
Like the out_405 file there is a set of constants for each set of aspect ratios.
There are only 5 constants for each aspect ratio and only these needs to be changed to change this file to another standard.
The first is (LINES_PER_FRAME) the number of lines in the standard been converted to.
The next two (AV_START and AV_STOP) are only needed for aspect ratio conversion and for normal operation just copy the values that are in the 4:3 => 4:3 set.
The next one (NUM_OF_INT_COEF) is the number of interpolater coefficients used. for a start I would set this value to 32. Later it can be changed to the correct amount.
The number of interpolater coefficients needed for a given number of output lines can be got by:
((32/625) X number of output lines) and round the result up to the nearest integer.
For 405 lines:
(32/625) X 405 = 20.736 rounded up =21 coefficients.
If too many coefficients are used you get a poorly interpolated picture. If too few you get horizontal lines on the picture.
A photo below shows he horizontal lines when I drop the coefficients for 405 lines from 21 to 20.
The next is (COEF_2_LINE_CD) the array that holds the interpolater coefficients. For a start I would set all the values in this array to 127. There are 32 values in the array. This gives a poorly interpolated picture. See photo below.
When the rest of the converter is up and running and the number of coefficients are known. The values can be calculated and inserted in the array.
An example below of what I would suggest to start off with if doing 567 lines. In this case selecting 16:9 => 5:4 on Hedghog would select 567 lines instead.
Code:
--------------------------------------------------------------------------------------------------
--- constants 16:9 => 5:4 output ---
--------------------------------------------------------------------------------------------------
constant LINES_PER_FRAME_169_54 : integer := 567; -- lines per frame
constant AV_START_169_54 : integer := 1; -- start of active VIDEO_IN after SAV
constant AV_STOP_169_54 : integer := 720; -- stop of active VIDEO_IN after SAV
constant NUM_OF_INT_COEF_169_54 : integer := 32; -- number of interpolater coefficients used
constant COEF_2_LINE_CD_169_54 : COEF_ARRAY := (127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, 127,127,127,127,127,127,127,127,127,127,127); -- 2 line coefficient array (32 max)
--------------------------------------------------------------------------------------------------
Frank