Changes proposed by Mathieu Malaterre from the GDCM project... Thanks a lot Mathieu
- '//' replaced by '/* */' - inclusion of int.h in int.c - inclusion of j2k.h in int.h in order to export symbols - adding (void) var when a variable is declared but not used - some explicit cast - CLOCKS_PER_SEC is declared as float in bcc55, so there is a need to cast it to int for the modulo operation - some variables changed from float -> double
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "fix.h"
|
||||
#include <math.h> //Add Antonin : multbug1
|
||||
#include <math.h> /*Add Antonin : multbug1*/
|
||||
|
||||
#ifdef WIN32
|
||||
#define int64 __int64
|
||||
@@ -37,13 +37,13 @@
|
||||
* Multiply two fixed-precision rational numbers.
|
||||
*/
|
||||
|
||||
//int fix_mul(int a, int b)
|
||||
//{
|
||||
// return (int) ((int64) a * (int64) b >> 13);
|
||||
//}
|
||||
/*int fix_mul(int a, int b)
|
||||
{
|
||||
return (int) ((int64) a * (int64) b >> 13);
|
||||
}*/
|
||||
|
||||
|
||||
//Mod Antonin : multbug1
|
||||
/*Mod Antonin : multbug1*/
|
||||
/*
|
||||
int fix_mul(int a, int b)
|
||||
{
|
||||
@@ -53,9 +53,9 @@ int fix_mul(int a, int b)
|
||||
return (int) v;
|
||||
}
|
||||
*/
|
||||
//doM
|
||||
/*doM*/
|
||||
|
||||
int fix_mul(int a, int b) // Luke Lee optimized : 11/16/2004
|
||||
int fix_mul(int a, int b) /* Luke Lee optimized : 11/16/2004*/
|
||||
{
|
||||
int64 temp = (int64) a * (int64) b >> 12;
|
||||
return (int) ((temp >> 1) + (temp & 1)) ;
|
||||
|
||||
Reference in New Issue
Block a user