# HG changeset patch # User Bhavna Hariharan <bha...@multicorewareinc.com> # Date 1486642023 -19800 # Thu Feb 09 17:37:03 2017 +0530 # Node ID f26e5f42669c0146666ffe27257d402c2ad40ab8 # Parent 0729b3a4a0ccddd1c16d637e4aa5ee03cbef7ea2 cli: rename complex-analysis option
diff -r 0729b3a4a0cc -r f26e5f42669c doc/reST/cli.rst --- a/doc/reST/cli.rst Thu Feb 09 09:58:10 2017 +0530 +++ b/doc/reST/cli.rst Thu Feb 09 17:37:03 2017 +0530 @@ -945,7 +945,7 @@ maximum TU size is smaller than the CU size then transform QT begins at the depth of the max-tu-size. Default: 32. -.. option:: --complex-analysis <0..4> +.. option:: --dynamic-rd <0..4> Increases the RD level at points where quality drops due to VBV rate control enforcement. The number of CUs for which the RD is reconfigured diff -r 0729b3a4a0cc -r f26e5f42669c source/CMakeLists.txt --- a/source/CMakeLists.txt Thu Feb 09 09:58:10 2017 +0530 +++ b/source/CMakeLists.txt Thu Feb 09 17:37:03 2017 +0530 @@ -29,7 +29,7 @@ option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF) mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD) # X265_BUILD must be incremented each time the public API is changed -set(X265_BUILD 109) +set(X265_BUILD 110) configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" "${PROJECT_BINARY_DIR}/x265.def") configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" diff -r 0729b3a4a0cc -r f26e5f42669c source/common/param.cpp --- a/source/common/param.cpp Thu Feb 09 09:58:10 2017 +0530 +++ b/source/common/param.cpp Thu Feb 09 17:37:03 2017 +0530 @@ -179,7 +179,7 @@ param->bEnableTemporalMvp = 1; param->bSourceReferenceEstimation = 0; param->limitTU = 0; - param->complexAnalysis = 0; + param->dynamicRd = 0; /* Loop Filter */ param->bEnableLoopFilter = 1; @@ -931,7 +931,7 @@ OPT("multi-pass-opt-analysis") p->analysisMultiPassRefine = atobool(value); OPT("multi-pass-opt-distortion") p->analysisMultiPassDistortion = atobool(value); OPT("aq-motion") p->bAQMotion = atobool(value); - OPT("complex-analysis") p->complexAnalysis = atof(value); + OPT("dynamic-rd") p->dynamicRd = atof(value); OPT("ssim-rd") { int bval = atobool(value); @@ -1171,8 +1171,8 @@ "RD Level is out of range"); CHECK(param->rdoqLevel < 0 || param->rdoqLevel > 2, "RDOQ Level is out of range"); - CHECK(param->complexAnalysis < 0 || param->complexAnalysis > X265_MAX_ANALYSIS_STRENGTH, - "Complex analysis strength must be between 0 and 4"); + CHECK(param->dynamicRd < 0 || param->dynamicRd > x265_ADAPT_RD_STRENGTH, + "Dynamic RD strength must be between 0 and 4"); CHECK(param->bframes && param->bframes >= param->lookaheadDepth && !param->rc.bStatRead, "Lookahead depth must be greater than the max consecutive bframe count"); CHECK(param->bframes < 0, @@ -1422,7 +1422,7 @@ TOOLOPT(param->bEnableAMP, "amp"); TOOLOPT(param->limitModes, "limit-modes"); TOOLVAL(param->rdLevel, "rd=%d"); - TOOLVAL(param->complexAnalysis, "complex-analysis=%.2f"); + TOOLVAL(param->dynamicRd, "dynamic-rd=%.2f"); TOOLVAL(param->psyRd, "psy-rd=%.2lf"); TOOLVAL(param->rdoqLevel, "rdoq=%d"); TOOLVAL(param->psyRdoq, "psy-rdoq=%.2lf"); @@ -1522,7 +1522,7 @@ s += sprintf(s, " tu-intra-depth=%d", p->tuQTMaxIntraDepth); s += sprintf(s, " limit-tu=%d", p->limitTU); s += sprintf(s, " rdoq-level=%d", p->rdoqLevel); - s += sprintf(s, " complex-analysis=%.2f", p->complexAnalysis); + s += sprintf(s, " dynamic-rd=%.2f", p->dynamicRd); BOOL(p->bEnableSignHiding, "signhide"); BOOL(p->bEnableTransformSkip, "tskip"); s += sprintf(s, " nr-intra=%d", p->noiseReductionIntra); diff -r 0729b3a4a0cc -r f26e5f42669c source/encoder/analysis.cpp --- a/source/encoder/analysis.cpp Thu Feb 09 09:58:10 2017 +0530 +++ b/source/encoder/analysis.cpp Thu Feb 09 17:37:03 2017 +0530 @@ -2923,7 +2923,7 @@ if (complexCheck) { int32_t offset = (int32_t)(qp_offset * 100 + .5); - double threshold = (1 - ((X265_MAX_ANALYSIS_STRENGTH - m_param->complexAnalysis) * 0.5)); + double threshold = (1 - ((x265_ADAPT_RD_STRENGTH - m_param->dynamicRd) * 0.5)); int32_t max_threshold = (int32_t)(threshold * 100 + .5); if (offset < max_threshold) return 1; diff -r 0729b3a4a0cc -r f26e5f42669c source/encoder/encoder.cpp --- a/source/encoder/encoder.cpp Thu Feb 09 09:58:10 2017 +0530 +++ b/source/encoder/encoder.cpp Thu Feb 09 17:37:03 2017 +0530 @@ -2157,10 +2157,10 @@ else m_param->rc.qgSize = p->maxCUSize; - if (m_param->complexAnalysis && (!bIsVbv || !p->rc.aqMode || p->rdLevel > 4)) + if (m_param->dynamicRd && (!bIsVbv || !p->rc.aqMode || p->rdLevel > 4)) { - p->complexAnalysis = 0; - x265_log(p, X265_LOG_WARNING, "Complex-analysis disabled, requires RD <= 4, VBV and aq-mode enabled\n"); + p->dynamicRd = 0; + x265_log(p, X265_LOG_WARNING, "Dynamic-rd disabled, requires RD <= 4, VBV and aq-mode enabled\n"); } if (p->uhdBluray) diff -r 0729b3a4a0cc -r f26e5f42669c source/encoder/frameencoder.cpp --- a/source/encoder/frameencoder.cpp Thu Feb 09 09:58:10 2017 +0530 +++ b/source/encoder/frameencoder.cpp Thu Feb 09 17:37:03 2017 +0530 @@ -1333,7 +1333,7 @@ && analysisFrameData->highDistortionCtuCount && analysisFrameData->lowDistortionCtuCount) curEncData.m_cuStat[cuAddr].baseQp += analysisFrameData->offset[cuAddr]; - if (m_param->complexAnalysis && (int32_t)(m_rce.qpaRc - m_rce.qpNoVbv) > 0) + if (m_param->dynamicRd && (int32_t)(m_rce.qpaRc - m_rce.qpNoVbv) > 0) ctu->m_vbvAffected = true; // Does all the CU analysis, returns best top level mode decision diff -r 0729b3a4a0cc -r f26e5f42669c source/test/rate-control-tests.txt --- a/source/test/rate-control-tests.txt Thu Feb 09 09:58:10 2017 +0530 +++ b/source/test/rate-control-tests.txt Thu Feb 09 17:37:03 2017 +0530 @@ -24,7 +24,7 @@ BasketballDrive_1920x1080_50.y4m,--preset ultrafast --bitrate 3000 --vbv-bufsize 3000 --vbv-maxrate 3000 --no-wpp big_buck_bunny_360p24.y4m,--preset medium --bitrate 400 --vbv-bufsize 600 --vbv-maxrate 600 --no-wpp --aud --hrd --tune fast-decode sita_1920x1080_30.yuv,--preset superfast --bitrate 3000 --vbv-bufsize 3000 --vbv-maxrate 3000 --aud --strict-cbr --no-wpp -sintel_trailer_2k_480p24.y4m, --preset slow --crf 24 --vbv-bufsize 150 --vbv-maxrate 150 --complex-analysis 1.53 +sintel_trailer_2k_480p24.y4m, --preset slow --crf 24 --vbv-bufsize 150 --vbv-maxrate 150 --dynamic-rd 1.53 diff -r 0729b3a4a0cc -r f26e5f42669c source/x265.h --- a/source/x265.h Thu Feb 09 09:58:10 2017 +0530 +++ b/source/x265.h Thu Feb 09 17:37:03 2017 +0530 @@ -390,7 +390,7 @@ #define X265_AQ_AUTO_VARIANCE 2 #define X265_AQ_AUTO_VARIANCE_BIASED 3 -#define X265_MAX_ANALYSIS_STRENGTH 4 +#define x265_ADAPT_RD_STRENGTH 4 /* NOTE! For this release only X265_CSP_I420 and X265_CSP_I444 are supported */ @@ -1373,7 +1373,7 @@ int bSsimRd; /* Increase RD at points where bitrate drops due to vbv. Default 0 */ - double complexAnalysis; + double dynamicRd; /* Enables the emitting of HDR SEI packets which contains HDR-specific params. * Auto-enabled when max-cll, max-fall, or mastering display info is specified. diff -r 0729b3a4a0cc -r f26e5f42669c source/x265cli.h --- a/source/x265cli.h Thu Feb 09 09:58:10 2017 +0530 +++ b/source/x265cli.h Thu Feb 09 17:37:03 2017 +0530 @@ -166,7 +166,7 @@ { "rd", required_argument, NULL, 0 }, { "rdoq-level", required_argument, NULL, 0 }, { "no-rdoq-level", no_argument, NULL, 0 }, - { "complex-analysis", required_argument, NULL, 0 }, + { "dynamic-rd", required_argument, NULL, 0 }, { "psy-rd", required_argument, NULL, 0 }, { "psy-rdoq", required_argument, NULL, 0 }, { "no-psy-rd", no_argument, NULL, 0 }, @@ -347,7 +347,7 @@ H0(" --[no-]psy-rd <0..5.0> Strength of psycho-visual rate distortion optimization, 0 to disable. Default %.1f\n", param->psyRd); H0(" --[no-]rdoq-level <0|1|2> Level of RDO in quantization 0:none, 1:levels, 2:levels & coding groups. Default %d\n", param->rdoqLevel); H0(" --[no-]psy-rdoq <0..50.0> Strength of psycho-visual optimization in RDO quantization, 0 to disable. Default %.1f\n", param->psyRdoq); - H0(" --complex-analysis <0..4.0> Strength of complex analysis, 0 to disable. Default %.2f\n", param->complexAnalysis); + H0(" --dynamic-rd <0..4.0> Strength of dynamic RD, 0 to disable. Default %.2f\n", param->dynamicRd); H0(" --[no-]ssim-rd Enable ssim rate distortion optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd)); H0(" --[no-]rd-refine Enable QP based RD refinement for rd levels 5 and 6. Default %s\n", OPT(param->bEnableRdRefine)); H0(" --[no-]early-skip Enable early SKIP detection. Default %s\n", OPT(param->bEnableEarlySkip)); _______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel