summaryrefslogtreecommitdiff
path: root/libavcodec/dcaenc.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-06-15 20:26:57 +0200
committerClément Bœsch <ubitux@gmail.com>2011-06-18 11:36:35 +0200
commitbde8055963ff3831091bf58a7b866e9eaaf7b3f5 (patch)
tree9b64121183f35b365eb32d91adc0edd1235e18d0 /libavcodec/dcaenc.c
parent47a8243c0db3fe497c490dfe2727a7a8422596cb (diff)
downloadffmpeg-bde8055963ff3831091bf58a7b866e9eaaf7b3f5.tar.gz
dcaenc: small quantization simplification.
Diffstat (limited to 'libavcodec/dcaenc.c')
-rw-r--r--libavcodec/dcaenc.c3
1 files changed, 1 insertions, 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)