aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2008-09-02 17:15:28 +0000
committerVladimir Voroshilov <voroshil@gmail.com>2008-09-02 17:15:28 +0000
commitd3bb8ad7afcfa82ed02fba1cd20b933cc45454d6 (patch)
treeec1bc2eaf3214b5332d94912603c88efc2a5eef7
parentd0b41d89318a2f9232444f5ead5e59df9da3cab6 (diff)
downloadffmpeg-d3bb8ad7afcfa82ed02fba1cd20b933cc45454d6.tar.gz
Parity bit calculation routine for G.729
Originally committed as revision 15154 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/g729dec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index f17524aa5c..b2761e4df0 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",