1. 09 Apr, 2011 11 commits
    • Reimar Döffinger's avatar
      Abort Ogg header parsing when we encounter a data packet. · d459d8e2
      Reimar Döffinger authored
      Fixes ticket #15.
      d459d8e2
    • Philip Langdale's avatar
      CrystalHD: Improve detection of h.264 content. · ae7a4a15
      Philip Langdale authored
      As previously discussed, the CrystalHD hardware returns exceptionally
      useless information about interlaced h.264 content - to the extent
      that it's not possible to distinguish most MBAFF and PAFF content until
      it's too late.
      
      In an attempt to compensate for this, I'm introducing two mechanisms:
      
      1) Peeking at the picture number of the next picture
      
      The hardware provides a capability to peek the next picture number. If
      it is the same as the current picture number, then we are clearly dealing
      with two fields and not a frame or fieldpair.
      
      If this always worked, it would be all we need, but it's not guaranteed
      to work. Sometimes, the next picture may not be decoded sufficiently
      for the number to be known; alternately, a corruption in the stream may
      cause the hardware to refuse to return the number even if the next
      intact frame is decoded. In either case, the query will return 0.
      
      If we are unable to peek the next picture number, we assume that the
      picture is a frame/fieldpair and return it accordingly. If that turns
      out to be incorrect, we discard the second field, and the user has
      to live with the glitch. In testing, false detection can occur for
      the first couple of seconds, and then the pipeline stabalizes and
      we get correct detection.
      
      2) Use the h264_parser to detect when individual input fields have
      been combined into an output fieldpair.
      
      I have multiple PAFF samples where this behaviour is detected. The
      peeking mechanism described above will correctly detect that the
      output is a fieldpair, but we need to know what the input type was
      to ensure pipeline stability (only return one output frame per input
      frame).
      
      If we find ourselves with an output fieldpair, yet the input picture
      type was a field, as reported by the parser, then we are dealing with
      this case, and can make sure not to return anything on the next
      decode() call.
      
      Taken together, these allow us to remove the hard-coded hacks for
      different h.264 types, and we can clearly describe the conditions
      under which we can trust the hardware's claim that content is
      interlaced.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      ae7a4a15
    • Philip Langdale's avatar
      CrystalHD: Carry picture type from input to output picture. · bfde0f1b
      Philip Langdale authored
      Now that we know the type of the input picture, we have to bring
      that information to the output picture to help identify its type.
      We do this by adding a field to the opaque_list node.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      bfde0f1b
    • Philip Langdale's avatar
      CrystalHD: Bring in h.264 parser to establish picture type. · f6421e0b
      Philip Langdale authored
      As the hardware is unreliable, we will have to use the h.264 parser
      to identify whether an input picture is a field or a frame. This
      change loads the parser and extracts the picture type.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      f6421e0b
    • Philip Langdale's avatar
      CrystalHD: Change opaque_list_pop to return the node. · e99fd6ee
      Philip Langdale authored
      In preparation for adding additional fields to the node, return
      the node instead of the pts value. This requires the caller to
      free the node.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      e99fd6ee
    • Philip Langdale's avatar
      CrystalHD: Fix whitespace after previous change. · ca0eed7e
      Philip Langdale authored
      'git diff -w' confirmed to return nothing.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      ca0eed7e
    • Philip Langdale's avatar
      CrystalHD: Handle different h.264 MBAFF packing. · 9ce1d5f0
      Philip Langdale authored
      I found another MBAFF sample where the input:output pattern is
      the same as mpeg2 and vc1 (fieldpair input, individual field output).
      While I'm not sure how you can output individual fields from MBAFF,
      if I apply the mpeg2/vc1 handling to this file, it plays correctly.
      
      So, this changes the detection algorithm to handle the known cases.
      
      Whitespace will be fixed in a separate change.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      9ce1d5f0
    • Michael Niedermayer's avatar
      flv: Only parse keyframe index when the underlaying protocol allows seeking as... · c0577ceb
      Michael Niedermayer authored
      flv: Only parse keyframe index when the underlaying protocol allows seeking as we need to seek to read the index
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      c0577ceb
    • Kharkov Alexander's avatar
      Fix support for flvtool2 "keyframes based" generated index in FLV format decoder · ba667e60
      Kharkov Alexander authored
      Current keyframes data parser unconditionally rewind metadata to the end
      at the end of function. As result ALL metadata located after keyframes
      index not parsed,
      and as metadata object can have ANY placement inside metadata it can
      lead to unpredictable result
      (bitrate can not be found, etc.). As result FLV movie will not play at
      all in such situation.
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      ba667e60
    • Lou Logan's avatar
      Replace outdated info on the FAQ · f7f9e24d
      Lou Logan authored
      FAQ could use some work. This updates a few little details.
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      f7f9e24d
    • Michael Niedermayer's avatar
      Merge remote branch 'qatar/master' · d4d09329
      Michael Niedermayer authored
      * qatar/master:
        lavf: bump minor and add an APIChanges entry for avformat cleanup
        lavf: get rid of ffm-specific stuff in avformat.h
      Not pulled:  avio: deprecate av_protocol_next().
        avio: add a function for iterating though protocol names.
        lavf: rename a parameter of av_sdp_create from buff->buf
        lavf: rename avf_sdp_create to av_sdp_create.
        lavf: make av_guess_image2_codec internal
        avio: make URLProtocol internal.
        avio: make URLContext internal.
        lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
        lavf: use designated initializers for all protocols
        applehttp: don't use deprecated url_ functions.
        avio: move two ff_udp_* functions from avio_internal to url.h
        asfdec: remove a forgotten declaration of nonexistent function
        avio: deprecate the typedef for URLInterruptCB
      Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      d4d09329
  2. 08 Apr, 2011 19 commits
  3. 07 Apr, 2011 10 commits