Statistics
| Branch: | Revision:

ffmpeg / libavcodec / amr.c @ db56acd4

History | View | Annotate | Download (17.7 KB)

1
/*
2
 * AMR Audio decoder stub
3
 * Copyright (c) 2003 the ffmpeg project
4
 *
5
 * This file is part of FFmpeg.
6
 *
7
 * FFmpeg is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * FFmpeg is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with FFmpeg; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
 */
21

    
22
 /** @file
23
 * Adaptive Multi-Rate (AMR) Audio decoder stub.
24
 *
25
 * This code implements both an AMR-NarrowBand (AMR-NB) and an AMR-WideBand
26
 * (AMR-WB) audio encoder/decoder through external reference code from
27
 * http://www.3gpp.org/. The license of the code from 3gpp is unclear so you
28
 * have to download the code separately. Two versions exists: One fixed-point
29
 * and one with floats. For some reason the float-encoder is significant faster
30
 * at least on a P4 1.5GHz (0.9s instead of 9.9s on a 30s audio clip at MR102).
31
 * Both float and fixed point are supported for AMR-NB, but only float for
32
 * AMR-WB.
33
 *
34
 * \section AMR-NB
35
 *
36
 * \subsection Float
37
 * The float version (default) can be downloaded from:
38
 * http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip
39
 * Extract the source into \c "ffmpeg/libavcodec/amr_float".
40
 *
41
 * \subsection Fixed-point
42
 * The fixed-point (TS26.073) can be downloaded from:
43
 * http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510.zip.
44
 * Extract the source into \c "ffmpeg/libavcodec/amr".
45
 * To use the fixed version run \c "./configure" with \c "--enable-amr_nb-fixed".
46
 *
47
 * \subsection Specification
48
 * The specification for AMR-NB can be found in TS 26.071
49
 * (http://www.3gpp.org/ftp/Specs/html-info/26071.htm) and some other
50
 * info at http://www.3gpp.org/ftp/Specs/html-info/26-series.htm.
51
 *
52
 * \section AMR-WB
53
 * \subsection Float
54
 * The reference code can be downloaded from:
55
 * http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip
56
 * It should be extracted to \c "ffmpeg/libavcodec/amrwb_float". Enable it with
57
 * \c "--enable-amr_wb".
58
 *
59
 * \subsection Fixed-point
60
 * If someone wants to use the fixed point version it can be downloaded from:
61
 * http://www.3gpp.org/ftp/Specs/archive/26_series/26.173/26173-571.zip.
62
 *
63
 * \subsection Specification
64
 * The specification for AMR-WB can be downloaded from:
65
 * http://www.3gpp.org/ftp/Specs/archive/26_series/26.171/26171-500.zip.
66
 *
67
 */
68

    
69
#include "avcodec.h"
70

    
71
#ifdef CONFIG_AMR_NB_FIXED
72

    
73
#define MMS_IO
74

    
75
#include "amr/sp_dec.h"
76
#include "amr/d_homing.h"
77
#include "amr/typedef.h"
78
#include "amr/sp_enc.h"
79
#include "amr/sid_sync.h"
80
#include "amr/e_homing.h"
81

    
82
#else
83
#include "amr_float/interf_dec.h"
84
#include "amr_float/interf_enc.h"
85
#endif
86

    
87
/* Common code for fixed and float version*/
88
typedef struct AMR_bitrates
89
{
90
    int rate;
91
    enum Mode mode;
92
} AMR_bitrates;
93

    
94
/* Match desired bitrate */
95
static int getBitrateMode(int bitrate)
96
{
97
    /* make the correspondance between bitrate and mode */
98
    AMR_bitrates rates[]={ {4750,MR475},
99
                           {5150,MR515},
100
                           {5900,MR59},
101
                           {6700,MR67},
102
                           {7400,MR74},
103
                           {7950,MR795},
104
                           {10200,MR102},
105
                           {12200,MR122},
106
                         };
107
    int i;
108

    
109
    for(i=0;i<8;i++)
110
    {
111
        if(rates[i].rate==bitrate)
112
        {
113
            return(rates[i].mode);
114
        }
115
    }
116
    /* no bitrate matching, return an error */
117
    return -1;
118
}
119

    
120
static void amr_decode_fix_avctx(AVCodecContext * avctx)
121
{
122
    const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB);
123

    
124
    if(avctx->sample_rate == 0)
125
    {
126
        avctx->sample_rate = 8000 * is_amr_wb;
127
    }
128

    
129
    if(avctx->channels == 0)
130
    {
131
        avctx->channels = 1;
132
    }
133

    
134
    avctx->frame_size = 160 * is_amr_wb;
135
}
136

    
137
#ifdef CONFIG_AMR_NB_FIXED
138
/* fixed point version*/
139
/* frame size in serial bitstream file (frame type + serial stream + flags) */
140
#define SERIAL_FRAMESIZE (1+MAX_SERIAL_SIZE+5)
141

    
142
typedef struct AMRContext {
143
    int frameCount;
144
    Speech_Decode_FrameState *speech_decoder_state;
145
    enum RXFrameType rx_type;
146
    enum Mode mode;
147
    Word16 reset_flag;
148
    Word16 reset_flag_old;
149

    
150
    int enc_bitrate;
151
    Speech_Encode_FrameState *enstate;
152
    sid_syncState *sidstate;
153
    enum TXFrameType tx_frametype;
154
} AMRContext;
155

    
156
static int amr_nb_decode_init(AVCodecContext * avctx)
157
{
158
    AMRContext *s = avctx->priv_data;
159

    
160
    s->frameCount=0;
161
    s->speech_decoder_state=NULL;
162
    s->rx_type = (enum RXFrameType)0;
163
    s->mode= (enum Mode)0;
164
    s->reset_flag=0;
165
    s->reset_flag_old=1;
166

    
167
    if(Speech_Decode_Frame_init(&s->speech_decoder_state, "Decoder"))
168
    {
169
        av_log(avctx, AV_LOG_ERROR, "Speech_Decode_Frame_init error\n");
170
        return -1;
171
    }
172

    
173
    amr_decode_fix_avctx(avctx);
174

    
175
    if(avctx->channels > 1)
176
    {
177
        av_log(avctx, AV_LOG_ERROR, "amr_nb: multichannel decoding not supported\n");
178
        return -1;
179
    }
180

    
181
    return 0;
182
}
183

    
184
static int amr_nb_encode_init(AVCodecContext * avctx)
185
{
186
    AMRContext *s = avctx->priv_data;
187

    
188
    s->frameCount=0;
189
    s->speech_decoder_state=NULL;
190
    s->rx_type = (enum RXFrameType)0;
191
    s->mode= (enum Mode)0;
192
    s->reset_flag=0;
193
    s->reset_flag_old=1;
194

    
195
    if(avctx->sample_rate!=8000)
196
    {
197
        av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
198
        return -1;
199
    }
200

    
201
    if(avctx->channels!=1)
202
    {
203
        av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
204
        return -1;
205
    }
206

    
207
    avctx->frame_size=160;
208
    avctx->coded_frame= avcodec_alloc_frame();
209

    
210
    if(Speech_Encode_Frame_init(&s->enstate, 0, "encoder") || sid_sync_init (&s->sidstate))
211
    {
212
        av_log(avctx, AV_LOG_ERROR, "Speech_Encode_Frame_init error\n");
213
        return -1;
214
    }
215

    
216
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
217
    {
218
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
219
        return -1;
220
    }
221

    
222
    return 0;
223
}
224

    
225
static int amr_nb_encode_close(AVCodecContext * avctx)
226
{
227
    AMRContext *s = avctx->priv_data;
228

    
229
    Speech_Encode_Frame_exit(&s->enstate);
230
    sid_sync_exit (&s->sidstate);
231
    av_freep(&avctx->coded_frame);
232
    return 0;
233
}
234

    
235
static int amr_nb_decode_close(AVCodecContext * avctx)
236
{
237
    AMRContext *s = avctx->priv_data;
238

    
239
    Speech_Decode_Frame_exit(&s->speech_decoder_state);
240
    return 0;
241
}
242

    
243
static int amr_nb_decode_frame(AVCodecContext * avctx,
244
            void *data, int *data_size,
245
            uint8_t * buf, int buf_size)
246
{
247
    AMRContext *s = avctx->priv_data;
248
    uint8_t*amrData=buf;
249
    int offset=0;
250
    UWord8 toc, q, ft;
251
    Word16 serial[SERIAL_FRAMESIZE];   /* coded bits */
252
    Word16 *synth;
253
    UWord8 *packed_bits;
254
    static Word16 packed_size[16] = {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0};
255
    int i;
256

    
257
    //printf("amr_decode_frame data_size=%i buf=0x%X buf_size=%d frameCount=%d!!\n",*data_size,buf,buf_size,s->frameCount);
258

    
259
    synth=data;
260

    
261
//    while(offset<buf_size)
262
    {
263
        toc=amrData[offset];
264
        /* read rest of the frame based on ToC byte */
265
        q  = (toc >> 2) & 0x01;
266
        ft = (toc >> 3) & 0x0F;
267

    
268
        //printf("offset=%d, packet_size=%d amrData= 0x%X %X %X %X\n",offset,packed_size[ft],amrData[offset],amrData[offset+1],amrData[offset+2],amrData[offset+3]);
269

    
270
        offset++;
271

    
272
        packed_bits=amrData+offset;
273

    
274
        offset+=packed_size[ft];
275

    
276
        //Unsort and unpack bits
277
        s->rx_type = UnpackBits(q, ft, packed_bits, &s->mode, &serial[1]);
278

    
279
        //We have a new frame
280
        s->frameCount++;
281

    
282
        if (s->rx_type == RX_NO_DATA)
283
        {
284
            s->mode = s->speech_decoder_state->prev_mode;
285
        }
286
        else {
287
            s->speech_decoder_state->prev_mode = s->mode;
288
        }
289

    
290
        /* if homed: check if this frame is another homing frame */
291
        if (s->reset_flag_old == 1)
292
        {
293
            /* only check until end of first subframe */
294
            s->reset_flag = decoder_homing_frame_test_first(&serial[1], s->mode);
295
        }
296
        /* produce encoder homing frame if homed & input=decoder homing frame */
297
        if ((s->reset_flag != 0) && (s->reset_flag_old != 0))
298
        {
299
            for (i = 0; i < L_FRAME; i++)
300
            {
301
                synth[i] = EHF_MASK;
302
            }
303
        }
304
        else
305
        {
306
            /* decode frame */
307
            Speech_Decode_Frame(s->speech_decoder_state, s->mode, &serial[1], s->rx_type, synth);
308
        }
309

    
310
        //Each AMR-frame results in 160 16-bit samples
311
        *data_size+=160*2;
312
        synth+=160;
313

    
314
        /* if not homed: check whether current frame is a homing frame */
315
        if (s->reset_flag_old == 0)
316
        {
317
            /* check whole frame */
318
            s->reset_flag = decoder_homing_frame_test(&serial[1], s->mode);
319
        }
320
        /* reset decoder if current frame is a homing frame */
321
        if (s->reset_flag != 0)
322
        {
323
            Speech_Decode_Frame_reset(s->speech_decoder_state);
324
        }
325
        s->reset_flag_old = s->reset_flag;
326

    
327
    }
328
    return offset;
329
}
330

    
331

    
332
static int amr_nb_encode_frame(AVCodecContext *avctx,
333
                            unsigned char *frame/*out*/, int buf_size, void *data/*in*/)
334
{
335
    short serial_data[250] = {0};
336
    AMRContext *s = avctx->priv_data;
337
    int written;
338

    
339
    s->reset_flag = encoder_homing_frame_test(data);
340

    
341
    Speech_Encode_Frame(s->enstate, s->enc_bitrate, data, &serial_data[1], &s->mode);
342

    
343
    /* add frame type and mode */
344
    sid_sync (s->sidstate, s->mode, &s->tx_frametype);
345

    
346
    written = PackBits(s->mode, s->enc_bitrate, s->tx_frametype, &serial_data[1], frame);
347

    
348
    if (s->reset_flag != 0)
349
    {
350
        Speech_Encode_Frame_reset(s->enstate);
351
        sid_sync_reset(s->sidstate);
352
    }
353
    return written;
354
}
355

    
356

    
357
#elif defined(CONFIG_AMR_NB) /* Float point version*/
358

    
359
typedef struct AMRContext {
360
    int frameCount;
361
    void * decState;
362
    int *enstate;
363
    int enc_bitrate;
364
} AMRContext;
365

    
366
static int amr_nb_decode_init(AVCodecContext * avctx)
367
{
368
    AMRContext *s = avctx->priv_data;
369

    
370
    s->frameCount=0;
371
    s->decState=Decoder_Interface_init();
372
    if(!s->decState)
373
    {
374
        av_log(avctx, AV_LOG_ERROR, "Decoder_Interface_init error\r\n");
375
        return -1;
376
    }
377

    
378
    amr_decode_fix_avctx(avctx);
379

    
380
    if(avctx->channels > 1)
381
    {
382
        av_log(avctx, AV_LOG_ERROR, "amr_nb: multichannel decoding not supported\n");
383
        return -1;
384
    }
385

    
386
    return 0;
387
}
388

    
389
static int amr_nb_encode_init(AVCodecContext * avctx)
390
{
391
    AMRContext *s = avctx->priv_data;
392

    
393
    s->frameCount=0;
394

    
395
    if(avctx->sample_rate!=8000)
396
    {
397
        av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
398
        return -1;
399
    }
400

    
401
    if(avctx->channels!=1)
402
    {
403
        av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
404
        return -1;
405
    }
406

    
407
    avctx->frame_size=160;
408
    avctx->coded_frame= avcodec_alloc_frame();
409

    
410
    s->enstate=Encoder_Interface_init(0);
411
    if(!s->enstate)
412
    {
413
        av_log(avctx, AV_LOG_ERROR, "Encoder_Interface_init error\n");
414
        return -1;
415
    }
416

    
417
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
418
    {
419
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
420
        return -1;
421
    }
422

    
423
    return 0;
424
}
425

    
426
static int amr_nb_decode_close(AVCodecContext * avctx)
427
{
428
    AMRContext *s = avctx->priv_data;
429

    
430
    Decoder_Interface_exit(s->decState);
431
    return 0;
432
}
433

    
434
static int amr_nb_encode_close(AVCodecContext * avctx)
435
{
436
    AMRContext *s = avctx->priv_data;
437

    
438
    Encoder_Interface_exit(s->enstate);
439
    av_freep(&avctx->coded_frame);
440
    return 0;
441
}
442

    
443
static int amr_nb_decode_frame(AVCodecContext * avctx,
444
            void *data, int *data_size,
445
            uint8_t * buf, int buf_size)
446
{
447
    AMRContext *s = avctx->priv_data;
448
    uint8_t*amrData=buf;
449
    static short block_size[16]={ 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 };
450
    enum Mode dec_mode;
451
    int packet_size;
452

    
453
    /* av_log(NULL,AV_LOG_DEBUG,"amr_decode_frame buf=%p buf_size=%d frameCount=%d!!\n",buf,buf_size,s->frameCount); */
454

    
455
    dec_mode = (buf[0] >> 3) & 0x000F;
456
    packet_size = block_size[dec_mode]+1;
457

    
458
    if(packet_size > buf_size) {
459
        av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n", buf_size, packet_size);
460
        return -1;
461
    }
462

    
463
    s->frameCount++;
464
    /* av_log(NULL,AV_LOG_DEBUG,"packet_size=%d amrData= 0x%X %X %X %X\n",packet_size,amrData[0],amrData[1],amrData[2],amrData[3]); */
465
    /* call decoder */
466
    Decoder_Interface_Decode(s->decState, amrData, data, 0);
467
    *data_size=160*2;
468

    
469
    return packet_size;
470
}
471

    
472
static int amr_nb_encode_frame(AVCodecContext *avctx,
473
                            unsigned char *frame/*out*/, int buf_size, void *data/*in*/)
474
{
475
    AMRContext *s = avctx->priv_data;
476
    int written;
477

    
478
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
479
    {
480
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
481
        return -1;
482
    }
483

    
484
    written = Encoder_Interface_Encode(s->enstate,
485
        s->enc_bitrate,
486
        data,
487
        frame,
488
        0);
489
    /* av_log(NULL,AV_LOG_DEBUG,"amr_nb_encode_frame encoded %u bytes, bitrate %u, first byte was %#02x\n",written, s->enc_bitrate, frame[0] ); */
490

    
491
    return written;
492
}
493

    
494
#endif
495

    
496
#if defined(CONFIG_AMR_NB) || defined(CONFIG_AMR_NB_FIXED)
497

    
498
AVCodec amr_nb_decoder =
499
{
500
    "amr_nb",
501
    CODEC_TYPE_AUDIO,
502
    CODEC_ID_AMR_NB,
503
    sizeof(AMRContext),
504
    amr_nb_decode_init,
505
    NULL,
506
    amr_nb_decode_close,
507
    amr_nb_decode_frame,
508
};
509

    
510
AVCodec amr_nb_encoder =
511
{
512
    "amr_nb",
513
    CODEC_TYPE_AUDIO,
514
    CODEC_ID_AMR_NB,
515
    sizeof(AMRContext),
516
    amr_nb_encode_init,
517
    amr_nb_encode_frame,
518
    amr_nb_encode_close,
519
    NULL,
520
};
521

    
522
#endif
523

    
524
/* -----------AMR wideband ------------*/
525
#ifdef CONFIG_AMR_WB
526

    
527
#ifdef _TYPEDEF_H
528
//To avoid duplicate typedefs from typdef in amr-nb
529
#define typedef_h
530
#endif
531

    
532
#include "amrwb_float/enc_if.h"
533
#include "amrwb_float/dec_if.h"
534

    
535
/* Common code for fixed and float version*/
536
typedef struct AMRWB_bitrates
537
{
538
    int rate;
539
    int mode;
540
} AMRWB_bitrates;
541

    
542
static int getWBBitrateMode(int bitrate)
543
{
544
    /* make the correspondance between bitrate and mode */
545
    AMRWB_bitrates rates[]={ {6600,0},
546
                           {8850,1},
547
                           {12650,2},
548
                           {14250,3},
549
                           {15850,4},
550
                           {18250,5},
551
                           {19850,6},
552
                           {23050,7},
553
                           {23850,8},
554
                         };
555
    int i;
556

    
557
    for(i=0;i<9;i++)
558
    {
559
        if(rates[i].rate==bitrate)
560
        {
561
            return(rates[i].mode);
562
        }
563
    }
564
    /* no bitrate matching, return an error */
565
    return -1;
566
}
567

    
568

    
569
typedef struct AMRWBContext {
570
    int frameCount;
571
    void *state;
572
    int mode;
573
    Word16 allow_dtx;
574
} AMRWBContext;
575

    
576
static int amr_wb_encode_init(AVCodecContext * avctx)
577
{
578
    AMRWBContext *s = avctx->priv_data;
579

    
580
    s->frameCount=0;
581

    
582
    if(avctx->sample_rate!=16000)
583
    {
584
        av_log(avctx, AV_LOG_ERROR, "Only 16000Hz sample rate supported\n");
585
        return -1;
586
    }
587

    
588
    if(avctx->channels!=1)
589
    {
590
        av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
591
        return -1;
592
    }
593

    
594
    if((s->mode=getWBBitrateMode(avctx->bit_rate))<0)
595
    {
596
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
597
        return -1;
598
    }
599

    
600
    avctx->frame_size=320;
601
    avctx->coded_frame= avcodec_alloc_frame();
602

    
603
    s->state = E_IF_init();
604
    s->allow_dtx=0;
605

    
606
    return 0;
607
}
608

    
609
static int amr_wb_encode_close(AVCodecContext * avctx)
610
{
611
    AMRWBContext *s = avctx->priv_data;
612

    
613
    E_IF_exit(s->state);
614
    av_freep(&avctx->coded_frame);
615
    s->frameCount++;
616
    return 0;
617
}
618

    
619
static int amr_wb_encode_frame(AVCodecContext *avctx,
620
                            unsigned char *frame/*out*/, int buf_size, void *data/*in*/)
621
{
622
    AMRWBContext *s = avctx->priv_data;
623
    int size;
624

    
625
    if((s->mode=getWBBitrateMode(avctx->bit_rate))<0)
626
    {
627
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
628
        return -1;
629
    }
630
    size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);
631
    return size;
632
}
633

    
634
static int amr_wb_decode_init(AVCodecContext * avctx)
635
{
636
    AMRWBContext *s = avctx->priv_data;
637

    
638
    s->frameCount=0;
639
    s->state = D_IF_init();
640

    
641
    amr_decode_fix_avctx(avctx);
642

    
643
    if(avctx->channels > 1)
644
    {
645
        av_log(avctx, AV_LOG_ERROR, "amr_wb: multichannel decoding not supported\n");
646
        return -1;
647
    }
648

    
649
    return 0;
650
}
651

    
652
extern const UWord8 block_size[];
653

    
654
static int amr_wb_decode_frame(AVCodecContext * avctx,
655
            void *data, int *data_size,
656
            uint8_t * buf, int buf_size)
657
{
658
    AMRWBContext *s = avctx->priv_data;
659
    uint8_t*amrData=buf;
660
    int mode;
661
    int packet_size;
662

    
663
    if(buf_size==0) {
664
        /* nothing to do */
665
        return 0;
666
    }
667

    
668
    mode = (amrData[0] >> 3) & 0x000F;
669
    packet_size = block_size[mode];
670

    
671
    if(packet_size > buf_size) {
672
        av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n", buf_size, packet_size+1);
673
        return -1;
674
    }
675

    
676
    s->frameCount++;
677
    D_IF_decode( s->state, amrData, data, _good_frame);
678
    *data_size=320*2;
679
    return packet_size;
680
}
681

    
682
static int amr_wb_decode_close(AVCodecContext * avctx)
683
{
684
    AMRWBContext *s = avctx->priv_data;
685

    
686
    D_IF_exit(s->state);
687
    return 0;
688
}
689

    
690
AVCodec amr_wb_decoder =
691
{
692
    "amr_wb",
693
    CODEC_TYPE_AUDIO,
694
    CODEC_ID_AMR_WB,
695
    sizeof(AMRWBContext),
696
    amr_wb_decode_init,
697
    NULL,
698
    amr_wb_decode_close,
699
    amr_wb_decode_frame,
700
};
701

    
702
AVCodec amr_wb_encoder =
703
{
704
    "amr_wb",
705
    CODEC_TYPE_AUDIO,
706
    CODEC_ID_AMR_WB,
707
    sizeof(AMRWBContext),
708
    amr_wb_encode_init,
709
    amr_wb_encode_frame,
710
    amr_wb_encode_close,
711
    NULL,
712
};
713

    
714
#endif //CONFIG_AMR_WB