[x265] [PATCH 2 of 3] cli: move a param validation into the encoder with other param validations

Steve Borho steve at borho.org
Thu Jan 29 16:33:29 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1422545518 21600
#      Thu Jan 29 09:31:58 2015 -0600
# Node ID 31321122396b06e3c49bbc27a031fbbde7c78c25
# Parent  2c2fb26e169caeb623dd274ab3e9264cd635f660
cli: move a param validation into the encoder with other param validations

diff -r 2c2fb26e169c -r 31321122396b source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Jan 29 09:29:45 2015 -0600
+++ b/source/encoder/encoder.cpp	Thu Jan 29 09:31:58 2015 -0600
@@ -1540,6 +1540,12 @@
         p->rc.rfConstantMin = 0;
     }
 
+    if (p->analysisMode && (p->bDistributeModeAnalysis || p->bDistributeMotionEstimation))
+    {
+        x265_log(p, X265_LOG_ERROR, "Analysis load/save options incompatible with pmode/pme");
+        p->bDistributeMotionEstimation = p->bDistributeModeAnalysis = 0;
+    }
+
     m_bframeDelay = p->bframes ? (p->bBPyramid ? 2 : 1) : 0;
 
     p->bFrameBias = X265_MIN(X265_MAX(-90, p->bFrameBias), 100);
diff -r 2c2fb26e169c -r 31321122396b source/x265.cpp
--- a/source/x265.cpp	Thu Jan 29 09:29:45 2015 -0600
+++ b/source/x265.cpp	Thu Jan 29 09:31:58 2015 -0600
@@ -507,15 +507,6 @@
 
     x265_picture_init(param, pic_in);
 
-    if (param->analysisMode)
-    {
-        if (param->bDistributeModeAnalysis || param->bDistributeMotionEstimation)
-        {
-            x265_log(NULL, X265_LOG_ERROR, "Analysis load/save options incompatible with pmode/pme");
-            goto fail;
-        }
-    }
-
     if (cliopt.bDither)
     {
         errorBuf = X265_MALLOC(int16_t, param->sourceWidth + 1);


More information about the x265-devel mailing list