Commit d3bb8ad7 authored by Vladimir Voroshilov's avatar Vladimir Voroshilov

Parity bit calculation routine for G.729

Originally committed as revision 15154 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d0b41d89
...@@ -71,6 +71,14 @@ static inline uint16_t g729_random(uint16_t value) ...@@ -71,6 +71,14 @@ static inline uint16_t g729_random(uint16_t value)
return 31821 * value + 13849; 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 = AVCodec g729_decoder =
{ {
"g729", "g729",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment