Lines Matching defs:image
5 * Queued image conversion support, with tiling and rotation.
10 #include <video/imx-ipu-image-convert.h>
18 * The image converter attempts to split up a conversion when
59 * output image. Tiles are numbered row major from top left to bottom
60 * right for both input and output image.
157 /* Source/destination image data and rotation mode */
184 /* where to place converted tile in dest image */
481 * Rotation and image offsets are out of scope.
487 * alignment, or pixel alignment due to image format
489 * alignment, or pixel alignment due to image format or rotator
856 struct ipu_image_convert_image *image)
864 if (image->type == IMAGE_CONVERT_IN) {
872 const unsigned int row = i / image->num_cols;
873 const unsigned int col = i % image->num_cols;
875 if (image->type == IMAGE_CONVERT_OUT)
876 tile = &image->tile[ctx->out_tile_map[i]];
878 tile = &image->tile[i];
880 tile->size = ((tile->height * image->fmt->bpp) >> 3) *
883 if (image->fmt->planar) {
888 (image->fmt->bpp * tile->width) >> 3;
890 (image->fmt->bpp * tile->height) >> 3;
896 image->type == IMAGE_CONVERT_IN ? "Input" : "Output",
903 image->type == IMAGE_CONVERT_IN ? "input" :
986 struct ipu_image_convert_image *image)
990 const struct ipu_image_pixfmt *fmt = image->fmt;
998 H = image->base.pix.height;
1000 y_stride = image->stride;
1008 for (row = 0; row < image->num_rows; row++) {
1009 top = image->tile[tile].top;
1013 for (col = 0; col < image->num_cols; col++) {
1014 y_col_off = image->tile[tile].left;
1030 image->tile[tile].offset = y_off;
1031 image->tile[tile].u_off = u_off;
1032 image->tile[tile++].v_off = v_off;
1039 image->type == IMAGE_CONVERT_IN ?
1051 struct ipu_image_convert_image *image)
1055 const struct ipu_image_pixfmt *fmt = image->fmt;
1061 stride = image->stride;
1064 for (row = 0; row < image->num_rows; row++) {
1065 row_off = image->tile[tile].top * stride;
1067 for (col = 0; col < image->num_cols; col++) {
1068 col_off = (image->tile[tile].left * bpp) >> 3;
1072 image->tile[tile].offset = offset;
1073 image->tile[tile].u_off = 0;
1074 image->tile[tile++].v_off = 0;
1081 image->type == IMAGE_CONVERT_IN ?
1093 struct ipu_image_convert_image *image)
1095 if (image->fmt->planar)
1096 return calc_tile_offsets_planar(ctx, image);
1098 return calc_tile_offsets_packed(ctx, image);
1106 * avoid sampling beyond the edges of the input image for this tile's last
1295 struct ipu_image_convert_image *image,
1307 if (image->type == IMAGE_CONVERT_OUT) {
1316 width = image->tile[tile_idx[0]].height;
1317 height = image->tile[tile_idx[0]].width;
1318 stride = image->tile[tile_idx[0]].rot_stride;
1323 width = image->tile[tile_idx[0]].width;
1324 height = image->tile[tile_idx[0]].height;
1325 stride = image->stride;
1326 addr0 = image->base.phys0 +
1327 image->tile[tile_idx[0]].offset;
1329 addr1 = image->base.phys0 +
1330 image->tile[tile_idx[1]].offset;
1339 tile_image.pix.pixelformat = image->fmt->fourcc;
1342 if (image->fmt->planar && !rot_swap_width_height) {
1343 tile_image.u_offset = image->tile[tile_idx[0]].u_off;
1344 tile_image.v_offset = image->tile[tile_idx[0]].v_off;
1358 image->fmt->planar && image->fmt->uv_height_dec == 2)
1927 struct ipu_image *image,
1932 ic_image->base = *image;
1935 ic_image->fmt = get_format(image->pix.pixelformat);
1988 /* image converter does not handle fields */
2024 /* set input/output strides and image sizes */
2178 * only one tile (the whole image can be converted in a single
2265 * Carry out a single image conversion run. Only the physaddr's of the input
2266 * and output image buffers are needed. The conversion context must have
2370 /* Unprepare image conversion context */
2403 * "Canned" asynchronous single image conversion. Allocates and returns
2444 /* "Canned" synchronous single image conversion */