Lines Matching refs:ratio
310 const struct resizer_ratio *ratio) in resizer_set_ratio() argument
318 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) in resizer_set_ratio()
320 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT) in resizer_set_ratio()
325 if (ratio->horz > MID_RESIZE_VALUE) in resizer_set_ratio()
331 if (ratio->vert > MID_RESIZE_VALUE) in resizer_set_ratio()
783 struct resizer_ratio *ratio) in resizer_calc_ratios() argument
808 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv) in resizer_calc_ratios()
810 if (ratio->vert > MID_RESIZE_VALUE) in resizer_calc_ratios()
811 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv) in resizer_calc_ratios()
813 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios()
816 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
817 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
821 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
833 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
874 width_alignment = ratio->vert < 256 ? 8 : 2; in resizer_calc_ratios()
879 ratio->horz = ((input->width - 7) * 256 + 255 - 16 - 32 * sph) in resizer_calc_ratios()
881 if (ratio->horz > MID_RESIZE_VALUE) in resizer_calc_ratios()
882 ratio->horz = ((input->width - 7) * 256 + 255 - 32 - 64 * sph) in resizer_calc_ratios()
884 ratio->horz = clamp_t(unsigned int, ratio->horz, in resizer_calc_ratios()
887 if (ratio->horz <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
888 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
892 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
915 resizer_set_ratio(res, &res->ratio); in resizer_set_crop_params()
918 if (res->ratio.horz >= RESIZE_DIVISOR) in resizer_set_crop_params()
1232 struct resizer_ratio ratio; in resizer_get_selection() local
1250 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1255 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1286 struct resizer_ratio ratio; in resizer_set_selection() local
1314 resizer_calc_ratios(res, &sel->r, &format_source, &ratio); in resizer_set_selection()
1338 res->ratio = ratio; in resizer_set_selection()
1384 struct resizer_ratio ratio; in resizer_try_format() local
1405 resizer_calc_ratios(res, &crop, fmt, &ratio); in resizer_try_format()
1541 &res->ratio); in resizer_set_format()