c - Fastest approximative methods to convert YUV to RGBA? -


I'm looking for the fastest way to convert an array into an array. For example, a YCbYCr array is given, which is the sequence of bytes:

  YCbYCr = Luma0, Cb0, Luma1, Cr0, Luma2, ...   

Where the sample with 8-bit blue and 8-bit red-duration chroma components is 2, but the sample with 8-bit luma duration 1 is. For example:

  1. luma0 in image pixel (0, 0), cr0 red-gap chroma, CB 0 blue-inter chroma
  2. image pixel (0,1) Luma1, cr0 red-difference chroma, CB 0 blue-difference chroma
  3. image pixel (0,2) is luma2, CR1 red-difference chroma, CB 1 blue-gap chroma
  4. Image pixel (0,3) is luma3, CR1 red-difference chroma, CB1 blue-inter-chroma
  5. etc.

    RGBA Array should be produced which is:

      RGBA = R0, G0, B, A, R1, G1 , ...   

    Where all the elements are unsigned characters and all the bits of each A # are zero.

    The Luma component in YCbYCr is 0. 0. 255 unsigned char, CB and CR-127. + 126 Signed Characters is a standard approach --- Multiply multiplication, but it is very slow for real-time applications And this floating point is running with numbers. I'm looking for a fast approximate numerical method.

    The biggest single-computational savings you can get from doing just by calculating in the fixed point instead of the floating point It is likely to be an order of intensity (on an estimate).

    You can also take advantage of redundancy in SubSpled chromatism contributions, given that the complete matrix is ​​multiplied by the form:

      rabc yg = df CR bGHCR   

    You can often calculate the chroma partial amount as half:

      RBCG = EF CB B High CR   

    and then add it to the luma contribution at the full output rate:

      rr 'a g = g' + d. YBB 'g    

Comments