[x265] [PATCH 3 of 5] cudata: avoid -ftrapv exception in broadcast multiply
Steve Borho
steve at borho.org
Wed Feb 25 20:42:25 CET 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1424888362 21600
# Wed Feb 25 12:19:22 2015 -0600
# Node ID 463eb1785e7796562af06a294897291cf7fb4538
# Parent 603de2f3d4380127f77462bb5497fd8cf232c332
cudata: avoid -ftrapv exception in broadcast multiply
diff -r 603de2f3d438 -r 463eb1785e77 source/common/cudata.cpp
--- a/source/common/cudata.cpp Wed Feb 25 13:14:51 2015 -0600
+++ b/source/common/cudata.cpp Wed Feb 25 12:19:22 2015 -0600
@@ -38,7 +38,7 @@
void bcast1(uint8_t* dst, uint8_t val) { dst[0] = val; }
void copy4(uint8_t* dst, uint8_t* src) { ((uint32_t*)dst)[0] = ((uint32_t*)src)[0]; }
-void bcast4(uint8_t* dst, uint8_t val) { ((uint32_t*)dst)[0] = 0x01010101 * val; }
+void bcast4(uint8_t* dst, uint8_t val) { ((uint32_t*)dst)[0] = 0x01010101u * val; }
void copy16(uint8_t* dst, uint8_t* src) { ((uint64_t*)dst)[0] = ((uint64_t*)src)[0]; ((uint64_t*)dst)[1] = ((uint64_t*)src)[1]; }
void bcast16(uint8_t* dst, uint8_t val) { uint64_t bval = 0x0101010101010101ULL * val; ((uint64_t*)dst)[0] = bval; ((uint64_t*)dst)[1] = bval; }
More information about the x265-devel
mailing list