Lines Matching refs:hBs
1410 static INT skipSbrHeader(HANDLE_FDK_BITSTREAM hBs, int isUsac) { in skipSbrHeader() argument
1416 FDKpushFor(hBs, 6); /* amp res 1, xover freq 3, reserved 2 */ in skipSbrHeader()
1419 FDKpushFor(hBs, 8); /* start / stop freq */ in skipSbrHeader()
1421 dflt_header_extra1 = FDKreadBit(hBs); in skipSbrHeader()
1422 dflt_header_extra2 = FDKreadBit(hBs); in skipSbrHeader()
1424 FDKpushFor(hBs, 5 * dflt_header_extra1 + 6 * dflt_header_extra2); in skipSbrHeader()
1430 HANDLE_FDK_BITSTREAM hBs, CSTpCallBacks *cb) { in ld_sbr_header() argument
1454 cb->cbSbrData, hBs, asc->m_samplingFrequency / dsFactor, in ld_sbr_header()
1469 HANDLE_FDK_BITSTREAM hBs, in EldSpecificConfig_Parse() argument
1481 esc->m_frameLengthFlag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1488 asc->m_vcb11Flag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1489 asc->m_rvlcFlag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1490 asc->m_hcrFlag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1492 esc->m_sbrPresentFlag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1496 FDKreadBits(hBs, 1); /* 0: single rate, 1: dual rate */ in EldSpecificConfig_Parse()
1497 esc->m_sbrCrcFlag = FDKreadBits(hBs, 1); in EldSpecificConfig_Parse()
1530 ldSbrLen += skipSbrHeader(hBs, 0); in EldSpecificConfig_Parse()
1539 eldExtLenSum = FDKgetValidBits(hBs); in EldSpecificConfig_Parse()
1542 while (((eldExtType = FDKreadBits(hBs, 4)) != ELDEXT_TERM) && in EldSpecificConfig_Parse()
1543 ((INT)FDKgetValidBits(hBs) >= 0) && (eldExtCnt++ < 15)) { in EldSpecificConfig_Parse()
1544 eldExtLen = len = FDKreadBits(hBs, 4); in EldSpecificConfig_Parse()
1546 len = FDKreadBits(hBs, 8); in EldSpecificConfig_Parse()
1550 len = FDKreadBits(hBs, 16); in EldSpecificConfig_Parse()
1560 cb->cbSscData, hBs, asc->m_aot, in EldSpecificConfig_Parse()
1579 FDKreadBits(hBs, 8); in EldSpecificConfig_Parse()
1586 getSampleRate(hBs, &tmpDownscaleFreqIdx, 4); in EldSpecificConfig_Parse()
1591 downscale_fill_nibble = FDKreadBits(hBs, 4); in EldSpecificConfig_Parse()
1606 if ((INT)FDKgetValidBits(hBs) < 0) { in EldSpecificConfig_Parse()
1629 eldExtLenSum = eldExtLenSum - FDKgetValidBits(hBs); in EldSpecificConfig_Parse()
1630 FDKpushBack(hBs, eldExtLenSum + ldSbrLen); in EldSpecificConfig_Parse()
1631 if (0 != ld_sbr_header(asc, dsFactor, hBs, cb)) { in EldSpecificConfig_Parse()
1634 FDKpushFor(hBs, eldExtLenSum); in EldSpecificConfig_Parse()
1643 HANDLE_FDK_BITSTREAM hBs, const INT configSize_bits, /* If < 0 (> 0) config in StoreConfigAsBitstream() argument
1660 FDKpushBack(hBs, nBits); in StoreConfigAsBitstream()
1663 tmp = FDKreadBits(hBs, 32); in StoreConfigAsBitstream()
1667 tmp = FDKreadBits(hBs, j); in StoreConfigAsBitstream()
1672 FDKpushBack(hBs, nBits); in StoreConfigAsBitstream()
1689 HANDLE_FDK_BITSTREAM hBs, in extElementConfig() argument
1697 UINT usacExtElementType = escapedValue(hBs, 4, 8, 16); in extElementConfig()
1714 int usacExtElementConfigLength = escapedValue(hBs, 4, 8, 16); in extElementConfig()
1718 if (FDKreadBit(hBs)) /* usacExtElementDefaultLengthPresent */ in extElementConfig()
1719 extElement->usacExtElementDefaultLength = escapedValue(hBs, 8, 16, 0) + 1; in extElementConfig()
1723 extElement->usacExtElementPayloadFrag = FDKreadBit(hBs); in extElementConfig()
1725 bsAnchor = (INT)FDKgetValidBits(hBs); in extElementConfig()
1738 cb->cbUniDrcData, hBs, usacExtElementConfigLength, in extElementConfig()
1756 (bsAnchor - (INT)FDKgetValidBits(hBs)); in extElementConfig()
1758 FDKpushFor(hBs, left_bits); in extElementConfig()
1774 HANDLE_FDK_BITSTREAM hBs, in configExtension() argument
1786 numConfigExtensions = (int)escapedValue(hBs, 2, 4, 8) + 1; in configExtension()
1789 int loudnessInfoSetConfigExtensionPosition = FDKgetValidBits(hBs); in configExtension()
1790 usacConfigExtType = escapedValue(hBs, 4, 8, 16); in configExtension()
1791 usacConfigExtLength = (int)escapedValue(hBs, 4, 8, 16); in configExtension()
1794 nbits = (INT)FDKgetValidBits(hBs); in configExtension()
1804 if (FDKreadBits(hBs, 8) != 0xa5) { in configExtension()
1812 cb->cbUniDrcData, hBs, usacConfigExtLength, in configExtension()
1828 8 * usacConfigExtLength - (nbits - (INT)FDKgetValidBits(hBs)); in configExtension()
1832 FDKpushFor(hBs, usacConfigExtLength); in configExtension()
1854 CSAudioSpecificConfig *asc, HANDLE_FDK_BITSTREAM hBs, in UsacRsv60DecoderConfig_Parse() argument
1865 numberOfElements = (int)escapedValue(hBs, 4, 8, 16) + 1; in UsacRsv60DecoderConfig_Parse()
1883 FDKreadBits(hBs, 2) | USAC_ID_BIT); /* set USAC_ID_BIT to map in UsacRsv60DecoderConfig_Parse()
1915 if (FDKreadBit(hBs)) { /* tw_mdct */ in UsacRsv60DecoderConfig_Parse()
1918 usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1); in UsacRsv60DecoderConfig_Parse()
1925 usc->element[i].m_harmonicSBR = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1926 usc->element[i].m_interTes = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1927 usc->element[i].m_pvc = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1928 if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency, in UsacRsv60DecoderConfig_Parse()
1944 if (FDKreadBit(hBs)) { /* tw_mdct */ in UsacRsv60DecoderConfig_Parse()
1947 usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1); in UsacRsv60DecoderConfig_Parse()
1952 usc->element[i].m_harmonicSBR = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1953 usc->element[i].m_interTes = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1954 usc->element[i].m_pvc = FDKreadBit(hBs); in UsacRsv60DecoderConfig_Parse()
1956 INT bitsToSkip = skipSbrHeader(hBs, 1); in UsacRsv60DecoderConfig_Parse()
1958 usc->element[i].m_stereoConfigIndex = FDKreadBits(hBs, 2); in UsacRsv60DecoderConfig_Parse()
1960 FDKpushBack(hBs, bitsToSkip + 2); in UsacRsv60DecoderConfig_Parse()
1968 if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency, in UsacRsv60DecoderConfig_Parse()
1980 FDKreadBits(hBs, 2); /* Needed in RM5 syntax */ in UsacRsv60DecoderConfig_Parse()
1992 if (cb->cbSsc(cb->cbSscData, hBs, asc->m_aot, in UsacRsv60DecoderConfig_Parse()
2024 if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency, in UsacRsv60DecoderConfig_Parse()
2037 ErrorStatus = extElementConfig(&usc->element[i].extElement, hBs, cb, 0, in UsacRsv60DecoderConfig_Parse()
2127 HANDLE_FDK_BITSTREAM hBs, in UsacConfig_Parse() argument
2133 INT nbits = (INT)FDKgetValidBits(hBs); in UsacConfig_Parse()
2135 usacSamplingFrequency = getSampleRate(hBs, &asc->m_samplingFrequencyIndex, 5); in UsacConfig_Parse()
2141 coreSbrFrameLengthIndex = FDKreadBits(hBs, 3); in UsacConfig_Parse()
2147 channelConfigurationIndex = FDKreadBits(hBs, 5); in UsacConfig_Parse()
2159 err = UsacRsv60DecoderConfig_Parse(asc, hBs, cb); in UsacConfig_Parse()
2164 if (FDKreadBits(hBs, 1)) { /* usacConfigExtensionPresent */ in UsacConfig_Parse()
2165 err = configExtension(&asc->m_sc.m_usacConfig, hBs, cb); in UsacConfig_Parse()
2188 INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits; in UsacConfig_Parse()
2189 if (StoreConfigAsBitstream(hBs, configSize_bits, in UsacConfig_Parse()
2506 CSAudioSpecificConfig *asc, HANDLE_FDK_BITSTREAM hBs, int audioMode, in Drm_xHEAACDecoderConfig() argument
2522 usc->element[elemIdx].m_noiseFilling = FDKreadBits(hBs, 1); in Drm_xHEAACDecoderConfig()
2528 usc->element[elemIdx].m_harmonicSBR = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2529 usc->element[elemIdx].m_interTes = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2530 usc->element[elemIdx].m_pvc = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2531 if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency, in Drm_xHEAACDecoderConfig()
2545 usc->element[elemIdx].m_noiseFilling = FDKreadBits(hBs, 1); in Drm_xHEAACDecoderConfig()
2547 usc->element[elemIdx].m_harmonicSBR = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2548 usc->element[elemIdx].m_interTes = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2549 usc->element[elemIdx].m_pvc = FDKreadBit(hBs); in Drm_xHEAACDecoderConfig()
2551 INT bitsToSkip = skipSbrHeader(hBs, 1); in Drm_xHEAACDecoderConfig()
2553 usc->element[elemIdx].m_stereoConfigIndex = FDKreadBits(hBs, 2); in Drm_xHEAACDecoderConfig()
2555 FDKpushBack(hBs, bitsToSkip + 2); in Drm_xHEAACDecoderConfig()
2589 if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency, in Drm_xHEAACDecoderConfig()
2598 /*usc->element[elemIdx].m_stereoConfigIndex =*/FDKreadBits(hBs, 2); in Drm_xHEAACDecoderConfig()
2609 cb->cbSscData, hBs, in Drm_xHEAACDecoderConfig()