[x265] [PATCH] analysis-save/load: fix crash during analysis sharing between non-dyadic

Aruna Matheswaran aruna at multicorewareinc.com
Mon Jan 20 18:21:22 CET 2020


Pushed to default.

On Mon, Jan 20, 2020 at 6:16 PM Aruna Matheswaran <
aruna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aruna Matheswaran <aruna at multicorewareinc.com>
> # Date 1579523879 -19800
> #      Mon Jan 20 18:07:59 2020 +0530
> # Node ID acc5d16999e2faf6e75ecc1df9a01c1953ebaf8c
> # Parent  8e6db24c1517f6f160f0e7e62deba44fc2b69d88
> analysis-save/load: fix crash during analysis sharing between non-dyadic
> resolutions.
>
> diff -r 8e6db24c1517 -r acc5d16999e2 source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp        Mon Jan 06 23:08:36 2020 +0530
> +++ b/source/encoder/encoder.cpp        Mon Jan 20 18:07:59 2020 +0530
> @@ -3780,9 +3780,10 @@
>                  x265_log(NULL, X265_LOG_ERROR, "Error reading analysis
> data. Conformance window right offset missing\n");
>                  m_aborted = true;
>              }
> -            else if (m_conformanceWindow.rightOffset)
> +            else if (m_conformanceWindow.rightOffset &&
> p->analysisLoadReuseLevel > 1)
>              {
> -                padsize = m_conformanceWindow.rightOffset * 2;
> +                int scaleFactor = p->scaleFactor < 2 ? 1 : p->scaleFactor;
> +                padsize = m_conformanceWindow.rightOffset * scaleFactor;
>                  p->sourceWidth += padsize;
>                  m_conformanceWindow.bEnabled = true;
>                  m_conformanceWindow.rightOffset = padsize;
> @@ -3793,9 +3794,10 @@
>                  x265_log(NULL, X265_LOG_ERROR, "Error reading analysis
> data. Conformance window bottom offset missing\n");
>                  m_aborted = true;
>              }
> -            else if (m_conformanceWindow.bottomOffset)
> +            else if (m_conformanceWindow.bottomOffset &&
> p->analysisLoadReuseLevel > 1)
>              {
> -                padsize = m_conformanceWindow.bottomOffset * 2;
> +                int scaleFactor = p->scaleFactor < 2 ? 1 : p->scaleFactor;
> +                padsize = m_conformanceWindow.bottomOffset * scaleFactor;
>                  p->sourceHeight += padsize;
>                  m_conformanceWindow.bEnabled = true;
>                  m_conformanceWindow.bottomOffset = padsize;
>


-- 
Regards,
*Aruna Matheswaran,*
Video Codec Engineer,
Media & AI analytics BU,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200120/d2956900/attachment.html>


More information about the x265-devel mailing list