fre 2021-09-17 klockan 04:08 +0200 skrev Andreas Rheinhardt: > Up until now, each call to avpriv_elbg_do() would result > in at least six allocations. And this function is called a lot: > A typical FATE run results in 52213653 calls to av_malloc; of these, > 34974671 originate from av_malloc_array and from these 34783679 > originate from avpriv_elbg_do; the msvideo1 encoder tests are behind > most of these. > > This commit changes this by keeping the buffers and only reallocating > them when needed. E.g. for the encoding part of fate-vsynth1-msvideo1 > total heap usage went down from 11,407,939 allocs and frees with > 468,106,207 bytes allocated to 3,149 allocs and frees with 13,181,847 > bytes allocated. The time for one encode2-call went down by 69%. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
Looks fine /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".