Mercurial > libavcodec.hg
changeset 11520:a791382fd782 libavcodec
Reindent after r22618.
author | vitor |
---|---|
date | Sun, 21 Mar 2010 11:36:17 +0000 |
parents | c091ab3b4135 |
children | 85d679e0b591 |
files | dct.c |
diffstat | 1 files changed, 43 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/dct.c Sun Mar 21 11:35:05 2010 +0000 +++ b/dct.c Sun Mar 21 11:36:17 2010 +0000 @@ -42,68 +42,69 @@ int n = 1 << ctx->nbits; int i; - float next = data[n - 1]; - float inv_n = 1.0f / n; + float next = data[n - 1]; + float inv_n = 1.0f / n; - for (i = n - 2; i >= 2; i -= 2) { - float val1 = data[i ]; - float val2 = data[i - 1] - data[i + 1]; - float c = COS(ctx, n, i); - float s = SIN(ctx, n, i); + for (i = n - 2; i >= 2; i -= 2) { + float val1 = data[i ]; + float val2 = data[i - 1] - data[i + 1]; + float c = COS(ctx, n, i); + float s = SIN(ctx, n, i); - data[i ] = c * val1 + s * val2; - data[i + 1] = s * val1 - c * val2; - } + data[i ] = c * val1 + s * val2; + data[i + 1] = s * val1 - c * val2; + } - data[1] = 2 * next; + data[1] = 2 * next; - ff_rdft_calc(&ctx->rdft, data); + ff_rdft_calc(&ctx->rdft, data); - for (i = 0; i < n / 2; i++) { - float tmp1 = data[i ] * inv_n; - float tmp2 = data[n - i - 1] * inv_n; - float csc = ctx->csc2[i] * (tmp1 - tmp2); + for (i = 0; i < n / 2; i++) { + float tmp1 = data[i ] * inv_n; + float tmp2 = data[n - i - 1] * inv_n; + float csc = ctx->csc2[i] * (tmp1 - tmp2); - tmp1 += tmp2; - data[i ] = tmp1 + csc; - data[n - i - 1] = tmp1 - csc; - } + tmp1 += tmp2; + data[i ] = tmp1 + csc; + data[n - i - 1] = tmp1 - csc; + } } static void ff_dct_calc_II_c(DCTContext *ctx, FFTSample *data) { int n = 1 << ctx->nbits; int i; - float next; - for (i=0; i < n/2; i++) { - float tmp1 = data[i ]; - float tmp2 = data[n - i - 1]; - float s = SIN(ctx, n, 2*i + 1); + float next; + + for (i=0; i < n/2; i++) { + float tmp1 = data[i ]; + float tmp2 = data[n - i - 1]; + float s = SIN(ctx, n, 2*i + 1); - s *= tmp1 - tmp2; - tmp1 = (tmp1 + tmp2) * 0.5f; + s *= tmp1 - tmp2; + tmp1 = (tmp1 + tmp2) * 0.5f; - data[i ] = tmp1 + s; - data[n-i-1] = tmp1 - s; - } + data[i ] = tmp1 + s; + data[n-i-1] = tmp1 - s; + } - ff_rdft_calc(&ctx->rdft, data); + ff_rdft_calc(&ctx->rdft, data); - next = data[1] * 0.5; - data[1] *= -1; + next = data[1] * 0.5; + data[1] *= -1; - for (i = n - 2; i >= 0; i -= 2) { - float inr = data[i ]; - float ini = data[i + 1]; - float c = COS(ctx, n, i); - float s = SIN(ctx, n, i); + for (i = n - 2; i >= 0; i -= 2) { + float inr = data[i ]; + float ini = data[i + 1]; + float c = COS(ctx, n, i); + float s = SIN(ctx, n, i); - data[i ] = c * inr + s * ini; + data[i ] = c * inr + s * ini; - data[i+1] = next; + data[i+1] = next; - next += s * inr - c * ini; - } + next += s * inr - c * ini; + } } void ff_dct_calc(DCTContext *s, FFTSample *data)