[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [4/7] - G.729 core

Michael Niedermayer michaelni
Fri Aug 22 23:04:35 CEST 2008


On Sat, Aug 23, 2008 at 03:32:22AM +0700, Vladimir Voroshilov wrote:
> 2008/8/23 Michael Niedermayer <michaelni at gmx.at>:
> > On Sat, Aug 23, 2008 at 01:41:58AM +0700, Vladimir Voroshilov wrote:
> >> 2008/8/22 Michael Niedermayer <michaelni at gmx.at>:
> >> > On Sun, Aug 17, 2008 at 05:42:33PM +0700, Vladimir Voroshilov wrote:
> >>
> >> [...]
> >>
> >> >> +    uint8_t ac_index_1st_bits;///< adaptive codebook index for first subframe (size in bits)
> >> >> +    uint8_t ac_index_2nd_bits;///< adaptive codebook index for second subframe (size in bits)
> >> >> +    uint8_t parity_bits;      ///< parity bit for pitch delay (size in bits)
> >> >> +    uint8_t gc_1st_index_bits;///< gain codebook (first stage) index (size in bits)
> >> >> +    uint8_t gc_2nd_index_bits;///< gain codebook (second stage) index (size in bits)
> >> >> +    uint8_t fc_signs_bits;    ///< number of pulses in fixed-codebook vector
> >> >> +    uint8_t fc_indexes_bits;  ///< size (in bits) of fixed-codebook index entry
> >> >> +    /// mr_energy = mean_energy + 10 * log10(2^26  * subframe_size) in (7.13)
> >> >> +    int mr_energy;
> >> >> +} G729_format_description;
> >> >
> >> > as this is just used in the .c file it does not need to be in the header
> >> > Also please move ALL other things from g729 headers into the corresponding
> >> > .c files when they are ot used outside of a single c file.
> >>
> >> If i remove all such things (and will not yet care about encoder),
> >> header will contain only one meanful line: "#define MAX_SUBFRAME_SIZE
> >> 44" since only this definition is used in both g729dec.c and
> >> g729postfilter.c.
> >> I'm not sure that this is ok, but if it is, i'll make such patch.
> >
> > ok
> 
> Definitions were moved to g729dec.c and g729data.h
> Values remaining in formats array differs from values used in G.729D.
> I've also tried to remove most of useless comments.

[...]
> -/**
> - * minimum quantized LSF value (3.2.4)
> - * 0.005 in Q13
> - */
> -#define LSFQ_MIN                   40
> -
> -/**
> - * maximum quantized LSF value (3.2.4)
> - * 3.135 in Q13
> - */
> -#define LSFQ_MAX                   25681
> -
> -/**
> - * minimum LSF distance (3.2.4)
> - * 0.0391 in Q13
> - */
> -#define LSFQ_DIFF_MIN              321
> -
>  /**
>   * maximum possible subframe size
>   */
> diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
> index 9870864..d6f1891 100644
> --- a/libavcodec/g729dec.c
> +++ b/libavcodec/g729dec.c
[...]
> +/**
> + * minimum quantized LSF value (3.2.4)
> + * 0.005 in Q13
> + */
> +#define LSFQ_MIN                   40
> +
> +/**
> + * maximum quantized LSF value (3.2.4)
> + * 3.135 in Q13
> + */
> +#define LSFQ_MAX                   25681
> +
> +/**
> + * minimum LSF distance (3.2.4)
> + * 0.0391 in Q13
> + */
> +#define LSFQ_DIFF_MIN              321
[...]

The above move is ok, and sorry for my earlier mail, i missed that 
g729dec.c is alraedy in svn thus making diffing against the header tricky

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080822/1145ad1e/attachment.pgp>



More information about the ffmpeg-devel mailing list