ref: e138ee5297bb85ad579f879fd5264981428c1e73
parent: 275d7efbc975f16479ac2a3df1977fbb43d2bde1
parent: 78109f36ad607991dadd66b7fcb5c47859e7c814
author: ruil2 <[email protected]>
date: Fri Jun 27 05:04:39 EDT 2014
Merge pull request #1020 from mstorsjo/simplify-64bit-suffix Use the ULL prefix for 64 bit constants on MSVC as well
--- a/codec/encoder/core/src/get_intra_predictor.cpp
+++ b/codec/encoder/core/src/get_intra_predictor.cpp
@@ -438,11 +438,7 @@
do {
const uint8_t kuiLeft = pRef[iStridex7 - 1]; // pLeft value
-#ifdef _MSC_VER
- uint64_t kuiSrc64 = (uint64_t) (0x0101010101010101U * kuiLeft);
-#else
uint64_t kuiSrc64 = (uint64_t) (0x0101010101010101ULL * kuiLeft);
-#endif
ST64 (pPred + iI8x8Stridex7, kuiSrc64);
iStridex7 -= kiStride;
@@ -518,13 +514,8 @@
/*caculate the iMean value*/
const uint8_t kuiTopMean = (pRef[-1] + pRef[kuiL1] + pRef[kuiL2] + pRef[kuiL3] + 2) >> 2 ;
const uint8_t kuiBottomMean = (pRef[kuiL4] + pRef[kuiL5] + pRef[kuiL6] + pRef[kuiL7] + 2) >> 2;
-#ifdef _MSC_VER
- const uint64_t kuiTopMean64 = (uint64_t) (0x0101010101010101U * kuiTopMean);
- const uint64_t kuiBottomMean64 = (uint64_t) (0x0101010101010101U * kuiBottomMean);
-#else
const uint64_t kuiTopMean64 = (uint64_t) (0x0101010101010101ULL * kuiTopMean);
const uint64_t kuiBottomMean64 = (uint64_t) (0x0101010101010101ULL * kuiBottomMean);
-#endif
ST64 (pPred , kuiTopMean64);
ST64 (pPred + 8 , kuiTopMean64);
ST64 (pPred + 16, kuiTopMean64);
@@ -553,11 +544,7 @@
}
void WelsIChormaPredDcNA_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
-#ifdef _MSC_VER
- const uint64_t kuiDcValue64 = (uint64_t)0x8080808080808080U;
-#else
const uint64_t kuiDcValue64 = (uint64_t)0x8080808080808080ULL;
-#endif
ST64 (pPred , kuiDcValue64);
ST64 (pPred + 8 , kuiDcValue64);
ST64 (pPred + 16, kuiDcValue64);
@@ -591,11 +578,7 @@
do {
const uint8_t kuiSrc8 = pRef[iStridex15 - 1];
-#ifdef _MSC_VER
- const uint64_t kuiV64 = (uint64_t) (0x0101010101010101U * kuiSrc8);
-#else
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101ULL * kuiSrc8);
-#endif
ST64 (&pPred[iPredStridex15], kuiV64);
ST64 (&pPred[iPredStridex15 + 8], kuiV64);
--- a/codec/processing/src/common/common.cpp
+++ b/codec/processing/src/common/common.cpp
@@ -57,11 +57,7 @@
do {
const uint8_t kuiSrc8 = pRef[iStridex15 - 1];
-#ifdef _MSC_VER
- const uint64_t kuiV64 = (uint64_t) (0x0101010101010101U * kuiSrc8);
-#else
const uint64_t kuiV64 = (uint64_t) (0x0101010101010101ULL * kuiSrc8);
-#endif
ST64 (&pPred[iPredStridex15], kuiV64);
ST64 (&pPred[iPredStridex15 + 8], kuiV64);