> +        if (nr->bNoiseReduction)
> +        {
> +            int index = (DCT_4x4 + log2BlockSize - ((trSize == 4) && (mode 
> != REG_DCT)));
> +            if (index == 1)
> +            {
> +                denoiseDct(m_tmpCoeff, nr->residualSum[0], nr->offset[0], 
> 16);
> +                nr->count[0]++;
> +            }
> +            else if (index == 2)
> +            {
> +                denoiseDct(m_tmpCoeff, nr->residualSum[1], nr->offset[1], 
> 64);
> +                nr->count[1]++;
> +            }
> +            else if (index == 3)
> +            {
> +                denoiseDct(m_tmpCoeff, nr->residualSum[2], nr->offset[2], 
> 256);
> +                nr->count[2]++;
> +            }
> +            else if (index == 4)
> +            {
> +                denoiseDct(m_tmpCoeff, nr->residualSum[3], nr->offset[3], 
> 1024);
> +                nr->count[3]++;
> +            }
> +        }
>      }

How about

denoiseDct(m_tmpCoeff, nr->residualSum[index], nr->offset[index], 16
<< (index*2));
nr->count[index]++;

?
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to