Inline image rotation
AssigneeApple Inc.
InventorsBrijesh Tripathi, Nitin Bhargava, Craig M. Okruhlica
Life of this patent
Estimating the term…
Abstract
Methods and apparatus for performing an inline rotation of an image. The apparatus includes a rotation unit for reading pixels from a source image in an order based on a specified rotation to be performed. The source image is partitioned into multiple tiles, the tiles are processed based on where they will be located within the rotated image, and each tile is stored in a tile buffer. The target pixel addresses within a tile buffer are calculated and stored in a lookup table, and when the pixels are retrieved from the source image by the rotation unit, the lookup table is read to determine where to write the pixels within a corresponding tile buffer.
Claims23
An apparatus comprising:
- a fetch unit;
- one or more tile buffers;
- and
- a memory coupled to the fetch unit;
- wherein the fetch unit is configured to:
- generate a plurality of read operations to read pixels from a source image stored in the memory, wherein the plurality of read operations are generated in an order that is based on a rotation being performed on the source image;
- and
- write the pixels to locations within a first tile buffer
- wherein the rotated image is the source image after the rotation has been performed;
- and
- wherein pixels from a single line of the source image are written to a diagonal line in the first tile buffer if there is not a rotation.
A rotation unit configured to:
- receive configuration bits indicating a selected rotation to be performed on a source image;
- issue read requests for the source image, wherein the read requests are issued in an order based on the selected rotation;
- for each read request, calculate target positions of corresponding pixels in a rotated image, wherein the rotated image is the source image after the selected rotation has been performed;
- store the calculated target positions in a table;
- receive the pixels from the source image;
- and
- retrieve the calculated target positions and store the received pixels at the calculated target positions within a tile buffer
- wherein pixels from a single line of the source image are written to a diagonal line in the tile buffer is there is not a rotation.
A method comprising:
- issuing fetch requests for pixels from a source image, wherein an order in which the fetch requests are issued is based on a specified rotation;
- calculating target locations for the pixels, wherein the target locations are calculated based on the specified rotation, and wherein the target locations correspond to locations within a rotated version of the source image;
- and
- receiving and storing the pixels in a tile buffer at the calculated target locations;
- and
- writing pixels from a single line of the source image to a single line in the tile buffer if there is a rotation, and
- wherein pixels from a single line of the source image are written to a diagonal line in the first tile buffer if there is not a rotation.
A method comprising:
- partitioning a source image into a plurality of tiles, wherein the partitioning is based on a specified rotation;
- reading pixels from a first tile of the source image;
- storing the pixels from the first tile in target locations within a tile buffer, wherein the target locations are calculated based on the specified rotation, wherein the rotated image is the source image after the rotation has been performed;
- writing pixels from a single line of the source image to a diagonal line in the tile buffer if there is not a rotation;
- responsive to detecting the tile buffer has been read by a subsequent stage in a graphics pipeline:
- reading pixels from a second tile of the source image;
- and
- storing the pixels from the second tile in the tile buffer.
Dependencies are inferred from the claim text.