[FFmpeg-cvslog] Perform dequantization of channel coefficients

Mashiat Sarker Shakkhar git at videolan.org
Sat Dec 24 02:03:03 CET 2011


ffmpeg | branch: master | Mashiat Sarker Shakkhar <shahriman_ams at yahoo.com> | Fri Dec 23 13:21:33 2011 +0600| [70dd5a603cb9d1e7ba00640afa2da52ce5fabf3e] | committer: Mashiat Sarker Shakkhar

Perform dequantization of channel coefficients

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

 libavcodec/wmalosslessdec.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 67aa655..e520ad3 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1052,10 +1052,11 @@ static int decode_subframe(WmallDecodeCtx *s)
 {
     int offset = s->samples_per_frame;
     int subframe_len = s->samples_per_frame;
-    int i;
+    int i, j;
     int total_samples   = s->samples_per_frame * s->num_channels;
     int rawpcm_tile;
     int padding_zeroes;
+    int quant_stepsize = s->quant_stepsize;
 
     s->subframe_offset = get_bits_count(&s->gb);
 
@@ -1155,7 +1156,6 @@ static int decode_subframe(WmallDecodeCtx *s)
     if(rawpcm_tile) {
 	
 	int bits = s->bits_per_sample - padding_zeroes;
-	int j;
 	dprintf(s->avctx, "RAWPCM %d bits per sample. total %d bits, remain=%d\n", bits,
 		bits * s->num_channels * subframe_len, get_bits_count(&s->gb));
 	for(i = 0; i < s->num_channels; i++) {
@@ -1182,6 +1182,11 @@ static int decode_subframe(WmallDecodeCtx *s)
     if(s->do_ac_filter)
         revert_acfilter(s, subframe_len);
 
+    /* Dequantize */
+    for (i = 0; i < s->num_channels; i++)
+        for (j = 0; j < subframe_len; j++)
+            s->channel_residues[i][j] *= quant_stepsize;
+
     /** handled one subframe */
 
     for (i = 0; i < s->channels_for_cur_subframe; i++) {



More information about the ffmpeg-cvslog mailing list