diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-07-06 16:18:04 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-07-09 13:23:47 +0200 |
commit | 5a481b15bd866752e2729f95bfb61f55da1a3d11 (patch) | |
tree | aa87ad90ff9ca746d5853d4ff0918f2e4aa3d577 /libavformat/framecrcenc.c | |
parent | 836065b27a0f5b8268c2fb6c6e825ac3b63168f0 (diff) | |
download | ffmpeg-5a481b15bd866752e2729f95bfb61f55da1a3d11.tar.gz |
truehd_core: Switch to in-place modifications
The truehd_core bitstream filter decreases the sizes of the
major_sync_info structure (if present), of the
substream_directory and of the substreams themselves. As a consequence,
there is enough space available in front of the actual substream data
for the new header, so that one only needs to modify the header in front
of the actual data (which apart from shrinking is left untouched) and
the packet's size and buffer pointer (after having made sure that the
packet is writable).
This and switching to bsf_get_packet_ref also removed the need for
having separate packets for in- and output.
Even if the input is not writable, there are noticable performance
improvements: The average of 10 iterations of processing a file with 262144
runs each (inlcuding about 20 skips per iteration) went down from 5669
to 4362 decicycles. If the input is writable, it goes down to 1363
decicycles.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/framecrcenc.c')
0 files changed, 0 insertions, 0 deletions