<div dir="ltr"><br><div id="__tbSetup"></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 25, 2013 at 2:56 PM, <span dir="ltr"><<a href="mailto:shazeb@multicorewareinc.com" target="_blank">shazeb@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Shazeb Nawaz Khan <<a href="mailto:shazeb@multicorewareinc.com">shazeb@multicorewareinc.com</a>><br>
# Date 1380099889 -19800<br>
# Wed Sep 25 14:34:49 2013 +0530<br>
# Node ID c24e375025c5c747a9c6902c7f0a383ce22449f3<br>
# Parent bdd26fd0325acf0f36409e994bdc262b11fa70f4<br>
Added support for multiple references<br>
<br>
Added a commandline parameter '--ref <max number of references>'. DPB size adjusted to use number of references.<br>
<br>
diff -r bdd26fd0325a -r c24e375025c5 source/common/common.cpp<br>
--- a/source/common/common.cpp Tue Sep 24 15:21:06 2013 -0500<br>
+++ b/source/common/common.cpp Wed Sep 25 14:34:49 2013 +0530<br>
@@ -160,6 +160,7 @@<br>
param->bEnableSignHiding = 1;<br>
param->bEnableTransformSkip = 1;<br>
param->bEnableTSkipFast = 1;<br>
+ param->maxNumReferences = 1;<br>
<br>
/* Loop Filter */<br>
param->bEnableLoopFilter = 1;<br>
diff -r bdd26fd0325a -r c24e375025c5 source/encoder/dpb.h<br>
--- a/source/encoder/dpb.h Tue Sep 24 15:21:06 2013 -0500<br>
+++ b/source/encoder/dpb.h Wed Sep 25 14:34:49 2013 +0530<br>
@@ -52,7 +52,7 @@<br>
m_lastIDR = 0;<br>
m_pocCRA = 0;<br>
m_bRefreshPending = false;<br>
- m_maxRefL0 = 1; //TODO: This values should later be fetched from input params<br>
+ m_maxRefL0 = cfg->param.maxNumReferences;<br>
m_maxRefL1 = 1;<br>
}<br>
<br>
diff -r bdd26fd0325a -r c24e375025c5 source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Tue Sep 24 15:21:06 2013 -0500<br>
+++ b/source/encoder/encoder.cpp Wed Sep 25 14:34:49 2013 +0530<br>
@@ -263,8 +263,8 @@<br>
vps.setMaxLayers(1);<br>
for (int i = 0; i < MAX_TLAYER; i++)<br>
{<br>
- m_numReorderPics[i] = _param->bframes;<br>
- m_maxDecPicBuffering[i] = _param->bframes + 2;<br>
+ m_numReorderPics[i] = 1;<br>
+ m_maxDecPicBuffering[i] = X265_MIN(MAX_NUM_REF, X265_MAX(m_numReorderPics[i] + 1, _param->maxNumReferences));<br>
vps.setNumReorderPics(m_numReorderPics[i], i);<br>
vps.setMaxDecPicBuffering(m_maxDecPicBuffering[i], i);<br>
}<br>
diff -r bdd26fd0325a -r c24e375025c5 source/x265.h<br>
--- a/source/x265.h Tue Sep 24 15:21:06 2013 -0500<br>
+++ b/source/x265.h Wed Sep 25 14:34:49 2013 +0530<br>
@@ -248,6 +248,7 @@<br>
int bEnableTransformSkip; ///< enable intra transform skipping<br>
int bEnableTSkipFast; ///< enable fast intra transform skipping<br>
int bEnableRDOQTS; ///< enable RD optimized quantization when transform skip is selected<br>
+ int maxNumReferences; ///< maximum number of references a frame can have in L0<br>
<br>
// loop filter<br>
int bEnableLoopFilter; ///< enable Loop Filter<br>
diff -r bdd26fd0325a -r c24e375025c5 source/x265opts.h<br>
--- a/source/x265opts.h Tue Sep 24 15:21:06 2013 -0500<br>
+++ b/source/x265opts.h Wed Sep 25 14:34:49 2013 +0530<br>
@@ -66,6 +66,7 @@<br>
OPT("bframes", param->bframes, required_argument, 'b', "Maximum number of consecutive b-frames (now it only enables B GOP structure)")<br>
OPT("bframe-bias", param->bFrameBias, required_argument, 0, "Bias towards B frame decisions")<br>
OPT("b-adapt", param->bFrameAdaptive, required_argument, 0, "0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling")<br>
+OPT("ref", param->maxNumReferences, required_argument, 0, "max number of references to be allowed")<br></blockquote><div><br></div><div>Can you add a range of supported values (1-16) and the default value (1) in the message?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
// Disabled because weighted uni-prediction was busted by not using<br>
// pre-generated planes in motion compensation<br>
//OPT("no-weightp", param->bEnableWeightedPred, no_argument, 0, "Disable weighted prediction in P slices")<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>