1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/mpegaudiodec_template: Fix some whitespace issues

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-08-05 08:54:13 +02:00
parent 5036d7b20c
commit 2c35797e18

View File

@ -118,9 +118,9 @@ static INTFLOAT is_table[2][16];
static INTFLOAT is_table_lsf[2][2][16]; static INTFLOAT is_table_lsf[2][2][16];
static INTFLOAT csa_table[8][4]; static INTFLOAT csa_table[8][4];
static int16_t division_tab3[1<<6 ]; static int16_t division_tab3[1 << 6 ];
static int16_t division_tab5[1<<8 ]; static int16_t division_tab5[1 << 8 ];
static int16_t division_tab9[1<<11]; static int16_t division_tab9[1 << 11];
static int16_t * const division_tabs[4] = { static int16_t * const division_tabs[4] = {
division_tab3, division_tab5, NULL, division_tab9 division_tab3, division_tab5, NULL, division_tab9
@ -255,7 +255,7 @@ static inline int l3_unscale(int value, int exponent)
#endif #endif
if (e > (SUINT)31) if (e > (SUINT)31)
return 0; return 0;
m = (m + ((1U << e)>>1)) >> e; m = (m + ((1U << e) >> 1)) >> e;
return m; return m;
} }
@ -304,8 +304,8 @@ static av_cold void decode_init_static(void)
j = 0; j = 0;
for (x = 0; x < xsize; x++) { for (x = 0; x < xsize; x++) {
for (y = 0; y < xsize; y++) { for (y = 0; y < xsize; y++) {
tmp_bits [(x << 5) | y | ((x&&y)<<4)]= h->bits [j ]; tmp_bits [(x << 5) | y | ((x && y) << 4)]= h->bits [j ];
tmp_codes[(x << 5) | y | ((x&&y)<<4)]= h->codes[j++]; tmp_codes[(x << 5) | y | ((x && y) << 4)]= h->codes[j++];
} }
} }
@ -345,7 +345,7 @@ static av_cold void decode_init_static(void)
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
if (ff_mpa_quant_bits[i] < 0) { if (ff_mpa_quant_bits[i] < 0) {
for (j = 0; j < (1 << (-ff_mpa_quant_bits[i]+1)); j++) { for (j = 0; j < (1 << (-ff_mpa_quant_bits[i] + 1)); j++) {
int val1, val2, val3, steps; int val1, val2, val3, steps;
int val = j; int val = j;
steps = ff_mpa_quant_steps[i]; steps = ff_mpa_quant_steps[i];
@ -513,8 +513,8 @@ static int handle_crc(MPADecodeContext *s, int sec_len)
crc_val = av_crc(crc_tab, crc_val, &buf[6], sec_byte_len); crc_val = av_crc(crc_tab, crc_val, &buf[6], sec_byte_len);
AV_WB32(tmp_buf, AV_WB32(tmp_buf,
((buf[6 + sec_byte_len] & (0xFF00>>sec_rem_bits))<<24) + ((buf[6 + sec_byte_len] & (0xFF00 >> sec_rem_bits)) << 24) +
((s->crc<<16) >> sec_rem_bits)); ((s->crc << 16) >> sec_rem_bits));
crc_val = av_crc(crc_tab, crc_val, tmp_buf, 3); crc_val = av_crc(crc_tab, crc_val, tmp_buf, 3);
@ -735,7 +735,7 @@ static int mp_decode_layer2(MPADecodeContext *s)
int mant, scale0, scale1; int mant, scale0, scale1;
scale0 = scale_factors[0][i][k]; scale0 = scale_factors[0][i][k];
scale1 = scale_factors[1][i][k]; scale1 = scale_factors[1][i][k];
qindex = alloc_table[j+b]; qindex = alloc_table[j + b];
bits = ff_mpa_quant_bits[qindex]; bits = ff_mpa_quant_bits[qindex];
if (bits < 0) { if (bits < 0) {
/* 3 values at the same time */ /* 3 values at the same time */
@ -929,8 +929,8 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
y = get_vlc2(&s->gb, vlc->table, 7, 3); y = get_vlc2(&s->gb, vlc->table, 7, 3);
if (!y) { if (!y) {
g->sb_hybrid[s_index ] = g->sb_hybrid[s_index ] =
g->sb_hybrid[s_index+1] = 0; g->sb_hybrid[s_index + 1] = 0;
s_index += 2; s_index += 2;
continue; continue;
} }
@ -958,7 +958,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
v = l3_unscale(y, exponent); v = l3_unscale(y, exponent);
if (get_bits1(&s->gb)) if (get_bits1(&s->gb))
v = -v; v = -v;
g->sb_hybrid[s_index+1] = v; g->sb_hybrid[s_index + 1] = v;
} }
} else { } else {
x = y >> 5; x = y >> 5;
@ -1004,10 +1004,10 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1); code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1);
ff_dlog(s->avctx, "t=%d code=%d\n", g->count1table_select, code); ff_dlog(s->avctx, "t=%d code=%d\n", g->count1table_select, code);
g->sb_hybrid[s_index+0] = g->sb_hybrid[s_index + 0] =
g->sb_hybrid[s_index+1] = g->sb_hybrid[s_index + 1] =
g->sb_hybrid[s_index+2] = g->sb_hybrid[s_index + 2] =
g->sb_hybrid[s_index+3] = 0; g->sb_hybrid[s_index + 3] = 0;
while (code) { while (code) {
static const int idxtab[16] = { 3,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0 }; static const int idxtab[16] = { 3,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0 };
int v; int v;
@ -1433,7 +1433,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
if (!s->adu_mode) { if (!s->adu_mode) {
int skip; int skip;
const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb) >> 3);
s->extrasize = av_clip((get_bits_left(&s->gb) >> 3) - s->extrasize, 0, s->extrasize = av_clip((get_bits_left(&s->gb) >> 3) - s->extrasize, 0,
FFMAX(0, LAST_BUF_SIZE - s->last_buf_size)); FFMAX(0, LAST_BUF_SIZE - s->last_buf_size));
av_assert1((get_bits_count(&s->gb) & 7) == 0); av_assert1((get_bits_count(&s->gb) & 7) == 0);
@ -1629,7 +1629,7 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples,
align_get_bits(&s->gb); align_get_bits(&s->gb);
i = (get_bits_left(&s->gb) >> 3) - s->extrasize; i = (get_bits_left(&s->gb) >> 3) - s->extrasize;
if (i >= 0 && i <= BACKSTEP_SIZE) { if (i >= 0 && i <= BACKSTEP_SIZE) {
memmove(s->last_buf, s->gb.buffer + (get_bits_count(&s->gb)>>3), i); memmove(s->last_buf, s->gb.buffer + (get_bits_count(&s->gb) >> 3), i);
s->last_buf_size=i; s->last_buf_size=i;
} else } else
av_log(s->avctx, AV_LOG_ERROR, "invalid old backstep %d\n", i); av_log(s->avctx, AV_LOG_ERROR, "invalid old backstep %d\n", i);
@ -1706,7 +1706,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
header = AV_RB32(buf); header = AV_RB32(buf);
if (header>>8 == AV_RB32("TAG")>>8) { if (header >> 8 == AV_RB32("TAG") >> 8) {
av_log(avctx, AV_LOG_DEBUG, "discarding ID3 tag\n"); av_log(avctx, AV_LOG_DEBUG, "discarding ID3 tag\n");
return buf_size + skipped; return buf_size + skipped;
} }