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 /tests | |
parent | abbc111067bfa7beafc51aa60f153bba3f4caca6 (diff) |
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 'tests')
-rw-r--r-- | tests/ref/fate/binsub-mksenc | 2 | ||||
-rw-r--r-- | tests/ref/fate/matroska-vp8-alpha-remux | 4 | ||||
-rw-r--r-- | tests/ref/fate/matroska-zero-length-block | 4 | ||||
-rw-r--r-- | tests/ref/fate/webm-dash-chapters | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/ref/fate/binsub-mksenc b/tests/ref/fate/binsub-mksenc index 01e7db64f2..184661a3f0 100644 --- a/tests/ref/fate/binsub-mksenc +++ b/tests/ref/fate/binsub-mksenc @@ -1 +1 @@ -9dd2ff92a3da9fb50405db3d05e41042 +490b1b4beb4a614c06004609039ce779 diff --git a/tests/ref/fate/matroska-vp8-alpha-remux b/tests/ref/fate/matroska-vp8-alpha-remux index 413961672f..c17e8d0587 100644 --- a/tests/ref/fate/matroska-vp8-alpha-remux +++ b/tests/ref/fate/matroska-vp8-alpha-remux @@ -1,5 +1,5 @@ -89c4f6136f151f45c217ec363fe9db2b *tests/data/fate/matroska-vp8-alpha-remux.matroska -237178 tests/data/fate/matroska-vp8-alpha-remux.matroska +58147987d42f32d105d96b24b0755257 *tests/data/fate/matroska-vp8-alpha-remux.matroska +235018 tests/data/fate/matroska-vp8-alpha-remux.matroska #tb 0: 1/1000 #media_type 0: video #codec_id 0: vp8 diff --git a/tests/ref/fate/matroska-zero-length-block b/tests/ref/fate/matroska-zero-length-block index edee36a4ab..924cec1e3f 100644 --- a/tests/ref/fate/matroska-zero-length-block +++ b/tests/ref/fate/matroska-zero-length-block @@ -1,5 +1,5 @@ -c09d3b89ed0795817d671deb041fca1b *tests/data/fate/matroska-zero-length-block.matroska -650 tests/data/fate/matroska-zero-length-block.matroska +f37ba7e8a30eaa33c1fd0ef77447fb41 *tests/data/fate/matroska-zero-length-block.matroska +636 tests/data/fate/matroska-zero-length-block.matroska #tb 0: 1/1000 #media_type 0: subtitle #codec_id 0: subrip diff --git a/tests/ref/fate/webm-dash-chapters b/tests/ref/fate/webm-dash-chapters index 95114e6526..af8110ed1a 100644 --- a/tests/ref/fate/webm-dash-chapters +++ b/tests/ref/fate/webm-dash-chapters @@ -1,5 +1,5 @@ -01732642a0750de3959fd348092929a5 *tests/data/fate/webm-dash-chapters.webm -111162 tests/data/fate/webm-dash-chapters.webm +f97445ba73e182c888fa077348384083 *tests/data/fate/webm-dash-chapters.webm +111156 tests/data/fate/webm-dash-chapters.webm #extradata 0: 3469, 0xc6769ddc #tb 0: 1/1000 #media_type 0: audio |