comparison amr.c @ 4898:3df69e140c33 libavcodec

Give libamr decoders/encoders a lib prefix in the name.
author diego
date Thu, 03 May 2007 10:38:03 +0000
parents 3e38885a28bc
children
comparison
equal deleted inserted replaced
4897:8f47dc8782f9 4898:3df69e140c33
63 * 63 *
64 */ 64 */
65 65
66 #include "avcodec.h" 66 #include "avcodec.h"
67 67
68 #ifdef CONFIG_AMR_NB_FIXED 68 #ifdef CONFIG_LIBAMR_NB_FIXED
69 69
70 #define MMS_IO 70 #define MMS_IO
71 71
72 #include "amr/sp_dec.h" 72 #include "amr/sp_dec.h"
73 #include "amr/d_homing.h" 73 #include "amr/d_homing.h"
134 } 134 }
135 135
136 avctx->frame_size = 160 * is_amr_wb; 136 avctx->frame_size = 160 * is_amr_wb;
137 } 137 }
138 138
139 #ifdef CONFIG_AMR_NB_FIXED 139 #ifdef CONFIG_LIBAMR_NB_FIXED
140 /* fixed point version*/ 140 /* fixed point version*/
141 /* frame size in serial bitstream file (frame type + serial stream + flags) */ 141 /* frame size in serial bitstream file (frame type + serial stream + flags) */
142 #define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5) 142 #define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5)
143 143
144 typedef struct AMRContext { 144 typedef struct AMRContext {
350 } 350 }
351 return written; 351 return written;
352 } 352 }
353 353
354 354
355 #elif defined(CONFIG_AMR_NB) /* Float point version*/ 355 #elif defined(CONFIG_LIBAMR_NB) /* Float point version*/
356 356
357 typedef struct AMRContext { 357 typedef struct AMRContext {
358 int frameCount; 358 int frameCount;
359 void * decState; 359 void * decState;
360 int *enstate; 360 int *enstate;
489 return written; 489 return written;
490 } 490 }
491 491
492 #endif 492 #endif
493 493
494 #if defined(CONFIG_AMR_NB) || defined(CONFIG_AMR_NB_FIXED) 494 #if defined(CONFIG_LIBAMR_NB) || defined(CONFIG_LIBAMR_NB_FIXED)
495 495
496 AVCodec amr_nb_decoder = 496 AVCodec libamr_nb_decoder =
497 { 497 {
498 "amr_nb", 498 "libamr_nb",
499 CODEC_TYPE_AUDIO, 499 CODEC_TYPE_AUDIO,
500 CODEC_ID_AMR_NB, 500 CODEC_ID_AMR_NB,
501 sizeof(AMRContext), 501 sizeof(AMRContext),
502 amr_nb_decode_init, 502 amr_nb_decode_init,
503 NULL, 503 NULL,
504 amr_nb_decode_close, 504 amr_nb_decode_close,
505 amr_nb_decode_frame, 505 amr_nb_decode_frame,
506 }; 506 };
507 507
508 AVCodec amr_nb_encoder = 508 AVCodec libamr_nb_encoder =
509 { 509 {
510 "amr_nb", 510 "libamr_nb",
511 CODEC_TYPE_AUDIO, 511 CODEC_TYPE_AUDIO,
512 CODEC_ID_AMR_NB, 512 CODEC_ID_AMR_NB,
513 sizeof(AMRContext), 513 sizeof(AMRContext),
514 amr_nb_encode_init, 514 amr_nb_encode_init,
515 amr_nb_encode_frame, 515 amr_nb_encode_frame,
518 }; 518 };
519 519
520 #endif 520 #endif
521 521
522 /* -----------AMR wideband ------------*/ 522 /* -----------AMR wideband ------------*/
523 #ifdef CONFIG_AMR_WB 523 #ifdef CONFIG_LIBAMR_WB
524 524
525 #ifdef _TYPEDEF_H 525 #ifdef _TYPEDEF_H
526 //To avoid duplicate typedefs from typdef in amr-nb 526 //To avoid duplicate typedefs from typdef in amr-nb
527 #define typedef_h 527 #define typedef_h
528 #endif 528 #endif
682 682
683 D_IF_exit(s->state); 683 D_IF_exit(s->state);
684 return 0; 684 return 0;
685 } 685 }
686 686
687 AVCodec amr_wb_decoder = 687 AVCodec libamr_wb_decoder =
688 { 688 {
689 "amr_wb", 689 "libamr_wb",
690 CODEC_TYPE_AUDIO, 690 CODEC_TYPE_AUDIO,
691 CODEC_ID_AMR_WB, 691 CODEC_ID_AMR_WB,
692 sizeof(AMRWBContext), 692 sizeof(AMRWBContext),
693 amr_wb_decode_init, 693 amr_wb_decode_init,
694 NULL, 694 NULL,
695 amr_wb_decode_close, 695 amr_wb_decode_close,
696 amr_wb_decode_frame, 696 amr_wb_decode_frame,
697 }; 697 };
698 698
699 AVCodec amr_wb_encoder = 699 AVCodec libamr_wb_encoder =
700 { 700 {
701 "amr_wb", 701 "libamr_wb",
702 CODEC_TYPE_AUDIO, 702 CODEC_TYPE_AUDIO,
703 CODEC_ID_AMR_WB, 703 CODEC_ID_AMR_WB,
704 sizeof(AMRWBContext), 704 sizeof(AMRWBContext),
705 amr_wb_encode_init, 705 amr_wb_encode_init,
706 amr_wb_encode_frame, 706 amr_wb_encode_frame,
707 amr_wb_encode_close, 707 amr_wb_encode_close,
708 NULL, 708 NULL,
709 }; 709 };
710 710
711 #endif //CONFIG_AMR_WB 711 #endif //CONFIG_LIBAMR_WB