diff sonic.c @ 7782:6efb15a24e91 libavcodec

Replace generic CONFIG_ENCODERS preprocessor conditionals by more specific CONFIG_FOO_ENCODER conditionals where appropriate.
author diego
date Wed, 03 Sep 2008 12:33:21 +0000
parents dbcdd0165e55
children 7a463923ecd1
line wrap: on
line diff
--- a/sonic.c	Wed Sep 03 04:45:01 2008 +0000
+++ b/sonic.c	Wed Sep 03 12:33:21 2008 +0000
@@ -408,7 +408,7 @@
     return x;
 }
 
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
 // Heavily modified Levinson-Durbin algorithm which
 // copes better with quantization, and calculates the
 // actual whitened result as it goes.
@@ -479,13 +479,12 @@
 
     av_free(state);
 }
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
 
 static const int samplerate_table[] =
     { 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
 
-#ifdef CONFIG_ENCODERS
-
+#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
 static inline int code_samplerate(int samplerate)
 {
     switch (samplerate)
@@ -748,7 +747,7 @@
     flush_put_bits(&pb);
     return (put_bits_count(&pb)+7)/8;
 }
-#endif //CONFIG_ENCODERS
+#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
 
 #ifdef CONFIG_SONIC_DECODER
 static av_cold int sonic_decode_init(AVCodecContext *avctx)
@@ -937,7 +936,7 @@
 }
 #endif /* CONFIG_SONIC_DECODER */
 
-#ifdef CONFIG_ENCODERS
+#ifdef CONFIG_SONIC_ENCODER
 AVCodec sonic_encoder = {
     "sonic",
     CODEC_TYPE_AUDIO,
@@ -949,7 +948,9 @@
     NULL,
     .long_name = NULL_IF_CONFIG_SMALL("Sonic"),
 };
+#endif
 
+#ifdef CONFIG_SONIC_LS_ENCODER
 AVCodec sonic_ls_encoder = {
     "sonicls",
     CODEC_TYPE_AUDIO,