[x265-commits] [x265] [OUTPUT CHANGED for 444] : considering cbf bits for best ...

Ashok Kumar Mishra ashok at multicorewareinc.com
Fri Oct 24 04:35:24 CEST 2014


details:   http://hg.videolan.org/x265/rev/cfa3750f72a5
branches:  
changeset: 8639:cfa3750f72a5
user:      Ashok Kumar Mishra<ashok at multicorewareinc.com>
date:      Thu Oct 23 18:39:56 2014 +0530
description:
[OUTPUT CHANGED for 444] : considering cbf bits for best cost estimation for 444 format
Subject: [x265] cmake: add -Wno-array-bounds if the compiler supports it

details:   http://hg.videolan.org/x265/rev/e3a3d17b821c
branches:  
changeset: 8640:e3a3d17b821c
user:      Steve Borho <steve at borho.org>
date:      Thu Oct 23 21:03:47 2014 -0500
description:
cmake: add -Wno-array-bounds if the compiler supports it

These warnings have proven to always be spurious

diffstat:

 source/CMakeLists.txt     |  4 ++++
 source/encoder/search.cpp |  7 ++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r daed2d3f67ba -r e3a3d17b821c source/CMakeLists.txt
--- a/source/CMakeLists.txt	Thu Oct 23 18:03:33 2014 -0500
+++ b/source/CMakeLists.txt	Thu Oct 23 21:03:47 2014 -0500
@@ -131,6 +131,10 @@ if(GCC)
         add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
     endif()
     check_cxx_compiler_flag(-Wno-narrowing CC_HAS_NO_NARROWING) 
+    check_cxx_compiler_flag(-Wno-array-bounds CC_HAS_NO_ARRAY_BOUNDS) 
+    if (CC_HAS_NO_ARRAY_BOUNDS)
+        add_definitions(-Wno-array-bounds) # these are unhelpful
+    endif()
     check_cxx_compiler_flag(-ffast-math CC_HAS_FAST_MATH) 
     if (CC_HAS_FAST_MATH)
         add_definitions(-ffast-math)
diff -r daed2d3f67ba -r e3a3d17b821c source/encoder/search.cpp
--- a/source/encoder/search.cpp	Thu Oct 23 18:03:33 2014 -0500
+++ b/source/encoder/search.cpp	Thu Oct 23 21:03:47 2014 -0500
@@ -167,7 +167,12 @@ void Search::xEncSubdivCbfQTChroma(const
     int hChromaShift = CHROMA_H_SHIFT(m_csp);
     int vChromaShift = CHROMA_V_SHIFT(m_csp);
 
-    if ((log2TrSize > 2) && !(m_csp == X265_CSP_I444))
+    bool mCodeAll = true;
+    const uint32_t numPels = 1 << (log2TrSize * 2 - hChromaShift - vChromaShift);
+    if (numPels < (MIN_TU_SIZE * MIN_TU_SIZE))
+        mCodeAll = false;
+
+    if (mCodeAll)
     {
         if (!trDepth || cu.getCbf(absPartIdx, TEXT_CHROMA_U, trDepth - 1))
             m_entropyCoder.codeQtCbf(cu, absPartIdx, absPartIdxStep, (width >> hChromaShift), (height >> vChromaShift), TEXT_CHROMA_U, trDepth, !subdiv);


More information about the x265-commits mailing list