<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 4:36 AM, Gopu Govindaswamy <span dir="ltr"><<a href="mailto:gopu@multicorewareinc.com" target="_blank">gopu@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"># HG changeset patch<br>
# User Gopu Govindaswamy <<a href="mailto:gopu@multicorewareinc.com">gopu@multicorewareinc.com</a>><br>
# Date 1382952951 -19800<br>
# Node ID 26475c9ced90e338399e9a93d886824aad55dc83<br>
# Parent 7916afc6c9c4835e0db6abe4a87f9b7c3579deec<br>
tenccfg : move loop filter configuration params from tenccfg to x265_param<br></blockquote><div><br></div><div>no space before the colon</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
diff -r 7916afc6c9c4 -r 26475c9ced90 source/Lib/TLibEncoder/TEncCfg.h<br>
--- a/source/Lib/TLibEncoder/TEncCfg.h Mon Oct 28 11:59:47 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncCfg.h Mon Oct 28 15:05:51 2013 +0530<br>
@@ -82,11 +82,6 @@<br>
UInt m_quadtreeTULog2MaxSize;<br>
UInt m_quadtreeTULog2MinSize;<br>
<br>
- //====== Loop/Deblock Filter ========<br>
- bool m_loopFilterOffsetInPPS;<br>
- int m_loopFilterBetaOffsetDiv2;<br>
- int m_loopFilterTcOffsetDiv2;<br>
- int m_maxNumOffsetsPerPic;<br>
<br>
//====== Lossless ========<br>
bool m_useLossless;<br>
@@ -183,11 +178,11 @@<br>
UInt getQuadtreeTULog2MinSize() const { return m_quadtreeTULog2MinSize; }<br>
<br>
//==== Loop/Deblock Filter ========<br>
- bool getLoopFilterOffsetInPPS() { return m_loopFilterOffsetInPPS; }<br>
+// bool getLoopFilterOffsetInPPS() { return m_loopFilterOffsetInPPS; }<br>
<br>
- int getLoopFilterBetaOffset() { return m_loopFilterBetaOffsetDiv2; }<br>
+// int getLoopFilterBetaOffset() { return m_loopFilterBetaOffsetDiv2; }<br>
<br>
- int getLoopFilterTcOffset() { return m_loopFilterTcOffsetDiv2; }<br>
+// int getLoopFilterTcOffset() { return m_loopFilterTcOffsetDiv2; }<br></blockquote><div><br></div><div>we should never comment out lines, these should just be removed</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
//==== Quality control ========<br>
int getMaxCuDQPDepth() { return m_maxCuDQPDepth; }<br>
@@ -208,7 +203,7 @@<br>
<br>
UInt getPCMLog2MinSize() { return m_pcmLog2MinSize; }<br>
<br>
- int getMaxNumOffsetsPerPic() { return m_maxNumOffsetsPerPic; }<br>
+ // int getMaxNumOffsetsPerPic() { return m_maxNumOffsetsPerPic; }<br>
<br>
bool getLFCrossTileBoundaryFlag() { return m_loopFilterAcrossTilesEnabledFlag; }<br>
<br>
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Mon Oct 28 11:59:47 2013 +0530<br>
+++ b/source/encoder/encoder.cpp Mon Oct 28 15:05:51 2013 +0530<br>
@@ -847,7 +847,7 @@<br>
pps->setOutputFlagPresentFlag(false);<br>
pps->setSignHideFlag(param.bEnableSignHiding);<br>
pps->setDeblockingFilterControlPresentFlag(!param.bEnableLoopFilter);<br>
- pps->setDeblockingFilterOverrideEnabledFlag(!m_loopFilterOffsetInPPS);<br>
+ pps->setDeblockingFilterOverrideEnabledFlag(!param.loopFilterOffsetInPPS);<br>
pps->setPicDisableDeblockingFilterFlag(!param.bEnableLoopFilter);<br>
pps->setLog2ParallelMergeLevelMinus2(m_log2ParallelMergeLevelMinus2);<br>
pps->setCabacInitPresentFlag(param.frameNumThreads > 1 ? 0 : CABAC_INIT_PRESENT_FLAG);<br>
@@ -1057,9 +1057,9 @@<br>
<br>
//====== Enforce these hard coded settings before initializeGOP() to<br>
// avoid a valgrind warning<br>
- m_loopFilterOffsetInPPS = 0;<br>
- m_loopFilterBetaOffsetDiv2 = 0;<br>
- m_loopFilterTcOffsetDiv2 = 0;<br>
+ param.loopFilterOffsetInPPS = 0;<br>
+ param.loopFilterBetaOffsetDiv2 = 0;<br>
+ param.loopFilterTcOffsetDiv2 = 0;<br></blockquote><div><br></div><div> The fact that these fields are all hard-coded in the encoder configure function means we do not allow them to be user-specified. So adding them to the public x265_param structure is fairly misleading. We need a different method for dealing with HM parameters that we do not allow to be user-configurable. Perhaps the values should just be hard-coded and the variables removed. But those decisions must be made on a case-by-case basis after reviewing each of the fields involved.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
m_loopFilterAcrossTilesEnabledFlag = 1;<br></blockquote><div><br></div><div>This is a bad default, since we do not use tiles (I realize this is only patch context, not a line you changed)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
//====== HM Settings not exposed for configuration ======<br>
@@ -1077,7 +1077,7 @@<br>
<br>
m_vps = vps;<br>
m_maxCuDQPDepth = 0;<br>
- m_maxNumOffsetsPerPic = 2048;<br>
+ param.maxNumOffsetsPerPic = 2048;<br>
m_log2ParallelMergeLevelMinus2 = 0;<br>
<br>
//========= set default display window ==================================<br>
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/frameencoder.cpp<br>
--- a/source/encoder/frameencoder.cpp Mon Oct 28 11:59:47 2013 +0530<br>
+++ b/source/encoder/frameencoder.cpp Mon Oct 28 15:05:51 2013 +0530<br>
@@ -268,16 +268,16 @@<br>
<br>
if (slice->getPPS()->getDeblockingFilterControlPresentFlag())<br>
{<br>
- slice->getPPS()->setDeblockingFilterOverrideEnabledFlag(!m_cfg->getLoopFilterOffsetInPPS());<br>
- slice->setDeblockingFilterOverrideFlag(!m_cfg->getLoopFilterOffsetInPPS());<br>
+ slice->getPPS()->setDeblockingFilterOverrideEnabledFlag(!m_cfg->param.loopFilterOffsetInPPS);<br>
+ slice->setDeblockingFilterOverrideFlag(!m_cfg->param.loopFilterOffsetInPPS);<br>
slice->getPPS()->setPicDisableDeblockingFilterFlag(!m_cfg->param.bEnableLoopFilter);<br>
slice->setDeblockingFilterDisable(!m_cfg->param.bEnableLoopFilter);<br>
if (!slice->getDeblockingFilterDisable())<br>
{<br>
- slice->getPPS()->setDeblockingFilterBetaOffsetDiv2(m_cfg->getLoopFilterBetaOffset());<br>
- slice->getPPS()->setDeblockingFilterTcOffsetDiv2(m_cfg->getLoopFilterTcOffset());<br>
- slice->setDeblockingFilterBetaOffsetDiv2(m_cfg->getLoopFilterBetaOffset());<br>
- slice->setDeblockingFilterTcOffsetDiv2(m_cfg->getLoopFilterTcOffset());<br>
+ slice->getPPS()->setDeblockingFilterBetaOffsetDiv2(m_cfg->param.loopFilterBetaOffsetDiv2);<br>
+ slice->getPPS()->setDeblockingFilterTcOffsetDiv2(m_cfg->param.loopFilterTcOffsetDiv2);<br>
+ slice->setDeblockingFilterBetaOffsetDiv2(m_cfg->param.loopFilterBetaOffsetDiv2);<br>
+ slice->setDeblockingFilterTcOffsetDiv2(m_cfg->param.loopFilterTcOffsetDiv2);<br>
}<br>
}<br>
else<br>
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/framefilter.cpp<br>
--- a/source/encoder/framefilter.cpp Mon Oct 28 11:59:47 2013 +0530<br>
+++ b/source/encoder/framefilter.cpp Mon Oct 28 15:05:51 2013 +0530<br>
@@ -73,7 +73,7 @@<br>
{<br>
m_sao.setSaoLcuBoundary(top->param.saoLcuBoundary);<br>
m_sao.setSaoLcuBasedOptimization(top->param.saoLcuBasedOptimization);<br>
- m_sao.setMaxNumOffsetsPerPic(top->getMaxNumOffsetsPerPic());<br>
+ m_sao.setMaxNumOffsetsPerPic(top->param.maxNumOffsetsPerPic);<br>
m_sao.create(top->param.sourceWidth, top->param.sourceHeight, g_maxCUWidth, g_maxCUHeight);<br>
m_sao.createEncBuffer();<br>
}<br>
diff -r 7916afc6c9c4 -r 26475c9ced90 source/x265.h<br>
--- a/source/x265.h Mon Oct 28 11:59:47 2013 +0530<br>
+++ b/source/x265.h Mon Oct 28 15:05:51 2013 +0530<br>
@@ -333,6 +333,13 @@<br>
int aqMode; ///< Adaptive QP (AQ)<br>
double aqStrength;<br>
} rc;<br>
+<br>
+ //====== Loop/Deblock Filter ========<br>
+ bool loopFilterOffsetInPPS;<br></blockquote><div><br></div><div>1 - this header must be C only, so bool types cannot be used.</div><div>2 - parameters that have boolean semantics should start with a b prefix</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ int loopFilterBetaOffsetDiv2;<br>
+ int loopFilterTcOffsetDiv2;<br>
+ int maxNumOffsetsPerPic;<br>
+<br></blockquote><div><br></div><div>we don't generally have trailing white-space at the end of structures</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
} x265_param;<br>
<br>
/***<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><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>