[x265] deblock.cpp, ipfilter.cpp review comments

chen chenm003 at 163.com
Mon Aug 22 17:54:12 CEST 2016


in 8bpp mode, pixel define as "unsigned char", it is safe extension to int16

At 2016-08-22 19:47:12,"N Vijay Anand" <nvijay.anand at trispacetech.com> wrote:

I've following observations on typecasting which could be potential
problem areas if input is 8 bitdepth.
Like this there are quite few places in the ipfilter.cpp and deblock.cpp file.




static inline void pelFilterLuma(pixel* src, intptr_t srcStep, intptr_t offset, int32_t tc, int32_t maskP, int32_t maskQ,
                                 int32_t maskP1, int32_t maskQ1)
{
    int32_t thrCut = tc * 10;
    int32_t tc2 = tc >> 1;
    maskP1 &= maskP;
    maskQ1 &= maskQ;


    for (int32_t i = 0; i < UNIT_SIZE; i++, src += srcStep)
    {
        int16_t m4  = (int16_t)src[0];
        int16_t m3  = (int16_t)src[-offset];
        int16_t m5  = (int16_t)src[offset];
        int16_t m2  = (int16_t)src[-offset * 2];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160822/f8d9d723/attachment.html>


More information about the x265-devel mailing list