Reindent mace.c, its indentation was completly inconsistent with the coding rules.

Originally committed as revision 15204 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak
2008-09-04 23:00:34 +00:00
parent b0880d5da4
commit 251d75f292

View File

@ -241,33 +241,32 @@ typedef struct MACEContext {
} MACEContext;
/* /// "chomp3()" */
static void chomp3(MACEContext *ctx,
uint8_t val,
const uint16_t tab1[],
const uint16_t tab2[][8],
uint32_t numChannels)
static void chomp3(MACEContext *ctx, uint8_t val, const uint16_t tab1[],
const uint16_t tab2[][8], uint32_t numChannels)
{
short current;
current = (short) tab2[(ctx->index & 0x7f0) >> 4][val];
if (current+ctx->lev > 32767) current=32767;
else if (current+ctx->lev < -32768) current=-32767;
else current+=ctx->lev;
if (current + ctx->lev > 32767)
current = 32767;
else if (current + ctx->lev < -32768)
current = -32767;
else
current += ctx->lev;
ctx->lev = current - (current >> 3);
//*ctx->outPtr++=current >> 8;
*ctx->outPtr = current;
ctx->outPtr += numChannels;
if ( ( ctx->index += tab1[val]-(ctx->index>>5) ) < 0 ) ctx->index = 0;
if (( ctx->index += tab1[val]-(ctx->index >> 5) ) < 0)
ctx->index = 0;
}
/* \\\ */
/* /// "Exp1to3()" */
static void Exp1to3(MACEContext *ctx,
const uint8_t *inBuffer,
void *outBuffer,
uint32_t cnt,
uint32_t numChannels,
uint32_t whichChannel)
static void Exp1to3(MACEContext *ctx, const uint8_t *inBuffer, void *outBuffer,
uint32_t cnt, uint32_t numChannels, uint32_t whichChannel)
{
uint8_t pkt;
@ -307,27 +306,31 @@ static void Exp1to3(MACEContext *ctx,
/* \\\ */
/* /// "chomp6()" */
static void chomp6(MACEContext *ctx,
uint8_t val,
const uint16_t tab1[],
const uint16_t tab2[][8],
uint32_t numChannels)
static void chomp6(MACEContext *ctx, uint8_t val, const uint16_t tab1[],
const uint16_t tab2[][8], uint32_t numChannels)
{
short current;
current = (short)tab2[(ctx->index & 0x7f0) >> 4][val];
if ((ctx->previous ^ current) >= 0) {
if (ctx->factor+506>32767) ctx->factor=32767;
else ctx->factor+=506;
if (ctx->factor + 506 > 32767)
ctx->factor = 32767;
else
ctx->factor += 506;
} else {
if (ctx->factor-314<-32768) ctx->factor=-32767;
else ctx->factor-=314;
if (ctx->factor - 314 < -32768)
ctx->factor = -32767;
else
ctx->factor -= 314;
}
if (current+ctx->level>32767) current=32767;
else if (current+ctx->level<-32768) current=-32767;
else current+=ctx->level;
if (current + ctx->level > 32767)
current = 32767;
else if (current + ctx->level < -32768)
current = -32767;
else
current += ctx->level;
ctx->level = ((current*ctx->factor) >> 15);
current >>= 1;
@ -341,17 +344,14 @@ static void chomp6(MACEContext *ctx,
ctx->prev2 = ctx->previous;
ctx->previous = current;
if( ( ctx->index += tab1[val]-(ctx->index>>5) ) < 0 ) ctx->index = 0;
if ((ctx->index += tab1[val] - (ctx->index >> 5)) < 0)
ctx->index = 0;
}
/* \\\ */
/* /// "Exp1to6()" */
static void Exp1to6(MACEContext *ctx,
const uint8_t *inBuffer,
void *outBuffer,
uint32_t cnt,
uint32_t numChannels,
uint32_t whichChannel)
static void Exp1to6(MACEContext *ctx, const uint8_t *inBuffer, void *outBuffer,
uint32_t cnt, uint32_t numChannels, uint32_t whichChannel)
{
uint8_t pkt;