From bde8055963ff3831091bf58a7b866e9eaaf7b3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Wed, 15 Jun 2011 20:26:57 +0200 Subject: [PATCH] dcaenc: small quantization simplification. --- libavcodec/dcaenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index 2b61bec98c..eccff08c03 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -365,8 +365,7 @@ static inline uint32_t quantize(int32_t sample, int bits) { av_assert0(sample < 1 << (bits - 1)); av_assert0(sample >= -(1 << (bits - 1))); - sample &= sample & ((1 << bits) - 1); - return sample; + return sample & ((1 << bits) - 1); } static inline int find_scale_factor7(int64_t max_value, int bits)