Commit 4eb7e81f authored by michael's avatar michael

remove dithering of filter coefficients, improves precision by 1-2 bits and

improves subjective sound quality on artificial sample (udial.wav resampling
to 32khz)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8467 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9ffc5f79
......@@ -93,7 +93,6 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun
for(ph=0;ph<phase_count;ph++) {
double norm = 0;
double e= 0;
for(i=0;i<tap_count;i++) {
x = M_PI * ((double)(i - center) - (double)ph / phase_count) * factor;
if (x == 0) y = 1.0;
......@@ -121,9 +120,8 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun
/* normalize so that an uniform color remains the same */
for(i=0;i<tap_count;i++) {
v = av_clip(lrintf(tab[i] * scale / norm + e), FELEM_MIN, FELEM_MAX);
v = av_clip(lrintf(tab[i] * scale / norm), FELEM_MIN, FELEM_MAX);
filter[ph * tap_count + i] = v;
e += tab[i] * scale / norm - v;
}
}
}
......
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