The actual float and double data types are defined in C89 and are usable as such without any extra typedefs. Removing the extra typedefs simplifies the compatibility typedef headers, simplifies portability and makes the code base easier to work with for people new to the library.
Showing the changes to codec/processing/src/downsample (1 of 4 files). Show all
Unified · Split
| @@ -73,8 +73,8 @@ void GeneralBilinearFastDownsampler_c (uint8_t* pDst, const int32_t kiDstStride, · 72 unmodified lines | ||
| 73 | 73 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { |
| 74 | 74 | const uint32_t kuiScaleBitWidth = 16, kuiScaleBitHeight = 15; |
| 75 | 75 | const uint32_t kuiScaleWidth = (1 << kuiScaleBitWidth), kuiScaleHeight = (1 << kuiScaleBitHeight); |
| 76 | − int32_t fScalex = (int32_t) ((float_t)kiSrcWidth / (float_t)kiDstWidth * kuiScaleWidth); | |
| 77 | − int32_t fScaley = (int32_t) ((float_t)kiSrcHeight / (float_t)kiDstHeight * kuiScaleHeight); | |
| 76 | + int32_t fScalex = (int32_t) ((float)kiSrcWidth / (float)kiDstWidth * kuiScaleWidth); | |
| 77 | + int32_t fScaley = (int32_t) ((float)kiSrcHeight / (float)kiDstHeight * kuiScaleHeight); | |
| 78 | 78 | uint32_t x; |
| 79 | 79 | int32_t iYInverse, iXInverse; |
| 80 | 80 | |
| @@ -142,8 +142,8 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr · 61 unmodified lines | ||
| 142 | 142 | uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) { |
| 143 | 143 | const int32_t kiScaleBit = 15; |
| 144 | 144 | const int32_t kiScale = (1 << kiScaleBit); |
| 145 | − int32_t iScalex = (int32_t) ((float_t)kiSrcWidth / (float_t)kiDstWidth * kiScale); | |
| 146 | − int32_t iScaley = (int32_t) ((float_t)kiSrcHeight / (float_t)kiDstHeight * kiScale); | |
| 145 | + int32_t iScalex = (int32_t) ((float)kiSrcWidth / (float)kiDstWidth * kiScale); | |
| 146 | + int32_t iScaley = (int32_t) ((float)kiSrcHeight / (float)kiDstHeight * kiScale); | |
| 147 | 147 | int64_t x; |
| 148 | 148 | int32_t iYInverse, iXInverse; |
| 149 | 149 | |
| @@ -208,8 +208,8 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr · 58 unmodified lines | ||
| 208 | 208 | // const int32_t kiScaleBitWidth = 16, kiScaleBitHeight = 15; |
| 209 | 209 | // const uint32_t kuiScaleWidth = (1 << kiScaleBitWidth), kuiScaleHeight = (1 << kiScaleBitHeight); |
| 210 | 210 | // |
| 211 | −// uint32_t uiScalex = (uint32_t) ((float_t)kiSrcWidth / (float_t)kiDstWidth * kuiScaleWidth); | |
| 212 | −// uint32_t uiScaley = (uint32_t) ((float_t)kiSrcHeight / (float_t)kiDstHeight * kuiScaleHeight); | |
| 211 | +// uint32_t uiScalex = (uint32_t) ((float)kiSrcWidth / (float)kiDstWidth * kuiScaleWidth); | |
| 212 | +// uint32_t uiScaley = (uint32_t) ((float)kiSrcHeight / (float)kiDstHeight * kuiScaleHeight); | |
| 213 | 213 | // |
| 214 | 214 | // GeneralBilinearFastDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, |
| 215 | 215 | // pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); |
| @@ -221,8 +221,8 @@ void GeneralBilinearAccurateDownsampler_c (uint8_t* pDst, const int32_t kiDstStr · 5 unmodified lines | ||
| 221 | 221 | // const int32_t kiScaleBit = 15; |
| 222 | 222 | // const uint32_t kuiScale = (1 << kiScaleBit); |
| 223 | 223 | // |
| 224 | −// uint32_t uiScalex = (uint32_t) ((float_t)kiSrcWidth / (float_t)kiDstWidth * kuiScale); | |
| 225 | −// uint32_t uiScaley = (uint32_t) ((float_t)kiSrcHeight / (float_t)kiDstHeight * kuiScale); | |
| 224 | +// uint32_t uiScalex = (uint32_t) ((float)kiSrcWidth / (float)kiDstWidth * kuiScale); | |
| 225 | +// uint32_t uiScaley = (uint32_t) ((float)kiSrcHeight / (float)kiDstHeight * kuiScale); | |
| 226 | 226 | // |
| 227 | 227 | // GeneralBilinearAccurateDownsampler_sse2 (pDst, kiDstStride, kiDstWidth, kiDstHeight, |
| 228 | 228 | // pSrc, kiSrcStride, kiSrcWidth, kiSrcHeight, uiScalex, uiScaley); |