summaryrefslogtreecommitdiff
path: root/libavcodec/sonic.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-09-03 12:33:21 +0000
committerDiego Biurrun <diego@biurrun.de>2008-09-03 12:33:21 +0000
commitf544a5fc84975879746f619e01b6f1e80844e59e (patch)
tree888967928796e772987ca8a3ad5834b7029beb27 /libavcodec/sonic.c
parentbb6c34e55b158c457272046ed9f22b974e832fb5 (diff)
Replace generic CONFIG_ENCODERS preprocessor conditionals by more specific
CONFIG_FOO_ENCODER conditionals where appropriate. Originally committed as revision 15174 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index d8bae3af3d..6e0bdc839b 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -408,7 +408,7 @@ static int predictor_calc_error(int *k, int *state, int order, int error)
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 @@ static void modified_levinson_durbin(int *window, int window_entries,
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 @@ static int sonic_encode_frame(AVCodecContext *avctx,
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 @@ static int sonic_decode_frame(AVCodecContext *avctx,
}
#endif /* CONFIG_SONIC_DECODER */
-#ifdef CONFIG_ENCODERS
+#ifdef CONFIG_SONIC_ENCODER
AVCodec sonic_encoder = {
"sonic",
CODEC_TYPE_AUDIO,
@@ -949,7 +948,9 @@ AVCodec sonic_encoder = {
NULL,
.long_name = NULL_IF_CONFIG_SMALL("Sonic"),
};
+#endif
+#ifdef CONFIG_SONIC_LS_ENCODER
AVCodec sonic_ls_encoder = {
"sonicls",
CODEC_TYPE_AUDIO,