Lines Matching refs:ratio
307 const struct resizer_ratio *ratio) in resizer_set_ratio() argument
315 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) in resizer_set_ratio()
317 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT) in resizer_set_ratio()
322 if (ratio->horz > MID_RESIZE_VALUE) in resizer_set_ratio()
328 if (ratio->vert > MID_RESIZE_VALUE) in resizer_set_ratio()
780 struct resizer_ratio *ratio) in resizer_calc_ratios() argument
805 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv) in resizer_calc_ratios()
807 if (ratio->vert > MID_RESIZE_VALUE) in resizer_calc_ratios()
808 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv) in resizer_calc_ratios()
810 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios()
813 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
814 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
818 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
830 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
871 width_alignment = ratio->vert < 256 ? 8 : 2; in resizer_calc_ratios()
876 ratio->horz = ((input->width - 7) * 256 + 255 - 16 - 32 * sph) in resizer_calc_ratios()
878 if (ratio->horz > MID_RESIZE_VALUE) in resizer_calc_ratios()
879 ratio->horz = ((input->width - 7) * 256 + 255 - 32 - 64 * sph) in resizer_calc_ratios()
881 ratio->horz = clamp_t(unsigned int, ratio->horz, in resizer_calc_ratios()
884 if (ratio->horz <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
885 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
889 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
912 resizer_set_ratio(res, &res->ratio); in resizer_set_crop_params()
915 if (res->ratio.horz >= RESIZE_DIVISOR) in resizer_set_crop_params()
1229 struct resizer_ratio ratio; in resizer_get_selection() local
1247 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1252 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1283 struct resizer_ratio ratio; in resizer_set_selection() local
1311 resizer_calc_ratios(res, &sel->r, &format_source, &ratio); in resizer_set_selection()
1334 res->ratio = ratio; in resizer_set_selection()
1379 struct resizer_ratio ratio; in resizer_try_format() local
1399 resizer_calc_ratios(res, &crop, fmt, &ratio); in resizer_try_format()
1533 &res->ratio); in resizer_set_format()