comparison sonic.c @ 3777:20545fbb6f7c libavcodec

add some #ifdef CONFIG_ENCODERS/DECODERS
author mru
date Wed, 27 Sep 2006 19:54:07 +0000
parents 0b546eab515d
children c8c591fe26f8
comparison
equal deleted inserted replaced
3776:1843a85123b7 3777:20545fbb6f7c
404 state[0] = x; 404 state[0] = x;
405 405
406 return x; 406 return x;
407 } 407 }
408 408
409 #ifdef CONFIG_ENCODERS
409 // Heavily modified Levinson-Durbin algorithm which 410 // Heavily modified Levinson-Durbin algorithm which
410 // copes better with quantization, and calculates the 411 // copes better with quantization, and calculates the
411 // actual whitened result as it goes. 412 // actual whitened result as it goes.
412 413
413 static void modified_levinson_durbin(int *window, int window_entries, 414 static void modified_levinson_durbin(int *window, int window_entries,
474 #endif 475 #endif
475 } 476 }
476 477
477 av_free(state); 478 av_free(state);
478 } 479 }
480 #endif /* CONFIG_ENCODERS */
479 481
480 static int samplerate_table[] = 482 static int samplerate_table[] =
481 { 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 }; 483 { 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
482 484
483 #ifdef CONFIG_ENCODERS 485 #ifdef CONFIG_ENCODERS
744 flush_put_bits(&pb); 746 flush_put_bits(&pb);
745 return (put_bits_count(&pb)+7)/8; 747 return (put_bits_count(&pb)+7)/8;
746 } 748 }
747 #endif //CONFIG_ENCODERS 749 #endif //CONFIG_ENCODERS
748 750
751 #ifdef CONFIG_DECODERS
749 static int sonic_decode_init(AVCodecContext *avctx) 752 static int sonic_decode_init(AVCodecContext *avctx)
750 { 753 {
751 SonicContext *s = avctx->priv_data; 754 SonicContext *s = avctx->priv_data;
752 GetBitContext gb; 755 GetBitContext gb;
753 int i, version; 756 int i, version;
934 937
935 *data_size = s->frame_size * 2; 938 *data_size = s->frame_size * 2;
936 939
937 return (get_bits_count(&gb)+7)/8; 940 return (get_bits_count(&gb)+7)/8;
938 } 941 }
942 #endif
939 943
940 #ifdef CONFIG_ENCODERS 944 #ifdef CONFIG_ENCODERS
941 AVCodec sonic_encoder = { 945 AVCodec sonic_encoder = {
942 "sonic", 946 "sonic",
943 CODEC_TYPE_AUDIO, 947 CODEC_TYPE_AUDIO,