[FFmpeg-cvslog] dpcm: consistently use the variable name 'n' for the next input byte.
Justin Ruggles
git at videolan.org
Sat Oct 1 03:06:42 CEST 2011
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Sep 11 12:08:38 2011 -0400| [989bb7bd0477ef467f374dd8464a88d039f86ebe] | committer: Justin Ruggles
dpcm: consistently use the variable name 'n' for the next input byte.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=989bb7bd0477ef467f374dd8464a88d039f86ebe
---
libavcodec/dpcm.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index ef90ab3..a024671 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -176,7 +176,6 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
int stereo = s->channels - 1;
short *output_samples = data;
int shift[2];
- unsigned char byte;
short diff;
if (!buf_size)
@@ -266,12 +265,12 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
}
while (in < buf_size) {
- byte = buf[in++];
- diff = (byte & 0xFC) << 8;
- if ((byte & 0x03) == 3)
+ uint8_t n = buf[in++];
+ diff = (n & 0xFC) << 8;
+ if ((n & 0x03) == 3)
shift[ch]++;
else
- shift[ch] -= (2 * (byte & 3));
+ shift[ch] -= (2 * (n & 3));
/* saturate the shifter to a lower limit of 0 */
if (shift[ch] < 0)
shift[ch] = 0;
@@ -303,8 +302,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
}
} else {
while (in < buf_size) {
- int n;
- n = buf[in++];
+ uint8_t n = buf[in++];
if (n & 0x80) s->sample[ch] -= s->sol_table[n & 0x7F];
else s->sample[ch] += s->sol_table[n & 0x7F];
s->sample[ch] = av_clip_int16(s->sample[ch]);
More information about the ffmpeg-cvslog
mailing list