Memory Sizes Required by Images in Different Formats

Calculation of the Memory Size Required by Raw Images

CEILING(X, Y) indicates that X is rounded up based on Y. In the following formulas, the unit is byte, width indicates the image width, height indicates the image height, and bit_width indicates the image pixel bit width.

  • Calculation with the compression algorithm disabled

    CEILING(CEILING(width, 32) x height, 8)/8 x CEILING(bit_width, 2)

  • Calculation with the frame compression algorithm enabled

    CEILING(width x height x bit_width x 1000/2000/8, 32)

  • Calculation with the line compression algorithm enabled

    CEILING(CEILING((16 + width x bit_width x 1000/1600 + 8192 + 127)/128, 2) x 16, 32) x height

Calculation of the Memory Size Required by YUV Images

The compression algorithm is not supported. The formulas are as follows:

  • YUV420

    CEILING(CEILING(width, 32) x CEILING(height, 2) x 1.5, 32)

  • YUV422

    CEILING(CEILING(width, 32) x CEILING(height, 2) x 2, 32)

  • YUV400

    CEILING(CEILING(width, 32) x CEILING(height, 2), 32)