[x265] [PATCH] rc: change stat read options

Divya Manivannan divya at multicorewareinc.com
Wed Nov 16 15:02:32 CET 2016


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1479304430 -19800
#      Wed Nov 16 19:23:50 2016 +0530
# Node ID 6737486707bfd4eec11ec40c84b16441920c0c1c
# Parent  9814b4491361c1b046b68f85a0a239cda89fbcf0
rc: change stat read options

diff -r 9814b4491361 -r 6737486707bf source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Wed Nov 16 17:49:14 2016 +0530
+++ b/source/encoder/ratecontrol.cpp	Wed Nov 16 19:23:50 2016 +0530
@@ -433,7 +433,7 @@
                 }
                 *statsIn = '\0';
                 statsIn++;
-                if (sscanf(opts, "#options: %dx%d", &i, &j) != 2)
+                if ((p = strstr(opts, " input-res=")) == 0 || sscanf(p, " input-res=%dx%d", &i, &j) != 2)
                 {
                     x265_log(m_param, X265_LOG_ERROR, "Resolution specified in stats file not valid\n");
                     return false;
@@ -459,7 +459,7 @@
                 CMP_OPT_FIRST_PASS("bframes", m_param->bframes);
                 CMP_OPT_FIRST_PASS("b-pyramid", m_param->bBPyramid);
                 CMP_OPT_FIRST_PASS("open-gop", m_param->bOpenGOP);
-                CMP_OPT_FIRST_PASS("keyint", m_param->keyframeMax);
+                CMP_OPT_FIRST_PASS(" keyint", m_param->keyframeMax);
                 CMP_OPT_FIRST_PASS("scenecut", m_param->scenecutThreshold);
                 CMP_OPT_FIRST_PASS("intra-refresh", m_param->bIntraRefresh);
                 if (m_param->bMultiPassOptRPS)


More information about the x265-devel mailing list