Function

GstGL-1.0GstGLgl_video_format_swizzleSince 1.24

  • Calculates the swizzle indices for video_format and gl_format in order to access a texture such that accessing a texel from a texture through the swizzle index produces values in the order (R, G, B, A) or (Y, U, V, A).

    For multi-planer formats, the swizzle index uses the same component order (RGBA/YUVA) and should be applied after combining multiple planes into a single rgba/yuva value. e.g. sampling from a NV12 format would have Y from one texture and UV from another texture into a (Y, U, V) value. Add an Aplha component and then perform swizzling. Sampling from NV21 would produce (Y, V, U) which is then swizzled to (Y, U, V).

    Parameters

    Returns [boolean, number[]]

    whether valid swizzle indices could be found

    1.24