# HG changeset patch # User voroshil # Date 1220375728 0 # Node ID 272a13ae94c0be84b5a1df5b70c6c4c6487dab46 # Parent 834a8f89b75ee4eae0e0040e02c7bb3d75e3e8a4 Parity bit calculation routine for G.729 diff -r 834a8f89b75e -r 272a13ae94c0 g729dec.c --- 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",