@@ -71,7 +71,6 @@ static int getBitrateMode(int bitrate)
}
typedef struct AMRContext {
- int frameCount;
void *decState;
void *enstate;
int enc_bitrate;
@@ -81,7 +80,6 @@ static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
{
AMRContext *s = avctx->priv_data;
- s->frameCount = 0;
s->decState = Decoder_Interface_init();
if (!s->decState) {
av_log(avctx, AV_LOG_ERROR, "Decoder_Interface_init error\r\n");
@@ -117,9 +115,6 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
enum Mode dec_mode;
int packet_size;
- /* av_log(NULL, AV_LOG_DEBUG, "amr_decode_frame buf=%p buf_size=%d frameCount=%d!!\n",
- buf, buf_size, s->frameCount); */
-
dec_mode = (buf[0] >> 3) & 0x000F;
packet_size = block_size[dec_mode] + 1;
@@ -129,9 +124,6 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
return -1;
}
- s->frameCount++;
- /* av_log(NULL, AV_LOG_DEBUG, "packet_size=%d amrData= 0x%X %X %X %X\n",
- packet_size, amrData[0], amrData[1], amrData[2], amrData[3]); */
/* call decoder */
Decoder_Interface_Decode(s->decState, amrData, data, 0);
*data_size = 160 * 2;
@@ -155,8 +147,6 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
{
AMRContext *s = avctx->priv_data;
- s->frameCount = 0;
-
if (avctx->sample_rate != 8000) {
av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
return -1;
@@ -207,8 +197,6 @@ static int amr_nb_encode_frame(AVCodecContext *avctx,
written = Encoder_Interface_Encode(s->enstate, s->enc_bitrate, data,
frame, 0);
- /* av_log(NULL, AV_LOG_DEBUG, "amr_nb_encode_frame encoded %u bytes, bitrate %u, first byte was %#02x\n",
- written, s->enc_bitrate, frame[0] ); */
return written;
}
@@ -240,7 +228,6 @@ AVCodec ff_libopencore_amrnb_encoder = {
#include <opencore-amrwb/if_rom.h>
typedef struct AMRWBContext {
- int frameCount;
void *state;
} AMRWBContext;
@@ -248,7 +235,6 @@ static av_cold int amr_wb_decode_init(AVCodecContext *avctx)
{
AMRWBContext *s = avctx->priv_data;
- s->frameCount = 0;
s->state = D_IF_init();
amr_decode_fix_avctx(avctx);
@@ -285,7 +271,6 @@ static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,
return -1;
}
- s->frameCount++;
D_IF_decode(s->state, amrData, data, _good_frame);
*data_size = 320 * 2;
return packet_size;