Skip to content

v0.56.0

Latest

Choose a tag to compare

@tobbee tobbee released this 22 Aug 14:24
· 22 commits to master since this release

Added

  • LablBox for the Label box labl (ISO/IEC 14496-12:2026 Section 8.10.5) with
    the LablIsGroupLabelFlag flag mask and an IsGroupLabel() accessor, as used
    for track labels in DASH-IF Ingest
  • UdtaBox.Labls with the labl children of a user data box, and
    UdtaBox.GroupLabl() to find the group label of a label group
  • TrakBox.Udta reference to the user data box of a track
  • QuickTime sound sample description versions 1 and 2 are parsed into
    AudioSampleEntryBox.QuickTimeVersion, QuickTimeV1, and QuickTimeV2,
    preserved on encode (along with the QuickTime revision level, vendor, and
    CompressionID), and the child boxes are read at the version-dependent
    offset. Info() reports the effective channel count, sample size, and
    sample rate from the version 2 struct
  • WaveBox for the QuickTime siDecompressionParam atom, so an esds wrapped
    in a wave child of an audio sample entry becomes reachable as Wave.Esds.
    Children that are not well-formed boxes (such as the spec-mandated
    terminator atom when written with size zero) are preserved verbatim
  • WaveBox.GetChildren, so a wave box satisfies the ContainerBox interface
  • DecoderConfigDescriptor.StreamTypeValue and UpStream decompose the
    packed streamType byte, and named constants cover the common stream types
    (ISO/IEC 14496-1 Table 6) and object type indications (mp4ra.org), so
    callers no longer need magic numbers for the esds vocabulary
  • aac.DecodeAudioSpecificConfigHeader parses the leading
    AudioSpecificConfig fields (object type including the 31-escape, base
    sampling frequency, channel configuration) for every audio object type,
    not just the AAC-LC and HE-AAC types the full decoder supports
  • ElstEntry.MediaRateFixed32 and SetMediaRateFixed32 combine and split
    the media rate halves as one signed 16.16 fixed-point number, so callers
    no longer need to know the bit layout
  • QuickTimeFormatFlagIsFloat and the other CoreAudio/QTFF linear-PCM
    format flags name the bits of
    QuickTimeV2SoundDescription.FormatSpecificFlags, and the IsFloat,
    IsBigEndian, and IsSignedInteger accessors read the common ones, so
    lpcm entries can be interpreted without magic numbers

Changed

  • Info() escapes control characters in box types as \xNN, so a type such
    as the four zero bytes of the QuickTime wave terminator atom stays visible
  • audio sample entries whose reserved bytes claim a QuickTime version whose
    layout does not parse fall back to the plain ISO interpretation, so
    previously decodable files keep decoding; the overlaid QuickTime bytes
    (version, revision level, vendor) are now preserved on encode instead of
    being zeroed
  • DecodeAudioSampleEntry now errors on bodies too short for the fixed
    fields, and encoding errors on inconsistent
    QuickTimeVersion/QuickTimeV1/QuickTimeV2 combinations
  • The QuickTime audio sample entries .mp3, lpcm, twos, and sowt
    decode as AudioSampleEntryBox (reachable as StsdBox.Mp3 and
    StsdBox.QtPcm) instead of falling through to UnknownBox. A body that
    does not parse as a sound sample description still becomes an
    UnknownBox, so previously decodable files keep decoding; a body that
    does parse now re-encodes with the same fidelity as mp4a (zeroed
    packet-size bytes, integer sample rate) instead of byte-verbatim. Note
    that a .mp3 entry carries no esds; its codec facts live in the sound
    description fields themselves

Fixed

  • hevc.ParseSliceHeader applies the Section 7.4.7.1 inferences for slice
    header fields that are absent from the bitstream, instead of leaving them at
    the Go zero value:
    • slice_deblocking_filter_disabled_flag from
      pps_deblocking_filter_disabled_flag. This one also caused a parse failure:
      a stream with deblocking disabled in the PPS and no slice header override
      read a slice_loop_filter_across_slices_enabled_flag bit that is not there
      and then failed byte_alignment (x265 --no-deblock output)
    • slice_loop_filter_across_slices_enabled_flag from
      pps_loop_filter_across_slices_enabled_flag
    • slice_beta_offset_div2 and slice_tc_offset_div2 from
      pps_beta_offset_div2 and pps_tc_offset_div2 when the slice header does
      not override the deblocking parameters
    • pic_output_flag as 1 when output_flag_present_flag is 0
  • avc.ParsePPSNALUnit rejects an out-of-range num_slice_groups_minus1
    (max 7 for any profile) instead of appending one entry per signalled slice
    group, which let a 7-byte malformed PPS NAL unit allocate over 10 GiB
  • hevc.ParseVPSNALUnit rejects an out-of-range vps_num_hrd_parameters
    (max vps_num_layer_sets_minus1 + 1) and vps_num_layer_sets_minus1
    (valid range 0-1023), which let a 33-byte malformed VPS NAL unit churn
    30 GiB of HRD parameter allocations
  • the alst sample group entry no longer underflows its count of optional
    entries when roll_count implies more bytes than the signalled
    description_length, which let a 32-byte sgpd box allocate over 4 GiB
  • avc.ParseSPSNALUnit rejects an out-of-range
    num_ref_frames_in_pic_order_cnt_cycle (valid range 0-255) instead of
    allocating a slice sized from the raw field, which let a tiny malformed SPS
    NAL unit trigger a multi-gigabyte allocation (found by fuzzing)
  • MdatBox.HeaderSize accounts for large lazy payloads, so trun data
    offsets are no longer 8 bytes short for fragments above 4 GiB