[x265] [PATCH] common : Added new function x265_param2string

Gopu Govindaswamy gopu at multicorewareinc.com
Thu Oct 17 09:05:17 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1381993509 -19800
# Node ID 4cba7c453533731ef6bca965b6cebe7e6caff8bf
# Parent  1d6b3626f1b3d4b8f8f181e66eaaa649f90bac02
common : Added new function x265_param2string

diff -r 1d6b3626f1b3 -r 4cba7c453533 source/common/common.cpp
--- a/source/common/common.cpp	Wed Oct 16 20:38:44 2013 -0500
+++ b/source/common/common.cpp	Thu Oct 17 12:35:09 2013 +0530
@@ -543,3 +543,52 @@
     berror |= valuewasnull;
     return berror ? X265_PARAM_BAD_VALUE : 0;
 }
+
+char *x265_param2string( x265_param_t *p)
+{
+    char *buf, *s;
+    buf = s = (char *)X265_MALLOC(char, 2000);
+    if (!buf)
+        return NULL;
+
+    s += sprintf(s, " %s", p->bEnableWavefront ? "wpp" : "no-wpp");
+    s += sprintf(s, " fps=%d", p->frameRate);
+    s += sprintf(s, " threads=%d", p->poolNumThreads);
+    s += sprintf(s, " frame-threads=%d", p->frameNumThreads);
+    s += sprintf(s, " ctu=%d", p->maxCUSize);
+    s += sprintf(s, " tu-intra-depth=%d", p->tuQTMaxIntraDepth);
+    s += sprintf(s, " tu-inter-depth=%d",p->tuQTMaxInterDepth);
+    s += sprintf(s, " me=%d", p->searchMethod);
+    s += sprintf(s, " subme=%d", p->subpelRefine);
+    s += sprintf(s, " merange=%d", p->searchRange);
+    s += sprintf(s, " %s", p->bEnableRectInter ? "rect" : "no-rect");
+    s += sprintf(s, " %s", p->bEnableAMP ? "amp" : "no-amp");
+    s += sprintf(s, " max-merge=%d", p->maxNumMergeCand);
+    s += sprintf(s, " %s", p->bEnableEarlySkip ? "early-skip" : "no-early-skip");
+    s += sprintf(s, " %s", p->bEnableCbfFastMode ? "fast-cbf" : "no-fast-cbf");
+    s += sprintf(s, " rdpenalty=%d", p->rdPenalty);
+    s += sprintf(s, " %s", p->bEnableTransformSkip ? "tskip" : "no-tskip");
+    s += sprintf(s, " %s", p->bEnableTSkipFast ? "tskip-fast" : "no-tskip-fast");
+    s += sprintf(s, " bEnableStrongIntraSmoothing = %s", p->bEnableStrongIntraSmoothing ? "strong-intra-smoothing" : "no-strong-intra-smoothing");
+    s += sprintf(s, " %s", p->bEnableConstrainedIntra ? "constrained-intra" : "no-constrained-intra");
+    s += sprintf(s, " refresh=%d", p->decodingRefreshType);
+    s += sprintf(s, " keyint=%d", p->keyframeMax);
+    s += sprintf(s, " rc-lookahead=%d", p->lookaheadDepth);
+    s += sprintf(s, " bframes=%d", p->bframes);
+    s += sprintf(s, " bframe-bias=%d", p->bFrameBias);
+    s += sprintf(s, " b-adapt=%d", p->bFrameAdaptive);
+    s += sprintf(s, " ref=%d", p->maxNumReferences);
+    s += sprintf(s, " %s", p->bEnableWeightedPred ? "weightp" : "no-weightp");
+    s += sprintf(s, " bitrate=%d", p->rc.bitrate);
+    s += sprintf(s, " qp=%d", p->rc.qp);
+    s += sprintf(s, " cbqpoffs=%d", p->cbQpOffset);
+    s += sprintf(s, " crqpoffs=%d", p->crQpOffset);
+    s += sprintf(s, " rd=%d", p->bRDLevel);
+    s += sprintf(s, " %s", p->bEnableSignHiding ? "signhide" : "no-signhide");
+    s += sprintf(s, " %s", p->bEnableLoopFilter ? "lft" : "no-lft");
+    s += sprintf(s, " %s", p->bEnableSAO ? "sao" : "no-sao");
+    s += sprintf(s, " sao-lcu-bounds=%d", p->saoLcuBoundary);
+    s += sprintf(s, " sao-lcu-opt=%d", p->saoLcuBasedOptimization);
+
+    return buf;
+}
diff -r 1d6b3626f1b3 -r 4cba7c453533 source/common/common.h
--- a/source/common/common.h	Wed Oct 16 20:38:44 2013 -0500
+++ b/source/common/common.h	Thu Oct 17 12:35:09 2013 +0530
@@ -114,5 +114,6 @@
 int  x265_check_params(x265_param_t *param);
 void x265_print_params(x265_param_t *param);
 int x265_set_globals(x265_param_t *param);
+char *x265_param2string( x265_param_t *p);
 
 #endif // ifndef X265_COMMON_H


More information about the x265-devel mailing list