[FFmpeg-devel] [PATCH 3/3] libavutil/softfloat: Add functions.
Michael Niedermayer
michael at niedermayer.cc
Sat Jul 25 21:42:36 CEST 2015
On Thu, Apr 30, 2015 at 01:51:37PM +0200, Nedeljko Babic wrote:
> Functions av_gt_sf, av_sqrt_sf and av_sincos_sf added to softfloat
>
> Signed-off-by: Nedeljko Babic <nedeljko.babic at imgtec.com>
> ---
> libavutil/softfloat.h | 93 +++++++++++++++-
> libavutil/softfloat_tables.h | 260 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 352 insertions(+), 1 deletion(-)
> create mode 100644 libavutil/softfloat_tables.h
[...]
> +/**
> + * Rounding-to-nearest used.
> + */
> +static av_always_inline void av_sincos_sf(int a, int *s, int *c)
this function seems to be buggy
the sine values are very accurate but the cosine values are not
look: (tested with libavutil/softfloat-test and tightened up thresholds)
sincos FAIL 8 0.642788 0.766263 0.642788 0.766044
sincos FAIL 14 0.939693 0.342220 0.939693 0.342020
sincos FAIL 15 0.965926 0.259066 0.965926 0.258819
sincos FAIL 16 0.984808 0.173942 0.984808 0.173648
sincos FAIL 17 0.996195 0.087495 0.996195 0.087156
sincos FAIL 24 0.866025 -0.499779 0.866025 -0.500000
sincos FAIL 25 0.819152 -0.573332 0.819152 -0.573576
sincos FAIL 26 0.766044 -0.642526 0.766044 -0.642788
sincos FAIL 44 -0.642788 -0.766263 -0.642788 -0.766044
sincos FAIL 50 -0.939693 -0.342220 -0.939693 -0.342020
sincos FAIL 51 -0.965926 -0.259066 -0.965926 -0.258819
sincos FAIL 52 -0.984808 -0.173942 -0.984808 -0.173648
sincos FAIL 53 -0.996195 -0.087495 -0.996195 -0.087156
sincos FAIL 60 -0.866025 0.499779 -0.866025 0.500000
sincos FAIL 61 -0.819152 0.573332 -0.819152 0.573576
sincos FAIL 62 -0.766044 0.642526 -0.766044 0.642788
sincos FAIL 80 0.642788 0.766263 0.642788 0.766044
sincos FAIL 86 0.939693 0.342220 0.939693 0.342020
sincos FAIL 87 0.965926 0.259066 0.965926 0.258819
sincos FAIL 88 0.984808 0.173942 0.984808 0.173648
sincos FAIL 89 0.996195 0.087495 0.996195 0.087156
sincos FAIL 96 0.866025 -0.499779 0.866025 -0.500000
sincos FAIL 97 0.819152 -0.573332 0.819152 -0.573576
sincos FAIL 98 0.766044 -0.642526 0.766044 -0.642788
sincos FAIL 116 -0.642788 -0.766263 -0.642788 -0.766044
sincos FAIL 122 -0.939693 -0.342220 -0.939693 -0.342020
sincos FAIL 123 -0.965926 -0.259066 -0.965926 -0.258819
sincos FAIL 124 -0.984808 -0.173942 -0.984808 -0.173648
sincos FAIL 125 -0.996195 -0.087495 -0.996195 -0.087156
sincos FAIL 132 -0.866025 0.499779 -0.866025 0.500000
sincos FAIL 133 -0.819152 0.573332 -0.819152 0.573576
sincos FAIL 134 -0.766044 0.642526 -0.766044 0.642788
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150725/79eb7b56/attachment.sig>
More information about the ffmpeg-devel
mailing list