From b25a881851fb5d626feca27a6a028c733b43e459 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 2 Aug 2009 13:35:42 +0000 Subject: cosmetics: K&R coding style, prettyprinting Originally committed as revision 19564 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmaprodec.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'libavcodec/wmaprodec.c') diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 83c8cc5..21e4f48 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -13,7 +13,7 @@ static av_cold int decode_end(AVCodecContext *avctx) av_freep(&s->subwoofer_cutoffs); av_freep(&s->sf_offsets); - for (i=0 ; imdct_ctx[i]); return 0; @@ -24,8 +24,8 @@ static av_cold int decode_end(AVCodecContext *avctx) *@param s codec context *@param chgroup channel group for which the matrix needs to be calculated */ -static void decode_decorrelation_matrix(WMA3DecodeContext* s, - WMA3ChannelGroup* chgroup) +static void decode_decorrelation_matrix(WMA3DecodeContext *s, + WMA3ChannelGroup *chgroup) { int i; int offset = 0; @@ -33,25 +33,25 @@ static void decode_decorrelation_matrix(WMA3DecodeContext* s, memset(chgroup->decorrelation_matrix,0, sizeof(float) *s->num_channels * s->num_channels); - for (i=0;inum_channels * (chgroup->num_channels - 1) >> 1;i++) + for (i = 0; i < chgroup->num_channels * (chgroup->num_channels - 1) >> 1; i++) rotation_offset[i] = get_bits(&s->gb,6); - for (i=0;inum_channels;i++) + for (i = 0; i < chgroup->num_channels; i++) chgroup->decorrelation_matrix[chgroup->num_channels * i + i] = get_bits1(&s->gb) ? 1.0 : -1.0; - for (i=1;inum_channels;i++) { + for (i = 1; i < chgroup->num_channels; i++) { int x; - for (x=0;xdecorrelation_matrix[x * chgroup->num_channels + y]; float v2 = chgroup->decorrelation_matrix[i * chgroup->num_channels + y]; int n = rotation_offset[offset + x]; float sinv; float cosv; - if (n<32) { + if (n < 32) { sinv = sin64[n]; cosv = sin64[32-n]; } else { @@ -77,7 +77,7 @@ static void inverse_channel_transform(WMA3DecodeContext *s) { int i; - for (i=0;inum_chgroups;i++) { + for (i = 0; i < s->num_chgroups; i++) { if (s->chgroup[i].transform == 1) { /** M/S stereo decoding */ @@ -119,10 +119,10 @@ static void inverse_channel_transform(WMA3DecodeContext *s) if (*tb++ == 1) { int y; /** multiply values with the decorrelation_matrix */ - for (y=sfb[0];ysubframe_len);y++) { + for (y = sfb[0]; y < FFMIN(sfb[1], s->subframe_len); y++) { const float* mat = s->chgroup[i].decorrelation_matrix; - const float* data_end= data + num_channels; - float* data_ptr= data; + const float* data_end = data + num_channels; + float* data_ptr = data; float** ch; for (ch = ch_data;ch < ch_end; ch++) -- cgit v1.1