[x265] [x265 Patch] Fix Win VC-11 build errors

Akil akil at multicorewareinc.com
Thu Aug 1 14:15:09 CEST 2019


# HG changeset patch
# User Akil Ayyappan<akil at multicorewareinc.com>
# Date 1563881631 -19800
#      Tue Jul 23 17:03:51 2019 +0530
# Node ID 747a67aa9aa551d611e78e3362bffaf749d2778a
# Parent  459d3822c608948d9c15322b770f7f9b7e2a233e
Fix Win VC-11 build errors

diff -r 459d3822c608 -r 747a67aa9aa5 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Fri Jul 26 10:53:09 2019 +0530
+++ b/source/encoder/slicetype.cpp Tue Jul 23 17:03:51 2019 +0530
@@ -137,16 +137,16 @@
     }

 #if HIGH_BIT_DEPTH //10-bit build
-    float_t threshold = 1023;
+    float threshold = 1023;
     pixel whitePixel = 1023;
 #else
-    float_t threshold = 255;
+    float threshold = 255;
     pixel whitePixel = 255;
 #endif
 #define PI 3.14159265

-    float_t gradientH = 0, gradientV = 0, radians = 0, theta = 0;
-    float_t gradientMagnitude = 0;
+    float gradientH = 0, gradientV = 0, radians = 0, theta = 0;
+    float gradientMagnitude = 0;
     pixel blackPixel = 0;
     edgePic = pic1 + curFrame->m_fencPic->m_lumaMarginY * stride +
curFrame->m_fencPic->m_lumaMarginX;
     //Applying Sobel filter on the gaussian filtered picture
@@ -167,12 +167,12 @@
                 const intptr_t rowThree = (rowNum + 1)*stride, colThree =
colNum + 1;
                 const intptr_t index = (rowNum*stride) + colNum;

-                gradientH = (float_t)(-3 * refPic[rowOne + colOne] + 3 *
refPic[rowOne + colThree] - 10 * refPic[rowTwo + colOne] + 10 *
refPic[rowTwo + colThree] - 3 * refPic[rowThree + colOne] + 3 *
refPic[rowThree + colThree]);
-                gradientV = (float_t)(-3 * refPic[rowOne + colOne] - 10 *
refPic[rowOne + colTwo] - 3 * refPic[rowOne + colThree] + 3 *
refPic[rowThree + colOne] + 10 * refPic[rowThree + colTwo] + 3 *
refPic[rowThree + colThree]);
+                gradientH = (float)(-3 * refPic[rowOne + colOne] + 3 *
refPic[rowOne + colThree] - 10 * refPic[rowTwo + colOne] + 10 *
refPic[rowTwo + colThree] - 3 * refPic[rowThree + colOne] + 3 *
refPic[rowThree + colThree]);
+                gradientV = (float)(-3 * refPic[rowOne + colOne] - 10 *
refPic[rowOne + colTwo] - 3 * refPic[rowOne + colThree] + 3 *
refPic[rowThree + colOne] + 10 * refPic[rowThree + colTwo] + 3 *
refPic[rowThree + colThree]);

                 gradientMagnitude = sqrtf(gradientH * gradientH +
gradientV * gradientV);
                 radians = atan2(gradientV, gradientH);
-                theta = (float_t)((radians * 180) / PI);
+                theta = (float)((radians * 180) / PI);
                 if (theta < 0)
                     theta = 180 + theta;
                 edgeTheta[(rowNum*stride) + colNum] = (pixel)theta;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190801/60d0a9a9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix_Win64_build_error.patch
Type: application/octet-stream
Size: 2646 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190801/60d0a9a9/attachment.obj>


More information about the x265-devel mailing list