<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">in 8bpp mode, pixel define as "unsigned char", it is safe extension to int16<div><div></div><div id="divNeteaseMailCard"></div><br>At 2016-08-22 19:47:12,"N Vijay Anand" <nvijay.anand@trispacetech.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div style="font-size:12.8px">I've following observations on typecasting which could be potential</div><div style="font-size:12.8px">problem areas if input is 8 bitdepth.</div><div style="font-size:12.8px">Like this there are quite few places in the ipfilter.cpp and deblock.cpp file.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>static inline void pelFilterLuma(pixel* src, intptr_t srcStep, intptr_t offset, int32_t tc, int32_t maskP, int32_t maskQ,</div><div> int32_t maskP1, int32_t maskQ1)</div><div>{</div><div> int32_t thrCut = tc * 10;</div><div> int32_t tc2 = tc >> 1;</div><div> maskP1 &= maskP;</div><div> maskQ1 &= maskQ;</div><div><br></div><div> for (int32_t i = 0; i < UNIT_SIZE; i++, src += srcStep)</div><div> {</div><div> int16_t m4 = (int16_t)src[0];</div><div> int16_t m3 = (int16_t)src[-offset];</div><div> int16_t m5 = (int16_t)src[offset];</div><div> int16_t m2 = (int16_t)src[-offset * 2];</div></div></div></div></div></div></div></div></div>
</div>
</blockquote></div></div>