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