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
60void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);60void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
61void WelsLogNil (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);61void WelsLogNil (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, va_list argv);
62 62
63real32_t WelsCalcPsnr (const void* kpTarPic,63float WelsCalcPsnr (const void* kpTarPic,
64 const int32_t kiTarStride,64 const int32_t kiTarStride,
65 const void* kpRefPic,65 const void* kpRefPic,
66 const int32_t kiRefStride,66 const int32_t kiRefStride,
67 const int32_t kiWidth,67 const int32_t kiWidth,
68 const int32_t kiHeight);68 const int32_t kiHeight);
69 69
70// to fill default routines70// to fill default routines
71#ifdef ENABLE_TRACE_FILE71#ifdef ENABLE_TRACE_FILE
@@ -343,7 +343,7 @@ void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...) { · 271 unmodified lines
343 343
344#ifndef CALC_PSNR344#ifndef CALC_PSNR
345#define CONST_FACTOR_PSNR (10.0 / log(10.0)) // for good computation345#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 )))
347#endif//CALC_PSNR347#endif//CALC_PSNR
348 348
349/*349/*
@@ -365,12 +365,12 @@ void WelsLog (void* pCtx, int32_t iLevel, const str_t* kpFmt, ...) { · 15 unmodified lines
365 * \note N/A365 * \note N/A
366 *************************************************************************************366 *************************************************************************************
367 */367 */
368real32_t WelsCalcPsnr (const void* kpTarPic,368float WelsCalcPsnr (const void* kpTarPic,
369 const int32_t kiTarStride,369 const int32_t kiTarStride,
370 const void* kpRefPic,370 const void* kpRefPic,
371 const int32_t kiRefStride,371 const int32_t kiRefStride,
372 const int32_t kiWidth,372 const int32_t kiWidth,
373 const int32_t kiHeight) {373 const int32_t kiHeight) {
374 int64_t iSqe = 0;374 int64_t iSqe = 0;
375 int32_t x, y;375 int32_t x, y;
376 uint8_t* pTar = (uint8_t*)kpTarPic;376 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