Commit daf1158d authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/softfloat: Move av_sf2double() to header

It was not intended to be a static private function
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 54f685a0
...@@ -23,12 +23,6 @@ ...@@ -23,12 +23,6 @@
#include "common.h" #include "common.h"
#include "log.h" #include "log.h"
static av_const double av_sf2double(SoftFloat v) {
v.exp -= ONE_BITS +1;
if(v.exp > 0) return (double)v.mant * (double)(1 << v.exp);
else return (double)v.mant / (double)(1 << (-v.exp));
}
void av_sincos_sf(int a, int *s, int *c) void av_sincos_sf(int a, int *s, int *c)
{ {
int idx, sign; int idx, sign;
......
...@@ -36,6 +36,12 @@ typedef struct SoftFloat{ ...@@ -36,6 +36,12 @@ typedef struct SoftFloat{
int32_t exp; int32_t exp;
}SoftFloat; }SoftFloat;
static inline av_const double av_sf2double(SoftFloat v) {
v.exp -= ONE_BITS +1;
if(v.exp > 0) return (double)v.mant * (double)(1 << v.exp);
else return (double)v.mant / (double)(1 << (-v.exp));
}
static av_const SoftFloat av_normalize_sf(SoftFloat a){ static av_const SoftFloat av_normalize_sf(SoftFloat a){
if(a.mant){ if(a.mant){
#if 1 #if 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment