An approximate formula for each buffer type can be used to derive the total memory requirement per use case. This shows a use case where frames are in raster format, except the reference frames which are in tiled format.
| Buffer | Formula |
|---|---|
| Source Frame | height x width x bit depth (12-bit = 2, 10-bit = 2, 8-bit= 1) x chroma format (4:4:4 = 3, 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1) |
| Reference Frame | height x width x bit depth (12-bit = 12/8, 10-bit = 10/8, 8-bit= 1) x chroma format (4:4:4 = 3, 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1) |
| Reconstructed Frame | height x width x bit depth (12-bit = 2, 10-bit = 2, 8-bit = 1) x chroma format (For 4:4:4 = 3, 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1) |
| Intermediate Buffers | height/16 x width/16 x 1328 (Required by AVC when using multi-core) |
| Motion Vector Buffer | height/16 x width/16 x Codec (For AVC = 32, For HEVC = 16) |
| Bitstream Buffer | height x width x bit depth (12-bit = 12/8, 10-bit = 10/8, 8-bit = 1) x color format (For 4:4:4 = 3, 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1)/ Codec (For AVC = 2, For HEVC = 4) |
| Other Buffers | 25664 + (height x width)/Codec (For AVC= 256, HEVC=1024) |
The following example is for a multi-stream use case: 4 1080p30 AVC, 4:2:2 chroma format, 10-bit depth.
| Buffers | No. of Buffers | Single Stream (1080p30) | Multi-Stream (4 1080p30) |
|---|---|---|---|
| Source Frame | 5 | 40 MB | 159 MB |
| Reference Frame | 3 | 15 MB | 60 MB |
| Reconstructed Frame | 1 | 8 MB | 32 MB |
| Intermediate Buffers | 2 | 21 MB | 83 MB |
| Motion Vector Buffer | 4 | 1 MB | 4 MB |
| Bitstream Buffer | 2 | 5 MB | 20 MB |
| Other Buffers | 1 | 1 MB | 1 MB |
| Total | 89 MB | 356 MB |