Function
av_normalize_sf
Source from the content-addressed store, hash-verified
| 55 | } |
| 56 | |
| 57 | static av_const SoftFloat av_normalize_sf(SoftFloat a){ |
| 58 | if(a.mant){ |
| 59 | #if 1 |
| 60 | while((a.mant + 0x1FFFFFFFU)<0x3FFFFFFFU){ |
| 61 | a.mant += a.mant; |
| 62 | a.exp -= 1; |
| 63 | } |
| 64 | #else |
| 65 | int s=ONE_BITS - av_log2(FFABS(a.mant)); |
| 66 | a.exp -= s; |
| 67 | a.mant <<= s; |
| 68 | #endif |
| 69 | if(a.exp < MIN_EXP){ |
| 70 | a.exp = MIN_EXP; |
| 71 | a.mant= 0; |
| 72 | } |
| 73 | }else{ |
| 74 | a.exp= MIN_EXP; |
| 75 | } |
| 76 | return a; |
| 77 | } |
| 78 | |
| 79 | static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){ |
| 80 | #if 1 |