diff mbox

[FFmpeg-devel] avutil/softfloat_ieee754: make all functions inline

Message ID 20160916020847.6760-1-jamrial@gmail.com
State Accepted
Commit 9ea69f48089254c4c5bda1851d6e297c68ec46fe
Headers show

Commit Message

James Almer Sept. 16, 2016, 2:08 a.m. UTC
Removes "defined but not used" warnings

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavutil/softfloat_ieee754.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Michael Niedermayer Sept. 16, 2016, 9:44 a.m. UTC | #1
On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
> Removes "defined but not used" warnings
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavutil/softfloat_ieee754.h | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

iam not the author/maintainer, but patch looks ok to me

thx

[...]
Thilo Borgmann Sept. 17, 2016, 10:23 a.m. UTC | #2
Am 16.09.16 um 11:44 schrieb Michael Niedermayer:
> On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
>> Removes "defined but not used" warnings
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  libavutil/softfloat_ieee754.h | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> iam not the author/maintainer, but patch looks ok to me

Most likely there is a reason but is there not the av_always_inline macro?

-Thilo
Michael Niedermayer Nov. 5, 2016, 8:50 p.m. UTC | #3
On Fri, Sep 16, 2016 at 11:44:48AM +0200, Michael Niedermayer wrote:
> On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
> > Removes "defined but not used" warnings
> > 
> > Signed-off-by: James Almer <jamrial@gmail.com>
> > ---
> >  libavutil/softfloat_ieee754.h | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> iam not the author/maintainer, but patch looks ok to me

ping

[...]
James Almer Nov. 5, 2016, 8:55 p.m. UTC | #4
On 11/5/2016 5:50 PM, Michael Niedermayer wrote:
> On Fri, Sep 16, 2016 at 11:44:48AM +0200, Michael Niedermayer wrote:
>> On Thu, Sep 15, 2016 at 11:08:47PM -0300, James Almer wrote:
>>> Removes "defined but not used" warnings
>>>
>>> Signed-off-by: James Almer <jamrial@gmail.com>
>>> ---
>>>  libavutil/softfloat_ieee754.h | 14 +++++++-------
>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> iam not the author/maintainer, but patch looks ok to me
> 
> ping

Sorry, completely forgot about this.

Pushed, thanks.
diff mbox

Patch

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;