[x265] [PATCH] analysis: update analysisReuseLevel 7 for analysis sharing

praveen at multicorewareinc.com praveen at multicorewareinc.com
Fri Nov 17 07:15:06 CET 2017


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1510561483 -19800
#      Mon Nov 13 13:54:43 2017 +0530
# Node ID 4b6af5ba01f8244aec5862dc5fccc0019c44d0c8
# Parent  2fec493b990ee3066e5ffc853d83669955f0ee3c
analysis: update analysisReuseLevel 7 for analysis sharing

diff -r 2fec493b990e -r 4b6af5ba01f8 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Nov 13 12:20:50 2017 +0530
+++ b/doc/reST/cli.rst	Mon Nov 13 13:54:43 2017 +0530
@@ -887,17 +887,19 @@
 
 	Note that --analysis-reuse-level must be paired with analysis-reuse-mode.
 
-	+--------+-----------------------------------------+
-	| Level  | Description                             |
-	+========+=========================================+
-	| 1      | Lookahead information                   |
-	+--------+-----------------------------------------+
-	| 2 to 4 | Level 1 + intra/inter modes, ref's      |
-	+--------+-----------------------------------------+
-	| 5 to 9 | Level 2 + rect-amp                      |
-	+--------+-----------------------------------------+
-	| 10     | Level 5 + Full CU analysis-info         |
-	+--------+-----------------------------------------+
+    +--------------+------------------------------------------+
+    | Level        | Description                              |
+    +==============+==========================================+
+    | 1            | Lookahead information                    |
+    +--------------+------------------------------------------+
+    | 2 to 4       | Level 1 + intra/inter modes, ref's       |
+    +--------------+------------------------------------------+
+    | 5,6,8 and 9  | Level 2 + rect-amp                       |
+    +--------------+------------------------------------------+
+    | 7            | Level 5 + AVC size CU refinement         |
+    +--------------+------------------------------------------+
+    | 10           | Level 5 + Full CU analysis-info          |
+    +--------------+------------------------------------------+
 
 .. option:: --refine-mv-type <string>
 
diff -r 2fec493b990e -r 4b6af5ba01f8 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Mon Nov 13 12:20:50 2017 +0530
+++ b/source/encoder/analysis.cpp	Mon Nov 13 13:54:43 2017 +0530
@@ -2301,7 +2301,7 @@
             for (uint32_t part = 0; part < numPU; part++)
             {
                 PredictionUnit pu(mode.cu, cuGeom, part);
-                if (m_param->analysisReuseLevel == 10)
+                if (m_param->analysisReuseLevel >= 7)
                 {
                     analysis_inter_data* interDataCTU = (analysis_inter_data*)m_frame->m_analysisData.interData;
                     int cuIdx = (mode.cu.m_cuAddr * parentCTU.m_numPartitions) + cuGeom.absPartIdx;
@@ -2407,7 +2407,7 @@
                 if (m_slice->m_pps->bUseDQP && nextDepth <= m_slice->m_pps->maxCuDQPDepth)
                     nextQP = setLambdaFromQP(parentCTU, calculateQpforCuSize(parentCTU, childGeom));
 
-                int lamdaQP = m_param->analysisReuseLevel == 10 ? nextQP : lqp;
+                int lamdaQP = (m_param->analysisReuseLevel >= 7) ? nextQP : lqp;
 
                 if (split)
                     m_param->rdLevel > 4 ? compressInterCU_rd5_6(parentCTU, childGeom, nextQP) : compressInterCU_rd0_4(parentCTU, childGeom, nextQP);
diff -r 2fec493b990e -r 4b6af5ba01f8 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Nov 13 12:20:50 2017 +0530
+++ b/source/encoder/encoder.cpp	Mon Nov 13 13:54:43 2017 +0530
@@ -3036,7 +3036,7 @@
             CHECKED_MALLOC(interData->mergeFlag, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);
         }
 
-        if (m_param->analysisReuseLevel == 10)
+        if (m_param->analysisReuseLevel >= 7)
         {
             CHECKED_MALLOC(interData->interDir, uint8_t, analysis->numPartitions * analysis->numCUsInFrame);
             for (int dir = 0; dir < numDir; dir++)
@@ -3113,7 +3113,7 @@
                 X265_FREE(((analysis_inter_data*)analysis->interData)->mergeFlag);
                 X265_FREE(((analysis_inter_data*)analysis->interData)->partSize);
             }
-            if (m_param->analysisReuseLevel == 10)
+            if (m_param->analysisReuseLevel >= 7)
             {
                 X265_FREE(((analysis_inter_data*)analysis->interData)->interDir);
                 int numDir = analysis->sliceType == X265_TYPE_P ? 1 : 2;


More information about the x265-devel mailing list