Skip to content
Snippets Groups Projects

codecs: vp9decoder: Reimplement VP9 parser and use it

Merged Seungha Yang requested to merge seungha.yang/gst-plugins-bad:vp9dec-update into master
    codecs: vp9decoder: Allow decoding start with intra-only frame

    As per spec "7.2 Uncompressed header semantics" and
    "8.2 Frame order constraints", decoding can start with intra-only
    frame. This commit is for fixing vp90-2-16-intra-only.webm
    bitstream test failure.
    codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()

    ... and fix picture duplication logic for vavp9dec
    codecs: vp9decoder: Port to GstVp9StatefulParser

    Use newly implemented VP9 parser. Since new GstVp9FrameHeader
    struct holds all the information of the stream, baseclass will not
    pass parser object to new_sequence() method anymore.
    codecparsers: Reimplement VP9 parser

    Existing VP9 parser implementation doesn't provide information
    required by other stateless decoding APIs (i.e., DXVA and NVDEC),
    specifically loop filter and segmentation parameters might not exist
    current frame. So parser needs to fill the information by using previously
    parsed information.
    We can update the gstvp9parser implementation so that it can provide
    all information required by stateless decoding APIs with a huge API break,
    or adding more ugly struct in it.
    Instead doing as such, this commit introduce a new VP9 parser implementation.

    What is different from existing one?
    * All variables will follow the specification as much as possible:
      VP9 Bitstream & Decoding Process Specification - v0.6 31st March 2016
    * Parser will fill all the required information for decoding frame
      to GstVp9FrameHeader struct. In case of old VP9 parser,
      user needs to read additional data from parser's member variables.
    * GstVp9StatefulParser object struct is completely completely opaque
    codecs: vp9decoder: Don't check codec change with show_existing_frame

    Show existing frame will zero frame_type value but it doesn't mean
    it's keyframe.
Edited by Seungha Yang

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • It makes sense with @ndufresne idea of passing only the segmentation pointer, while we can assure that size of the array is well defined.

  • Seungha Yang marked this merge request as draft

    marked this merge request as draft

  • I might need another approach.

    current vp9parser doesn't provide information what DXVA want to know. I feel GstVpParser's mb_segment_tree_probs, segment_pred_probs, and segmentation member variables are redundant. IMHO, parser should update each loop filter and segmentation information in frame header value as such depending on context, instead of duplicating some of them. Current design seems confusing

  • Seungha Yang added 11 commits

    added 11 commits

    • 888169e8...061e32b1 - 7 commits from branch gstreamer:master
    • 1dca321e - codecs: vp9decoder: Don't check codec change with show_existing_frame
    • 37d5ae06 - codecparsers: Reimplement VP9 parser
    • dff619c6 - codecs: vp9decoder: Port to GstVp9StatefulParser
    • 6b8354e1 - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()

    Compare with previous version

  • Seungha Yang marked this merge request as ready

    marked this merge request as ready

  • Seungha Yang changed title from WIP: codecs: vp9decoder: Pass parser as decode_picture() parameter to codecs: vp9decoder: Reimplement VP9 parser and use it

    changed title from WIP: codecs: vp9decoder: Pass parser as decode_picture() parameter to codecs: vp9decoder: Reimplement VP9 parser and use it

  • Seungha Yang changed the description

    changed the description

  • Seungha Yang resolved all threads

    resolved all threads

    • Resolved by Seungha Yang

      I gave up to modify current vp9 parser. It's tooooo VAAPI specific and other stateless decoding API unfriendly. So I decided to re-implement parser from scratch.

      I got 215/303 test score with D3D11 and I don't see any regression at VA side.

  • Seungha Yang added 5 commits

    added 5 commits

    • 62410e53 - codecs: vp9decoder: Port to GstVp9StatefulParser
    • e817b85b - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
    • 9a6135c9 - codecparsers: vp9parser: Allow parsing superframe header without parser object
    • f08f6516 - vp9parse: Skip stream change detection if show-existing-frame flag is set
    • 95b890e6 - vp9parse: Port to GstVp9StatefulParser

    Compare with previous version

  • Seungha Yang changed the description

    changed the description

  • Seungha Yang added 6 commits

    added 6 commits

    • 166003d3 - codecparsers: Reimplement VP9 parser
    • 8b21afb8 - codecs: vp9decoder: Port to GstVp9StatefulParser
    • f43dd386 - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
    • f8ef2662 - codecparsers: vp9parser: Allow parsing superframe header without parser object
    • 1c4feb42 - vp9parse: Skip stream change detection if show-existing-frame flag is set
    • 9a4dbe0f - vp9parse: Port to GstVp9StatefulParser

    Compare with previous version

  • Seungha Yang added 8 commits

    added 8 commits

    • be1f66a4 - 1 commit from branch gstreamer:master
    • 88f5b1ff - codecs: vp9decoder: Don't check codec change with show_existing_frame
    • 05bc3897 - codecparsers: Reimplement VP9 parser
    • 6127a426 - codecs: vp9decoder: Port to GstVp9StatefulParser
    • 104f33a3 - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
    • af89dafb - codecparsers: vp9parser: Allow parsing superframe header without parser object
    • 7ffe9c42 - vp9parse: Skip stream change detection if show-existing-frame flag is set
    • 377a8859 - vp9parse: Port to GstVp9StatefulParser

    Compare with previous version

  • Seungha Yang added 6 commits

    added 6 commits

    • 1cf338bf - codecparsers: Reimplement VP9 parser
    • 67de583d - codecs: vp9decoder: Port to GstVp9StatefulParser
    • a86dab26 - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
    • 77038541 - codecparsers: vp9parser: Allow parsing superframe header without parser object
    • 6866b55c - vp9parse: Skip stream change detection if show-existing-frame flag is set
    • 5c9a7295 - vp9parse: Port to GstVp9StatefulParser

    Compare with previous version

  • Seungha Yang resolved all threads

    resolved all threads

  • Seungha Yang changed the description

    changed the description

  • Seungha Yang added 6 commits

    added 6 commits

    • d44f709d - codecparsers: Reimplement VP9 parser
    • f777494d - codecs: vp9decoder: Port to GstVp9StatefulParser
    • 78354fbb - codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
    • 466e9856 - codecparsers: vp9parser: Allow parsing superframe header without parser object
    • 8d80975d - vp9parse: Skip stream change detection if show-existing-frame flag is set
    • f734be99 - vp9parse: Port to GstVp9StatefulParser

    Compare with previous version

  • Nicolas Dufresne
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading