Lines Matching refs:bs

109   if (pAdts->bs.protection_absent) {
123 if (pAdts->bs.protection_absent == 0)
134 if (pAdts->bs.protection_absent)
178 STRUCT_ADTS_BS bs;
190 bs.mpeg_id = FDKreadBits(hBs, Adts_Length_Id);
191 bs.layer = FDKreadBits(hBs, Adts_Length_Layer);
192 bs.protection_absent = FDKreadBits(hBs, Adts_Length_ProtectionAbsent);
193 bs.profile = FDKreadBits(hBs, Adts_Length_Profile);
194 bs.sample_freq_index = FDKreadBits(hBs, Adts_Length_SamplingFrequencyIndex);
195 bs.private_bit = FDKreadBits(hBs, Adts_Length_PrivateBit);
196 bs.channel_config = FDKreadBits(hBs, Adts_Length_ChannelConfiguration);
197 bs.original = FDKreadBits(hBs, Adts_Length_OriginalCopy);
198 bs.home = FDKreadBits(hBs, Adts_Length_Home);
201 bs.copyright_id = FDKreadBits(hBs, Adts_Length_CopyrightIdentificationBit);
202 bs.copyright_start = FDKreadBits(hBs, Adts_Length_CopyrightIdentificationStart);
203 bs.frame_length = FDKreadBits(hBs, Adts_Length_FrameLength);
204 bs.adts_fullness = FDKreadBits(hBs, Adts_Length_BufferFullness);
205 bs.num_raw_blocks = FDKreadBits(hBs, Adts_Length_NumberOfRawDataBlocksInFrame);
206 bs.num_pce_bits = 0;
210 if (!bs.protection_absent) {
217 if (! bs.protection_absent && bs.num_raw_blocks>0) {
218 for (i=0; i<bs.num_raw_blocks; i++) {
223 pAdts->rawDataBlockDist[bs.num_raw_blocks] = bs.frame_length - 7 - bs.num_raw_blocks*2 - 2 ;
224 for (i=bs.num_raw_blocks; i>0; i--) {
230 if (!bs.protection_absent)
240 if (bs.num_raw_blocks > 0) {
252 (bs.layer != 0) || // we only support MPEG ADTS
253 (bs.sample_freq_index >= 13) // we only support 96kHz - 7350kHz
255 FDKpushFor(hBs, bs.frame_length * 8); // try again one frame later
260 if ( (bs.mpeg_id == 0) && (pAdts->decoderCanDoMpeg4 == 0) )
265 FDKpushFor(hBs, bs.frame_length * 8); // try again one frame later
271 cmp_buffer_fullness = bs.frame_length*8 + bs.adts_fullness*32*getNumberOfEffectiveChannels(bs.channel_config);
275 if (bs.adts_fullness != 0x7FF)
303 pAsc->m_aot = (AUDIO_OBJECT_TYPE)(bs.profile + 1);
304 pAsc->m_samplingFrequencyIndex = bs.sample_freq_index;
305 pAsc->m_samplingFrequency = SamplingRateTable[bs.sample_freq_index];
306 pAsc->m_channelConfiguration = bs.channel_config;
310 if (bs.channel_config == 0)
325 bs.num_pce_bits = pceBits;
334 && (bs.sample_freq_index == pAdts->bs.sample_freq_index) /* we could compare the complete fixed header (bytes) here! */
335 && (bs.channel_config == pAdts->bs.channel_config) /* == 0 */
336 && (bs.mpeg_id == pAdts->bs.mpeg_id) )
340 else if (bs.mpeg_id == 0) {
344 FDKpushFor(hBs, (bs.frame_length<<3) - adtsHeaderLength - 3);
356 FDKmemcpy(&pAdts->bs, &bs, sizeof(STRUCT_ADTS_BS));
368 if (pAdts->bs.num_raw_blocks == 0) {
369 length = (pAdts->bs.frame_length - 7) << 3; /* aac_frame_length subtracted by the header size (7 bytes). */
370 if (pAdts->bs.protection_absent == 0)
373 if (pAdts->bs.protection_absent) {
383 length -= pAdts->bs.num_pce_bits;