www.pudn.com > T-REC-G.722.1-200505-I!!SOFT-ZST-E.zip > decode.c
/***************************************************************************
****************************************************************************
**
** ITU-T 7/14kHz Audio Coder Candidate (G.722.1 Annex C) Source Code
**
** © 2004 Polycom, Inc.
**
** All rights reserved.
**
****************************************************************************
***************************************************************************/
/***************************************************************************
Filename: decode.c
Purpose: Contains the main function for the G.722.1 Annex C decoder
Design Notes:
WMOPS: 7kHz | 24kbit | 32kbit
-------|--------------|----------------
AVG | 2.73 | 2.85
-------|--------------|----------------
MAX | 2.79 | 2.88
-------|--------------|----------------
14kHz | 24kbit | 32kbit | 48kbit
-------|--------------|----------------|----------------
AVG | 5.28 | 5.53 | 5.85
-------|--------------|----------------|----------------
MAX | 5.56 | 5.77 | 5.95
-------|--------------|----------------|----------------
***************************************************************************/
/***************************************************************************
Include files
***************************************************************************/
#include "defs.h"
#include "count.h"
/************************************************************************************
Local type declarations
*************************************************************************************/
/* This object is used to control the command line input */
typedef struct
{
Word16 syntax;
Word32 bit_rate;
Word16 bandwidth;
Word16 number_of_bits_per_frame;
Word16 number_of_regions;
Word16 frame_size;
FILE *fpout;
FILE *fp_bitstream;
} DECODER_CONTROL;
/************************************************************************************
Constant definitions
*************************************************************************************/
#define MAX_SAMPLE_RATE 32000
#define MAX_FRAMESIZE (MAX_SAMPLE_RATE/50)
#define MEASURE_WMOPS 1
#define WMOPS 1
/***************************************************************************
Local function declarations
***************************************************************************/
void parse_command_line(char *argv[],DECODER_CONTROL *control);
Word16 read_ITU_format(Word16 *, Word16 *, Word16, FILE *);
/************************************************************************************
Function: G722.1 Annex C main decoder function
Syntax: decode