Hi Chen,
Thanks for spending your valuable time reviewing the patch and sharing the
comments. We have incorporated the suggested changes and adding a few more
to it. We will send you the updated patch soon :)

Thanks & Regards
*Niranjan Kumar B*
Video Codec Engineer
Media & AI Analytics
+91 958 511 1449
<https://multicorewareinc.com/>


On Thu, Feb 27, 2020 at 2:35 PM chen <chenm...@163.com> wrote:

>
> At 2020-02-27 16:59:18, "Niranjan Bala" <niran...@multicorewareinc.com>
> wrote:
>
> +double computeBrightnessIntensity(pixel *inPlane, int width, int height,
> intptr_t stride)
> +{
> +    pixel* rowStart = inPlane;
> restrict with const prefix may better.
>
> +    double count = 0;
> why declare as Double?
>
> +
> +    for (int i = 0; i < height; i++)
> +    {
> +        for (int j = 0; j < width; j++)
> +        {
> +            if (rowStart[j] > BRIGHTNESS_THRESHOLD)
> +                count++;
> +        }
> +        rowStart += stride;
> +    }
> +
> +    /* Returns the brightness percentage of the input plane */
> +    return (count / (width * height)) * 100;
> +}
> +
> +double computeEdgeIntensity(pixel *inPlane, int width, int height,
> intptr_t stride)
> +{
> +    pixel* rowStart = inPlane;
> +    double count = 0;
> +
> +    for (int i = 0; i < height; i++)
> +    {
> +        for (int j = 0; j < width; j++)
> +        {
> +            if (rowStart[j] > 0)
> +                count++;
> +        }
> +        rowStart += stride;
> +    }
> +
> +    /* Returns the edge percentage of the input plane */
> +    return (count / (width * height)) * 100;
> 100 is integer, multiplication with Double.
>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel@videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to