[FFmpeg-cvslog] dpcm: use sol_table_16 directly instead of through the DPCMContext.

Justin Ruggles git at videolan.org
Sat Oct 1 03:06:43 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Sep 11 12:43:03 2011 -0400| [5a54d5101780421cdcb71c018eea157e3d4d3c8f] | committer: Justin Ruggles

dpcm: use sol_table_16 directly instead of through the DPCMContext.

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

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

diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index 3ddc676..2491292 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -146,7 +146,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
             s->sample[0] = s->sample[1] = 0x80;
             break;
         case 3:
-            s->sol_table = sol_table_16;
             break;
         default:
             av_log(avctx, AV_LOG_ERROR, "Unknown SOL subcodec\n");
@@ -297,8 +296,8 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         } else {
             while (buf < buf_end) {
                 uint8_t n = *buf++;
-                if (n & 0x80) s->sample[ch] -= s->sol_table[n & 0x7F];
-                else          s->sample[ch] += s->sol_table[n & 0x7F];
+                if (n & 0x80) s->sample[ch] -= sol_table_16[n & 0x7F];
+                else          s->sample[ch] += sol_table_16[n & 0x7F];
                 s->sample[ch] = av_clip_int16(s->sample[ch]);
                 *output_samples++ = s->sample[ch];
                 /* toggle channel */



More information about the ffmpeg-cvslog mailing list