1. 23 Jul, 2021 6 commits
  2. 22 Jul, 2021 2 commits
  3. 21 Jul, 2021 19 commits
    • He Junyan's avatar
      codecs: h264dec: Improve the algorithm for low latency mode. · 13020562
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      In low_latency mode, try to bump the picture as soon as possible
      without the frames disorder:
      1. We can directly output the continuous non-reference frame.
      2. Consider max_num_reorder_frames, which is special useful for
         I-P mode.
      3. Consider the leading pictures with negative POC.
      4  Output small POC pictures when non-reference frame comes.
      4. Output the POC increment<=2 pictures. This is not 100% safe,
         but in practice this condition can be used.
      
      Part-of: <!2373>
      13020562
    • He Junyan's avatar
      codecs: h264dec: Add help function of dpb_set_max_num_reorder_frames. · 573d3f5b
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      The max_num_reorder_frames can be useful for bump check. We store it
      in the DPB and no need for the decoder now.
      
      Part-of: <!2373>
      573d3f5b
    • He Junyan's avatar
      codecs: h264dec: Add a flag to record whether picture is reference. · be223ad3
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      The picture->ref field will change from time to time according to decoder's
      state and reference sliding window. We need another flag to record whether
      the picture is a reference picture when it is created, and this can help
      the bumping check.
      
      Part-of: <!2373>
      be223ad3
    • He Junyan's avatar
      codecs: h264dec: Change the order of dpb_add and dpb_bump. · b4e38874
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      The current behavior is different from the SPEC. We should check
      and bump the DPB or drain the DPB before we insert the current
      picture into it. This may cause the output picture disorder.
      
      Part-of: <!2373>
      b4e38874
    • He Junyan's avatar
      codecs: h264dec: Modify the DPB need bump check. · f1df1207
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      Accord to spec, we should not add the current picture into the DPB
      when we check whether it needs to bump, so the checks of the IDR and
      the "memory_management_control_operation equal to 5" are no needed.
      
      And the spec also says that the DPB only needs to bump when there is
      no empty frame buffer left(We handle the IDR cases in other places).
      We need to follow that and the max_num_reorder_frames is useless.
      
      We also minus 1 in has_empty_frame_buffer because the current frame
      has not been added yet.
      
      Part-of: <!2373>
      f1df1207
    • He Junyan's avatar
      codecs: h264dec: Make dpb_has_empty_frame_buffer a codecs API. · 4411a4e0
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      Part-of: <!2373>
      4411a4e0
    • He Junyan's avatar
      codecs: h264dec: Set picture to a small poc when mem_mgmt_5. · 23b15aa5
      He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      When current frame memory_management_control_operation equal to 5, that
      means we need to drain the dpb and the current picture act as an IDR frame.
      So it should have smaller poc than the later pictures to ensure the output
      order.
      
      Part-of: <!2373>
      23b15aa5
    • Edward Hervey's avatar
      mxfdemux: Make gst-indent on the CI happy · 7a6bc987
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      grmbl
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      7a6bc987
    • Edward Hervey's avatar
      mxfdemux: Handle non-frame wrapping · 726ea62d
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      * If we have an index table for non-framed essence, we can handle it
      
      * The demuxer has a state which indicates whether it will next fetch a KLV or
      data contained *within* a KLV.
      
      * The position on Essence Tracks always correspond to the next entry to fetch,
      demuxer offset will be skipped accordingly whenever we switch between
      partitions (in case of resyncs). A copy of the main clip/custom KLV for that
      partition is kept to track the position within the essence of that partition.
      
      * For clip/custom-wrapped raw audio, if the edit rate is too small (and would
      cause plenty of tiny buffers to be outputted), specify a minimum number of edit
      units per buffer.
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      726ea62d
    • Edward Hervey's avatar
      mxfdemux: Use KLV for position/content tracking · 38ec61c5
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      * For pull-based, this avoids pulling content if it's not needed (ex: skipping filler
      packet, not downloading the content if we only need to know if/where an essence
      packet is, etc...). Allows reducing i/o usage to the minimum.
      
      * This also allows doing sub-klv position tracking, and opens the way for
      non-frame-wrapping handling
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      38ec61c5
    • Edward Hervey's avatar
      mxfdemux: Output the topology of the file in debug logs · 40d36900
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      This provides a summary of the number/type of tracks in the Material and File
      Packages
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      40d36900
    • Edward Hervey's avatar
      mxfdemux: Refactor pull seek · 3303e0eb
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      In order to figure out the exact start position (backed by a keyframe) accross
      all tracks, we first figure out the backing keyframe position, and *then* seek
      to that position.
      
      Avoids ending up in situations where we would properly seek to the backing
      keyframe on video ... but not on the audio streams (they would have been set to
      the original non-keyframe position). Fixes key-unit seeking.
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      3303e0eb
    • Edward Hervey's avatar
      mxfaes-bwf: Handle new custom-constant-sized variant · 8817b08d
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      Defined by Amendment 2:2013 to SMPTE ST 382:2007
      
      Also define a new "UNKNOWN" wrapping type to make the difference with known
      wrapping types
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      8817b08d
    • Edward Hervey's avatar
      mxfmpeg: Fix essence coding detection · f502ef90
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      The picture essence coding matching was wrong. Use the proper "base" MXFUL for
      video mpeg compression for matching.
      
      Also handle the case where some old files would put the essence container label
      in the essence coding field
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      f502ef90
    • Edward Hervey's avatar
      mxfdemux: Refactor index table and offset handling · ac483b23
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      * Streamline offset <=> entry handling. Historically the demuxer didn't support
      information from index tables and stored the discovered information in an array
      per track. When index table support was added, a parallel system was setup for
      that relationship. This commit unifies this into one system with the
      `find_edit_entry()` and `find_entry_for_offset()` functions.
      
      * By extension, per-track offset entry tables are only created/used if no index
      table is present for those tracks.
      
      * Use index table information as-is. The index table system from MXF is quite
      complex and there are various ways to use the information contained
      within. Instead of converting that information we store the data from the tables
      as-is and extract the needed information when needed.
      
      * Handle index tables without entries (i.e. all content package units are of the
      same size).
      
      * Allow collecting index table segments as we go instead of only once if a
      random-index-pack is present. This also improves support of some files in
      push-mode.
      
      * When searching for keyframe entries, use the keyframe_offset if
      present (speeds up searching).
      
      * For interleaved content (i.e. several tracks in the sample essence container),
      we use a system to be able to identify the position of each track in the delta
      entries of index tables.
      
      * Handle temporal offset only on tracks which *do* need it (as specified in the
      delta entries of the index tables). If present, those offsets are stored in a
      pre-processed table which allows computing PTS from DTS with a simple offset.
      
      * Add a quirk for files which are known to be have wrongly stored temporal
      offsets.
      
      * Overall opens the way to handle more types of MXF files, especially those with
      non-frame-wrapping.
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      ac483b23
    • Edward Hervey's avatar
      mxfdemux: Drop duplicate seek events · c24d4876
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      Part-of: <gstreamer/gst-plugins-bad!2371>
      c24d4876
    • Edward Hervey's avatar
      mxf: Improve index entry debug log · a68198c4
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      By printing out the various known flag values
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      a68198c4
    • Edward Hervey's avatar
      mxf: Demote error message when resolving valid empty reference · 11d9abd2
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      A Source Clip can have zero'd SourcePackageID and SourceTrackID, this indicates
      it terminates the source reference chain
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      11d9abd2
    • Edward Hervey's avatar
      mxfdemux: Handle temporal reordering shift · dfee771a
      Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
      This is similar to how the same issue was handled in qtdemux.
      
      In order for the "DTS <= PTS" constraint to be respected, we calculate the
      maximum temporal reordering that can happen (via index tables).
      
      If there is a non-0 temporal reordering, we:
      * Shift all outgoing PTS by that amount
      * Shift segment for that stream by that amount
      * Don't modify DTS (i.e. they might end up having negative running-time, before
      the start of the segment)
      
      Also ensure all entries have a valid PTS set, previously this wouldn't be set
      for entries with a temporal offset of 0.
      
      Fixes gstreamer/gst-plugins-bad#584
      
      (and maybe a lot of other issues)
      
      Part-of: <gstreamer/gst-plugins-bad!2371>
      dfee771a
  4. 17 Jul, 2021 5 commits
  5. 16 Jul, 2021 2 commits
  6. 15 Jul, 2021 6 commits