[FFmpeg-cvslog] dcaenc: use put_sbits()

James Almer git at videolan.org
Sat Apr 18 19:20:11 CEST 2015


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Apr 17 23:25:40 2015 -0300| [b5564e041bdcd3c527c9ad67300313f9c84b0994] | committer: James Almer

dcaenc: use put_sbits()

Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index d57d658..c8a215c 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -847,8 +847,7 @@ static void put_subframe_samples(DCAEncContext *c, int ss, int band, int ch)
         int i;
         for (i = 0; i < 8; i++) {
             int bits = bit_consumption[c->abits[band][ch]] / 16;
-            int32_t mask = (1 << bits) - 1;
-            put_bits(&c->pb, bits, c->quantized[ss * 8 + i][band][ch] & mask);
+            put_sbits(&c->pb, bits, c->quantized[ss * 8 + i][band][ch]);
         }
     }
 }



More information about the ffmpeg-cvslog mailing list