[FFmpeg-cvslog] wavpackenc: simplify "sign = ((sample) < 0) ? 1 : 0; "

Michael Niedermayer git at videolan.org
Thu Aug 15 11:34:59 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 14 19:20:13 2013 +0200| [bfbe07670bb0d0d902c03953d44f9482709696ee] | committer: Michael Niedermayer

wavpackenc: simplify "sign = ((sample) < 0) ? 1 : 0;"

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/wavpackenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 1a4f252..3cc74bd 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -2049,7 +2049,7 @@ static void wavpack_encode_sample(WavPackEncodeContext *s, WvChannel *c, int32_t
 {
     WavPackWords *w = &s->w;
     uint32_t ones_count, low, high;
-    int sign = ((sample) < 0) ? 1 : 0;
+    int sign = sample < 0;
 
     if (s->w.c[0].median[0] < 2 && !s->w.holding_zero && s->w.c[1].median[0] < 2) {
         if (w->zeros_acc) {



More information about the ffmpeg-cvslog mailing list