[x265] [PATCH] Fix Windows 32bit build errors

Shushuang Yan shushang at multicorewareinc.com
Tue May 28 08:34:25 CEST 2019


# HG changeset patch
# User Shushuang <shushang at multicorewareinc.com>
# Date 1559023314 -28800
#      Tue May 28 14:01:54 2019 +0800
# Node ID a46ded2c14116af1cafacdc1fb98be43259dc7d6
# Parent  4583000db964b8b942c55f532216a3696fcf69ea
Fix Windows 32bit build errors

diff -r 4583000db964 -r a46ded2c1411 source/x265.cpp
--- a/source/x265.cpp Mon May 27 11:48:25 2019 +0530
+++ b/source/x265.cpp Tue May 28 14:01:54 2019 +0800
@@ -1017,8 +1017,9 @@
                     picField1.height = picField2.height = pic_in->height
>> 1;
                     picField1.framesize = picField2.framesize =
pic_in->framesize >> 1;

-                    char* field1Buf = X265_MALLOC( char, pic_in->framesize
>> 1 );
-                    char* field2Buf = X265_MALLOC( char, pic_in->framesize
>> 1 );
+                    size_t fieldFrameSize = (size_t)pic_in->framesize >> 1;
+                    char* field1Buf = X265_MALLOC(char, fieldFrameSize);
+                    char* field2Buf = X265_MALLOC(char, fieldFrameSize);

                     int stride = picField1.stride[0] = picField2.stride[0]
= pic_in->stride[0];
                     uint64_t framesize = stride * (height >>
x265_cli_csps[pic_in->colorSpace].height[0]);

-- 
Thanks,
Shushuang Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190528/b69bff52/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12517.patch
Type: application/octet-stream
Size: 1221 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190528/b69bff52/attachment.obj>


More information about the x265-devel mailing list