diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-16 14:01:28 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-19 12:18:14 +0100 |
commit | 9f7e0b37ffc76e2ad0e5a2b007601cfdd6cc201d (patch) | |
tree | b583558fd52357a4e91288ac1c3eebe992c63889 /libavcodec/vaapi_vp9.c | |
parent | abbc111067bfa7beafc51aa60f153bba3f4caca6 (diff) | |
download | ffmpeg-9f7e0b37ffc76e2ad0e5a2b007601cfdd6cc201d.tar.gz |
avformat/matroskaenc: Don't waste bytes on BlockGroup length fields
This commit uses the new EbmlWriter API to write the length fields
of the BlockGroup and its descendants that are themselves Master
elements (namely BlockAdditions and BlockMore) on the least amount of
bytes.
This fixes regressions introduced when the special code for writing
general subtitles was removed. Accordingly, the binsub-mksenc and
matroska-zero-length-block FATE-tests have now been reverted back
to their old state again; the advantages of this approach are evident
with the matroska-vp8-alpha-remux test which up until now wrote
all the length fields of all BlockGroups, BlockAdditions and BlockMore
on eight bytes.
Using the EbmlWriter API also allowed to improve locality in
mkv_write_block(): E.g. both DiscardPadding as well as the
BlockAdditional side-data are now directly used to add elements
to the writer whereas the earlier code had to first check
for whether a BlockGroup should be used and then check again
(after the place where a BlockGroup would be opened if one were
used) for whether there is DiscardPadding or BlockAdditional
side-data to write.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vaapi_vp9.c')
0 files changed, 0 insertions, 0 deletions