[FFmpeg-cvslog] avutil/softfloat_ieee754: make all functions inline
James Almer
git at videolan.org
Sat Nov 5 22:54:59 EET 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Sep 15 23:05:29 2016 -0300| [9ea69f48089254c4c5bda1851d6e297c68ec46fe] | committer: James Almer
avutil/softfloat_ieee754: make all functions inline
Removes "defined but not used" warnings
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ea69f48089254c4c5bda1851d6e297c68ec46fe
---
libavutil/softfloat_ieee754.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/libavutil/softfloat_ieee754.h b/libavutil/softfloat_ieee754.h
index f82397b..b8957fb 100644
--- a/libavutil/softfloat_ieee754.h
+++ b/libavutil/softfloat_ieee754.h
@@ -38,7 +38,7 @@ static const SoftFloat_IEEE754 FLOAT_1 = {0, 0, 0};
/** Normalize the softfloat as defined by IEEE 754 single-recision floating
* point specification
*/
-static SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) {
+static inline SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) {
while( sf.mant >= 0x1000000UL ) {
sf.exp++;
sf.mant >>= 1;
@@ -50,7 +50,7 @@ static SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) {
/** Convert integer to softfloat.
* @return softfloat with value n * 2^e
*/
-static SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) {
+static inline SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) {
int sign = 0;
if (n < 0) {
@@ -63,13 +63,13 @@ static SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) {
/** Make a softfloat out of the bitstream. Assumes the bits are in the form as defined
* by the IEEE 754 spec.
*/
-static SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) {
+static inline SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) {
return ((SoftFloat_IEEE754) { (n & 0x80000000UL), (n & 0x7FFFFFUL), (n & 0x7F800000UL) });
}
/** Convert the softfloat to integer
*/
-static int av_sf2int_ieee754(SoftFloat_IEEE754 a) {
+static inline int av_sf2int_ieee754(SoftFloat_IEEE754 a) {
if(a.exp >= 0) return a.mant << a.exp ;
else return a.mant >>(-a.exp);
}
@@ -77,7 +77,7 @@ static int av_sf2int_ieee754(SoftFloat_IEEE754 a) {
/** Divide a by b. b should not be zero.
* @return normalized result
*/
-static SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
+static inline SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
int32_t mant, exp, sign;
a = av_normalize_sf_ieee754(a);
b = av_normalize_sf_ieee754(b);
@@ -90,7 +90,7 @@ static SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE75
/** Multiply a with b
* #return normalized result
*/
-static SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
+static inline SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
int32_t sign, mant, exp;
a = av_normalize_sf_ieee754(a);
b = av_normalize_sf_ieee754(b);
@@ -103,7 +103,7 @@ static SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE75
/** Compare a with b strictly
* @returns 1 if the a and b are equal, 0 otherwise.
*/
-static int av_cmp_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
+static inline int av_cmp_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
a = av_normalize_sf_ieee754(a);
b = av_normalize_sf_ieee754(b);
if (a.sign != b.sign) return 0;
More information about the ffmpeg-cvslog
mailing list