Transformations are used to rotate and mirror the source surface of a blit operation. The destination rectangle is not affected by any transformation settings.
NvMediaTransform identifies the transformations that can be applied as a combination of rotation and mirroring.
Specifically, given a hypothetical 2x2 image, applying these operations would yield the following results:
INPUT OUTPUT
+---+---+ +---+---+
| 0 | 1 | IDENTITY | 0 | 1 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 2 | 3 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | ROTATE_90 | 1 | 3 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 0 | 2 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | ROTATE_180 | 3 | 2 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 1 | 0 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | ROTATE_270 | 2 | 0 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 3 | 1 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | FLIP_HORIZONTAL | 1 | 0 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 3 | 2 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | INVTRANSPOSE | 3 | 1 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 2 | 0 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | FLIP_VERTICAL | 2 | 3 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 0 | 1 |
+---+---+ +---+---+
+---+---+ +---+---+
| 0 | 1 | TRANSPOSE | 0 | 2 |
+---+---+ ---------------> +---+---+
| 2 | 3 | | 1 | 3 |
+---+---+ +---+---+
◆ NvMediaTransform
2D rotation/transform.
This enum describes the 2D transform to apply during a blit operation.
Enumerator |
---|
NVMEDIA_TRANSFORM_NONE | No transform.
|
NVMEDIA_TRANSFORM_ROTATE_90 | Rotate 90 degrees anti-clockwise.
|
NVMEDIA_TRANSFORM_ROTATE_180 | Rotate 180 degrees.
|
NVMEDIA_TRANSFORM_ROTATE_270 | Rotate 270 degrees anti-clockwise.
|
NVMEDIA_TRANSFORM_FLIP_HORIZONTAL | Flip horizontally (mirror along Y axis).
|
NVMEDIA_TRANSFORM_INV_TRANSPOSE | Apply inverse transpose (mirror along diagonal axis from top-right to bottom-left).
|
NVMEDIA_TRANSFORM_FLIP_VERTICAL | Flip vertically (mirror along X axis).
|
NVMEDIA_TRANSFORM_TRANSPOSE | Apply transpose (mirror along diagonal axis from top-left to bottom-right).
|
Definition at line 151 of file multimedia/tvmr/include/nvmedia_2d.h.