cosmetics: Fix indentation.

Originally committed as revision 8622 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Biurrun 2007-04-03 22:17:37 +00:00
parent 8896cdd379
commit e7b85a15c8
1 changed files with 51 additions and 51 deletions

View File

@ -260,68 +260,68 @@ static int amr_nb_decode_frame(AVCodecContext * avctx,
synth=data; synth=data;
toc=amrData[offset]; toc=amrData[offset];
/* read rest of the frame based on ToC byte */ /* read rest of the frame based on ToC byte */
q = (toc >> 2) & 0x01; q = (toc >> 2) & 0x01;
ft = (toc >> 3) & 0x0F; ft = (toc >> 3) & 0x0F;
//printf("offset=%d, packet_size=%d amrData= 0x%X %X %X %X\n",offset,packed_size[ft],amrData[offset],amrData[offset+1],amrData[offset+2],amrData[offset+3]); //printf("offset=%d, packet_size=%d amrData= 0x%X %X %X %X\n",offset,packed_size[ft],amrData[offset],amrData[offset+1],amrData[offset+2],amrData[offset+3]);
offset++; offset++;
packed_bits=amrData+offset; packed_bits=amrData+offset;
offset+=packed_size[ft]; offset+=packed_size[ft];
//Unsort and unpack bits //Unsort and unpack bits
s->rx_type = UnpackBits(q, ft, packed_bits, &s->mode, &serial[1]); s->rx_type = UnpackBits(q, ft, packed_bits, &s->mode, &serial[1]);
//We have a new frame //We have a new frame
s->frameCount++; s->frameCount++;
if (s->rx_type == RX_NO_DATA) if (s->rx_type == RX_NO_DATA)
{
s->mode = s->speech_decoder_state->prev_mode;
}
else {
s->speech_decoder_state->prev_mode = s->mode;
}
/* if homed: check if this frame is another homing frame */
if (s->reset_flag_old == 1)
{
/* only check until end of first subframe */
s->reset_flag = decoder_homing_frame_test_first(&serial[1], s->mode);
}
/* produce encoder homing frame if homed & input=decoder homing frame */
if ((s->reset_flag != 0) && (s->reset_flag_old != 0))
{
for (i = 0; i < L_FRAME; i++)
{ {
s->mode = s->speech_decoder_state->prev_mode; synth[i] = EHF_MASK;
}
else {
s->speech_decoder_state->prev_mode = s->mode;
} }
}
else
{
/* decode frame */
Speech_Decode_Frame(s->speech_decoder_state, s->mode, &serial[1], s->rx_type, synth);
}
/* if homed: check if this frame is another homing frame */ //Each AMR-frame results in 160 16-bit samples
if (s->reset_flag_old == 1) *data_size+=160*2;
{
/* only check until end of first subframe */
s->reset_flag = decoder_homing_frame_test_first(&serial[1], s->mode);
}
/* produce encoder homing frame if homed & input=decoder homing frame */
if ((s->reset_flag != 0) && (s->reset_flag_old != 0))
{
for (i = 0; i < L_FRAME; i++)
{
synth[i] = EHF_MASK;
}
}
else
{
/* decode frame */
Speech_Decode_Frame(s->speech_decoder_state, s->mode, &serial[1], s->rx_type, synth);
}
//Each AMR-frame results in 160 16-bit samples /* if not homed: check whether current frame is a homing frame */
*data_size+=160*2; if (s->reset_flag_old == 0)
{
/* if not homed: check whether current frame is a homing frame */ /* check whole frame */
if (s->reset_flag_old == 0) s->reset_flag = decoder_homing_frame_test(&serial[1], s->mode);
{ }
/* check whole frame */ /* reset decoder if current frame is a homing frame */
s->reset_flag = decoder_homing_frame_test(&serial[1], s->mode); if (s->reset_flag != 0)
} {
/* reset decoder if current frame is a homing frame */ Speech_Decode_Frame_reset(s->speech_decoder_state);
if (s->reset_flag != 0) }
{ s->reset_flag_old = s->reset_flag;
Speech_Decode_Frame_reset(s->speech_decoder_state);
}
s->reset_flag_old = s->reset_flag;
return offset; return offset;
} }