[FFmpeg-devel] [PATCH 00/15] Matroska muxer patches

Andreas Rheinhardt andreas.rheinhardt at googlemail.com
Tue Apr 2 16:32:50 EEST 2019


Hello,

this patchset is mostly concerned with reducing the unnecessary overhead
of the Matroska muxer; this overhead mostly comes from not using the
minimal amount of bytes when writing the length field of master
elements. The length fields of most level 1 elements are currently
written on eight bytes; after this patchset, they are always written
with the minimal amount of bytes.

Currently, writing level 1 elements always uses dynamic buffers
(regardless of whether one is in seekable or non-seekable mode), but
strangely, there are nevertheless two different codepaths for writing
for the seekable and the non-seekable modes. These have been unified; as
a consequence, CRC-32 elements are now also written in
non-seekable/live-mode.

Given that this patchset changes the output, I had to update some fate
tests. This is the first time I did this, so I hope I did everything
right. But doublechecking wouldn't hurt.

- Andreas

Andreas Rheinhardt (15):
  avformat/matroskaenc: Fix relative timestamp check
  avformat/matroskaenc: Fix BlockGroup size calculation
  avformat/matroskaenc: Slightly improve size bounds for cues
  avformat/matroskaenc: Don't waste bytes in EBML Header
  avformat/matroskaenc: Remove traces of secondary seek head
  avformat/matroskaenc: Simplify check for writing CRCs
  avformat/matroskaenc: Improve log message
  avformat/matroskaenc: Remove redundant check
  avformat/matroskaenc: Change variable types
  avformat/matroskaenc: Avoid seeking when writing level 1 elements
  avformat/matroskaenc: Write CRC-32 in non-seekable mode
  avformat/matroskaenc: Cosmetics and typo
  avformat/matroskaenc: Don't waste bytes writing level 1 elements
  avformat/matroskaenc: Improve log messages for blocks
  avformat/matroskaenc: Reduce usage of ebml_master

 libavformat/matroskaenc.c            | 319 +++++++++++++--------------
 tests/fate/matroska.mak              |   2 +-
 tests/fate/wavpack.mak               |   4 +-
 tests/ref/fate/aac-autobsf-adtstoasc |   4 +-
 tests/ref/fate/binsub-mksenc         |   2 +-
 tests/ref/fate/rgb24-mkv             |   4 +-
 tests/ref/lavf/mka                   |   4 +-
 tests/ref/lavf/mkv                   |   4 +-
 tests/ref/lavf/mkv_attachment        |   4 +-
 tests/ref/seek/lavf-mkv              |  44 ++--
 10 files changed, 185 insertions(+), 206 deletions(-)

-- 
2.19.2



More information about the ffmpeg-devel mailing list