[FFmpeg-devel] [PATCH] G.729 parameters decoding
Vladimir Voroshilov
voroshil
Thu Jun 18 20:15:00 CEST 2009
2009/6/19 Michael Niedermayer <michaelni at gmx.at>:
> On Thu, Jun 18, 2009 at 11:15:55PM +0700, Vladimir Voroshilov wrote:
>> 2009/6/18 Michael Niedermayer <michaelni at gmx.at>:
>> > On Thu, Jun 18, 2009 at 07:43:31AM +0700, Vladimir Voroshilov wrote:
>> >> 2009/6/18 Michael Niedermayer <michaelni at gmx.at>:
>> >> > On Thu, Jun 18, 2009 at 06:55:09AM +0700, Vladimir Voroshilov wrote:
>> >> >> 2009/6/18 Michael Niedermayer <michaelni at gmx.at>:
>> >> >> > On Sat, Jun 13, 2009 at 01:21:24AM +0700, Vladimir Voroshilov wrote:
>> >> >> >
>> >> >> > [...]
>> >> >> >> + ? ?for (i = 0; i < 2; i++) {
>> >> >> >> + ? ? ? ?uint8_t ac_index; ? ? ?///< adaptive codebook index
>> >> >> >> + ? ? ? ?uint8_t pulses_signs; ?///< fixed-codebook vector pulse signs
>> >> >> >> + ? ? ? ?int fc_indexes; ? ? ? ?///< fixed-codebook indexes
>> >> >> >> + ? ? ? ?uint8_t gc_1st_index; ?///< gain codebook (first stage) index
>> >> >> >> + ? ? ? ?uint8_t gc_2nd_index; ?///< gain codebook (second stage) index
>> >> >> >> +
>> >> >> >> + ? ? ? ?ac_index ? ? ?= get_bits(&gb, format.ac_index_bits[i]);
>> >> >> >
>> >> >> >> + ? ? ? ?if(!i && format.parity_bits) {
>> >> >> >> + ? ? ? ? ? ?int parity = get_bits(&gb, format.parity_bits);
>> >> >> >> + ? ? ? ? ? ?bad_pitch = get_parity(ac_index) == parity;
>> >> >> >> + ? ? ? ?}
>> >> >> >
>> >> >> > uhm ugh
>> >> >> >
>> >> >> > bad_pitch = get_parity(show_bits(format.ac_index_bits[0] + format.parity_bits);
>> >> >> > prior to the loop
>> >> >>
>> >> >> If format.parity_bits==0 this code will become to:
>> >> >> ?bad_pitch = get_parity(show_bits(format.ac_index_bits[0]);
>> >> >
>> >> > if(format.parity_bits)
>> >> > ? ?...
>> >> >
>> >> > and its actually parity_bit not bits
>> >>
>> >>
>> >> ...and i still have to check parity_bits inside for() too,
>> >> since get_bits(pgb, 0) does not work. don't know why.
>> >> Where is benefit ?
>> >
>> > maybe none, the code feels just really ugly
>> > anyway at the least you can change it to
>> > ? ? ?if(!i && format.parity_bits)
>> > ?? ? ? ?bad_pitch = get_parity(ac_index) == get_bits1(&gb);
>>
>> This is better. Works fine, fixed.
>>
>> >
>> > [...]
>> > --
>> > Michael ? ? GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>> >
>> > The educated differ from the uneducated as much as the living from the
>> > dead. -- Aristotle
>> >
>> > -----BEGIN PGP SIGNATURE-----
>> > Version: GnuPG v1.4.9 (GNU/Linux)
>> >
>> > iD8DBQFKOhWkYR7HhwQLD6sRAi7wAJ0VEVuRHi5pPCJS1KDDMnFHW3MkDQCeIzE6
>> > 5NaEFaNRLz0u6gxb49yRn74=
>> > =v6/+
>> > -----END PGP SIGNATURE-----
>> >
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel at mplayerhq.hu
>> > https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>> >
>>
>>
>>
>> --
>> Regards,
>> Vladimir Voroshilov ? ? mailto:voroshil at gmail.com
>> JID: voroshil at gmail.com, voroshil at jabber.ru
>> ICQ: 95587719
>
>> ?g729dec.c | ?113 ++++++++++++++++++++++++++++++++++++++++++++++++++------------
>> ?1 file changed, 92 insertions(+), 21 deletions(-)
>> 8fb5f0ad33119a0fdfb25ba0a947deb678d96e7c ?0001-Decoding-routine-skeleton.159.patch
>> From 891a0bf189e63fa4b9895a3f22428bf0a71c2417 Mon Sep 17 00:00:00 2001
>> From: Vladimir Voroshilov <voroshil at gmail.com>
>> Date: Thu, 4 Jun 2009 19:30:31 +0700
>> Subject: [PATCH] Decoding routine (skeleton)
>
> ok
applied.
>
> [...]
> --
> Michael ? ? GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Complexity theory is the science of finding the exact solution to an
> approximation. Benchmarking OTOH is finding an approximation of the exact
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFKOn+dYR7HhwQLD6sRAglnAJ9+QDgW2TYdrlsaeKH+MN4fvgcp7QCgkis6
> 9SKjvKlrCYp8aJMu4Kk7CoY=
> =oJvB
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
More information about the ffmpeg-devel
mailing list