Skip to content

MTY_RenderDesc

chrisd1100 edited this page Apr 9, 2023 · 4 revisions

Description of a render operation.

typedef struct {
    MTY_ColorFormat format;
    MTY_Rotation    rotation;
    MTY_Chroma      chroma;
    MTY_Filter      filter;
    MTY_Effect      effects[2];
    float           levels[2];
    bool            fullRangeYUV;
    bool            multiplyYUV;
    uint8_t         layer;
    uint32_t        imageWidth;
    uint32_t        imageHeight;
    uint32_t        cropWidth;
    uint32_t        cropHeight;
    uint32_t        viewWidth;
    uint32_t        viewHeight;
    float           aspectRatio;
    float           scale;
} MTY_RenderDesc;

Members

format (MTY_ColorFormat)

The color format of a raw image.

rotation (MTY_Rotation)

Rotation applied to the image.

chroma (MTY_Chroma)

Color subsampling, chroma layout for planar YUV formats.

filter (MTY_Filter)

Filter applied to the image.

effects[2] (MTY_Effect)

Effects applied to the image.

levels[2] (float)

Intensity of the applied effects between 0.0f and 1.0f.

fullRangeYUV (bool)

Use the full 0-255 color range for YUV formats.

multiplyYUV (bool)

Properly normalize 10-bit YUV formats if not already done.

layer (uint8_t)

If drawing multiple layers of quads between present, layer determines the order in the blending hierarchy.

imageWidth (uint32_t)

The width in pixels of the image.

imageHeight (uint32_t)

The height in pixels of the image.

cropWidth (uint32_t)

Desired crop width of the image from the top left corner.

cropHeight (uint32_t)

Desired crop height of the image from the top left corner.

viewWidth (uint32_t)

The width of the viewport.

viewHeight (uint32_t)

The height of the viewport.

aspectRatio (float)

Desired aspect ratio of the image. The renderer will letterbox the image to maintain the specified aspect ratio.

scale (float)

Multiplier applied to the dimensions of the image, producing an minimized or magnified image. This can be set to 0 if unnecessary.

See also

Module: App

Clone this wiki locally