[x265] [PATCH] fix build error on VS2008 ( ambiguous on pow() )

Pradeep Ramachandran pradeep at multicorewareinc.com
Wed Jun 28 20:23:18 CEST 2017


On Wed, Jun 28, 2017 at 10:25 PM, chen <chenm003 at 163.com> wrote:

> From 360c25c6198e7aaa3a9f0ad611d99f94a1ea6347 Mon Sep 17 00:00:00 2001
> From: Min Chen <chenm003 at 163.com>
> Date: Wed, 28 Jun 2017 11:54:05 -0500
> Subject: [PATCH] fix build error on VS2008 ( ambiguous on pow() )
>

Pushed into default branch.


>
> ---
>  source/encoder/slicetype.cpp |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
> index b013335..d7638a4 100644
> --- a/source/encoder/slicetype.cpp
> +++ b/source/encoder/slicetype.cpp
> @@ -1819,7 +1819,8 @@ void Lookahead::calcMotionAdaptiveQuantFrame(Lowres
> **frames, int p0, int p1, in
>                      MV *mvs = frames[b]->lowresMvs[list][listDist[list]];
>                      int32_t x = mvs[cuIndex].x;
>                      int32_t y = mvs[cuIndex].y;
> -                    displacement += sqrt(pow(abs(x), 2) + pow(abs(y), 2));
> +                    // NOTE: the dynamic range of abs(x) and abs(y) is
> 15-bits
> +                    displacement += sqrt((double)(abs(x) * abs(x)) +
> (double)(abs(y) * abs(y)));
>                  }
>                  else
>                      displacement += 0.0;
> --
> 1.7.9.msysgit.0
>
>
> _______________________________________________
> 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/20170628/6854051f/attachment.html>


More information about the x265-devel mailing list