summaryrefslogtreecommitdiff
path: root/libavcodec/liba52
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/liba52')
-rw-r--r--libavcodec/liba52/bitstream.c2
-rw-r--r--libavcodec/liba52/bitstream.h4
-rw-r--r--libavcodec/liba52/crc.c12
-rw-r--r--libavcodec/liba52/imdct.c4
-rw-r--r--libavcodec/liba52/parse.c12
-rw-r--r--libavcodec/liba52/resample.c2
-rw-r--r--libavcodec/liba52/resample_mmx.c38
7 files changed, 37 insertions, 37 deletions
diff --git a/libavcodec/liba52/bitstream.c b/libavcodec/liba52/bitstream.c
index 89b69cff03..a760719d74 100644
--- a/libavcodec/liba52/bitstream.c
+++ b/libavcodec/liba52/bitstream.c
@@ -84,7 +84,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/libavcodec/liba52/bitstream.h b/libavcodec/liba52/bitstream.h
index f559fbf833..ed1a4dbeda 100644
--- a/libavcodec/liba52/bitstream.h
+++ b/libavcodec/liba52/bitstream.h
@@ -53,7 +53,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;
@@ -66,7 +66,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/libavcodec/liba52/crc.c b/libavcodec/liba52/crc.c
index 6698155bd4..1ec4b085f3 100644
--- a/libavcodec/liba52/crc.c
+++ b/libavcodec/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/libavcodec/liba52/imdct.c b/libavcodec/liba52/imdct.c
index 7a1690b63a..b701b41a56 100644
--- a/libavcodec/liba52/imdct.c
+++ b/libavcodec/liba52/imdct.c
@@ -248,7 +248,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;
@@ -301,7 +301,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;
BUTTERFLY_0 (a_r, a_i, t_i, t_r, buf1[i].imag, buf1[i].real);
diff --git a/libavcodec/liba52/parse.c b/libavcodec/liba52/parse.c
index d3e6914ea7..be402e2215 100644
--- a/libavcodec/liba52/parse.c
+++ b/libavcodec/liba52/parse.c
@@ -126,7 +126,7 @@ int a52_frame (a52_state_t * state, uint8_t * buf, int * flags,
{
static level_t clev[4] = { LEVEL (LEVEL_3DB), LEVEL (LEVEL_45DB),
LEVEL (LEVEL_6DB), LEVEL (LEVEL_45DB) };
- static level_t slev[4] = { LEVEL (LEVEL_3DB), LEVEL (LEVEL_6DB),
+ static level_t slev[4] = { LEVEL (LEVEL_3DB), LEVEL (LEVEL_6DB),
0, LEVEL (LEVEL_6DB) };
int chaninfo;
int acmod;
@@ -257,7 +257,7 @@ static int parse_exponents (a52_state_t * state, int expstr, int ngrps,
case EXP_D15:
*(dest++) = exponent;
}
- }
+ }
return 0;
}
@@ -305,7 +305,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 (3 * nstate) >> 2;
@@ -676,7 +676,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++)
@@ -894,7 +894,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 {
@@ -923,7 +923,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/libavcodec/liba52/resample.c b/libavcodec/liba52/resample.c
index 07e2d69478..faa6877fdd 100644
--- a/libavcodec/liba52/resample.c
+++ b/libavcodec/liba52/resample.c
@@ -37,7 +37,7 @@ void* tmp;
a52_resample=tmp;
return tmp;
}
-
+
av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
return NULL;
}
diff --git a/libavcodec/liba52/resample_mmx.c b/libavcodec/liba52/resample_mmx.c
index 315322e3ca..a4e313c606 100644
--- a/libavcodec/liba52/resample_mmx.c
+++ b/libavcodec/liba52/resample_mmx.c
@@ -1,10 +1,10 @@
// MMX optimizations from Michael Niedermayer (michaelni@gmx.at) (under GPL)
-/* optimization TODO / NOTES
- movntq is slightly faster (0.5% with the current test.c benchmark)
+/* optimization TODO / NOTES
+ movntq is slightly faster (0.5% with the current test.c benchmark)
(but thats just test.c so that needs to be testd in reallity)
- and it would mean (C / MMX2 / MMX / 3DNOW) versions
+ and it would mean (C / MMX2 / MMX / 3DNOW) versions
*/
static uint64_t __attribute__((aligned(8))) attribute_used magicF2W= 0x43c0000043c00000LL;
@@ -128,7 +128,7 @@ static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
"movq %%mm0, (%0, %%edi) \n\t"
"movq %%mm1, 8(%0, %%edi) \n\t"
"movq %%mm3, 16(%0, %%edi) \n\t"
-
+
"movd 1032(%1, %%esi), %%mm1 \n\t"
"punpckldq 12(%1, %%esi), %%mm1\n\t"
"movd 2060(%1, %%esi), %%mm2 \n\t"
@@ -142,7 +142,7 @@ static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
"packssdw %%mm3, %%mm2 \n\t"
"movq %%mm0, 24(%0, %%edi) \n\t"
"movq %%mm2, 32(%0, %%edi) \n\t"
-
+
"addl $16, %%esi \n\t"
" jnz 1b \n\t"
"emms \n\t"
@@ -235,7 +235,7 @@ static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
"movq %%mm0, (%0, %%edi) \n\t"
"movq %%mm2, 8(%0, %%edi) \n\t"
"movq %%mm4, 16(%0, %%edi) \n\t"
-
+
"movd 3080(%1, %%esi), %%mm0 \n\t"
"punpckldq 4104(%1, %%esi), %%mm0\n\t"
"movd 1032(%1, %%esi), %%mm1 \n\t"
@@ -252,7 +252,7 @@ static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
"packssdw %%mm3, %%mm2 \n\t"
"movq %%mm0, 24(%0, %%edi) \n\t"
"movq %%mm2, 32(%0, %%edi) \n\t"
-
+
"addl $16, %%esi \n\t"
" jnz 1b \n\t"
"emms \n\t"
@@ -311,12 +311,12 @@ static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
"1: \n\t"
"movq 1024(%1, %%esi), %%mm0 \n\t"
"movq 2048(%1, %%esi), %%mm1 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
+ "movq (%1, %%esi), %%mm5 \n\t"
"psubd %%mm7, %%mm0 \n\t"
"psubd %%mm7, %%mm1 \n\t"
"psubd %%mm7, %%mm5 \n\t"
"leal (%%esi, %%esi, 2), %%edi \n\t"
-
+
"pxor %%mm4, %%mm4 \n\t"
"packssdw %%mm5, %%mm0 \n\t" // FfAa
"packssdw %%mm4, %%mm1 \n\t" // 00Bb
@@ -326,7 +326,7 @@ static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
"punpckldq %%mm4, %%mm3 \n\t" // f0XX
"punpckldq %%mm6, %%mm0 \n\t" // 00ba
"punpckhdq %%mm1, %%mm3 \n\t" // BAf0
-
+
"movq %%mm0, (%0, %%edi) \n\t" // 00ba
"punpckhdq %%mm4, %%mm0 \n\t" // F000
"movq %%mm3, 8(%0, %%edi) \n\t" // BAf0
@@ -350,13 +350,13 @@ static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
"movq 1024(%1, %%esi), %%mm0 \n\t"
"movq 3072(%1, %%esi), %%mm1 \n\t"
"movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
+ "movq (%1, %%esi), %%mm5 \n\t"
"psubd %%mm7, %%mm0 \n\t"
"psubd %%mm7, %%mm1 \n\t"
"psubd %%mm7, %%mm4 \n\t"
"psubd %%mm7, %%mm5 \n\t"
"leal (%%esi, %%esi, 2), %%edi \n\t"
-
+
"packssdw %%mm4, %%mm0 \n\t" // EeAa
"packssdw %%mm5, %%mm1 \n\t" // FfBb
"movq %%mm0, %%mm2 \n\t" // EeAa
@@ -365,7 +365,7 @@ static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
"movq %%mm0, %%mm1 \n\t" // BAba
"punpckldq %%mm6, %%mm0 \n\t" // 00ba
"punpckhdq %%mm1, %%mm1 \n\t" // BABA
-
+
"movq %%mm0, (%0, %%edi) \n\t"
"punpckhdq %%mm2, %%mm0 \n\t" // FE00
"punpckldq %%mm1, %%mm2 \n\t" // BAfe
@@ -391,14 +391,14 @@ static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
"movq 2048(%1, %%esi), %%mm1 \n\t"
"movq 3072(%1, %%esi), %%mm2 \n\t"
"movq 4096(%1, %%esi), %%mm3 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
+ "movq (%1, %%esi), %%mm5 \n\t"
"psubd %%mm7, %%mm0 \n\t"
"psubd %%mm7, %%mm1 \n\t"
"psubd %%mm7, %%mm2 \n\t"
"psubd %%mm7, %%mm3 \n\t"
"psubd %%mm7, %%mm5 \n\t"
"leal (%%esi, %%esi, 2), %%edi \n\t"
-
+
"packssdw %%mm2, %%mm0 \n\t" // CcAa
"packssdw %%mm3, %%mm1 \n\t" // DdBb
"packssdw %%mm5, %%mm5 \n\t" // FfFf
@@ -413,7 +413,7 @@ static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
"punpckhdq %%mm1, %%mm1 \n\t" // BABA
"punpckldq %%mm1, %%mm4 \n\t" // BAf0
"punpckhdq %%mm3, %%mm2 \n\t" // F0DC
-
+
"movq %%mm0, (%0, %%edi) \n\t"
"movq %%mm4, 8(%0, %%edi) \n\t"
"movq %%mm2, 16(%0, %%edi) \n\t"
@@ -438,7 +438,7 @@ static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
"movq 4096(%1, %%esi), %%mm2 \n\t"
"movq 5120(%1, %%esi), %%mm3 \n\t"
"movq 2048(%1, %%esi), %%mm4 \n\t"
- "movq (%1, %%esi), %%mm5 \n\t"
+ "movq (%1, %%esi), %%mm5 \n\t"
"psubd %%mm7, %%mm0 \n\t"
"psubd %%mm7, %%mm1 \n\t"
"psubd %%mm7, %%mm2 \n\t"
@@ -446,7 +446,7 @@ static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
"psubd %%mm7, %%mm4 \n\t"
"psubd %%mm7, %%mm5 \n\t"
"leal (%%esi, %%esi, 2), %%edi \n\t"
-
+
"packssdw %%mm2, %%mm0 \n\t" // CcAa
"packssdw %%mm3, %%mm1 \n\t" // DdBb
"packssdw %%mm4, %%mm4 \n\t" // EeEe
@@ -461,7 +461,7 @@ static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
"punpckhdq %%mm1, %%mm1 \n\t" // BABA
"punpckldq %%mm1, %%mm4 \n\t" // BAfe
"punpckhdq %%mm3, %%mm2 \n\t" // FEDC
-
+
"movq %%mm0, (%0, %%edi) \n\t"
"movq %%mm4, 8(%0, %%edi) \n\t"
"movq %%mm2, 16(%0, %%edi) \n\t"