projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9df9b81
)
Stop the approximation in bessel() once it does no longer improve.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 6 Jan 2010 22:40:52 +0000
(22:40 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 6 Jan 2010 22:40:52 +0000
(22:40 +0000)
This is faster.
Originally committed as revision 21038 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/resample2.c
patch
|
blob
|
history
diff --git
a/libavcodec/resample2.c
b/libavcodec/resample2.c
index
31d2be7
..
5276983
100644
(file)
--- a/
libavcodec/resample2.c
+++ b/
libavcodec/resample2.c
@@
-76,11
+76,13
@@
typedef struct AVResampleContext{
*/
static double bessel(double x){
double v=1;
+ double lastv=0;
double t=1;
int i;
x= x*x/4;
- for(i=1; i<50; i++){
+ for(i=1; v != lastv; i++){
+ lastv=v;
t *= x/(i*i);
v += t;
}