[x265] [PATCH] encoder.cpp: fix encoder crash for --analysis-reuse-level=10

Pradeep Ramachandran pradeep at multicorewareinc.com
Wed Nov 22 17:55:44 CET 2017


On Wed, Nov 22, 2017 at 5:27 PM, <praveen at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Praveen Tiwari <praveen at multicorewareinc.com>
> # Date 1511338280 -19800
> #      Wed Nov 22 13:41:20 2017 +0530
> # Branch stable
> # Node ID dd11aa99f40a1af59065984afa9b699d2eb1162e
> # Parent  752ed1108fce1b475e0458b70f92503d6343818b
> encoder.cpp: fix encoder crash for --analysis-reuse-level=10
>

Thanks for the fix. Pushed to stable, and merged into default


>
> diff -r 752ed1108fce -r dd11aa99f40a source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp        Tue Nov 21 09:50:45 2017 +0530
> +++ b/source/encoder/encoder.cpp        Wed Nov 22 13:41:20 2017 +0530
> @@ -1155,6 +1155,8 @@
>                      pic_out->analysisData.wt =
> outFrame->m_analysisData.wt;
>                      pic_out->analysisData.interData =
> outFrame->m_analysisData.interData;
>                      pic_out->analysisData.intraData =
> outFrame->m_analysisData.intraData;
> +                    pic_out->analysisData.modeFlag[0] =
> outFrame->m_analysisData.modeFlag[0];
> +                    pic_out->analysisData.modeFlag[1] =
> outFrame->m_analysisData.modeFlag[1];
>                      if (m_param->bDisableLookahead)
>                      {
>                          int factor = 1;
> @@ -3067,6 +3069,7 @@
>                  CHECKED_MALLOC(interData->mvpIdx[dir], uint8_t,
> analysis->numPartitions * analysis->numCUsInFrame);
>                  CHECKED_MALLOC(interData->refIdx[dir], int8_t,
> analysis->numPartitions * analysis->numCUsInFrame);
>                  CHECKED_MALLOC(interData->mv[dir], MV,
> analysis->numPartitions * analysis->numCUsInFrame);
> +                CHECKED_MALLOC(analysis->modeFlag[dir], uint8_t,
> analysis->numPartitions * analysis->numCUsInFrame);
>              }
>
>              /* Allocate intra in inter */
> @@ -3146,7 +3149,11 @@
>                      X265_FREE(((analysis_inter_
> data*)analysis->interData)->mvpIdx[dir]);
>                      X265_FREE(((analysis_inter_
> data*)analysis->interData)->refIdx[dir]);
>                      X265_FREE(((analysis_inter_
> data*)analysis->interData)->mv[dir]);
> -                    X265_FREE(analysis->modeFlag[dir]);
> +                    if (analysis->modeFlag[dir] != NULL)
> +                    {
> +                        X265_FREE(analysis->modeFlag[dir]);
> +                        analysis->modeFlag[dir] = NULL;
> +                    }
>                  }
>              }
>              else
> _______________________________________________
> 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/20171122/687813a0/attachment.html>


More information about the x265-devel mailing list