[x265] [PATCH] Cleanup unused variables and fix build warnings

Mahesh Pittala mahesh at multicorewareinc.com
Thu Dec 29 16:12:26 UTC 2022


Pushed to master branch, Thanks

On Thu, Dec 22, 2022 at 5:54 PM Kirithika Kalirathnam <
kirithika at multicorewareinc.com> wrote:

> Please find the updated version of the patch.
>
> From 87774f5edf3be2afeaafeef43196f83be7e89912 Mon Sep 17 00:00:00 2001
> From: Kirithika <kirithika at multicorewareinc.com>
> Date: Tue, 20 Dec 2022 11:29:27 +0530
> Subject: [PATCH] Cleanup unused variables and fix build warnings
>
> ---
>  source/common/param.cpp          | 2 +-
>  source/common/temporalfilter.cpp | 2 +-
>  source/encoder/ratecontrol.cpp   | 2 --
>  3 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/source/common/param.cpp b/source/common/param.cpp
> index eeda40e..03c3beb 100755
> --- a/source/common/param.cpp
> +++ b/source/common/param.cpp
> @@ -824,7 +824,7 @@ int x265_scenecut_aware_qp_param_parse(x265_param* p,
> const char* name, const ch
>                      p->bwdNonRefQpDelta[i] = p->bwdNonRefQpDelta[i - 1] -
> (0.15 * p->bwdNonRefQpDelta[i - 1]);
>                  }
>              }
> -            else if (36 == sscanf(value,
> "%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf"
> +            else if (36 == sscanf(value,
> "%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf"
>                  , &window1[0], &refQpDelta1[0], &nonRefQpDelta1[0],
> &window1[1], &refQpDelta1[1], &nonRefQpDelta1[1]
>                  , &window1[2], &refQpDelta1[2], &nonRefQpDelta1[2],
> &window1[3], &refQpDelta1[3], &nonRefQpDelta1[3]
>                  , &window1[4], &refQpDelta1[4], &nonRefQpDelta1[4],
> &window1[5], &refQpDelta1[5], &nonRefQpDelta1[5]
> diff --git a/source/common/temporalfilter.cpp
> b/source/common/temporalfilter.cpp
> index 01a6ddf..215feaa 100644
> --- a/source/common/temporalfilter.cpp
> +++ b/source/common/temporalfilter.cpp
> @@ -336,7 +336,7 @@ int TemporalFilter::motionErrorLumaSSD(
>          /* copy PU block into cache */
>          primitives.pu[partEnum].copy_pp(predPUYuv.m_buf[0], FENC_STRIDE,
> bufferRowStart, buffStride);
>
> -        error = primitives.cu[partEnum].sse_pp(m_metld->me.fencPUYuv.m_buf[0],
> FENC_STRIDE, predPUYuv.m_buf[0], FENC_STRIDE);
> +        error = (int)primitives.cu[partEnum].sse_pp(m_metld->me.fencPUYuv.m_buf[0],
> FENC_STRIDE, predPUYuv.m_buf[0], FENC_STRIDE);
>
>  #endif
>          if (error > besterror)
> diff --git a/source/encoder/ratecontrol.cpp
> b/source/encoder/ratecontrol.cpp
> index 17d8c1e..b645676 100644
> --- a/source/encoder/ratecontrol.cpp
> +++ b/source/encoder/ratecontrol.cpp
> @@ -3347,7 +3347,6 @@ double RateControl::forwardMasking(Frame* curFrame,
> double q)
>      uint32_t maxWindowSize = uint32_t((m_param->fwdMaxScenecutWindow /
> 1000.0) * (m_param->fpsNum / m_param->fpsDenom) + 0.5);
>      uint32_t windowSize[6], prevWindow = 0;
>      int lastScenecut = m_top->m_rateControl->m_lastScenecut;
> -    int lastIFrame = m_top->m_rateControl->m_lastScenecutAwareIFrame;
>
>      double fwdRefQpDelta[6], fwdNonRefQpDelta[6], sliceTypeDelta[6];
>      for (int i = 0; i < 6; i++)
> @@ -3424,7 +3423,6 @@ double RateControl::forwardMasking(Frame* curFrame,
> double q)
>  double RateControl::backwardMasking(Frame* curFrame, double q)
>  {
>      double qp = x265_qScale2qp(q);
> -    uint32_t maxWindowSize = uint32_t((m_param->bwdMaxScenecutWindow /
> 1000.0) * (m_param->fpsNum / m_param->fpsDenom) + 0.5);
>      uint32_t windowSize[6], prevWindow = 0;
>      int lastScenecut = m_top->m_rateControl->m_lastScenecut;
>
> --
> 2.10.2.windows.1
>
> *Thanks,*
> *Kirithika*
>
>
> On Tue, Dec 20, 2022 at 3:27 PM Kirithika Kalirathnam <
> kirithika at multicorewareinc.com> wrote:
>
>> From 44dcf54c016cc45f7f0da3c6ff30f2ee57373335 Mon Sep 17 00:00:00 2001
>> From: Kirithika <kirithika at multicorewareinc.com>
>> Date: Tue, 20 Dec 2022 11:29:27 +0530
>> Subject: [PATCH] Cleanup unused variables and fix build warnings
>>
>> ---
>>  source/common/param.cpp        | 2 +-
>>  source/encoder/ratecontrol.cpp | 2 --
>>  2 files changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/source/common/param.cpp b/source/common/param.cpp
>> index eeda40eb5..03c3beb70 100755
>> --- a/source/common/param.cpp
>> +++ b/source/common/param.cpp
>> @@ -824,7 +824,7 @@ int x265_scenecut_aware_qp_param_parse(x265_param* p,
>> const char* name, const ch
>>                      p->bwdNonRefQpDelta[i] = p->bwdNonRefQpDelta[i - 1]
>> - (0.15 * p->bwdNonRefQpDelta[i - 1]);
>>                  }
>>              }
>> -            else if (36 == sscanf(value,
>> "%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf"
>> +            else if (36 == sscanf(value,
>> "%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf,%d,%lf,%lf"
>>                  , &window1[0], &refQpDelta1[0], &nonRefQpDelta1[0],
>> &window1[1], &refQpDelta1[1], &nonRefQpDelta1[1]
>>                  , &window1[2], &refQpDelta1[2], &nonRefQpDelta1[2],
>> &window1[3], &refQpDelta1[3], &nonRefQpDelta1[3]
>>                  , &window1[4], &refQpDelta1[4], &nonRefQpDelta1[4],
>> &window1[5], &refQpDelta1[5], &nonRefQpDelta1[5]
>> diff --git a/source/encoder/ratecontrol.cpp
>> b/source/encoder/ratecontrol.cpp
>> index 17d8c1e0d..b645676c8 100644
>> --- a/source/encoder/ratecontrol.cpp
>> +++ b/source/encoder/ratecontrol.cpp
>> @@ -3347,7 +3347,6 @@ double RateControl::forwardMasking(Frame* curFrame,
>> double q)
>>      uint32_t maxWindowSize = uint32_t((m_param->fwdMaxScenecutWindow /
>> 1000.0) * (m_param->fpsNum / m_param->fpsDenom) + 0.5);
>>      uint32_t windowSize[6], prevWindow = 0;
>>      int lastScenecut = m_top->m_rateControl->m_lastScenecut;
>> -    int lastIFrame = m_top->m_rateControl->m_lastScenecutAwareIFrame;
>>
>>      double fwdRefQpDelta[6], fwdNonRefQpDelta[6], sliceTypeDelta[6];
>>      for (int i = 0; i < 6; i++)
>> @@ -3424,7 +3423,6 @@ double RateControl::forwardMasking(Frame* curFrame,
>> double q)
>>  double RateControl::backwardMasking(Frame* curFrame, double q)
>>  {
>>      double qp = x265_qScale2qp(q);
>> -    uint32_t maxWindowSize = uint32_t((m_param->bwdMaxScenecutWindow /
>> 1000.0) * (m_param->fpsNum / m_param->fpsDenom) + 0.5);
>>      uint32_t windowSize[6], prevWindow = 0;
>>      int lastScenecut = m_top->m_rateControl->m_lastScenecut;
>>
>> --
>> 2.28.0.windows.1
>>
>> *Thanks,*
>> *Kirithika*
>>
> _______________________________________________
> 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/20221229/dc967270/attachment.htm>


More information about the x265-devel mailing list