• Andreas Rheinhardt's avatar
    avcodec/flashsv: Avoid deflating data · dcc3f622
    Andreas Rheinhardt authored
    Currently priming the zlib decompressor involves compressing
    data directly after having decompressed it and decompressing
    it again in order to set the "dictionary" and to initialize
    the adler32-checksum. Yet this is wasteful and can be simplified
    by synthetizing the compressed data via non-compressed blocks.
    
    This reduced the amount of allocations for the decoding part
    of fate-vsynth1-flashsv2, namely from
    total heap usage: 9,135 allocs, 9,135 frees, 376,503,427 bytes allocated
    to
    total heap usage: 2,373 allocs, 2,373 frees, 14,144,083 bytes allocated
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    dcc3f622
flashsv.c 20.5 KB