Mercurial > libavcodec.hg
comparison g726.c @ 8590:7a463923ecd1 libavcodec
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.
author | aurel |
---|---|
date | Tue, 13 Jan 2009 23:44:16 +0000 |
parents | 6efb15a24e91 |
children | 04423b2f6e0b |
comparison
equal
deleted
inserted
replaced
8589:a29b5b5c3c9d | 8590:7a463923ecd1 |
---|---|
283 c->y = 544; | 283 c->y = 544; |
284 | 284 |
285 return 0; | 285 return 0; |
286 } | 286 } |
287 | 287 |
288 #ifdef CONFIG_ADPCM_G726_ENCODER | 288 #if CONFIG_ADPCM_G726_ENCODER |
289 static int16_t g726_encode(G726Context* c, int16_t sig) | 289 static int16_t g726_encode(G726Context* c, int16_t sig) |
290 { | 290 { |
291 uint8_t i; | 291 uint8_t i; |
292 | 292 |
293 i = quant(c, sig/4 - c->se) & ((1<<c->code_size) - 1); | 293 i = quant(c, sig/4 - c->se) & ((1<<c->code_size) - 1); |
340 { | 340 { |
341 av_freep(&avctx->coded_frame); | 341 av_freep(&avctx->coded_frame); |
342 return 0; | 342 return 0; |
343 } | 343 } |
344 | 344 |
345 #ifdef CONFIG_ADPCM_G726_ENCODER | 345 #if CONFIG_ADPCM_G726_ENCODER |
346 static int g726_encode_frame(AVCodecContext *avctx, | 346 static int g726_encode_frame(AVCodecContext *avctx, |
347 uint8_t *dst, int buf_size, void *data) | 347 uint8_t *dst, int buf_size, void *data) |
348 { | 348 { |
349 G726Context *c = avctx->priv_data; | 349 G726Context *c = avctx->priv_data; |
350 short *samples = data; | 350 short *samples = data; |
379 | 379 |
380 *data_size = (uint8_t*)samples - (uint8_t*)data; | 380 *data_size = (uint8_t*)samples - (uint8_t*)data; |
381 return buf_size; | 381 return buf_size; |
382 } | 382 } |
383 | 383 |
384 #ifdef CONFIG_ADPCM_G726_ENCODER | 384 #if CONFIG_ADPCM_G726_ENCODER |
385 AVCodec adpcm_g726_encoder = { | 385 AVCodec adpcm_g726_encoder = { |
386 "g726", | 386 "g726", |
387 CODEC_TYPE_AUDIO, | 387 CODEC_TYPE_AUDIO, |
388 CODEC_ID_ADPCM_G726, | 388 CODEC_ID_ADPCM_G726, |
389 sizeof(G726Context), | 389 sizeof(G726Context), |