[FFmpeg-cvslog] r15154 - trunk/libavcodec/g729dec.c

voroshil subversion
Tue Sep 2 19:15:28 CEST 2008


Author: voroshil
Date: Tue Sep  2 19:15:28 2008
New Revision: 15154

Log:
Parity bit calculation routine for G.729



Modified:
   trunk/libavcodec/g729dec.c

Modified: trunk/libavcodec/g729dec.c
==============================================================================
--- trunk/libavcodec/g729dec.c	(original)
+++ trunk/libavcodec/g729dec.c	Tue Sep  2 19:15:28 2008
@@ -71,6 +71,14 @@ static inline uint16_t g729_random(uint1
     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",




More information about the ffmpeg-cvslog mailing list