On Mon, Apr 25, 2011 at 11:41:11AM +0200, Vitor Sessak wrote:
> [...]
Here is a cosmetics patch for squashing into your changeset, as per
the boy scout rule[1].
Diego
[1] http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index b91ee12..accaae3 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -122,7 +122,7 @@ typedef struct {
FFTContext mdct_ctx;
} ATRAC3Context;
-static DECLARE_ALIGNED(32, float,mdct_window)[512];
+static DECLARE_ALIGNED(32, float, mdct_window)[512];
static VLC spectral_coeff_tab[7];
static float gain_tab1[16];
static float gain_tab2[31];
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index af2bee9..79aee2e 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -153,7 +153,7 @@ typedef struct cook {
/* data buffers */
uint8_t* decoded_bytes_buffer;
- DECLARE_ALIGNED(32, float,mono_mdct_output)[2048];
+ DECLARE_ALIGNED(32, float, mono_mdct_output)[2048];
float decode_buffer_1[1024];
float decode_buffer_2[1024];
float decode_buffer_0[1060]; /* static allocation for joint decode */
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 5bd8463..aa34b34 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -114,18 +114,18 @@ static av_cold void fft_perm_avx(FFTContext *s)
int i;
int n = 1 << s->nbits;
- for(i = 0; i < n; i += 16) {
+ for (i = 0; i < n; i += 16) {
int k;
if (is_second_half_of_fft32(i, n)) {
- for (k=0; k < 16; k++)
- s->revtab[-split_radix_permutation(i+k, n, s->inverse) & (n-1)] =
+ for (k = 0; k < 16; k++)
+ s->revtab[-split_radix_permutation(i + k, n, s->inverse) & (n - 1)] =
i + avx_tab[k];
} else {
- for (k=0; k < 16; k++) {
+ for (k = 0; k < 16; k++) {
int j = i + k;
- j = (j&~7) | ((j>>1)&3) | ((j<<2)&4);
- s->revtab[-split_radix_permutation(i + k, n, s->inverse) & (n-1)] = j;
+ j = (j & ~7) | ((j >> 1) & 3) | ((j << 2) & 4);
+ s->revtab[-split_radix_permutation(i + k, n, s->inverse) & (n - 1)] = j;
}
}
}
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 12aaed7..59c1b3b 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -47,7 +47,7 @@
typedef struct NellyMoserDecodeContext {
AVCodecContext* avctx;
- DECLARE_ALIGNED(32, float,float_buf)[NELLY_SAMPLES];
+ DECLARE_ALIGNED(32, float, float_buf)[NELLY_SAMPLES];
float state[128];
AVLFG random_state;
GetBitContext gb;
@@ -55,7 +55,7 @@ typedef struct NellyMoserDecodeContext {
DSPContext dsp;
FFTContext imdct_ctx;
FmtConvertContext fmt_conv;
- DECLARE_ALIGNED(32, float,imdct_out)[NELLY_BUF_LEN * 2];
+ DECLARE_ALIGNED(32, float, imdct_out)[NELLY_BUF_LEN * 2];
} NellyMoserDecodeContext;
static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in)
diff --git a/libavcodec/x86/fft.c b/libavcodec/x86/fft.c
index f0b3284..b29412c 100644
--- a/libavcodec/x86/fft.c
+++ b/libavcodec/x86/fft.c
@@ -27,10 +27,10 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
int has_vectors = av_get_cpu_flags();
if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
/* AVX for SB */
- s->imdct_calc = ff_imdct_calc_sse;
- s->imdct_half = ff_imdct_half_avx;
- s->fft_permute = ff_fft_permute_sse;
- s->fft_calc = ff_fft_calc_avx;
+ s->imdct_calc = ff_imdct_calc_sse;
+ s->imdct_half = ff_imdct_half_avx;
+ s->fft_permute = ff_fft_permute_sse;
+ s->fft_calc = ff_fft_calc_avx;
s->fft_permutation = FF_FFT_PERM_AVX;
} else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
/* SSE for P3/P4/K8 */
diff --git a/libavcodec/x86/fft_sse.c b/libavcodec/x86/fft_sse.c
index f068718..5b52988 100644
--- a/libavcodec/x86/fft_sse.c
+++ b/libavcodec/x86/fft_sse.c
@@ -83,7 +83,7 @@ void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input)
long n = s->mdct_size;
long n4 = n >> 2;
- s->imdct_half(s, output+n4, input);
+ s->imdct_half(s, output + n4, input);
j = -n;
k = n-16;
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel