I'm trying to do an exact 4x upscale using the resizer, and it's not happy with it. Looking at the linux driver code, it appears that the calculation of hrsz in the driver yields <64, which is then kicked out as invalid.
Input:
params->in_hsize = 200;
params->in_vsize = 120;
params->in_pitch = 1600;
params->out_hsize = 800;
params->out_vsize = 480;
params->out_pitch = 1600;
params->pix_fmt = RSZ_PIX_FMT_YUYV;
params->inptyp = RSZ_INTYPE_YCBCR422_16BIT;
params->cbilin = 0;
params->vert_starting_pixel = 0;
params->horz_starting_pixel = 0;
params->hstph = 0;
params->vstph = 0;
params->yenh_params.type = RSZ_YENH_DISABLE;
status = ioctl(rsz_fd, RSZ_S_PARAM, params);
The calculation in the resizer driver is:
vrsz = ((params->in_vsize - NUM_D2TAPS) * RATIO_MULTIPLIER) /
(params->out_vsize - 1);
or vrsz = ((120-7)*256)/(480-1) = 60.39
It then recalculates it as
vrsz = (params->in_vsize - NUM_TAPS) * RATIO_MULTIPLIER /
(params->out_vsize - 1);
or vrsz = (120-4)*256/(480-1) = 61.99
Since vrsz < UP_RSZ_RATIO (64), it errors out.
hrsz is similar:
hrsz = 61.84, then recalculated as 62.80, and will also error out.
So, how do I get a 4x upscale?
BTW, the calcoeffs tool is misleading at best - it will happily (with -p) give you a resizer param structure with >4x upscale ("calccoef --insize 180x100 --outsize 800x480 --in_pitch 1600 --print_param " for example)