Allow two L1 refs when b-pyramid is enabled

Issue #12 resolved
Steve Borho created an issue

Consider this common case: You have 5 consecutive (display order frames) that are determined to be P1-B1-B2-B3-P2 by the lookahead. When b-pyramid is enabled, the middle B will be encoded first and used as a reference by the two following B frames (in encode order); P1-P2-B2ref-B1-B3

frame L0 L1
P1
P2 P1
B2ref P1 P2
B1 P1 P2 B2ref
B3 B2ref P1 P2

When B1 is encoded, both B2ref and P2 should be available as L1 references but we are only using one of them.

This will require some care where we are signaling max DPB sizes and other places, but should in the end be a small change. When this is fixed, the encode compression efficiency should improve when b-pyramid is enabled

Comments (2)

  1. Steve Borho reporter

    dpb: Allow two L1 refs when b-pyramid is enabled [CHANGES OUTPUTS]

    Consider this common case: if we have 5 consecutive (display order frames) that are determined to be P1-B1-B2-B3-P2 by the lookahead. When b-pyramid is enabled, the middle B will be encoded first and used as a reference by the two following B frames (in encode order); P1-P2-B2ref-B1-B3

    frame L0 L1 P1 P2 P1 B2ref P1 P2 B1 P1 P2 B2ref B3 B2ref P1 P2

    When B1 is encoded, both B2ref and P2 should be available as L1 references, this will improve the encode compression efficiency when b-pyramid is enabled (closes #12)

    → <<cset d815c4a8fa74>>

  2. Log in to comment