/* * uds_output_size - Return the output size for an input size and scaling ratio * @input: input size in pixels * @ratio: scaling ratio in U4.12 fixed-point format
*/ staticunsignedint uds_output_size(unsignedint input, unsignedint ratio)
{ if (ratio > 4096) { /* Down-scaling */ unsignedint mp;
/* * uds_output_limits - Return the min and max output sizes for an input size * @input: input size in pixels * @minimum: minimum output size (returned) * @maximum: maximum output size (returned)
*/ staticvoid uds_output_limits(unsignedint input, unsignedint *minimum, unsignedint *maximum)
{
*minimum = max(uds_output_size(input, UDS_MAX_FACTOR), UDS_MIN_SIZE);
*maximum = min(uds_output_size(input, UDS_MIN_FACTOR), UDS_MAX_SIZE);
}
/* * uds_passband_width - Return the passband filter width for a scaling ratio * @ratio: scaling ratio in U4.12 fixed-point format
*/ staticunsignedint uds_passband_width(unsignedint ratio)
{ if (ratio >= 4096) { /* Down-scaling */ unsignedint mp;
staticunsignedint uds_compute_ratio(unsignedint input, unsignedint output)
{ /* TODO: This is an approximation that will need to be refined. */ return (input - 1) * 4096 / (output - 1);
}
/* ----------------------------------------------------------------------------- * V4L2 Subdevice Pad Operations
*/
switch (pad) { case UDS_PAD_SINK: /* Default to YUV if the requested format is not supported. */ if (fmt->code != MEDIA_BUS_FMT_ARGB8888_1X32 &&
fmt->code != MEDIA_BUS_FMT_AYUV8_1X32)
fmt->code = MEDIA_BUS_FMT_AYUV8_1X32;
case UDS_PAD_SOURCE: /* The UDS scales but can't perform format conversion. */
format = v4l2_subdev_state_get_format(sd_state, UDS_PAD_SINK);
fmt->code = format->code;
format = v4l2_subdev_state_get_format(state, fmt->pad);
*format = fmt->format;
if (fmt->pad == UDS_PAD_SINK) { /* Propagate the format to the source pad. */
format = v4l2_subdev_state_get_format(state, UDS_PAD_SOURCE);
*format = fmt->format;
/* * Multi-tap scaling can't be enabled along with alpha scaling when * scaling down with a factor lower than or equal to 1/2 in either * direction.
*/ if (uds->scale_alpha && (hscale >= 8192 || vscale >= 8192))
multitap = false; else
multitap = true;
/* * The maximum width of the UDS is 304 pixels. These are input pixels * in the event of up-scaling, and output pixels in the event of * downscaling. * * To support overlapping partition windows we clamp at units of 256 and * the remaining pixels are reserved.
*/ if (hscale <= 2) return 256; elseif (hscale <= 4) return 512; elseif (hscale <= 8) return 1024; else return 2048;
}
/* ----------------------------------------------------------------------------- * Partition Algorithm Support
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.