Memory Footprint Calculation - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2023-05-16
Version
2023.1 English

An approximate formula for each buffer type can be used to derive the total memory requirement per use case.

Table 1. Buffer-Formula Mapping
Buffer Formula
Source Frame height x width x bit depth (10-bit = 4/3, 8-bit = 1) x chroma format (For 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1)
Reference Frame height x width x bit depth (10-bit = 10/8, 8-bit = 1) x chroma format (For 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1)
Reconstructed Frame height x width x bit depth (10-bit = 10/8, 8-bit = 1) x chroma format (For 4:2:2 = 2, 4:2:0 = 1.5, 4:0:0 = 1)
Intermediate Buffers height/16 x width/16 x 1328 (Requires by AVC when using multi-cores)
Motion Vector Buffer height/16 x width/16 x Codec (For AVC = 32, For HEVC = 16)
Bitstream Buffer height x width x bit depth (10-bit = 10/8, 8-bit = 1) x color format (For 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 multistream use case: 4 1080p30 AVC, 4:2:2 chroma format, 10-bit depth.

Table 2. Multi-stream Use Case
Buffers No. of Buffers Single Stream (1080p30) Multi-Stream (4 1080p30)
Source Frame 5 27 MB 105 MB
Reference Frame 3 15 MB 60 MB
Reconstructed Frame 1 5 MB 20 MB
Intermediate Buffers 2 0 MB 0 MB
Motion Vector Buffer 4 1 MB 4 MB
Bitstream Buffer 2 5 MB 20 MB
Other Buffers 1 1 MB 4 MB
Total   54 MB 217 MB