Lines Matching refs:ratio
309 const struct resizer_ratio *ratio) in resizer_set_ratio() argument
317 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) in resizer_set_ratio()
319 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT) in resizer_set_ratio()
324 if (ratio->horz > MID_RESIZE_VALUE) in resizer_set_ratio()
330 if (ratio->vert > MID_RESIZE_VALUE) in resizer_set_ratio()
782 struct resizer_ratio *ratio) in resizer_calc_ratios() argument
807 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv) in resizer_calc_ratios()
809 if (ratio->vert > MID_RESIZE_VALUE) in resizer_calc_ratios()
810 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv) in resizer_calc_ratios()
812 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios()
815 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
816 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
820 upscaled_height = (output->height - 1) * ratio->vert in resizer_calc_ratios()
832 if (ratio->vert <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
873 width_alignment = ratio->vert < 256 ? 8 : 2; in resizer_calc_ratios()
878 ratio->horz = ((input->width - 7) * 256 + 255 - 16 - 32 * sph) in resizer_calc_ratios()
880 if (ratio->horz > MID_RESIZE_VALUE) in resizer_calc_ratios()
881 ratio->horz = ((input->width - 7) * 256 + 255 - 32 - 64 * sph) in resizer_calc_ratios()
883 ratio->horz = clamp_t(unsigned int, ratio->horz, in resizer_calc_ratios()
886 if (ratio->horz <= MID_RESIZE_VALUE) { in resizer_calc_ratios()
887 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
891 upscaled_width = (output->width - 1) * ratio->horz in resizer_calc_ratios()
914 resizer_set_ratio(res, &res->ratio); in resizer_set_crop_params()
917 if (res->ratio.horz >= RESIZE_DIVISOR) in resizer_set_crop_params()
1231 struct resizer_ratio ratio; in resizer_get_selection() local
1249 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1254 resizer_calc_ratios(res, &sel->r, format_source, &ratio); in resizer_get_selection()
1285 struct resizer_ratio ratio; in resizer_set_selection() local
1313 resizer_calc_ratios(res, &sel->r, &format_source, &ratio); in resizer_set_selection()
1337 res->ratio = ratio; in resizer_set_selection()
1383 struct resizer_ratio ratio; in resizer_try_format() local
1404 resizer_calc_ratios(res, &crop, fmt, &ratio); in resizer_try_format()
1540 &res->ratio); in resizer_set_format()