[FFmpeg-devel] [PATCH] G.729 Add packet_type variable
Michael Niedermayer
michaelni
Sat Jun 27 02:17:44 CEST 2009
On Sat, Jun 27, 2009 at 02:01:16AM +0700, Vladimir Voroshilov wrote:
> Due to wrong order of patches this patch was missing (and it was
> required for pitch delay decoding patch).
>
> --
> Regards,
> Vladimir Voroshilov mailto:voroshil at gmail.com
> JID: voroshil at gmail.com, voroshil at jabber.ru
> ICQ: 95587719
> g729dec.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> fdb16f3c44b145a838a5e97780d5112bf86428dd 0006-Add-packet_type.176.patch
> From a05604a16ab5b6536ec318c05c887b397a6d4dfe Mon Sep 17 00:00:00 2001
> From: Vladimir Voroshilov <voroshil at gmail.com>
> Date: Sat, 13 Jun 2009 00:24:23 +0700
> Subject: [PATCH 06/25] Add packet_type
>
>
> diff --git ffmpeg-r19281/libavcodec/g729dec.c ffmpeg-r19281_v176/libavcodec/g729dec.c
> index f193123..7961403 100644
> --- ffmpeg-r19281/libavcodec/g729dec.c
> +++ ffmpeg-r19281_v176/libavcodec/g729dec.c
> @@ -71,6 +71,12 @@
> */
> #define SHARP_MAX 13017
>
> +typedef enum {
> + FORMAT_G729_8K = 0,
> + FORMAT_G729D_6K4,
> + FORMAT_COUNT,
> +} G729Formats;
> +
> typedef struct {
> uint8_t ac_index_bits[2]; ///< adaptive codebook index for second subframe (size in bits)
> uint8_t parity_bit; ///< parity bit for pitch delay
> @@ -233,6 +239,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
> int bad_pitch = 0; ///< parity check failed
> int i;
> int16_t *tmp;
> + G729Formats packet_type;
> G729Context *ctx = avctx->priv_data;
> int16_t lp[2][11]; // (3.12)
> uint8_t ma_predictor; ///< switched MA predictor of LSP quantizer
> @@ -249,9 +256,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
> }
>
> if (buf_size == 10) {
> + packet_type = FORMAT_G729_8K;
> format = format_g729_8k;
> av_log(avctx, AV_LOG_DEBUG, "Packet type: %s\n", "G.729 @ 8kbit/s");
> } else if (buf_size == 8) {
> + packet_type = FORMAT_G729D_6K4;
> format = format_g729d_6k4;
> av_log(avctx, AV_LOG_DEBUG, "Packet type: %s\n", "G.729D @ 6.4kbit/s");
> } else {
i dont see what this patch could be good for
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20090627/8f4c0f2e/attachment.pgp>
More information about the ffmpeg-devel
mailing list