diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-11-30 21:24:21 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-11-30 21:24:21 +0000 |
commit | add0bcc4c9191cb8980d0b6935ca5d51a9928d82 (patch) | |
tree | 1ef3c98b5183a299107193ceca9135e9f3c57bfc /src/liba52 | |
parent | 6d410af50e98533e07dd8ebb8fdd3870192f8a73 (diff) | |
download | xine-lib-add0bcc4c9191cb8980d0b6935ca5d51a9928d82.tar.gz xine-lib-add0bcc4c9191cb8980d0b6935ca5d51a9928d82.tar.bz2 |
Trim trailing space & reduce space+tab.
Diffstat (limited to 'src/liba52')
-rw-r--r-- | src/liba52/bit_allocate.c | 2 | ||||
-rw-r--r-- | src/liba52/bitstream.c | 2 | ||||
-rw-r--r-- | src/liba52/bitstream.h | 4 | ||||
-rw-r--r-- | src/liba52/crc.c | 12 | ||||
-rw-r--r-- | src/liba52/imdct.c | 4 | ||||
-rw-r--r-- | src/liba52/parse.c | 10 | ||||
-rw-r--r-- | src/liba52/xine_a52_decoder.c | 24 |
7 files changed, 29 insertions, 29 deletions
diff --git a/src/liba52/bit_allocate.c b/src/liba52/bit_allocate.c index 0567b2285..9da1661dc 100644 --- a/src/liba52/bit_allocate.c +++ b/src/liba52/bit_allocate.c @@ -100,7 +100,7 @@ static int8_t latab[256] = { 0, 0, 0, 0 }; -#define UPDATE_LEAK() \ +#define UPDATE_LEAK() \ do { \ fastleak += fdecay; \ if (fastleak > psd + fgain) \ diff --git a/src/liba52/bitstream.c b/src/liba52/bitstream.c index 04e8ca6d0..b645cb79f 100644 --- a/src/liba52/bitstream.c +++ b/src/liba52/bitstream.c @@ -88,7 +88,7 @@ int32_t a52_bitstream_get_bh_2 (a52_state_t * state, uint32_t num_bits) if (num_bits != 0) result = (result << num_bits) | (state->current_word >> (32 - num_bits)); - + state->bits_left = 32 - num_bits; return result; diff --git a/src/liba52/bitstream.h b/src/liba52/bitstream.h index f242c37c4..59f91cc0e 100644 --- a/src/liba52/bitstream.h +++ b/src/liba52/bitstream.h @@ -57,7 +57,7 @@ int32_t a52_bitstream_get_bh_2 (a52_state_t * state, uint32_t num_bits); static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits) { uint32_t result; - + if (num_bits < state->bits_left) { result = (state->current_word << (32 - state->bits_left)) >> (32 - num_bits); state->bits_left -= num_bits; @@ -70,7 +70,7 @@ static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits) static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits) { int32_t result; - + if (num_bits < state->bits_left) { result = (((int32_t)state->current_word) << (32 - state->bits_left)) >> (32 - num_bits); state->bits_left -= num_bits; diff --git a/src/liba52/crc.c b/src/liba52/crc.c index 38254c9ef..ac7666a90 100644 --- a/src/liba52/crc.c +++ b/src/liba52/crc.c @@ -1,23 +1,23 @@ -/* +/* * crc.c * * Copyright (C) Aaron Holtzman - May 1999 * * This file is part of ac3dec, a free Dolby AC-3 stream decoder. - * + * * ac3dec is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. - * + * * ac3dec is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * */ @@ -25,7 +25,7 @@ #include <stdio.h> #include <inttypes.h> -static const uint16_t crc_lut[256] = +static const uint16_t crc_lut[256] = { 0x0000,0x8005,0x800f,0x000a,0x801b,0x001e,0x0014,0x8011, 0x8033,0x0036,0x003c,0x8039,0x0028,0x802d,0x8027,0x0022, diff --git a/src/liba52/imdct.c b/src/liba52/imdct.c index 5835e70a1..672b54c2e 100644 --- a/src/liba52/imdct.c +++ b/src/liba52/imdct.c @@ -247,7 +247,7 @@ void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias) sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; const sample_t * window = a52_imdct_window; complex_t buf[128]; - + for (i = 0; i < 128; i++) { k = fftorder[i]; t_r = pre1[i].real; @@ -311,7 +311,7 @@ void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias) /* Post IFFT complex multiply */ /* Window and convert to real valued signal */ for (i = 0; i < 32; i++) { - /* y1[n] = z1[n] * (xcos2[n] + j * xs in2[n]) ; */ + /* y1[n] = z1[n] * (xcos2[n] + j * xs in2[n]) ; */ t_r = post2[i].real; t_i = post2[i].imag; diff --git a/src/liba52/parse.c b/src/liba52/parse.c index f1adc2f40..c7531ec61 100644 --- a/src/liba52/parse.c +++ b/src/liba52/parse.c @@ -253,7 +253,7 @@ static int parse_exponents (a52_state_t * state, int expstr, int ngrps, case EXP_D15: *(dest++) = exponent; } - } + } return 0; } @@ -301,7 +301,7 @@ static inline int16_t dither_gen (a52_state_t * state) int16_t nstate; nstate = dither_lut[state->lfsr_state >> 8] ^ (state->lfsr_state << 8); - + state->lfsr_state = (uint16_t) nstate; return nstate; @@ -631,7 +631,7 @@ int a52_block (a52_state_t * state) cplexpstr = bitstream_get (state, 2); for (i = 0; i < nfchans; i++) chexpstr[i] = bitstream_get (state, 2); - if (state->lfeon) + if (state->lfeon) lfeexpstr = bitstream_get (state, 1); for (i = 0; i < nfchans; i++) @@ -849,7 +849,7 @@ int a52_block (a52_state_t * state) if (blksw[i]) a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, bias); - else + else a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, bias); } else { @@ -878,7 +878,7 @@ int a52_block (a52_state_t * state) for (i = 0; i < nfchans; i++) a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, state->bias); - else + else for (i = 0; i < nfchans; i++) a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, state->bias); diff --git a/src/liba52/xine_a52_decoder.c b/src/liba52/xine_a52_decoder.c index 47babce7a..9e590f77d 100644 --- a/src/liba52/xine_a52_decoder.c +++ b/src/liba52/xine_a52_decoder.c @@ -72,11 +72,11 @@ int a52file; typedef struct { audio_decoder_class_t decoder_class; config_values_t *config; - + float a52_level; int disable_dynrng_compress; int enable_surround_downmix; - + } a52dec_class_t; typedef struct a52dec_decoder_s { @@ -221,7 +221,7 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts, int previe */ #ifdef LOG_PTS printf("a52dec:decode_frame:pts=%lld\n",pts); -#endif +#endif if (!this->bypass_mode) { int a52_output_flags, i; @@ -273,7 +273,7 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts, int previe this->stream->audio_out->close (this->stream->audio_out, this->stream); - this->output_open = (this->stream->audio_out->open) (this->stream->audio_out, + this->output_open = (this->stream->audio_out->open) (this->stream->audio_out, this->stream, 16, this->a52_sample_rate, output_mode) ; @@ -297,13 +297,13 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts, int previe for (i = 0; i < 6; i++) { if (a52_block (this->a52_state)) { xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "liba52: a52_block error on audio channel %d\n", i); -#if 0 +#if 0 for(n=0;n<2000;n++) { printf("%02x ",this->frame_buffer[n]); if ((n % 32) == 0) printf("\n"); } printf("\n"); -#endif +#endif buf->num_frames = 0; break; } @@ -457,7 +457,7 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { * We call the start of an A52 frame a frame header. * So, if a A52 pack has 2 "Number of frame headers" is means that the A52 pack contains 2 A52 frame headers. * The "First access unit" then tells us which A52 frame the PTS value applies to. - * + * * Take the following example: - * PACK1: PTS = 10. Contains the entire A52 frame1, followed by the beginning of the frame2. PTS applies to frame1. * PACK2: PTS = 1000, Contains the rest of frame2, and the whole of frame3. and the start of frame4. PTS applies to frame4. @@ -579,14 +579,14 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { } } break; - + case 2: /* Filling frame_buffer with sync_info bytes */ *this->frame_ptr++ = *current++; this->frame_todo--; if (this->frame_todo < 1) { this->sync_state = 3; } else break; - + case 3: /* Ready for decode */ crc16 = (uint16_t) ((this->frame_buffer[2] << 8) | this->frame_buffer[3]) ; crc16_result = crc16_block(&this->frame_buffer[2], this->frame_length - 2) ; /* frame_length */ @@ -620,7 +620,7 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->syncword = 0; this->sync_state = 0; break; - default: /* No come here */ + default: /* No come here */ break; } } @@ -674,14 +674,14 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->pts_list_position = 0; if( !this->a52_state ) { - this->a52_state = + this->a52_state = #ifdef HAVE_A52DEC_A52_H /* External liba52 */ /* When using external liba52, enable _all_ capabilities, even if that might break stuff if they add some new capability that depends on CPU's caps. At the moment the only capability is DJBFFT, which is tested only if djbfft is being used at compile time. - + The actual question would be: why don't they check for capabilities themselves? */ |