diff options
author | Vladimir Voroshilov <voroshil@gmail.com> | 2008-09-02 17:15:28 +0000 |
---|---|---|
committer | Vladimir Voroshilov <voroshil@gmail.com> | 2008-09-02 17:15:28 +0000 |
commit | d3bb8ad7afcfa82ed02fba1cd20b933cc45454d6 (patch) | |
tree | ec1bc2eaf3214b5332d94912603c88efc2a5eef7 /libavcodec/g729dec.c | |
parent | d0b41d89318a2f9232444f5ead5e59df9da3cab6 (diff) | |
download | ffmpeg-streaming-d3bb8ad7afcfa82ed02fba1cd20b933cc45454d6.zip ffmpeg-streaming-d3bb8ad7afcfa82ed02fba1cd20b933cc45454d6.tar.gz |
Parity bit calculation routine for G.729
Originally committed as revision 15154 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g729dec.c')
-rw-r--r-- | libavcodec/g729dec.c | 8 |
1 files changed, 8 insertions, 0 deletions
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", |