[x265] [PATCH] fix build error, add definition for getICRateNegDiff

Steve Borho steve at borho.org
Thu Feb 5 10:14:00 CET 2015


On Thu, Feb 5, 2015 at 12:19 AM,  <santhoshini at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Santhoshini Sekar<santhoshini at multicorewareinc.com>
> # Date 1423117093 -19800
> #      Thu Feb 05 11:48:13 2015 +0530
> # Node ID bd4febc33ccc0a51228bc4884c7a5287fea8fea8
> # Parent  0e3ce940f2f416ba7252d98bea79fb9b8875b559
> fix build error, add definition for getICRateNegDiff
>
> diff -r 0e3ce940f2f4 -r bd4febc33ccc source/common/quant.cpp
> --- a/source/common/quant.cpp   Wed Feb 04 18:54:10 2015 -0600
> +++ b/source/common/quant.cpp   Thu Feb 05 11:48:13 2015 +0530
> @@ -104,6 +104,20 @@
>      return rate;
>  }

this function is only used by X265_CHECK statements, so it needs to be
wrapped in

#if CHECKED_BUILD || _DEBUG

otherwise you cause warnings in release builds

> +inline int getICRateNegDiff(uint32_t absLevel, const int* greaterOneBits, const int* levelAbsBits)
> +{
> +    X265_CHECK(absLevel <= 2, "absLevel check failure\n");
> +
> +    int rate;
> +    if (absLevel == 0)
> +        rate = 0;
> +    else if (absLevel == 2)
> +        rate = greaterOneBits[1] + levelAbsBits[0];
> +    else
> +        rate = greaterOneBits[0];
> +    return rate;
> +}
> +
>  inline int getICRateLessVlc(uint32_t absLevel, int32_t diffLevel, const uint32_t absGoRice)
>  {
>      X265_CHECK(absGoRice <= 4, "absGoRice check failure\n");
> _______________________________________________
> 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