Revision 764ef400 libavcodec/adpcm.c

View differences:

libavcodec/adpcm.c
107 107

  
108 108
/* XXX: implement encoding */
109 109

  
110
#ifdef CONFIG_ENCODERS
110 111
static int adpcm_encode_init(AVCodecContext *avctx)
111 112
{
112 113
    if (avctx->channels > 2)
......
265 266
    }
266 267
    return dst - frame;
267 268
}
269
#endif //CONFIG_ENCODERS
268 270

  
269 271
static int adpcm_decode_init(AVCodecContext * avctx)
270 272
{
......
685 687
    return src - buf;
686 688
}
687 689

  
688
#define ADPCM_CODEC(id, name)                   \
690

  
691

  
692
#ifdef CONFIG_ENCODERS
693
#define ADPCM_ENCODER(id,name)                  \
689 694
AVCodec name ## _encoder = {                    \
690 695
    #name,                                      \
691 696
    CODEC_TYPE_AUDIO,                           \
......
695 700
    adpcm_encode_frame,                         \
696 701
    adpcm_encode_close,                         \
697 702
    NULL,                                       \
698
};                                              \
703
};
704
#else
705
#define ADPCM_ENCODER(id,name)
706
#endif
707

  
708
#ifdef CONFIG_DECODERS
709
#define ADPCM_DECODER(id,name)                  \
699 710
AVCodec name ## _decoder = {                    \
700 711
    #name,                                      \
701 712
    CODEC_TYPE_AUDIO,                           \
......
706 717
    NULL,                                       \
707 718
    adpcm_decode_frame,                         \
708 719
};
720
#else
721
#define ADPCM_DECODER(id,name)
722
#endif
723

  
724
#define ADPCM_CODEC(id, name)                   \
725
ADPCM_ENCODER(id,name) ADPCM_DECODER(id,name)
709 726

  
710 727
ADPCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
711 728
ADPCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);

Also available in: Unified diff