diff options
-rw-r--r-- | common/dct.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/dct.cpp b/common/dct.cpp index dea75f4c45..27e0c0bf41 100644 --- a/common/dct.cpp +++ b/common/dct.cpp @@ -73,7 +73,7 @@ void DCT::calc(float *data) { void DCT::calcDCTI(float *data) { int n = 1 << _bits; - float next = -0.5 * (data[0] - data[n]); + float next = -0.5f * (data[0] - data[n]); for (int i = 0; i < (n / 2); i++) { float tmp1 = data[i ]; @@ -87,7 +87,7 @@ void DCT::calcDCTI(float *data) { next += c; - tmp1 = (tmp1 + tmp2) * 0.5; + tmp1 = (tmp1 + tmp2) * 0.5f; data[i ] = tmp1 - s; data[n - i] = tmp1 + s; @@ -113,7 +113,7 @@ void DCT::calcDCTII(float *data) { s *= tmp1 - tmp2; - tmp1 = (tmp1 + tmp2) * 0.5; + tmp1 = (tmp1 + tmp2) * 0.5f; data[i ] = tmp1 + s; data[n - i - 1] = tmp1 - s; @@ -121,7 +121,7 @@ void DCT::calcDCTII(float *data) { _rdft->calc(data); - float next = data[1] * 0.5; + float next = data[1] * 0.5f; data[1] *= -1; @@ -143,7 +143,7 @@ void DCT::calcDCTIII(float *data) { int n = 1 << _bits; float next = data[n - 1]; - float inv_n = 1.0 / n; + float inv_n = 1.0f / n; for (int i = n - 2; i >= 2; i -= 2) { float val1 = data[i ]; @@ -184,7 +184,7 @@ void DCT::calcDSTI(float *data) { float s = SIN(n, 2 * i); s *= tmp1 + tmp2; - tmp1 = (tmp1 - tmp2) * 0.5; + tmp1 = (tmp1 - tmp2) * 0.5f; data[i ] = s + tmp1; data[n - i] = s - tmp1; @@ -194,7 +194,7 @@ void DCT::calcDSTI(float *data) { _rdft->calc(data); - data[0] *= 0.5; + data[0] *= 0.5f; for (int i = 1; i < (n - 2); i += 2) { data[i + 1] += data[i - 1]; |