]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Parity bit calculation routine for G.729
authorvoroshil <voroshil@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 2 Sep 2008 17:15:28 +0000 (17:15 +0000)
committervoroshil <voroshil@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 2 Sep 2008 17:15:28 +0000 (17:15 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15154 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/g729dec.c

index f17524aa5c2070296444369f7635250024d885e0..b2761e4df01e2f8c1a20ead800ccc59bfd01c8a2 100644 (file)
@@ -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",