[x265] [PATCH] avoid calculate rateIncUp and rateIncDown when sigHide disabled

Steve Borho steve at borho.org
Fri Apr 10 17:30:48 CEST 2015


On 04/10, Min Chen wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1428670165 -28800
> # Node ID 43792061e4f115b5257caf3ca8cd95cf561ec888
> # Parent  67f55ea84d7b6e4f872d5bddf7aa8dec971fef60
> avoid calculate rateIncUp and rateIncDown when sigHide disabled
> ---
>  source/common/quant.cpp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff -r 67f55ea84d7b -r 43792061e4f1 source/common/quant.cpp
> --- a/source/common/quant.cpp	Fri Apr 10 20:06:28 2015 +0800
> +++ b/source/common/quant.cpp	Fri Apr 10 20:49:25 2015 +0800
> @@ -739,7 +739,7 @@
>                  totalRdCost += costCoeff[scanPos];
>  
>                  /* record costs for sign-hiding performed at the end */
> -                if (level)
> +                if ((cu.m_slice->m_pps->bSignHideEnabled ? ~0 : 0) & level)

this is faster than if (level && cu.m_slice->m_pps->bSignHideEnabled) ?

>                  {
>                      const int32_t diff0 = level - 1 - baseLevel;
>                      const int32_t diff2 = level + 1 - baseLevel;
> 
> _______________________________________________
> 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