Mercurial > mplayer.hg
comparison liba52/parse.c @ 29264:e83eef58b30a
Remove all kind of trailing whitespaces from all MPlayer's files.
This affects all kind of spaces (' ',^I,^M,^L,...): actually
[:space:] regex character set.
author | bircoph |
---|---|
date | Wed, 13 May 2009 15:22:13 +0000 |
parents | 94d9e6403ee4 |
children |
comparison
equal
deleted
inserted
replaced
29263:0f1b5b68af32 | 29264:e83eef58b30a |
---|---|
62 | 62 |
63 state = malloc (sizeof (a52_state_t)); | 63 state = malloc (sizeof (a52_state_t)); |
64 if (state == NULL) | 64 if (state == NULL) |
65 return NULL; | 65 return NULL; |
66 | 66 |
67 #if defined(__MINGW32__) && defined(HAVE_SSE) | 67 #if defined(__MINGW32__) && defined(HAVE_SSE) |
68 state->samples = av_malloc(256 * 12 * sizeof (sample_t)); | 68 state->samples = av_malloc(256 * 12 * sizeof (sample_t)); |
69 #else | 69 #else |
70 state->samples = memalign (16, 256 * 12 * sizeof (sample_t)); | 70 state->samples = memalign (16, 256 * 12 * sizeof (sample_t)); |
71 #endif | 71 #endif |
72 if(((int)state->samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){ | 72 if(((int)state->samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){ |
73 mm_accel &=~MM_ACCEL_X86_SSE; | 73 mm_accel &=~MM_ACCEL_X86_SSE; |
74 fprintf(stderr, "liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n"); | 74 fprintf(stderr, "liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n"); |
75 } | 75 } |
76 | 76 |
77 if (state->samples == NULL) { | 77 if (state->samples == NULL) { |
78 free (state); | 78 free (state); |
79 return NULL; | 79 return NULL; |
80 } | 80 } |
81 | 81 |
272 case EXP_D25: | 272 case EXP_D25: |
273 *(dest++) = exponent; | 273 *(dest++) = exponent; |
274 case EXP_D15: | 274 case EXP_D15: |
275 *(dest++) = exponent; | 275 *(dest++) = exponent; |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 return 0; | 279 return 0; |
280 } | 280 } |
281 | 281 |
282 static int parse_deltba (a52_state_t * state, int8_t * deltba) | 282 static int parse_deltba (a52_state_t * state, int8_t * deltba) |
320 static inline int16_t dither_gen (a52_state_t * state) | 320 static inline int16_t dither_gen (a52_state_t * state) |
321 { | 321 { |
322 int16_t nstate; | 322 int16_t nstate; |
323 | 323 |
324 nstate = dither_lut[state->lfsr_state >> 8] ^ (state->lfsr_state << 8); | 324 nstate = dither_lut[state->lfsr_state >> 8] ^ (state->lfsr_state << 8); |
325 | 325 |
326 state->lfsr_state = (uint16_t) nstate; | 326 state->lfsr_state = (uint16_t) nstate; |
327 | 327 |
328 return nstate; | 328 return nstate; |
329 } | 329 } |
330 | 330 |
650 lfeexpstr = EXP_REUSE; | 650 lfeexpstr = EXP_REUSE; |
651 if (state->chincpl) /* cplinu */ | 651 if (state->chincpl) /* cplinu */ |
652 cplexpstr = bitstream_get (state, 2); | 652 cplexpstr = bitstream_get (state, 2); |
653 for (i = 0; i < nfchans; i++) | 653 for (i = 0; i < nfchans; i++) |
654 chexpstr[i] = bitstream_get (state, 2); | 654 chexpstr[i] = bitstream_get (state, 2); |
655 if (state->lfeon) | 655 if (state->lfeon) |
656 lfeexpstr = bitstream_get (state, 1); | 656 lfeexpstr = bitstream_get (state, 1); |
657 | 657 |
658 for (i = 0; i < nfchans; i++) | 658 for (i = 0; i < nfchans; i++) |
659 if (chexpstr[i] != EXP_REUSE) { | 659 if (chexpstr[i] != EXP_REUSE) { |
660 if ((state->chincpl >> i) & 1) | 660 if ((state->chincpl >> i) & 1) |
868 | 868 |
869 if (coeff[i]) { | 869 if (coeff[i]) { |
870 if (blksw[i]) | 870 if (blksw[i]) |
871 a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, | 871 a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, |
872 bias); | 872 bias); |
873 else | 873 else |
874 a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, | 874 a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, |
875 bias); | 875 bias); |
876 } else { | 876 } else { |
877 int j; | 877 int j; |
878 | 878 |
897 | 897 |
898 if (blksw[0]) | 898 if (blksw[0]) |
899 for (i = 0; i < nfchans; i++) | 899 for (i = 0; i < nfchans; i++) |
900 a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, | 900 a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, |
901 state->bias); | 901 state->bias); |
902 else | 902 else |
903 for (i = 0; i < nfchans; i++) | 903 for (i = 0; i < nfchans; i++) |
904 a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, | 904 a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, |
905 state->bias); | 905 state->bias); |
906 } | 906 } |
907 | 907 |