[x265] [PATCH] Dolby Vision: Move payload freeing from library to application

Pradeep Ramachandran pradeep at multicorewareinc.com
Mon Feb 4 17:10:13 CET 2019


On Mon, Jan 28, 2019 at 12:11 PM <aruna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aruna Matheswaran <aruna at multicorewareinc.com>
> # Date 1548429257 -19800
> #      Fri Jan 25 20:44:17 2019 +0530
> # Node ID 46b84ff665fd301e384328972d3d1312a8c74599
> # Parent  ae085e5cd8a2cdb161eb5bf54ba9019c3d873506
> Dolby Vision: Move payload freeing from library to application.
>
> Since the memory for rpu payload is allocated in the application, its free
> is
> moved to application.
>

Seems a cleaner way to free it.
Pushed to default.


> diff -r ae085e5cd8a2 -r 46b84ff665fd source/encoder/api.cpp
> --- a/source/encoder/api.cpp    Fri Jan 04 18:50:22 2019 +0530
> +++ b/source/encoder/api.cpp    Fri Jan 25 20:44:17 2019 +0530
> @@ -635,8 +635,6 @@
>
>  void x265_picture_free(x265_picture *p)
>  {
> -    if (p->rpu.payload)
> -        X265_FREE(p->rpu.payload);
>      return x265_free(p);
>  }
>
> diff -r ae085e5cd8a2 -r 46b84ff665fd source/x265.cpp
> --- a/source/x265.cpp   Fri Jan 04 18:50:22 2019 +0530
> +++ b/source/x265.cpp   Fri Jan 25 20:44:17 2019 +0530
> @@ -880,6 +880,7 @@
>      uint32_t nal;
>      int16_t *errorBuf = NULL;
>      bool bDolbyVisionRPU = false;
> +    uint8_t *rpuPayload = NULL;
>      int ret = 0;
>
>
> @@ -899,7 +900,8 @@
>
>      if (param->dolbyProfile && cliopt.dolbyVisionRpu)
>      {
> -        pic_in->rpu.payload = X265_MALLOC(uint8_t, 1024);
> +        rpuPayload = X265_MALLOC(uint8_t, 1024);
> +        pic_in->rpu.payload = rpuPayload;
>          if (pic_in->rpu.payload)
>              bDolbyVisionRPU = true;
>      }
> @@ -1060,6 +1062,7 @@
>      api->param_free(param);
>
>      X265_FREE(errorBuf);
> +    X265_FREE(rpuPayload);
>
>      SetConsoleTitle(orgConsoleTitle);
>      SetThreadExecutionState(ES_CONTINUOUS);
> _______________________________________________
> 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/20190204/180b0eeb/attachment.html>


More information about the x265-devel mailing list