Lines Matching refs:ratio

52  * Constants for ratio calculation
304 * @ratio: Structure for ratio parameters.
309 const struct resizer_ratio *ratio)
317 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT)
319 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT)
324 if (ratio->horz > MID_RESIZE_VALUE)
330 if (ratio->vert > MID_RESIZE_VALUE)
682 * @ratio : return calculated ratios
686 * has a fixed number of phases that depend on the resizing ratio. As the ratio
690 * The input/output/ratio relationship is given by the OMAP34xx TRM:
705 * we need to compute the highest resizing ratio that satisfies the following
717 * expression of the last inequality. The highest resizing ratio value will be
718 * achieved when b is equal to its maximum value of 255. That resizing ratio
735 * the ratio, depends on the ratio, we start with the 4-tap mode equations to
736 * compute an approximation of the ratio, and switch to the 7-tap mode equations
737 * if the approximation is higher than the ratio threshold.
739 * As the 7-tap mode equations will return a ratio smaller than or equal to the
740 * 4-tap mode equations, the resulting ratio could become lower than or equal to
741 * the ratio threshold. This 'equations loop' isn't an issue as long as the
743 * 4-tap mode equations ensure that, in case of values resulting in a 'ratio
744 * loop', the smallest of the ratio values will be used, never exceeding the
765 * the maximum value guarantees that the ratio value will never be smaller than
767 * ratio will thus result in a resizing factor slightly larger than the
774 * on the vertical resizing ratio. Fortunately, the output height doesn't
775 * depend on the horizontal resizing ratio. We can then start by computing the
776 * output height and the vertical ratio, and then move to computing the output
777 * width and the horizontal ratio.
782 struct resizer_ratio *ratio)
799 * compute the vertical resizing ratio.
807 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv)
809 if (ratio->vert > MID_RESIZE_VALUE)
810 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv)
812 ratio->vert = clamp_t(unsigned int, ratio->vert,
815 if (ratio->vert <= MID_RESIZE_VALUE) {
816 upscaled_height = (output->height - 1) * ratio->vert
820 upscaled_height = (output->height - 1) * ratio->vert
827 * capabilities. The maximum depends on the vertical resizing ratio.
832 if (ratio->vert <= MID_RESIZE_VALUE) {
873 width_alignment = ratio->vert < 256 ? 8 : 2;
878 ratio->horz = ((input->width - 7) * 256 + 255 - 16 - 32 * sph)
880 if (ratio->horz > MID_RESIZE_VALUE)
881 ratio->horz = ((input->width - 7) * 256 + 255 - 32 - 64 * sph)
883 ratio->horz = clamp_t(unsigned int, ratio->horz,
886 if (ratio->horz <= MID_RESIZE_VALUE) {
887 upscaled_width = (output->width - 1) * ratio->horz
891 upscaled_width = (output->width - 1) * ratio->horz
914 resizer_set_ratio(res, &res->ratio);
917 if (res->ratio.horz >= RESIZE_DIVISOR)
1190 /* Crop rectangle is constrained by the output size so that zoom ratio
1231 struct resizer_ratio ratio;
1249 resizer_calc_ratios(res, &sel->r, format_source, &ratio);
1254 resizer_calc_ratios(res, &sel->r, format_source, &ratio);
1285 struct resizer_ratio ratio;
1313 resizer_calc_ratios(res, &sel->r, &format_source, &ratio);
1337 res->ratio = ratio;
1383 struct resizer_ratio ratio;
1404 resizer_calc_ratios(res, &crop, fmt, &ratio);
1540 &res->ratio);