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

chen chenm003 at 163.com
Fri Apr 10 18:42:01 CEST 2015


At 2015-04-10 23:30:48,"Steve Borho" <steve at borho.org> wrote:
>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) ?
yes, mask operator just generate one conditional jump
of course,  we need make a new variant for mask on some compiler to avoid duplicate mask generate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150411/4e8f077a/attachment-0001.html>


More information about the x265-devel mailing list