~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/mpeg4audio.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    return 0;
53
53
}
54
54
 
55
 
const int ff_mpeg4audio_sample_rates[16] = {
 
55
const int avpriv_mpeg4audio_sample_rates[16] = {
56
56
    96000, 88200, 64000, 48000, 44100, 32000,
57
57
    24000, 22050, 16000, 12000, 11025, 8000, 7350
58
58
};
73
73
{
74
74
    *index = get_bits(gb, 4);
75
75
    return *index == 0x0f ? get_bits(gb, 24) :
76
 
        ff_mpeg4audio_sample_rates[*index];
 
76
        avpriv_mpeg4audio_sample_rates[*index];
77
77
}
78
78
 
79
 
int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size)
 
79
int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
 
80
                                 int bit_size, int sync_extension)
80
81
{
81
82
    GetBitContext gb;
82
83
    int specific_config_bitindex;
83
84
 
84
 
    init_get_bits(&gb, buf, buf_size*8);
 
85
    init_get_bits(&gb, buf, bit_size);
85
86
    c->object_type = get_object_type(&gb);
86
87
    c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
87
88
    c->chan_config = get_bits(&gb, 4);
117
118
            return -1;
118
119
    }
119
120
 
120
 
    if (c->ext_object_type != AOT_SBR) {
 
121
    if (c->ext_object_type != AOT_SBR && sync_extension) {
121
122
        while (get_bits_left(&gb) > 15) {
122
123
            if (show_bits(&gb, 11) == 0x2b7) { // sync extension
123
124
                get_bits(&gb, 11);
151
152
    return el;
152
153
}
153
154
 
154
 
int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
 
155
int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
155
156
{
156
157
    int five_bit_ch, four_bit_ch, comment_size, bits;
157
158
    int offset = put_bits_count(pb);
173
174
        copy_bits(pb, gb, 16);
174
175
    if (bits)
175
176
        copy_bits(pb, gb, bits);
176
 
    align_put_bits(pb);
 
177
    avpriv_align_put_bits(pb);
177
178
    align_get_bits(gb);
178
179
    comment_size = copy_bits(pb, gb, 8);
179
180
    for (; comment_size > 0; comment_size--)