[x265] [PATCH] param: cleanup, print reconfigured param option along with its old and configured value

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Mar 8 06:27:19 CET 2016


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1457356750 -19800
#      Mon Mar 07 18:49:10 2016 +0530
# Node ID 6f7dbb1c901cb5b5b88cc20c3213906465021338
# Parent  88aebc166fa8e16f91d5f0acce77690003be9d91
param: cleanup, print reconfigured param option along with its old and configured value

diff -r 88aebc166fa8 -r 6f7dbb1c901c source/common/param.cpp
--- a/source/common/param.cpp	Fri Mar 04 16:59:45 2016 +0530
+++ b/source/common/param.cpp	Mon Mar 07 18:49:10 2016 +0530
@@ -1373,36 +1373,31 @@
     if (!param || !reconfiguredParam)
         return;
 
-    x265_log(param,X265_LOG_INFO, "Reconfigured param options :\n");
-
-    char buf[80] = { 0 };
     char tmp[40];
-#define TOOLCMP(COND1, COND2, STR, VAL)  if (COND1 != COND2) { sprintf(tmp, STR, VAL); appendtool(param, buf, sizeof(buf), tmp); }
-    TOOLCMP(param->maxNumReferences, reconfiguredParam->maxNumReferences, "ref=%d", reconfiguredParam->maxNumReferences);
-    TOOLCMP(param->maxTUSize, reconfiguredParam->maxTUSize, "max-tu-size=%d", reconfiguredParam->maxTUSize);
-    TOOLCMP(param->searchRange, reconfiguredParam->searchRange, "merange=%d", reconfiguredParam->searchRange);
-    TOOLCMP(param->subpelRefine, reconfiguredParam->subpelRefine, "subme= %d", reconfiguredParam->subpelRefine);
-    TOOLCMP(param->rdLevel, reconfiguredParam->rdLevel, "rd=%d", reconfiguredParam->rdLevel);
-    TOOLCMP(param->psyRd, reconfiguredParam->psyRd, "psy-rd=%.2lf", reconfiguredParam->psyRd);
-    TOOLCMP(param->rdoqLevel, reconfiguredParam->rdoqLevel, "rdoq=%d", reconfiguredParam->rdoqLevel);
-    TOOLCMP(param->psyRdoq, reconfiguredParam->psyRdoq, "psy-rdoq=%.2lf", reconfiguredParam->psyRdoq);
-    TOOLCMP(param->noiseReductionIntra, reconfiguredParam->noiseReductionIntra, "nr-intra=%d", reconfiguredParam->noiseReductionIntra);
-    TOOLCMP(param->noiseReductionInter, reconfiguredParam->noiseReductionInter, "nr-inter=%d", reconfiguredParam->noiseReductionInter);
-    TOOLCMP(param->bEnableTSkipFast, reconfiguredParam->bEnableTSkipFast, "tskip-fast=%d", reconfiguredParam->bEnableTSkipFast);
-    TOOLCMP(param->bEnableSignHiding, reconfiguredParam->bEnableSignHiding, "signhide=%d", reconfiguredParam->bEnableSignHiding);
-    TOOLCMP(param->bEnableFastIntra, reconfiguredParam->bEnableFastIntra, "fast-intra=%d", reconfiguredParam->bEnableFastIntra);
-    if (param->bEnableLoopFilter && (param->deblockingFilterBetaOffset != reconfiguredParam->deblockingFilterBetaOffset 
+#define TOOLCMP(COND1, COND2, STR, OLD_VAL, NEW_VAL)  if (COND1 != COND2) { sprintf(tmp, STR, OLD_VAL, NEW_VAL);}
+    TOOLCMP(param->maxNumReferences, reconfiguredParam->maxNumReferences, "[x265] Reconfigure: ref=%d to %d", param->maxNumReferences, reconfiguredParam->maxNumReferences);
+    TOOLCMP(param->maxTUSize, reconfiguredParam->maxTUSize, "[x265] Reconfigure: max-tu-size=%d to %d", param->maxTUSize, reconfiguredParam->maxTUSize);
+    TOOLCMP(param->searchRange, reconfiguredParam->searchRange, "[x265] Reconfigure: merange=%d to %d", param->searchRange, reconfiguredParam->searchRange);
+    TOOLCMP(param->subpelRefine, reconfiguredParam->subpelRefine, "[x265] Reconfigure: subme=%d to %d", param->subpelRefine, reconfiguredParam->subpelRefine);
+    TOOLCMP(param->rdLevel, reconfiguredParam->rdLevel, "[x265] Reconfigure: rd=%d to %d", param->rdLevel, reconfiguredParam->rdLevel);
+    TOOLCMP(param->psyRd, reconfiguredParam->psyRd, "[x265] Reconfigure: psy-rd=%.2lf to %.2lf", param->psyRd, reconfiguredParam->psyRd);
+    TOOLCMP(param->rdoqLevel, reconfiguredParam->rdoqLevel, "[x265] Reconfigure: rdoq=%d to %d", param->rdoqLevel, reconfiguredParam->rdoqLevel);
+    TOOLCMP(param->psyRdoq, reconfiguredParam->psyRdoq, "[x265] Reconfigure: psy-rdoq=%.2lf to %.2lf", param->psyRdoq, reconfiguredParam->psyRdoq);
+    TOOLCMP(param->noiseReductionIntra, reconfiguredParam->noiseReductionIntra, "[x265] Reconfigure: nr-intra=%d to %d", param->noiseReductionIntra, reconfiguredParam->noiseReductionIntra);
+    TOOLCMP(param->noiseReductionInter, reconfiguredParam->noiseReductionInter, "[x265] Reconfigure: nr-inter=%d to %d", param->noiseReductionInter, reconfiguredParam->noiseReductionInter);
+    TOOLCMP(param->bEnableTSkipFast, reconfiguredParam->bEnableTSkipFast, "[x265] Reconfigure: tskip-fast=%d to %d", param->bEnableTSkipFast, reconfiguredParam->bEnableTSkipFast);
+    TOOLCMP(param->bEnableSignHiding, reconfiguredParam->bEnableSignHiding, "[x265] Reconfigure: signhide=%d to %d", param->bEnableSignHiding, reconfiguredParam->bEnableSignHiding);
+    TOOLCMP(param->bEnableFastIntra, reconfiguredParam->bEnableFastIntra, "[x265] Reconfigure: fast-intra=%d to %d", param->bEnableFastIntra, reconfiguredParam->bEnableFastIntra);
+    if (param->bEnableLoopFilter && (param->deblockingFilterBetaOffset != reconfiguredParam->deblockingFilterBetaOffset
         || param->deblockingFilterTCOffset != reconfiguredParam->deblockingFilterTCOffset))
     {
-        sprintf(tmp, "deblock(tC=%d:B=%d)", param->deblockingFilterTCOffset, param->deblockingFilterBetaOffset);
-        appendtool(param, buf, sizeof(buf), tmp);
+        sprintf(tmp, "[x265] Reconfigure: deblock(tC=%d:B=%d) to (tC=%d:B=%d)", param->deblockingFilterTCOffset, param->deblockingFilterBetaOffset, reconfiguredParam->deblockingFilterTCOffset, reconfiguredParam->deblockingFilterBetaOffset);
     }
     else
-        TOOLCMP(param->bEnableLoopFilter,  reconfiguredParam->bEnableLoopFilter, "deblock=%d", reconfiguredParam->bEnableLoopFilter);
+        TOOLCMP(param->bEnableLoopFilter, reconfiguredParam->bEnableLoopFilter, "[x265] Reconfigure: deblock=%d to %d", param->bEnableLoopFilter, reconfiguredParam->bEnableLoopFilter);
 
-    TOOLCMP(param->bEnableTemporalMvp, reconfiguredParam->bEnableTemporalMvp, "tmvp=%d", reconfiguredParam->bEnableTemporalMvp);
-    TOOLCMP(param->bEnableEarlySkip, reconfiguredParam->bEnableEarlySkip, "early-skip=%d", reconfiguredParam->bEnableEarlySkip);
-    x265_log(param, X265_LOG_INFO, "tools:%s\n", buf);
+    TOOLCMP(param->bEnableTemporalMvp, reconfiguredParam->bEnableTemporalMvp, "[x265] Reconfigure: tmvp=%d to %d", param->bEnableTemporalMvp, reconfiguredParam->bEnableTemporalMvp);
+    TOOLCMP(param->bEnableEarlySkip, reconfiguredParam->bEnableEarlySkip, "[x265] Reconfigure: early-skip=%d to %d", param->bEnableEarlySkip, reconfiguredParam->bEnableEarlySkip);
 }
 
 char *x265_param2string(x265_param* p)


More information about the x265-devel mailing list