changeset 7773:272a13ae94c0 libavcodec

Parity bit calculation routine for G.729
author voroshil
date Tue, 02 Sep 2008 17:15:28 +0000
parents 834a8f89b75e
children a570a1e80400
files g729dec.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/g729dec.c	Tue Sep 02 16:31:18 2008 +0000
+++ b/g729dec.c	Tue Sep 02 17:15:28 2008 +0000
@@ -71,6 +71,14 @@
     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",