Mercurial > libavcodec.hg
comparison mpegaudiodec.c @ 11722:5aa83c5fb2c9 libavcodec
Cast constants to float to avoid gcc converting to and from
float<->double in every operation.
author | michael |
---|---|
date | Thu, 13 May 2010 17:58:17 +0000 |
parents | fcb1d0addf28 |
children | 87851e2b449a |
comparison
equal
deleted
inserted
replaced
11721:969a7d792b79 | 11722:5aa83c5fb2c9 |
---|---|
41 | 41 |
42 #if CONFIG_FLOAT | 42 #if CONFIG_FLOAT |
43 # define SHR(a,b) ((a)*(1.0/(1<<(b)))) | 43 # define SHR(a,b) ((a)*(1.0/(1<<(b)))) |
44 # define compute_antialias compute_antialias_float | 44 # define compute_antialias compute_antialias_float |
45 # define FIXR_OLD(a) ((int)((a) * FRAC_ONE + 0.5)) | 45 # define FIXR_OLD(a) ((int)((a) * FRAC_ONE + 0.5)) |
46 # define FIXR(x) (x) | 46 # define FIXR(x) ((float)(x)) |
47 # define FIXHR(x) (x) | 47 # define FIXHR(x) ((float)(x)) |
48 # define MULH3(x, y, s) ((s)*(y)*(x)) | 48 # define MULH3(x, y, s) ((s)*(y)*(x)) |
49 # define MULLx(x, y, s) ((y)*(x)) | 49 # define MULLx(x, y, s) ((y)*(x)) |
50 # define RENAME(a) a ## _float | 50 # define RENAME(a) a ## _float |
51 #else | 51 #else |
52 # define SHR(a,b) ((a)>>(b)) | 52 # define SHR(a,b) ((a)>>(b)) |