[SCM] libav/experimental: Parity bit calculation routine for G.729

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:29:16 UTC 2013


The following commit has been merged in the experimental branch:
commit d3bb8ad7afcfa82ed02fba1cd20b933cc45454d6
Author: Vladimir Voroshilov <voroshil at gmail.com>
Date:   Tue Sep 2 17:15:28 2008 +0000

    Parity bit calculation routine for G.729
    
    Originally committed as revision 15154 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index f17524a..b2761e4 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -71,6 +71,14 @@ static inline uint16_t g729_random(uint16_t value)
     return 31821 * value + 13849;
 }
 
+/**
+ * Get parity bit of bit 2..7
+ */
+static inline int g729_get_parity(uint8_t value)
+{
+   return (0x6996966996696996ULL >> (value >> 2)) & 1;
+}
+
 AVCodec g729_decoder =
 {
     "g729",

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list