[x265] [PATCH] zone: Remove unnessary conditions on zone reconfig

Aruna Matheswaran aruna at multicorewareinc.com
Tue Mar 24 08:21:21 CET 2020


Pushed the series into default.

On Wed, Mar 18, 2020 at 7:06 PM Snehaa Giridharan <
snehaa at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Snehaa Giridharan <snehaa at multicorewareinc.com>
> # Date 1581575253 -19800
> #      Thu Feb 13 11:57:33 2020 +0530
> # Branch Release_3.3
> # Node ID 14e2b9794784f9a46197ed33e25b9ed94f17c298
> # Parent  69997e133cd665d6f98458c542241f36da701056
> zone: Remove unnessary conditions on zone reconfig
>
> This commit
> - Removes unnessary conditions on zone reconfig
> - Fixes crash with dynamic zone reconfig
>
> diff --git a/source/common/param.cpp b/source/common/param.cpp
> --- a/source/common/param.cpp
> +++ b/source/common/param.cpp
> @@ -2422,7 +2422,7 @@
>      dst->bResetZoneConfig = src->bResetZoneConfig;
>      dst->decoderVbvMaxRate = src->decoderVbvMaxRate;
>
> -    if (src->rc.zonefileCount && src->rc.zones)
> +    if (src->rc.zonefileCount && src->rc.zones && src->bResetZoneConfig)
>      {
>          for (int i = 0; i < src->rc.zonefileCount; i++)
>          {
> diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp
> --- a/source/encoder/api.cpp
> +++ b/source/encoder/api.cpp
> @@ -1016,12 +1016,12 @@
>
>  void x265_zone_free(x265_param *param)
>  {
> -    if (param && param->rc.zonefileCount) {
> +    if (param && param->rc.zones && (param->rc.zoneCount ||
> param->rc.zonefileCount))
> +    {
>          for (int i = 0; i < param->rc.zonefileCount; i++)
>              x265_free(param->rc.zones[i].zoneParam);
> +        x265_free(param->rc.zones);
>      }
> -    if (param && (param->rc.zoneCount || param->rc.zonefileCount))
> -        x265_free(param->rc.zones);
>  }
>
>  static const x265_api libapi =
> diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp
> +++ b/source/encoder/encoder.cpp
> @@ -4106,7 +4106,7 @@
>          x265_log(p, X265_LOG_WARNING, "Radl requires fixed gop-length
> (keyint == min-keyint). Disabling radl.\n");
>      }
>
> -    if ((p->chunkStart || p->chunkEnd) && p->bOpenGOP)
> +    if ((p->chunkStart || p->chunkEnd) && p->bOpenGOP &&
> m_param->bResetZoneConfig)
>      {
>          p->chunkStart = p->chunkEnd = 0;
>          x265_log(p, X265_LOG_WARNING, "Chunking requires closed gop
> structure. Disabling chunking.\n");
> @@ -4139,12 +4139,6 @@
>          x265_log(p, X265_LOG_WARNING, "Turning on repeat - headers for
> zone encoding\n");
>      }
>
> -    if (!m_param->bResetZoneConfig && (p->keyframeMax != p->keyframeMin))
> -        x265_log(p, X265_LOG_WARNING, "External zone reconfiguration
> requires a fixed GOP size to enable appropriate signaling of HRD info\n");
> -
> -    if (!m_param->bResetZoneConfig && (p->reconfigWindowSize !=
> (uint64_t)p->keyframeMax))
> -        x265_log(p, X265_LOG_WARNING, "Zone size must be multiple of GOP
> size to enable appropriate signaling of HRD info\n");
> -
>      if (m_param->bEnableHME)
>      {
>          if (m_param->sourceHeight < 540)
>
> --
> *Thanks and Regards,*
> *Snehaa.G*
>
>
> <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=5d1cffcc-cd7a-478a-8410-76188ea236f6> I’m
> protected online with Avast Free Antivirus. Get it here — it’s free
> forever.
> <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=5d1cffcc-cd7a-478a-8410-76188ea236f6>
> <#m_5881957380866492049_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>


-- 
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/20200324/ecee7917/attachment-0001.html>


More information about the x265-devel mailing list