On a custom DM355 board running DVSDK3.1 resizer seems to be dropping last line. Input to IPIPE is Bayer from RAM.
If I tell the driver (resizer) that my input frame is the same as output frame, the output frame is one line short. Example, I use 640x360 input frame in Bayer format. The IPIPEer will produce 359 lines. The reason I know is that If I prefill the output buffer with a fixed color and run IPIPE the last line in the output image will have that color.
When I resize the frame (go from 1280x960 down to 640x480) I get all the lines except the last line may have strange colors.
After a little bit of digging and one call to ioctl(PREV_DUMP_HW_CONFIG) I got the following print-out:
IPIPEIF PPLN = 0x288
IPIPEIF LPFR = 0x179
IPIPEIF HNUM = 0x280
IPIPEIF VNUM = 0x168
IPIPEIF RSZ = 0x10
**************************************************
IPIPE VST = 0x1
IPIPE VSZ = 0x167
IPIPE HST = 0x0
IPIPE HSZ = 0x27f
Resizer Registers
**************************************************
IPIPE RSZ 0 ENABLE = 0x0
IPIPE RSZ 0 MODE = 0x1
IPIPE RSZ 0 I_VST = 0x1
IPIPE RSZ 0 I_VSZ = 0x167
IPIPE RSZ 0 I_HST = 0x0
IPIPE RSZ 0 O_VSZ = 0x167
IPIPE RSZ 0 O_HST = 0x0
IPIPE RSZ 0 O_HSZ = 0x27f
Note the highlighted line above (the one with RSZ 0 I_VST). The start line in the input to the resizer is 1. The driver takes that parameter from IPIPE_VST (bold line) in dm355_ipipe.c with the following line:
param->rsz_rsc_param[0].rsz_i_vst = param->ipipe_vst;
However, the manual says that RSZ_I_VST is "Vertical start position of image processing. After IPIPE_VST, the VAL line is processed as the first line in each image".
I understand that IPIPE_VST has to be set to 1. The question is does rsz_i_vst need to be set to 1. From the description I would think it is not, but the driver (whoever wrote it) thinks it also has to be set to 1 as if the RSZ_I_VST defined in reference to the start of global frame.
What should be the value of RSZ_I_VST? Can it be 0 when IPIPE_VST = 1?