[x265] [PATCH] fix ambiguous call to overloaded function 'sqrt' (in old MSVC)

Ashok Kumar Mishra ashok at multicorewareinc.com
Fri Dec 1 16:18:10 CET 2017


Thanks. Pushed

On Thu, Nov 30, 2017 at 10:49 PM, Ma0 <mateuszb at poczta.onet.pl> wrote:

> # HG changeset patch
> # User Ma0 <mateuszb at poczta.onet.pl>
> # Date 1512062200 -3600
> #      Thu Nov 30 18:16:40 2017 +0100
> # Node ID 5e5fbf5ce96f0361f51f122ab43f3c6369a79ad2
> # Parent  b1dfa312234ed72c3541831a15f307feaf79484d
> fix ambiguous call to overloaded function 'sqrt' (in old MSVC)
>
> diff -r b1dfa312234e -r 5e5fbf5ce96f source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp        Thu Nov 30 10:06:49 2017 +0530
> +++ b/source/encoder/encoder.cpp        Thu Nov 30 18:16:40 2017 +0100
> @@ -575,7 +575,7 @@
>                              {
>                                  int mv_x = ((analysis_inter_data
> *)curFrame->m_analysisData.interData)->mv[k][(mbIndex * 16) + cuOffset].x;
>                                  int mv_y = ((analysis_inter_data
> *)curFrame->m_analysisData.interData)->mv[k][(mbIndex * 16) + cuOffset].y;
> -                                double mv = sqrt(mv_x*mv_x + mv_y*mv_y);
> +                                double mv = sqrt((double)(mv_x*mv_x +
> mv_y*mv_y));
>                                  if (numPU == PU_2Nx2N &&
> ((srcInterData)->depth[cuPos + cuOffset] == (m_param->maxCUSize >> 5)) &&
> mv <= MVTHRESHOLD)
>                                      memset(&curFrame->m_analysisData.modeFlag[k][cuPos
> + cuOffset], 1, bytes);
>                              }
> @@ -658,7 +658,7 @@
>                                      {
>                                          int mv_x = ((analysis_inter_data
> *)curFrame->m_analysisData.interData)->mv[i][count + pu].x;
>                                          int mv_y = ((analysis_inter_data
> *)curFrame->m_analysisData.interData)->mv[i][count + pu].y;
> -                                        double mv = sqrt(mv_x*mv_x +
> mv_y*mv_y);
> +                                        double mv =
> sqrt((double)(mv_x*mv_x + mv_y*mv_y));
>                                          if (numPU == PU_2Nx2N &&
> m_param->num4x4Partitions <= 16 && mv <= MVTHRESHOLD)
>                                              memset(&curFrame->m_analysisData.modeFlag[i][count
> + pu], 1, bytes);
>                                      }
> _______________________________________________
> 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/20171201/27ddf81b/attachment.html>


More information about the x265-devel mailing list