[x265-commits] [x265] api: drop param.vui.bEnableVuiParametersPresentFlag and b...

Steve Borho steve at borho.org
Wed Apr 9 03:29:00 CEST 2014


details:   http://hg.videolan.org/x265/rev/c1300ae4e7ba
branches:  
changeset: 6674:c1300ae4e7ba
user:      Steve Borho <steve at borho.org>
date:      Sat Apr 05 16:56:32 2014 -0500
description:
api: drop param.vui.bEnableVuiParametersPresentFlag and bEnableAspectRatioIdc

These two params can be implied from other parameters, and having them present
only makes the VUI configuration more complicated than it needs to be.

This commit also drops the debugging --vui CLI option
Subject: [x265] strtok_r: fix detection on Windows

details:   http://hg.videolan.org/x265/rev/a4cb624267f3
branches:  
changeset: 6675:a4cb624267f3
user:      Rafaël Carré
date:      Sun Apr 06 17:31:49 2014 -0500
description:
strtok_r: fix detection on Windows

* Make sure HAVE_STRTOK_R is always defined, to 0 if absent
* Fix typo in #if
* mingw-w64's pthread.h #defines strtok_r, make sure to undef it
before we use our own definition.
Subject: [x265] TEncEntropy: cleanup bRD arg, fix 4:4:4 intra chroma rate [OUTPUT CHANGE 4:4:4]

details:   http://hg.videolan.org/x265/rev/aec57ffb18de
branches:  
changeset: 6676:aec57ffb18de
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Mon Apr 07 13:21:01 2014 +0900
description:
TEncEntropy: cleanup bRD arg, fix 4:4:4 intra chroma rate [OUTPUT CHANGE 4:4:4]
Subject: [x265] TComPic: change pointer initial values to NULL (instead of 0).

details:   http://hg.videolan.org/x265/rev/b5caca9954f3
branches:  
changeset: 6677:b5caca9954f3
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Apr 08 16:13:11 2014 +0530
description:
TComPic: change pointer initial values to NULL (instead of 0).
Subject: [x265] level: move decoder level logic to level.cpp, make table based

details:   http://hg.videolan.org/x265/rev/23b509a26449
branches:  
changeset: 6678:23b509a26449
user:      Steve Borho <steve at borho.org>
date:      Mon Apr 07 10:19:47 2014 -0500
description:
level: move decoder level logic to level.cpp, make table based

the new function enforces more limits defined in Annex A -
  widths and heights are capped to avoid extreme rectangular dimensions
  DPB size is limited based on resolution
  at higher resolutions, the min CTU size is 32

this commit also lays the groundwork for adding --level 5.1 --tier HIGH params
Subject: [x265] rc: update the default build output filename for our DLL

details:   http://hg.videolan.org/x265/rev/15471ecb08d8
branches:  
changeset: 6679:15471ecb08d8
user:      Steve Borho <steve at borho.org>
date:      Mon Apr 07 12:23:01 2014 -0500
description:
rc: update the default build output filename for our DLL

diffstat:

 doc/reST/cli.rst                       |    6 -
 source/CMakeLists.txt                  |    2 +-
 source/Lib/TLibCommon/TComPic.cpp      |    4 +-
 source/Lib/TLibEncoder/TEncCu.cpp      |   42 +++---
 source/Lib/TLibEncoder/TEncEntropy.cpp |   79 ++----------
 source/Lib/TLibEncoder/TEncEntropy.h   |   20 +-
 source/Lib/TLibEncoder/TEncSearch.cpp  |   36 ++--
 source/common/CMakeLists.txt           |    4 +-
 source/common/common.cpp               |    2 +-
 source/common/common.h                 |    2 +-
 source/common/param.cpp                |   34 +-----
 source/encoder/CMakeLists.txt          |    1 +
 source/encoder/api.cpp                 |    3 +-
 source/encoder/compress.cpp            |   16 +-
 source/encoder/encoder.cpp             |  133 +-------------------
 source/encoder/encoder.h               |    2 -
 source/encoder/level.cpp               |  203 +++++++++++++++++++++++++++++++++
 source/encoder/level.h                 |   38 ++++++
 source/x265.cpp                        |    5 +-
 source/x265.h                          |    8 -
 source/x265.rc.in                      |    2 +-
 21 files changed, 340 insertions(+), 302 deletions(-)

diffs (truncated from 1194 to 300 lines):

diff -r ac1bcf04c144 -r 15471ecb08d8 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Fri Apr 04 16:34:51 2014 -0500
+++ b/doc/reST/cli.rst	Mon Apr 07 12:23:01 2014 -0500
@@ -623,12 +623,6 @@ By default x265 does not emit a VUI in t
 of the VUI fields (:option:`--sar`, :option:`--range`, etc) the VUI is
 implicitly enabled.
 
-.. option:: --vui, --no-vui
-
-	Enable video usability information with all fields in the SPS. This
-	is a debugging feature and will likely be removed in a later
-	release.  Default disabled
-
 .. option:: --sar <integer|w:h>
 
 	Sample Aspect Ratio, the ratio of width to height of an individual
diff -r ac1bcf04c144 -r 15471ecb08d8 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Fri Apr 04 16:34:51 2014 -0500
+++ b/source/CMakeLists.txt	Mon Apr 07 12:23:01 2014 -0500
@@ -19,7 +19,7 @@ include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 14)
+set(X265_BUILD 15)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r ac1bcf04c144 -r 15471ecb08d8 source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp	Fri Apr 04 16:34:51 2014 -0500
+++ b/source/Lib/TLibCommon/TComPic.cpp	Mon Apr 07 12:23:01 2014 -0500
@@ -78,8 +78,8 @@ TComPic::TComPic()
     m_ssimCnt = 0;
     m_frameTime = 0.0;
     m_elapsedCompressTime = 0.0;
-    m_qpaAq = 0;
-    m_qpaRc = 0;
+    m_qpaAq = NULL;
+    m_qpaRc = NULL;
     m_avgQpRc = 0;
     m_avgQpAq = 0;
     m_bChromaPlanesExtended = false;
diff -r ac1bcf04c144 -r 15471ecb08d8 source/Lib/TLibEncoder/TEncCu.cpp
--- a/source/Lib/TLibEncoder/TEncCu.cpp	Fri Apr 04 16:34:51 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncCu.cpp	Mon Apr 07 12:23:01 2014 -0500
@@ -607,7 +607,7 @@ void TEncCu::xCompressIntraCU(TComDataCU
         }
 
         m_entropyCoder->resetBits();
-        m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth, true);
+        m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth);
         outBestCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
         outBestCU->m_totalCost  = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
 
@@ -661,7 +661,7 @@ void TEncCu::xCompressIntraCU(TComDataCU
         if (!bBoundary)
         {
             m_entropyCoder->resetBits();
-            m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth, true);
+            m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth);
 
             outTempCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
         }
@@ -942,7 +942,7 @@ void TEncCu::xCompressCU(TComDataCU*& ou
         }
 
         m_entropyCoder->resetBits();
-        m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth, true);
+        m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth);
         outBestCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
         outBestCU->m_totalCost  = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
 
@@ -1004,7 +1004,7 @@ void TEncCu::xCompressCU(TComDataCU*& ou
         if (!bBoundary)
         {
             m_entropyCoder->resetBits();
-            m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth, true);
+            m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth);
 
             outTempCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
         }
@@ -1399,13 +1399,13 @@ void TEncCu::xCheckRDCostIntra(TComDataC
     m_entropyCoder->resetBits();
     if (outTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     {
-        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0, true);
+        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0);
     }
-    m_entropyCoder->encodeSkipFlag(outTempCU, 0, true);
-    m_entropyCoder->encodePredMode(outTempCU, 0, true);
-    m_entropyCoder->encodePartSize(outTempCU, 0, depth, true);
-    m_entropyCoder->encodePredInfo(outTempCU, 0, true);
-    m_entropyCoder->encodeIPCMInfo(outTempCU, 0, true);
+    m_entropyCoder->encodeSkipFlag(outTempCU, 0);
+    m_entropyCoder->encodePredMode(outTempCU, 0);
+    m_entropyCoder->encodePartSize(outTempCU, 0, depth);
+    m_entropyCoder->encodePredInfo(outTempCU, 0);
+    m_entropyCoder->encodeIPCMInfo(outTempCU, 0);
 
     // Encode Coefficients
     bool bCodeDQP = getdQPFlag();
@@ -1438,13 +1438,13 @@ void TEncCu::xCheckRDCostIntraInInter(TC
     m_entropyCoder->resetBits();
     if (outTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     {
-        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0, true);
+        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0);
     }
-    m_entropyCoder->encodeSkipFlag(outTempCU, 0, true);
-    m_entropyCoder->encodePredMode(outTempCU, 0, true);
-    m_entropyCoder->encodePartSize(outTempCU, 0, depth, true);
-    m_entropyCoder->encodePredInfo(outTempCU, 0, true);
-    m_entropyCoder->encodeIPCMInfo(outTempCU, 0, true);
+    m_entropyCoder->encodeSkipFlag(outTempCU, 0);
+    m_entropyCoder->encodePredMode(outTempCU, 0);
+    m_entropyCoder->encodePartSize(outTempCU, 0, depth);
+    m_entropyCoder->encodePredInfo(outTempCU, 0);
+    m_entropyCoder->encodeIPCMInfo(outTempCU, 0);
 
     // Encode Coefficients
     bool bCodeDQP = getdQPFlag();
@@ -1487,12 +1487,12 @@ void TEncCu::xCheckIntraPCM(TComDataCU*&
     m_entropyCoder->resetBits();
     if (outTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     {
-        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0, true);
+        m_entropyCoder->encodeCUTransquantBypassFlag(outTempCU, 0);
     }
-    m_entropyCoder->encodeSkipFlag(outTempCU, 0, true);
-    m_entropyCoder->encodePredMode(outTempCU, 0, true);
-    m_entropyCoder->encodePartSize(outTempCU, 0, depth, true);
-    m_entropyCoder->encodeIPCMInfo(outTempCU, 0, true);
+    m_entropyCoder->encodeSkipFlag(outTempCU, 0);
+    m_entropyCoder->encodePredMode(outTempCU, 0);
+    m_entropyCoder->encodePartSize(outTempCU, 0, depth);
+    m_entropyCoder->encodeIPCMInfo(outTempCU, 0);
 
     m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);
 
diff -r ac1bcf04c144 -r 15471ecb08d8 source/Lib/TLibEncoder/TEncEntropy.cpp
--- a/source/Lib/TLibEncoder/TEncEntropy.cpp	Fri Apr 04 16:34:51 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncEntropy.cpp	Mon Apr 07 12:23:01 2014 -0500
@@ -94,12 +94,8 @@ void TEncEntropy::encodeAUD(TComSlice* s
     m_entropyCoderIf->codeAUD(slice);
 }
 
-void TEncEntropy::encodeCUTransquantBypassFlag(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodeCUTransquantBypassFlag(TComDataCU* cu, uint32_t absPartIdx)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     m_entropyCoderIf->codeCUTransquantBypassFlag(cu, absPartIdx);
 }
 
@@ -108,16 +104,12 @@ void TEncEntropy::encodeVPS(TComVPS* vps
     m_entropyCoderIf->codeVPS(vps);
 }
 
-void TEncEntropy::encodeSkipFlag(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodeSkipFlag(TComDataCU* cu, uint32_t absPartIdx)
 {
     if (cu->getSlice()->isIntra())
     {
         return;
     }
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     m_entropyCoderIf->codeSkipFlag(cu, absPartIdx);
 }
 
@@ -136,31 +128,20 @@ void TEncEntropy::encodeMergeFlag(TComDa
  * \param cu
  * \param absPartIdx
  * \param uiPUIdx
- * \param bRD
  * \returns void
  */
-void TEncEntropy::encodeMergeIndex(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodeMergeIndex(TComDataCU* cu, uint32_t absPartIdx)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-        assert(cu->getPartitionSize(absPartIdx) == SIZE_2Nx2N);
-    }
     m_entropyCoderIf->codeMergeIndex(cu, absPartIdx);
 }
 
 /** encode prediction mode
  * \param cu
  * \param absPartIdx
- * \param bRD
  * \returns void
  */
-void TEncEntropy::encodePredMode(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodePredMode(TComDataCU* cu, uint32_t absPartIdx)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     if (cu->getSlice()->isIntra())
     {
         return;
@@ -170,12 +151,8 @@ void TEncEntropy::encodePredMode(TComDat
 }
 
 // Split mode
-void TEncEntropy::encodeSplitFlag(TComDataCU* cu, uint32_t absPartIdx, uint32_t depth, bool bRD)
+void TEncEntropy::encodeSplitFlag(TComDataCU* cu, uint32_t absPartIdx, uint32_t depth)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     m_entropyCoderIf->codeSplitFlag(cu, absPartIdx, depth);
 }
 
@@ -183,25 +160,19 @@ void TEncEntropy::encodeSplitFlag(TComDa
  * \param cu
  * \param absPartIdx
  * \param depth
- * \param bRD
  * \returns void
  */
-void TEncEntropy::encodePartSize(TComDataCU* cu, uint32_t absPartIdx, uint32_t depth, bool bRD)
+void TEncEntropy::encodePartSize(TComDataCU* cu, uint32_t absPartIdx, uint32_t depth)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     m_entropyCoderIf->codePartSize(cu, absPartIdx, depth);
 }
 
 /** Encode I_PCM information.
  * \param cu pointer to CU
  * \param absPartIdx CU index
- * \param bRD flag indicating estimation or encoding
  * \returns void
  */
-void TEncEntropy::encodeIPCMInfo(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodeIPCMInfo(TComDataCU* cu, uint32_t absPartIdx)
 {
     if (!cu->getSlice()->getSPS()->getUsePCM()
         || cu->getCUSize(absPartIdx) > (1 << cu->getSlice()->getSPS()->getPCMLog2MaxSize())
@@ -210,11 +181,6 @@ void TEncEntropy::encodeIPCMInfo(TComDat
         return;
     }
 
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
-
     m_entropyCoderIf->codeIPCMInfo(cu, absPartIdx);
 }
 
@@ -417,57 +383,42 @@ void TEncEntropy::encodeIntraDirModeLuma
 }
 
 // Intra direction for Chroma
-void TEncEntropy::encodeIntraDirModeChroma(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodeIntraDirModeChroma(TComDataCU* cu, uint32_t absPartIdx)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
-
     m_entropyCoderIf->codeIntraDirChroma(cu, absPartIdx);
 }
 
-void TEncEntropy::encodePredInfo(TComDataCU* cu, uint32_t absPartIdx, bool bRD)
+void TEncEntropy::encodePredInfo(TComDataCU* cu, uint32_t absPartIdx)
 {
-    if (bRD)
-    {
-        absPartIdx = 0;
-    }
     if (cu->isIntra(absPartIdx)) // If it is Intra mode, encode intra prediction mode.
     {
         encodeIntraDirModeLuma(cu, absPartIdx, true);
         if (cu->getChromaFormat() != CHROMA_400)
         {
-            encodeIntraDirModeChroma(cu, absPartIdx, bRD);
+            encodeIntraDirModeChroma(cu, absPartIdx);
 
             if ((cu->getChromaFormat() == CHROMA_444) && (cu->getPartitionSize(absPartIdx) == SIZE_NxN))
             {
                 uint32_t partOffset = (cu->getPic()->getNumPartInCU() >> (cu->getDepth(absPartIdx) << 1)) >> 2;
-                encodeIntraDirModeChroma(cu, absPartIdx + partOffset, bRD);
-                encodeIntraDirModeChroma(cu, absPartIdx + partOffset * 2, bRD);
-                encodeIntraDirModeChroma(cu, absPartIdx + partOffset * 3, bRD);
+                encodeIntraDirModeChroma(cu, absPartIdx + partOffset);
+                encodeIntraDirModeChroma(cu, absPartIdx + partOffset * 2);


More information about the x265-commits mailing list