History

Remove the real32_t typedef

The float type is defined in standards and is portably available on all supported compilers and platforms.

Martin Storsjö committed 12 years ago

Commit e66ad9a1 parent d36b10f7 files · +33 −32Browse files

Showing the changes to codec/encoder/core/src/utils.cpp (1 of 7 files). Show all

Unified · Split

codec/encoder/core/src/utils.cpp+13−13
@@ -60,12 +60,12 @@ namespace WelsSVCEnc { · 59 unmodified lines
6060 void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
6161 void WelsLogNil (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
6262
63−real32_t WelsCalcPsnr (const void* kpTarPic,
64− const int32_t kiTarStride,
65− const void* kpRefPic,
66− const int32_t kiRefStride,
67− const int32_t kiWidth,
68− const int32_t kiHeight);
63+float WelsCalcPsnr (const void* kpTarPic,
64+ const int32_t kiTarStride,
65+ const void* kpRefPic,
66+ const int32_t kiRefStride,
67+ const int32_t kiWidth,
68+ const int32_t kiHeight);
6969
7070 // to fill default routines
7171 #ifdef ENABLE_TRACE_FILE
@@ -343,7 +343,7 @@ void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...) { · 271 unmodified lines
343343
344344 #ifndef CALC_PSNR
345345 #define CONST_FACTOR_PSNR (10.0 / log(10.0)) // for good computation
346−#define CALC_PSNR(w, h, s) ((real32_t)(CONST_FACTOR_PSNR * log( 65025.0 * w * h / iSqe )))
346+#define CALC_PSNR(w, h, s) ((float)(CONST_FACTOR_PSNR * log( 65025.0 * w * h / iSqe )))
347347 #endif//CALC_PSNR
348348
349349 /*
@@ -365,12 +365,12 @@ void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...) { · 15 unmodified lines
365365 * \note N/A
366366 *************************************************************************************
367367 */
368−real32_t WelsCalcPsnr (const void* kpTarPic,
369− const int32_t kiTarStride,
370− const void* kpRefPic,
371− const int32_t kiRefStride,
372− const int32_t kiWidth,
373− const int32_t kiHeight) {
368+float WelsCalcPsnr (const void* kpTarPic,
369+ const int32_t kiTarStride,
370+ const void* kpRefPic,
371+ const int32_t kiRefStride,
372+ const int32_t kiWidth,
373+ const int32_t kiHeight) {
374374 int64_t iSqe = 0;
375375 int32_t x, y;
376376 uint8_t* pTar = (uint8_t*)kpTarPic;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t