Mode variables
--------------

To allow mode selector blocks to used as overlay descriptors, the list of mode variables is to be extended as follows:

Mode flags (mode variable 0):

 Bits 16-18 will be used to specify any rotate/flip transform that is being applied to the image:
   Bit 16: Rotate 90 clockwise
   Bit 17: Rotate 180 / flip H+V
   Bit 18: Flip vertically
   
 For rotated screens/buffers, the width and height values correspond to the unrotated form of the image; e.g. if the user has a 1920x1080 monitor that they want to use in a protrait orientation, the mode selector must specify dimensions of 1080x1920. The transform bits indicate the operations that should be applied to this framebuffer in order to translate it for display on the screen. This means that if the user has rotated their screen 90 degrees anticlockwise, bits 16-18 need to describe a rotation by 90 degrees clockwise. If multiple transforms are enabled, bit 16 is applied first, followed by 17, and then 18.

Min screen banks (mode variable 13):

 This is a new mode variable, primarily intended to allow mode selection and overlay creation to request that enough memory is reserved to allow for a guaranteed number of screen banks/buffers to be available.


Pixel formats
-------------

The current extended framebuffer format specification at https://www.riscosopen.org/wiki/documentation/show/Extended%20Framebuffer%20Format%20Specification does not provide sufficient support for the "YUV" formats that are commonly supported by hardware. To resolve this, the list of supported pixel formats is being extended as follows:

NColour     Log2BPP  Description
0x59565955  7        FOURCC "UYVY", i.e. 32bpp words of &Y1.Cr.Y0.Cb
0x32595559  7        FOURCC "YUY2", i.e. 32bpp words of &Cr.Y1.Cb.Y0
0x3231564e  7        FOURCC "NV12". Plane 0 is 8bpp Y data with no sub-sampling.
                     Plane 1 is UV data, 2x2 sub-sampled. Each 16 bits is an
                     8 bit U (Cb) sample followed by an 8 bit V (Cr) sample.
0x3132564e  7        FOURCC "NV21". As per NV12 but with Cb and Cr swapped.
0x32315659  7        FOURCC "YV12". Plane 0 is 8bpp Y data with no sub-sampling.
                     Plane 1 is 8bpp Cb data with 2x2 sub-sampling.
                     Plane 2 is 8bpp Cr data with 2x2 sub-sampling.
0x36315659  7        FOURCC "YV16". Plane 0 is 8bpp Y data with no sub-sampling.
                     Plane 1 is 8bpp Cb data with 2x1 sub-sampling.
                     Plane 2 is 8bpp Cr data with 2x1 sub-sampling.

It's anticipated that in the future a more flexible pixel format descriptor system will be introduced in order to allow the memory layouts of pixels and macroblocks to be precisely described, making the use of FOURCCs as NColour values redundant.
