# HG changeset patch
# User Gopu Govindaswamy
# Date 1396427874 -19800
#      Wed Apr 02 14:07:54 2014 +0530
# Node ID d168ffde7d312a3fb332c1a2fc81b6737fba4bfa
# Parent  931b4cd4da91dc667efd16d26b4e9ea834007623
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

diff -r 931b4cd4da91 -r d168ffde7d31 source/encoder/dpb.h
--- a/source/encoder/dpb.h      Wed Apr 02 11:21:34 2014 +0530
+++ b/source/encoder/dpb.h      Wed Apr 02 14:07:54 2014 +0530
@@ -52,7 +52,7 @@
         m_pocCRA = 0;
         m_bRefreshPending = false;
         m_maxRefL0 = cfg->param->maxNumReferences;
-        m_maxRefL1 = 1;
+        m_maxRefL1 = cfg->param->bBPyramid ? 2 : 1;
         m_bOpenGOP = cfg->param->bOpenGOP;
     }
 
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to