[FFmpeg-devel] [PATCH 3/5] Add G.723.1 decoder data tables

Vitor Sessak vitor1001 at gmail.com
Sat Mar 19 15:04:13 CET 2011


On 03/17/2011 11:56 PM, banan at ludd.ltu.se wrote:
> From: Mohamed Naufal Basheer<naufal11 at gmail.com>
>
> ---
>   libavcodec/g723_1_data.h | 1245 ++++++++++++++++++++++++++++++++++++++++++++++
>   1 files changed, 1245 insertions(+), 0 deletions(-)
>   create mode 100644 libavcodec/g723_1_data.h
>
> diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h
> new file mode 100644
> index 0000000..3b180ef
> --- /dev/null
> +++ b/libavcodec/g723_1_data.h
> @@ -0,0 +1,1245 @@
> +/*
> + * G723.1 compatible decoder data tables.
> + * Copyright (c) 2006 Benjamin Larsson
> + * Copyright (c) 2010 Mohamed Naufal Basheer
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +/**
> + * @file
> + * G723.1 compatible decoder data tables
> + */
> +
> +#define SUBFRAMES       4
> +#define SUBFRAME_LEN    60
> +#define FRAME_LEN       (SUBFRAME_LEN<<  2)
> +#define LPC_ORDER       10
> +#define LSP_BANDS       3
> +#define LSP_CB_SIZE     256
> +#define PITCH_MIN       18
> +#define PITCH_MAX       (PITCH_MIN + 127)
> +#define PITCH_ORDER     5
> +#define GRID_SIZE       2
> +#define PULSE_MAX       6
> +#define GAIN_LEVELS     24
> +#define COS_TBL_SIZE    512
> +
> +/**
> + * G723.1 frame types
> + */
> +typedef enum {
> +    ActiveFrame,        ///<  Active speech
> +    SIDFrame,           ///<  Silence Insertion Descriptor frame
> +    UntransmittedFrame
> +} FrameType;
> +
> +static const uint8_t frame_size[4] = {24, 20, 4, 1};
> +
> +typedef enum {
> +    Rate6k3,
> +    Rate5k3
> +} Rate;
> +
> +/**
> + * G723.1 unpacked data subframe
> + */
> +typedef struct {
> +    int ad_cb_lag;     ///<  adaptive codebook lag
> +    int ad_cb_gain;
> +    int dirac_train;
> +    int pulse_sign;
> +    int grid_index;
> +    int amp_index;
> +    int pulse_pos;
> +} G723_1_Subframe;
> +
> +/**
> + * Pitch postfilter parameters
> + */
> +typedef struct {
> +    int     index;    ///<  postfilter backward/forward lag
> +    int16_t opt_gain; ///<  optimal gain
> +    int16_t sc_gain;  ///<  scaling gain
> +} PPFParam;

I think a all (or a good part) of these defines and structs belongs to 
the .c.

-Vitor



More information about the ffmpeg-devel mailing list