On Mon, Jul 27, 2015 at 01:36:42PM +0000, Nedeljko Babic wrote: > >> +/** > >> + * 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) > > Could you please send me configuration which you used here? > > I tried with several configurations and didn't have a problem with sincos on > this test.
sure first apply: (to use the same threshold for cosine as sine diff --git a/libavutil/softfloat.c b/libavutil/softfloat.c index a9d1b0c..597be04 100644 --- a/libavutil/softfloat.c +++ b/libavutil/softfloat.c @@ -104,7 +104,7 @@ int main(void){ av_sincos_sf(i*(1ULL<<32)/36/4, &s, &c); errs = (double)s/ (1<<30) - sin(i*M_PI/36); errc = (double)c/ (1<<30) - cos(i*M_PI/36); - if (fabs(errs) > 0.00000002 || fabs(errc) >0.001) { + if (fabs(errs) > 0.00000002 || fabs(errc) >0.00000002) { printf("sincos FAIL %d %f %f %f %f\n", i, (float)s/ (1<<30), (float)c/ (1<<30), sin(i*M_PI/36), cos(i*M_PI/36)); } ./configure && make -j12 libavutil/softfloat-test && libavutil/softfloat-test [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel