diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-10-17 09:28:53 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-10-20 21:06:57 +0200 |
commit | 82ab61f9015659419e0a2766ee031c367e3f2908 (patch) | |
tree | 6038273b3b05bb76477115e39b4a6bfd1116deaf | |
parent | 73ae27e17be5fd0a4e34e7ea8a449ca59bc09664 (diff) | |
download | ffmpeg-82ab61f9015659419e0a2766ee031c367e3f2908.tar.gz |
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
-rw-r--r-- | libavcodec/mp3_header_decompress_bsf.c | 4 | ||||
-rw-r--r-- | libavcodec/mpegaudio_parser.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegaudiodata.c | 4 | ||||
-rw-r--r-- | libavcodec/mpegaudiodata.h | 4 | ||||
-rw-r--r-- | libavcodec/mpegaudiodec.c | 6 | ||||
-rw-r--r-- | libavcodec/mpegaudiodecheader.c | 10 | ||||
-rw-r--r-- | libavcodec/mpegaudiodecheader.h | 4 | ||||
-rw-r--r-- | libavcodec/mpegaudioenc.c | 6 | ||||
-rw-r--r-- | libavformat/isom.c | 2 | ||||
-rw-r--r-- | libavformat/mp3dec.c | 4 | ||||
-rw-r--r-- | libavformat/mp3enc.c | 8 | ||||
-rw-r--r-- | libavformat/nutenc.c | 4 |
12 files changed, 29 insertions, 29 deletions
diff --git a/libavcodec/mp3_header_decompress_bsf.c b/libavcodec/mp3_header_decompress_bsf.c index 3f3074286a..78025ccc41 100644 --- a/libavcodec/mp3_header_decompress_bsf.c +++ b/libavcodec/mp3_header_decompress_bsf.c @@ -50,10 +50,10 @@ static int mp3_header_decompress(AVBitStreamFilterContext *bsfc, AVCodecContext lsf = sample_rate < (24000+32000)/2; mpeg25 = sample_rate < (12000+16000)/2; sample_rate_index= (header>>10)&3; - sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); //in case sample rate is a little off + sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); //in case sample rate is a little off for(bitrate_index=2; bitrate_index<30; bitrate_index++){ - frame_size = ff_mpa_bitrate_tab[lsf][2][bitrate_index>>1]; + frame_size = avpriv_mpa_bitrate_tab[lsf][2][bitrate_index>>1]; frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1); if(frame_size == buf_size + 4) break; diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index f07d34bd29..17d329dc1c 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -64,7 +64,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, state= (state<<8) + buf[i++]; - ret = ff_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate); + ret = avpriv_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate); if (ret < 4) { s->header_count= -2; } else { diff --git a/libavcodec/mpegaudiodata.c b/libavcodec/mpegaudiodata.c index b850d22c9e..81a43656a9 100644 --- a/libavcodec/mpegaudiodata.c +++ b/libavcodec/mpegaudiodata.c @@ -27,7 +27,7 @@ #include "mpegaudiodata.h" -const uint16_t ff_mpa_bitrate_tab[2][3][15] = { +const uint16_t avpriv_mpa_bitrate_tab[2][3][15] = { { {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 }, {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 }, {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 } }, @@ -37,7 +37,7 @@ const uint16_t ff_mpa_bitrate_tab[2][3][15] = { } }; -const uint16_t ff_mpa_freq_tab[3] = { 44100, 48000, 32000 }; +const uint16_t avpriv_mpa_freq_tab[3] = { 44100, 48000, 32000 }; /*******************************************************/ /* half mpeg encoding window (full precision) */ diff --git a/libavcodec/mpegaudiodata.h b/libavcodec/mpegaudiodata.h index 84458836fa..24ea536a6c 100644 --- a/libavcodec/mpegaudiodata.h +++ b/libavcodec/mpegaudiodata.h @@ -32,8 +32,8 @@ #define MODE_EXT_MS_STEREO 2 #define MODE_EXT_I_STEREO 1 -extern const uint16_t ff_mpa_bitrate_tab[2][3][15]; -extern const uint16_t ff_mpa_freq_tab[3]; +extern const uint16_t avpriv_mpa_bitrate_tab[2][3][15]; +extern const uint16_t avpriv_mpa_freq_tab[3]; extern const int32_t ff_mpa_enwindow[257]; extern const int ff_mpa_sblimit_table[5]; extern const int ff_mpa_quant_steps[17]; diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 6f841e87b1..1b36937e69 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1790,7 +1790,7 @@ static int decode_frame(AVCodecContext * avctx, return -1; } - if (ff_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) { + if (avpriv_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) { /* free format: prepare to compute frame size */ s->frame_size = -1; return -1; @@ -1863,7 +1863,7 @@ static int decode_frame_adu(AVCodecContext * avctx, return buf_size; } - ff_mpegaudio_decode_header((MPADecodeHeader *)s, header); + avpriv_mpegaudio_decode_header((MPADecodeHeader *)s, header); /* update codec info */ avctx->sample_rate = s->sample_rate; avctx->channels = s->nb_channels; @@ -2016,7 +2016,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, if (ff_mpa_check_header(header) < 0) // Bad header, discard block break; - ff_mpegaudio_decode_header((MPADecodeHeader *)m, header); + avpriv_mpegaudio_decode_header((MPADecodeHeader *)m, header); out_size += mp_decode_frame(m, outptr, buf, fsize); buf += fsize; len -= fsize; diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c index be7abc619d..dbd67ff0e3 100644 --- a/libavcodec/mpegaudiodecheader.c +++ b/libavcodec/mpegaudiodecheader.c @@ -31,7 +31,7 @@ #include "mpegaudiodecheader.h" -int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) +int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) { int sample_rate, frame_size, mpeg25, padding; int sample_rate_index, bitrate_index; @@ -46,7 +46,7 @@ int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) s->layer = 4 - ((header >> 17) & 3); /* extract frequency */ sample_rate_index = (header >> 10) & 3; - sample_rate = ff_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); + sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); sample_rate_index += 3 * (s->lsf + mpeg25); s->sample_rate_index = sample_rate_index; s->error_protection = ((header >> 16) & 1) ^ 1; @@ -67,7 +67,7 @@ int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) s->nb_channels = 2; if (bitrate_index != 0) { - frame_size = ff_mpa_bitrate_tab[s->lsf][s->layer - 1][bitrate_index]; + frame_size = avpriv_mpa_bitrate_tab[s->lsf][s->layer - 1][bitrate_index]; s->bit_rate = frame_size * 1000; switch(s->layer) { case 1: @@ -109,14 +109,14 @@ int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) return 0; } -int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate) +int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate) { MPADecodeHeader s1, *s = &s1; if (ff_mpa_check_header(head) != 0) return -1; - if (ff_mpegaudio_decode_header(s, head) != 0) { + if (avpriv_mpegaudio_decode_header(s, head) != 0) { return -1; } diff --git a/libavcodec/mpegaudiodecheader.h b/libavcodec/mpegaudiodecheader.h index 2991595b02..764e8abde4 100644 --- a/libavcodec/mpegaudiodecheader.h +++ b/libavcodec/mpegaudiodecheader.h @@ -50,11 +50,11 @@ typedef struct MPADecodeHeader { /* header decoding. MUST check the header before because no consistency check is done there. Return 1 if free format found and that the frame size must be computed externally */ -int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header); +int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header); /* useful helper to get mpeg audio stream infos. Return -1 if error in header, otherwise the coded frame size in bytes */ -int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate); +int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate); /* fast header check for resync */ static inline int ff_mpa_check_header(uint32_t header){ diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c index 1cadef7175..71ea39373e 100644 --- a/libavcodec/mpegaudioenc.c +++ b/libavcodec/mpegaudioenc.c @@ -84,9 +84,9 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx) /* encoding freq */ s->lsf = 0; for(i=0;i<3;i++) { - if (ff_mpa_freq_tab[i] == freq) + if (avpriv_mpa_freq_tab[i] == freq) break; - if ((ff_mpa_freq_tab[i] / 2) == freq) { + if ((avpriv_mpa_freq_tab[i] / 2) == freq) { s->lsf = 1; break; } @@ -99,7 +99,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx) /* encoding bitrate & frequency */ for(i=0;i<15;i++) { - if (ff_mpa_bitrate_tab[s->lsf][1][i] == bitrate) + if (avpriv_mpa_bitrate_tab[s->lsf][1][i] == bitrate) break; } if (i == 15){ diff --git a/libavformat/isom.c b/libavformat/isom.c index d7c0af101e..e5fd859472 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -437,7 +437,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext st->codec->extradata_size); st->codec->channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 - st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; + st->codec->sample_rate = avpriv_mpa_freq_tab[cfg.sampling_index]; else if (cfg.ext_sample_rate) st->codec->sample_rate = cfg.ext_sample_rate; else diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 09494de136..9011f9f996 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -51,7 +51,7 @@ static int mp3_read_probe(AVProbeData *p) for(frames = 0; buf2 < end; frames++) { header = AV_RB32(buf2); - fsize = ff_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); + fsize = avpriv_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); if(fsize < 0) break; buf2 += fsize; @@ -86,7 +86,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) if(ff_mpa_check_header(v) < 0) return -1; - if (ff_mpegaudio_decode_header(&c, v) == 0) + if (avpriv_mpegaudio_decode_header(&c, v) == 0) vbrtag_size = c.frame_size; if(c.layer != 3) return -1; diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 07c28e176d..64f8957a4c 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -217,12 +217,12 @@ static void mp3_write_xing(AVFormatContext *s) MPADecodeHeader mpah; int srate_idx, i, channels; - for (i = 0; i < FF_ARRAY_ELEMS(ff_mpa_freq_tab); i++) - if (ff_mpa_freq_tab[i] == codec->sample_rate) { + for (i = 0; i < FF_ARRAY_ELEMS(avpriv_mpa_freq_tab); i++) + if (avpriv_mpa_freq_tab[i] == codec->sample_rate) { srate_idx = i; break; } - if (i == FF_ARRAY_ELEMS(ff_mpa_freq_tab)) { + if (i == FF_ARRAY_ELEMS(avpriv_mpa_freq_tab)) { av_log(s, AV_LOG_ERROR, "Unsupported sample rate.\n"); return; } @@ -240,7 +240,7 @@ static void mp3_write_xing(AVFormatContext *s) header |= channels << 6; avio_wb32(s->pb, header); - ff_mpegaudio_decode_header(&mpah, header); + avpriv_mpegaudio_decode_header(&mpah, header); ffio_fill(s->pb, 0, xing_offset); ffio_wfourcc(s->pb, "Xing"); diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index f8a078cb8a..bde6ba26a8 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -59,10 +59,10 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint else if(sample_rate < (44100 + 48000)/2) sample_rate_index=0; else sample_rate_index=1; - sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); + sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); for(bitrate_index=2; bitrate_index<30; bitrate_index++){ - frame_size = ff_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; + frame_size = avpriv_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1); if(frame_size == size) |