Lines Matching refs:pAdts
108 HANDLE_ADTS pAdts) /*!< pointer to adts crc info stucture */ in adtsRead_CrcInit() argument
110 FDKcrcInit(&pAdts->crcInfo, 0x8005, 0xFFFF, 16); in adtsRead_CrcInit()
114 HANDLE_ADTS pAdts, /*!< pointer to adts stucture */ in adtsRead_CrcStartReg() argument
118 if (pAdts->bs.protection_absent) { in adtsRead_CrcStartReg()
122 return (FDKcrcStartReg(&pAdts->crcInfo, hBs, mBits)); in adtsRead_CrcStartReg()
126 HANDLE_ADTS pAdts, /*!< pointer to adts crc info stucture */ in adtsRead_CrcEndReg() argument
130 if (pAdts->bs.protection_absent == 0) { in adtsRead_CrcEndReg()
131 FDKcrcEndReg(&pAdts->crcInfo, hBs, reg); in adtsRead_CrcEndReg()
135 TRANSPORTDEC_ERROR adtsRead_CrcCheck(HANDLE_ADTS pAdts) { in adtsRead_CrcCheck() argument
139 if (pAdts->bs.protection_absent) return TRANSPORTDEC_OK; in adtsRead_CrcCheck()
141 crc = FDKcrcGetCRC(&pAdts->crcInfo); in adtsRead_CrcCheck()
142 if (crc != pAdts->crcReadValue) { in adtsRead_CrcCheck()
166 TRANSPORTDEC_ERROR adtsRead_DecodeHeader(HANDLE_ADTS pAdts, in adtsRead_DecodeHeader() argument
217 FDKcrcReset(&pAdts->crcInfo); in adtsRead_DecodeHeader()
219 crcReg = FDKcrcStartReg(&pAdts->crcInfo, hBs, 0); in adtsRead_DecodeHeader()
228 pAdts->rawDataBlockDist[i] = (USHORT)FDKreadBits(hBs, 16); in adtsRead_DecodeHeader()
232 pAdts->rawDataBlockDist[bs.num_raw_blocks] = in adtsRead_DecodeHeader()
235 pAdts->rawDataBlockDist[i] -= pAdts->rawDataBlockDist[i - 1]; in adtsRead_DecodeHeader()
243 FDKcrcEndReg(&pAdts->crcInfo, hBs, crcReg); in adtsRead_DecodeHeader()
252 pAdts->crcReadValue = crc_check; in adtsRead_DecodeHeader()
255 if (pAdts->crcReadValue != FDKcrcGetCRC(&pAdts->crcInfo)) { in adtsRead_DecodeHeader()
259 FDKcrcReset(&pAdts->crcInfo); in adtsRead_DecodeHeader()
272 if ((bs.mpeg_id == 0) && (pAdts->decoderCanDoMpeg4 == 0)) { in adtsRead_DecodeHeader()
286 if (pAdts->BufferFullnesStartFlag) { in adtsRead_DecodeHeader()
300 pAdts->BufferFullnesStartFlag = 0; in adtsRead_DecodeHeader()
320 crcReg = adtsRead_CrcStartReg(pAdts, hBs, 0); in adtsRead_DecodeHeader()
324 adtsRead_CrcEndReg(pAdts, hBs, crcReg); in adtsRead_DecodeHeader()
336 pAdts->bs.sample_freq_index) /* we could compare the complete fixed in adtsRead_DecodeHeader()
338 && (bs.channel_config == pAdts->bs.channel_config) /* == 0 */ in adtsRead_DecodeHeader()
341 pAdts->bs.mpeg_id)) { /* Restore previous PCE which is still valid */ in adtsRead_DecodeHeader()
359 FDKmemcpy(&pAdts->bs, &bs, sizeof(STRUCT_ADTS_BS)); in adtsRead_DecodeHeader()
368 int adtsRead_GetRawDataBlockLength(HANDLE_ADTS pAdts, INT blockNum) { in adtsRead_GetRawDataBlockLength() argument
371 if (pAdts->bs.num_raw_blocks == 0) { in adtsRead_GetRawDataBlockLength()
373 (pAdts->bs.frame_length - 7) in adtsRead_GetRawDataBlockLength()
375 if (pAdts->bs.protection_absent == 0) in adtsRead_GetRawDataBlockLength()
378 if (pAdts->bs.protection_absent) { in adtsRead_GetRawDataBlockLength()
384 length = (pAdts->rawDataBlockDist[blockNum] << 3) - 16; in adtsRead_GetRawDataBlockLength()
389 length -= pAdts->bs.num_pce_bits; in adtsRead_GetRawDataBlockLength()