summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2009-06-15 04:05:38 +0000
committerariff <ariff@FreeBSD.org>2009-06-15 04:05:38 +0000
commit548135de8c5758a1ed1974d90650e40b03cd5b87 (patch)
tree2be3d7fb1b3eed0e74b8a7feceab7bab6a0a57ae
parentd573bd048d1afbc9827d0675e99125818da1fcd5 (diff)
downloadFreeBSD-src-548135de8c5758a1ed1974d90650e40b03cd5b87.zip
FreeBSD-src-548135de8c5758a1ed1974d90650e40b03cd5b87.tar.gz
Remap type of polynomial interpolators for better polyphase
coefficients quality: - Linear interpolator for oversampling factor larger and equal than 4096 (log2 = 12). - Quadratic interpolator for oversampling factor larger and equal than 256 (log2 = 8). Default oversampling factor (128 ~ log2 = 7) will use OPT32X, which provides better accuracy.
-rw-r--r--sys/dev/sound/pcm/feeder_rate.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
index 73a780a..eeb8e92 100644
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -789,13 +789,11 @@ z_resampler_sinc_len(struct z_info *info)
defined(Z_COEFF_INTER_BSPLINE) || defined(Z_COEFF_INTERP_OPT32X) || \
defined(Z_COEFF_INTERP_OPT16X) || defined(Z_COEFF_INTERP_OPT8X) || \
defined(Z_COEFF_INTERP_OPT4X) || defined(Z_COEFF_INTERP_OPT2X))
-#if Z_DRIFT_SHIFT >= 8
+#if Z_DRIFT_SHIFT >= 12
#define Z_COEFF_INTERP_LINEAR 1
-#elif Z_DRIFT_SHIFT == 7
+#elif Z_DRIFT_SHIFT >= 8
#define Z_COEFF_INTERP_QUADRATIC 1
-#elif Z_DRIFT_SHIFT == 6
-#define Z_COEFF_INTERP_HERMITE 1
-#elif Z_DRIFT_SHIFT == 5
+#elif Z_DRIFT_SHIFT >= 5
#define Z_COEFF_INTERP_OPT32X 1
#elif Z_DRIFT_SHIFT == 4
#define Z_COEFF_INTERP_OPT16X 1
OpenPOWER on IntegriCloud