[x265] [PATCH] tenccfg : move loop filter configuration params from tenccfg to x265_param

Gopu Govindaswamy gopu at multicorewareinc.com
Mon Oct 28 10:36:00 CET 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1382952951 -19800
# Node ID 26475c9ced90e338399e9a93d886824aad55dc83
# Parent  7916afc6c9c4835e0db6abe4a87f9b7c3579deec
tenccfg : move loop filter configuration params from tenccfg to x265_param

diff -r 7916afc6c9c4 -r 26475c9ced90 source/Lib/TLibEncoder/TEncCfg.h
--- a/source/Lib/TLibEncoder/TEncCfg.h	Mon Oct 28 11:59:47 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCfg.h	Mon Oct 28 15:05:51 2013 +0530
@@ -82,11 +82,6 @@
     UInt      m_quadtreeTULog2MaxSize;
     UInt      m_quadtreeTULog2MinSize;
 
-    //====== Loop/Deblock Filter ========
-    bool      m_loopFilterOffsetInPPS;
-    int       m_loopFilterBetaOffsetDiv2;
-    int       m_loopFilterTcOffsetDiv2;
-    int       m_maxNumOffsetsPerPic;
 
     //====== Lossless ========
     bool      m_useLossless;
@@ -183,11 +178,11 @@
     UInt getQuadtreeTULog2MinSize() const { return m_quadtreeTULog2MinSize; }
 
     //==== Loop/Deblock Filter ========
-    bool getLoopFilterOffsetInPPS() { return m_loopFilterOffsetInPPS; }
+//    bool getLoopFilterOffsetInPPS() { return m_loopFilterOffsetInPPS; }
 
-    int getLoopFilterBetaOffset() { return m_loopFilterBetaOffsetDiv2; }
+//    int getLoopFilterBetaOffset() { return m_loopFilterBetaOffsetDiv2; }
 
-    int getLoopFilterTcOffset() { return m_loopFilterTcOffsetDiv2; }
+//    int getLoopFilterTcOffset() { return m_loopFilterTcOffsetDiv2; }
 
     //==== Quality control ========
     int getMaxCuDQPDepth() { return m_maxCuDQPDepth; }
@@ -208,7 +203,7 @@
 
     UInt getPCMLog2MinSize() { return m_pcmLog2MinSize; }
 
-    int   getMaxNumOffsetsPerPic() { return m_maxNumOffsetsPerPic; }
+ //   int   getMaxNumOffsetsPerPic() { return m_maxNumOffsetsPerPic; }
 
     bool  getLFCrossTileBoundaryFlag() { return m_loopFilterAcrossTilesEnabledFlag; }
 
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Oct 28 11:59:47 2013 +0530
+++ b/source/encoder/encoder.cpp	Mon Oct 28 15:05:51 2013 +0530
@@ -847,7 +847,7 @@
     pps->setOutputFlagPresentFlag(false);
     pps->setSignHideFlag(param.bEnableSignHiding);
     pps->setDeblockingFilterControlPresentFlag(!param.bEnableLoopFilter);
-    pps->setDeblockingFilterOverrideEnabledFlag(!m_loopFilterOffsetInPPS);
+    pps->setDeblockingFilterOverrideEnabledFlag(!param.loopFilterOffsetInPPS);
     pps->setPicDisableDeblockingFilterFlag(!param.bEnableLoopFilter);
     pps->setLog2ParallelMergeLevelMinus2(m_log2ParallelMergeLevelMinus2);
     pps->setCabacInitPresentFlag(param.frameNumThreads > 1 ? 0 : CABAC_INIT_PRESENT_FLAG);
@@ -1057,9 +1057,9 @@
 
     //====== Enforce these hard coded settings before initializeGOP() to
     //       avoid a valgrind warning
-    m_loopFilterOffsetInPPS = 0;
-    m_loopFilterBetaOffsetDiv2 = 0;
-    m_loopFilterTcOffsetDiv2 = 0;
+    param.loopFilterOffsetInPPS = 0;
+    param.loopFilterBetaOffsetDiv2 = 0;
+    param.loopFilterTcOffsetDiv2 = 0;
     m_loopFilterAcrossTilesEnabledFlag = 1;
 
     //====== HM Settings not exposed for configuration ======
@@ -1077,7 +1077,7 @@
 
     m_vps = vps;
     m_maxCuDQPDepth = 0;
-    m_maxNumOffsetsPerPic = 2048;
+    param.maxNumOffsetsPerPic = 2048;
     m_log2ParallelMergeLevelMinus2 = 0;
 
     //========= set default display window ==================================
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Mon Oct 28 11:59:47 2013 +0530
+++ b/source/encoder/frameencoder.cpp	Mon Oct 28 15:05:51 2013 +0530
@@ -268,16 +268,16 @@
 
     if (slice->getPPS()->getDeblockingFilterControlPresentFlag())
     {
-        slice->getPPS()->setDeblockingFilterOverrideEnabledFlag(!m_cfg->getLoopFilterOffsetInPPS());
-        slice->setDeblockingFilterOverrideFlag(!m_cfg->getLoopFilterOffsetInPPS());
+        slice->getPPS()->setDeblockingFilterOverrideEnabledFlag(!m_cfg->param.loopFilterOffsetInPPS);
+        slice->setDeblockingFilterOverrideFlag(!m_cfg->param.loopFilterOffsetInPPS);
         slice->getPPS()->setPicDisableDeblockingFilterFlag(!m_cfg->param.bEnableLoopFilter);
         slice->setDeblockingFilterDisable(!m_cfg->param.bEnableLoopFilter);
         if (!slice->getDeblockingFilterDisable())
         {
-            slice->getPPS()->setDeblockingFilterBetaOffsetDiv2(m_cfg->getLoopFilterBetaOffset());
-            slice->getPPS()->setDeblockingFilterTcOffsetDiv2(m_cfg->getLoopFilterTcOffset());
-            slice->setDeblockingFilterBetaOffsetDiv2(m_cfg->getLoopFilterBetaOffset());
-            slice->setDeblockingFilterTcOffsetDiv2(m_cfg->getLoopFilterTcOffset());
+            slice->getPPS()->setDeblockingFilterBetaOffsetDiv2(m_cfg->param.loopFilterBetaOffsetDiv2);
+            slice->getPPS()->setDeblockingFilterTcOffsetDiv2(m_cfg->param.loopFilterTcOffsetDiv2);
+            slice->setDeblockingFilterBetaOffsetDiv2(m_cfg->param.loopFilterBetaOffsetDiv2);
+            slice->setDeblockingFilterTcOffsetDiv2(m_cfg->param.loopFilterTcOffsetDiv2);
         }
     }
     else
diff -r 7916afc6c9c4 -r 26475c9ced90 source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Mon Oct 28 11:59:47 2013 +0530
+++ b/source/encoder/framefilter.cpp	Mon Oct 28 15:05:51 2013 +0530
@@ -73,7 +73,7 @@
     {
         m_sao.setSaoLcuBoundary(top->param.saoLcuBoundary);
         m_sao.setSaoLcuBasedOptimization(top->param.saoLcuBasedOptimization);
-        m_sao.setMaxNumOffsetsPerPic(top->getMaxNumOffsetsPerPic());
+        m_sao.setMaxNumOffsetsPerPic(top->param.maxNumOffsetsPerPic);
         m_sao.create(top->param.sourceWidth, top->param.sourceHeight, g_maxCUWidth, g_maxCUHeight);
         m_sao.createEncBuffer();
     }
diff -r 7916afc6c9c4 -r 26475c9ced90 source/x265.h
--- a/source/x265.h	Mon Oct 28 11:59:47 2013 +0530
+++ b/source/x265.h	Mon Oct 28 15:05:51 2013 +0530
@@ -333,6 +333,13 @@
         int       aqMode;                      ///< Adaptive QP (AQ)
         double    aqStrength;
     } rc;
+
+    //====== Loop/Deblock Filter ========
+    bool      loopFilterOffsetInPPS;
+    int       loopFilterBetaOffsetDiv2;
+    int       loopFilterTcOffsetDiv2;
+    int       maxNumOffsetsPerPic;
+
 } x265_param;
 
 /***


More information about the x265-devel mailing list