[FFmpeg-devel] sizeof(HEVCVPS)
Lynne
dev at lynne.ee
Thu Mar 21 01:09:52 EET 2024
Mar 20, 2024, 23:24 by michael at niedermayer.cc:
> Hi
>
> why is sizeof(HEVCVPS) is 7463476 ?
>
> If you think about this for a moment, a VPS in the bit stream is what, 5 bytes ?
>
> Now iam not even talking about someone proving you a 10mb file with a million VPSs
> 7TB allocation, memsets memcpies, ...
>
> But even with a totally normal file 7mb is easily bigger than the frame buffer
> that wastes memory, it wastes cpu time, it wastes data cache
>
As discussed on IRC, Vulkan ran into this.
The size of all HEVC structs (SPS, VPS, PPS) at their maximum array sizes is ~120 Mb.
That's why there's a function in Vulkan to allocate them on demand.
More information about the ffmpeg-devel
mailing list