[FFmpeg-cvslog] lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
Anton Khirnov
git at videolan.org
Fri Oct 21 02:37:11 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Oct 17 09:28:53 2011 +0200| [59a9a235811dc5f6a2c8b631a320968a06a867d1] | committer: Anton Khirnov
lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59a9a235811dc5f6a2c8b631a320968a06a867d1
---
libavcodec/aac_adtstoasc_bsf.c | 2 +-
libavcodec/aacadtsdec.c | 4 ++--
libavcodec/aacdec.c | 2 +-
libavcodec/aacenc.c | 2 +-
libavcodec/alsdec.c | 2 +-
libavcodec/libvo-aacenc.c | 2 +-
libavcodec/mpeg4audio.c | 8 ++++----
libavcodec/mpeg4audio.h | 6 +++---
libavcodec/mpegaudiodec.c | 2 +-
libavformat/adtsenc.c | 4 ++--
libavformat/flvdec.c | 2 +-
libavformat/isom.c | 2 +-
libavformat/latmenc.c | 4 ++--
libavformat/matroskadec.c | 4 ++--
libavformat/matroskaenc.c | 2 +-
libavformat/sdp.c | 2 +-
16 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
index be12e99..55181bb 100644
--- a/libavcodec/aac_adtstoasc_bsf.c
+++ b/libavcodec/aac_adtstoasc_bsf.c
@@ -78,7 +78,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
return -1;
}
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
- pce_size = ff_copy_pce_data(&pb, &gb)/8;
+ pce_size = avpriv_copy_pce_data(&pb, &gb)/8;
flush_put_bits(&pb);
buf_size -= get_bits_count(&gb)/8;
buf += get_bits_count(&gb)/8;
diff --git a/libavcodec/aacadtsdec.c b/libavcodec/aacadtsdec.c
index 09bf139..30f92e0 100644
--- a/libavcodec/aacadtsdec.c
+++ b/libavcodec/aacadtsdec.c
@@ -39,7 +39,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
crc_abs = get_bits1(gbc); /* protection_absent */
aot = get_bits(gbc, 2); /* profile_objecttype */
sr = get_bits(gbc, 4); /* sample_frequency_index */
- if(!ff_mpeg4audio_sample_rates[sr])
+ if(!avpriv_mpeg4audio_sample_rates[sr])
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
skip_bits1(gbc); /* private_bit */
ch = get_bits(gbc, 3); /* channel_configuration */
@@ -62,7 +62,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
hdr->crc_absent = crc_abs;
hdr->num_aac_frames = rdb + 1;
hdr->sampling_index = sr;
- hdr->sample_rate = ff_mpeg4audio_sample_rates[sr];
+ hdr->sample_rate = avpriv_mpeg4audio_sample_rates[sr];
hdr->samples = (rdb + 1) * 1024;
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index d03363d..a3a6b42 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -470,7 +470,7 @@ static int decode_audio_specific_config(AACContext *ac,
init_get_bits(&gb, data, data_size * 8);
- if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
+ if ((i = avpriv_mpeg4audio_get_config(m4ac, data, data_size)) < 0)
return -1;
if (m4ac->sampling_index > 12) {
av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", m4ac->sampling_index);
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index d5021a4..31d740f 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -171,7 +171,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
avctx->frame_size = 1024;
for (i = 0; i < 16; i++)
- if (avctx->sample_rate == ff_mpeg4audio_sample_rates[i])
+ if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[i])
break;
if (i == 16) {
av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n", avctx->sample_rate);
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 1ab72ad..4301fab 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -289,7 +289,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);
- config_offset = ff_mpeg4audio_get_config(&m4ac, avctx->extradata,
+ config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata,
avctx->extradata_size);
if (config_offset < 0)
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index 18aa824..647971a 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -63,7 +63,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
}
for (index = 0; index < 16; index++)
- if (avctx->sample_rate == ff_mpeg4audio_sample_rates[index])
+ if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[index])
break;
if (index == 16) {
av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index f0399af..aa5ae4d 100644
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -52,7 +52,7 @@ static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c)
return 0;
}
-const int ff_mpeg4audio_sample_rates[16] = {
+const int avpriv_mpeg4audio_sample_rates[16] = {
96000, 88200, 64000, 48000, 44100, 32000,
24000, 22050, 16000, 12000, 11025, 8000, 7350
};
@@ -73,10 +73,10 @@ static inline int get_sample_rate(GetBitContext *gb, int *index)
{
*index = get_bits(gb, 4);
return *index == 0x0f ? get_bits(gb, 24) :
- ff_mpeg4audio_sample_rates[*index];
+ avpriv_mpeg4audio_sample_rates[*index];
}
-int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size)
+int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size)
{
GetBitContext gb;
int specific_config_bitindex;
@@ -151,7 +151,7 @@ static av_always_inline unsigned int copy_bits(PutBitContext *pb,
return el;
}
-int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
+int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
{
int five_bit_ch, four_bit_ch, comment_size, bits;
int offset = put_bits_count(pb);
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index c729c04..d6730b9 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -40,7 +40,7 @@ typedef struct {
int ps; ///< -1 implicit, 1 presence
} MPEG4AudioConfig;
-extern const int ff_mpeg4audio_sample_rates[16];
+extern const int avpriv_mpeg4audio_sample_rates[16];
extern const uint8_t ff_mpeg4audio_channels[8];
/**
* Parse MPEG-4 systems extradata to retrieve audio configuration.
@@ -49,7 +49,7 @@ extern const uint8_t ff_mpeg4audio_channels[8];
* @param[in] buf_size Extradata size.
* @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata.
*/
-int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size);
+int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size);
enum AudioObjectType {
AOT_NULL,
@@ -101,6 +101,6 @@ enum AudioObjectType {
#define MAX_PCE_SIZE 304 ///<Maximum size of a PCE including the 3-bit ID_PCE
///<marker and the comment
-int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb);
+int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb);
#endif /* AVCODEC_MPEG4AUDIO_H */
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 1b36937..2af05ed 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1924,7 +1924,7 @@ static int decode_init_mp3on4(AVCodecContext * avctx)
return -1;
}
- ff_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size);
+ avpriv_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size);
if (!cfg.chan_config || cfg.chan_config > 7) {
av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
return -1;
diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 7f61e94..ce002fe 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -35,7 +35,7 @@ int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf
int off;
init_get_bits(&gb, buf, size * 8);
- off = ff_mpeg4audio_get_config(&m4ac, buf, size);
+ off = avpriv_mpeg4audio_get_config(&m4ac, buf, size);
if (off < 0)
return off;
skip_bits_long(&gb, off);
@@ -67,7 +67,7 @@ int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf
init_put_bits(&pb, adts->pce_data, MAX_PCE_SIZE);
put_bits(&pb, 3, 5); //ID_PCE
- adts->pce_size = (ff_copy_pce_data(&pb, &gb) + 3) / 8;
+ adts->pce_size = (avpriv_copy_pce_data(&pb, &gb) + 3) / 8;
flush_put_bits(&pb);
}
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 5e354b1..395c8f8 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -531,7 +531,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
if (st->codec->codec_id == CODEC_ID_AAC) {
MPEG4AudioConfig cfg;
- ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
+ avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
st->codec->extradata_size);
st->codec->channels = cfg.channels;
if (cfg.ext_sample_rate)
diff --git a/libavformat/isom.c b/libavformat/isom.c
index e5fd859..c5b01f2 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -433,7 +433,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
st->codec->extradata_size = len;
if (st->codec->codec_id == CODEC_ID_AAC) {
MPEG4AudioConfig cfg;
- ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
+ avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
st->codec->extradata_size);
st->codec->channels = cfg.channels;
if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index 7c6d1ea..2e72c48 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -54,7 +54,7 @@ static int latm_decode_extradata(LATMContext *ctx, uint8_t *buf, int size)
MPEG4AudioConfig m4ac;
init_get_bits(&gb, buf, size * 8);
- ctx->off = ff_mpeg4audio_get_config(&m4ac, buf, size);
+ ctx->off = avpriv_mpeg4audio_get_config(&m4ac, buf, size);
if (ctx->off < 0)
return ctx->off;
skip_bits_long(&gb, ctx->off);
@@ -111,7 +111,7 @@ static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
ff_copy_bits(bs, avctx->extradata, ctx->off + 3);
if (!ctx->channel_conf) {
- ff_copy_pce_data(bs, &gb);
+ avpriv_copy_pce_data(bs, &gb);
}
}
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b3466db..8ee3698 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1263,8 +1263,8 @@ static int matroska_aac_sri(int samplerate)
{
int sri;
- for (sri=0; sri<FF_ARRAY_ELEMS(ff_mpeg4audio_sample_rates); sri++)
- if (ff_mpeg4audio_sample_rates[sri] == samplerate)
+ for (sri=0; sri<FF_ARRAY_ELEMS(avpriv_mpeg4audio_sample_rates); sri++)
+ if (avpriv_mpeg4audio_sample_rates[sri] == samplerate)
break;
return sri;
}
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 02d10af..a35a2fa 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -443,7 +443,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int
{
MPEG4AudioConfig mp4ac;
- if (ff_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size) < 0) {
+ if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size) < 0) {
av_log(s, AV_LOG_WARNING, "Error parsing AAC extradata, unable to determine samplerate.\n");
return;
}
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index a586690..5adf14d 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -342,7 +342,7 @@ static char *latm_context2config(AVCodecContext *c)
char *config;
for (rate_index = 0; rate_index < 16; rate_index++)
- if (ff_mpeg4audio_sample_rates[rate_index] == c->sample_rate)
+ if (avpriv_mpeg4audio_sample_rates[rate_index] == c->sample_rate)
break;
if (rate_index == 16) {
av_log(c, AV_LOG_ERROR, "Unsupported sample rate\n");
More information about the ffmpeg-cvslog
mailing list