On 07/14/2012 09:41 AM, Kostya Shishkov wrote:
> Decoder is _not_ bitexact but hopefully is good enough.
> Sent gzipped since the patch is rather large.
>
>
> 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
[...]
> +/**
> + * 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;
Those enums and structs are not data tables and are not needed by the
data tables, so they should go in g723_1.c instead of g723_1_data.h.
Also, please do not use CamelCase for the enum values.
And the header should directly include stdint.h.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel