aboutsummaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer2015-06-05 12:57:06 +0200
committerMichael Niedermayer2015-06-05 12:57:06 +0200
commit904ea60afacd78ff106422019b0ef5032ff7a195 (patch)
treea117cdec4ad080c4210ccf2c6d8c26b2701ddfe9 /libavutil
parentc7ce16e716a8e160140c16c7cfb326cdcfb31652 (diff)
avutil/softfloat: Add more tests for the normalization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/softfloat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/softfloat.c b/libavutil/softfloat.c
index b6e1f35d4d..37dd758b31 100644
--- a/libavutil/softfloat.c
+++ b/libavutil/softfloat.c
@@ -93,6 +93,16 @@ int main(void){
sf3 = av_add_sf(sf3, sf2);
printf("test3 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf3), sf3.mant, sf3.exp);
+ sf1 = av_int2sf(0xFFFFFFF0, 0);
+ printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
+ sf1 = av_int2sf(0x00000010, 0);
+ printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
+
+ sf1 = av_int2sf(0x1FFFFFFF, 0);
+ printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
+ sf1 = av_int2sf(0xE0000001, 0);
+ printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
+
return 0;
}