From a7cc783d711f0f47eb748a33b55d0c4f57ac1840 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Thu, 14 Aug 2008 03:58:05 +0000 Subject: mlp: split simple inline function that xors 4 bytes into one. Originally committed as revision 14747 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mlp.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libavcodec/mlp.h') diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h index dc6856727a..a434cd1a22 100644 --- a/libavcodec/mlp.h +++ b/libavcodec/mlp.h @@ -107,4 +107,12 @@ int ff_mlp_init_crc2D(AVCodecParserContext *s); void ff_mlp_init_crc(); +/** XOR four bytes into one. */ +static inline uint8_t xor_32_to_8(uint32_t value) +{ + value ^= value >> 16; + value ^= value >> 8; + return value; +} + #endif /* FFMPEG_MLP_H */ -- cgit v1.2.3