[x265] [PATCH] deblock: set reference frame to NULL if refIdx < 0. Dereferencing refFrameList when

Ashok Kumar Mishra ashok at multicorewareinc.com
Fri Dec 1 16:23:15 CET 2017


Pushed.

On Fri, Dec 1, 2017 at 1:33 PM, <santhoshini at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Santhoshini Sekar <santhoshini at multicorewareinc.com>
> # Date 1512043592 -19800
> #      Thu Nov 30 17:36:32 2017 +0530
> # Branch stable
> # Node ID f9d08feabf7b2607561d337e5048657a786a7c68
> # Parent  b0d89eaaebcf3534204e054243d402b6cf646234
> deblock: set reference frame to NULL if refIdx < 0. Dereferencing
> refFrameList when
> refIdx < 0 is not valid
>
> diff --git a/source/common/deblock.cpp b/source/common/deblock.cpp
> --- a/source/common/deblock.cpp
> +++ b/source/common/deblock.cpp
> @@ -208,8 +208,8 @@
>      const Slice* const sliceQ = cuQ->m_slice;
>      const Slice* const sliceP = cuP->m_slice;
>
> -    const Frame* refP0 = sliceP->m_refFrameList[0][cuP-
> >m_refIdx[0][partP]];
> -    const Frame* refQ0 = sliceQ->m_refFrameList[0][cuQ-
> >m_refIdx[0][partQ]];
> +    const Frame* refP0 = (cuP->m_refIdx[0][partP] >= 0) ?
> sliceP->m_refFrameList[0][cuP->m_refIdx[0][partP]] : NULL;
> +    const Frame* refQ0 = (cuQ->m_refIdx[0][partQ] >= 0) ?
> sliceQ->m_refFrameList[0][cuQ->m_refIdx[0][partQ]] : NULL;
>      const MV& mvP0 = refP0 ? cuP->m_mv[0][partP] : zeroMv;
>      const MV& mvQ0 = refQ0 ? cuQ->m_mv[0][partQ] : zeroMv;
>
> @@ -220,8 +220,8 @@
>      }
>
>      // (sliceQ->isInterB() || sliceP->isInterB())
> -    const Frame* refP1 = sliceP->m_refFrameList[1][cuP-
> >m_refIdx[1][partP]];
> -    const Frame* refQ1 = sliceQ->m_refFrameList[1][cuQ-
> >m_refIdx[1][partQ]];
> +    const Frame* refP1 = (cuP->m_refIdx[1][partP] >= 0) ?
> sliceP->m_refFrameList[1][cuP->m_refIdx[1][partP]] : NULL;
> +    const Frame* refQ1 = (cuQ->m_refIdx[1][partQ] >= 0) ?
> sliceQ->m_refFrameList[1][cuQ->m_refIdx[1][partQ]] : NULL;
>      const MV& mvP1 = refP1 ? cuP->m_mv[1][partP] : zeroMv;
>      const MV& mvQ1 = refQ1 ? cuQ->m_mv[1][partQ] : zeroMv;
>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20171201/5829fb71/attachment.html>


More information about the x265-devel mailing list