[x265] [PATCH 2 of 5] param: add more param options to print as string
Steve Borho
steve at borho.org
Fri Jul 11 21:42:52 CEST 2014
On Fri, Jul 11, 2014 at 6:12 AM, <aarthi at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Aarthi Thirumalai
> # Date 1405075645 -19800
> # Fri Jul 11 16:17:25 2014 +0530
> # Node ID a73535d798fc0e68bcc0c78705810e6a93f7fbea
> # Parent 86b4c19eb7061753fa98332a1b59024c387845d0
> param: add more param options to print as string
>
> diff -r 86b4c19eb706 -r a73535d798fc source/common/param.cpp
> --- a/source/common/param.cpp Fri Jul 11 16:06:02 2014 +0530
> +++ b/source/common/param.cpp Fri Jul 11 16:17:25 2014 +0530
> @@ -1209,12 +1209,12 @@
> buf = s = X265_MALLOC(char, 2000);
> if (!buf)
> return NULL;
> -
> #define BOOL(param, cliopt) \
> s += sprintf(s, " %s", (param) ? cliopt : "no-"cliopt);
> -
> + s += sprintf(s, "%dx%d", p->sourceWidth,p->sourceHeight);
> + s += sprintf(s, " fps=%u/%u", p->fpsNum, p->fpsDenom);
> + s += sprintf(s, " bitdepth=%d",p->internalBitDepth);
> BOOL(p->bEnableWavefront, "wpp");
> - s += sprintf(s, " fps=%d/%d", p->fpsNum, p->fpsDenom);
> 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);
> @@ -1284,9 +1284,9 @@
> s += sprintf(s, " qp=%d", p->rc.qp);
> if (!(p->rc.rateControlMode == X265_RC_CQP && p->rc.qp == 0))
this if-check here is likely wrong, but I'm leaving it in place for
now. I suspect this should be: if (!p->bLossless)
> {
> - s += sprintf(s, " ip_ratio=%.2f", p->rc.ipFactor);
> + s += sprintf(s, " ip-ratio=%.2f", p->rc.ipFactor);
> if (p->bframes)
> - s += sprintf(s, " pb_ratio=%.2f", p->rc.pbFactor);
> + s += sprintf(s, " pb-ratio=%.2f", p->rc.pbFactor);
changed these to ipratio and pbratio to match the x265_param_parse()
strings. that function will map the _ to -; an artifact of x264's
function. We should probably use dashes here.
> }
> #undef BOOL
> return buf;
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
--
Steve Borho
More information about the x265-devel
mailing list