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).
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).