[FFmpeg-cvslog] dcaenc: small quantization simplification.

Clément Bœsch git at videolan.org
Sat Jun 18 11:37:25 CEST 2011


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Jun 15 20:26:57 2011 +0200| [bde8055963ff3831091bf58a7b866e9eaaf7b3f5] | committer: Clément Bœsch

dcaenc: small quantization simplification.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bde8055963ff3831091bf58a7b866e9eaaf7b3f5
---

 libavcodec/dcaenc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 2b61bec..eccff08 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)



More information about the ffmpeg-cvslog mailing list