Lines Matching refs:pHcr
126 static void HcrCalcNumCodeword(H_HCR_INFO pHcr);
127 static void HcrSortCodebookAndNumCodewordInSection(H_HCR_INFO pHcr);
128 static void HcrPrepareSegmentationGrid(H_HCR_INFO pHcr);
129 static void HcrExtendedSectionInfo(H_HCR_INFO pHcr);
155 static void DecodePCWs(HANDLE_FDK_BITSTREAM bs, H_HCR_INFO pHcr);
158 H_HCR_INFO pHcr, CAacDecoderChannelInfo *pAacDecoderChannelInfo,
162 H_HCR_INFO pHcr, PCW_TYPE kind,
166 static void errDetectWithinSegmentationFinal(H_HCR_INFO pHcr);
265 UINT HcrInit(H_HCR_INFO pHcr, CAacDecoderChannelInfo *pAacDecoderChannelInfo, in HcrInit() argument
276 pHcr->decInOut.lengthOfReorderedSpectralData = in HcrInit()
279 pHcr->decInOut.lengthOfLongestCodeword = in HcrInit()
281 pHcr->decInOut.pQuantizedSpectralCoefficientsBase = in HcrInit()
283 pHcr->decInOut.quantizedSpectralCoefficientsIdx = 0; in HcrInit()
284 pHcr->decInOut.pCodebook = in HcrInit()
286 pHcr->decInOut.pNumLineInSect = in HcrInit()
288 pHcr->decInOut.numSection = in HcrInit()
290 pHcr->decInOut.errorLog = 0; in HcrInit()
291 pHcr->nonPcwSideinfo.pResultBase = in HcrInit()
295 pHcr->decInOut.bitstreamAnchor = (INT)FDKgetValidBits(bs); in HcrInit()
314 pNumLinesInSec = pHcr->decInOut.pNumLineInSect; /* out */ in HcrInit()
315 pCodeBk = pHcr->decInOut.pCodebook; /* out */ in HcrInit()
345 &pHcr->decInOut.errorLog); in HcrInit()
346 if (pHcr->decInOut.errorLog != 0) { in HcrInit()
347 return (pHcr->decInOut.errorLog); in HcrInit()
365 errDetectorInHcrSideinfoShrt(cb, numLine, &pHcr->decInOut.errorLog); in HcrInit()
367 pHcr->decInOut.errorLog |= NUM_SECT_OUT_OF_RANGE_SHORT_BLOCK; in HcrInit()
369 errDetectorInHcrLengths(pHcr->decInOut.lengthOfLongestCodeword, in HcrInit()
370 pHcr->decInOut.lengthOfReorderedSpectralData, in HcrInit()
371 &pHcr->decInOut.errorLog); in HcrInit()
372 if (pHcr->decInOut.errorLog != 0) { in HcrInit()
373 return (pHcr->decInOut.errorLog); in HcrInit()
378 pHcr->decInOut.numSection = numSection; in HcrInit()
382 errDetectorInHcrLengths(pHcr->decInOut.lengthOfLongestCodeword, in HcrInit()
383 pHcr->decInOut.lengthOfReorderedSpectralData, in HcrInit()
384 &pHcr->decInOut.errorLog); in HcrInit()
385 numSection = pHcr->decInOut.numSection; in HcrInit()
386 pNumLinesInSec = pHcr->decInOut.pNumLineInSect; in HcrInit()
387 pCodeBk = pHcr->decInOut.pCodebook; in HcrInit()
389 pHcr->decInOut.errorLog |= NUM_SECT_OUT_OF_RANGE_LONG_BLOCK; in HcrInit()
397 pHcr->decInOut.errorLog |= CB_OUT_OF_RANGE_LONG_BLOCK; in HcrInit()
404 pHcr->decInOut.errorLog |= LINE_IN_SECT_OUT_OF_RANGE_LONG_BLOCK; in HcrInit()
407 if (pHcr->decInOut.errorLog != 0) { in HcrInit()
408 return (pHcr->decInOut.errorLog); in HcrInit()
412 pCodeBk = pHcr->decInOut.pCodebook; in HcrInit()
423 return (pHcr->decInOut.errorLog); in HcrInit()
433 UINT HcrDecoder(H_HCR_INFO pHcr, CAacDecoderChannelInfo *pAacDecoderChannelInfo, in HcrDecoder() argument
442 HcrCalcNumCodeword(pHcr); in HcrDecoder()
444 HcrSortCodebookAndNumCodewordInSection(pHcr); in HcrDecoder()
446 HcrPrepareSegmentationGrid(pHcr); in HcrDecoder()
448 HcrExtendedSectionInfo(pHcr); in HcrDecoder()
450 if ((pHcr->decInOut.errorLog & HCR_FATAL_PCW_ERROR_MASK) != 0) { in HcrDecoder()
451 return (pHcr->decInOut.errorLog); /* sideinfo is massively corrupt, return in HcrDecoder()
457 pHcr->segmentInfo.numSegment, in HcrDecoder()
458 pHcr->sectionInfo.pNumExtendedSortedCodewordInSection, in HcrDecoder()
459 pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx, in HcrDecoder()
460 pHcr->sectionInfo.pNumExtendedSortedSectionsInSets, in HcrDecoder()
461 pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx); in HcrDecoder()
464 pTmp1 = pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx; in HcrDecoder()
465 pTmp2 = pHcr->sectionInfo.extendedSortedCodebookIdx; in HcrDecoder()
466 pTmp3 = pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx; in HcrDecoder()
467 pTmp4 = pHcr->decInOut.quantizedSpectralCoefficientsIdx; in HcrDecoder()
468 pTmp5 = pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx; in HcrDecoder()
471 DecodePCWs(bs, pHcr); in HcrDecoder()
473 if ((pHcr->decInOut.errorLog & HCR_FATAL_PCW_ERROR_MASK) == 0) { in HcrDecoder()
475 DecodeNonPCWs(bs, pHcr); in HcrDecoder()
478 errDetectWithinSegmentationFinal(pHcr); in HcrDecoder()
481 pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx = pTmp1; in HcrDecoder()
482 pHcr->sectionInfo.extendedSortedCodebookIdx = pTmp2; in HcrDecoder()
483 pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx = pTmp3; in HcrDecoder()
484 pHcr->decInOut.quantizedSpectralCoefficientsIdx = pTmp4; in HcrDecoder()
485 pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx = pTmp5; in HcrDecoder()
487 HcrReorderQuantizedSpectralCoefficients(pHcr, pAacDecoderChannelInfo, in HcrDecoder()
496 return (pHcr->decInOut.errorLog); in HcrDecoder()
511 H_HCR_INFO pHcr, CAacDecoderChannelInfo *pAacDecoderChannelInfo, in HcrReorderQuantizedSpectralCoefficients() argument
520 UINT numSection = pHcr->decInOut.numSection; in HcrReorderQuantizedSpectralCoefficients()
522 pHcr->decInOut.pQuantizedSpectralCoefficientsBase; in HcrReorderQuantizedSpectralCoefficients()
524 SPEC_LONG(pHcr->decInOut.pQuantizedSpectralCoefficientsBase); in HcrReorderQuantizedSpectralCoefficients()
527 UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook; in HcrReorderQuantizedSpectralCoefficients()
529 pHcr->sectionInfo.pNumSortedCodewordInSection; in HcrReorderQuantizedSpectralCoefficients()
530 USHORT *pReorderOffset = pHcr->sectionInfo.pReorderOffset; in HcrReorderQuantizedSpectralCoefficients()
650 pHcr->decInOut.errorLog |= LAV_VIOLATION; in HcrReorderQuantizedSpectralCoefficients()
669 static void HcrCalcNumCodeword(H_HCR_INFO pHcr) { in HcrCalcNumCodeword() argument
673 UINT numSection = pHcr->decInOut.numSection; in HcrCalcNumCodeword()
674 UCHAR *pCodebook = pHcr->decInOut.pCodebook; in HcrCalcNumCodeword()
675 SHORT *pNumLineInSection = pHcr->decInOut.pNumLineInSect; in HcrCalcNumCodeword()
678 USHORT *pNumCodewordInSection = pHcr->sectionInfo.pNumCodewordInSection; in HcrCalcNumCodeword()
689 pHcr->sectionInfo.numCodeword = numCodeword; in HcrCalcNumCodeword()
699 static void HcrSortCodebookAndNumCodewordInSection(H_HCR_INFO pHcr) { in HcrSortCodebookAndNumCodewordInSection() argument
708 UINT numSection = pHcr->decInOut.numSection; in HcrSortCodebookAndNumCodewordInSection()
709 UCHAR *pCodebook = pHcr->decInOut.pCodebook; in HcrSortCodebookAndNumCodewordInSection()
710 UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook; in HcrSortCodebookAndNumCodewordInSection()
711 USHORT *pNumCodewordInSection = pHcr->sectionInfo.pNumCodewordInSection; in HcrSortCodebookAndNumCodewordInSection()
713 pHcr->sectionInfo.pNumSortedCodewordInSection; in HcrSortCodebookAndNumCodewordInSection()
714 UCHAR *pCodebookSwitch = pHcr->sectionInfo.pCodebookSwitch; in HcrSortCodebookAndNumCodewordInSection()
715 USHORT *pReorderOffset = pHcr->sectionInfo.pReorderOffset; in HcrSortCodebookAndNumCodewordInSection()
733 pHcr->sectionInfo.numSortedSection = in HcrSortCodebookAndNumCodewordInSection()
736 pCodebook = pHcr->decInOut.pCodebook; in HcrSortCodebookAndNumCodewordInSection()
759 pCodebookSwitch = pHcr->sectionInfo.pCodebookSwitch; in HcrSortCodebookAndNumCodewordInSection()
799 static void HcrPrepareSegmentationGrid(H_HCR_INFO pHcr) { in HcrPrepareSegmentationGrid() argument
809 SCHAR lengthOfLongestCodeword = pHcr->decInOut.lengthOfLongestCodeword; in HcrPrepareSegmentationGrid()
811 pHcr->decInOut.lengthOfReorderedSpectralData; in HcrPrepareSegmentationGrid()
812 UINT numSortedSection = pHcr->sectionInfo.numSortedSection; in HcrPrepareSegmentationGrid()
813 UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook; in HcrPrepareSegmentationGrid()
815 pHcr->sectionInfo.pNumSortedCodewordInSection; in HcrPrepareSegmentationGrid()
816 INT *pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment; in HcrPrepareSegmentationGrid()
817 INT *pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment; in HcrPrepareSegmentationGrid()
818 SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment; in HcrPrepareSegmentationGrid()
858 pHcr->segmentInfo.numSegment = numSegment; in HcrPrepareSegmentationGrid()
872 static void HcrExtendedSectionInfo(H_HCR_INFO pHcr) { in HcrExtendedSectionInfo() argument
878 UINT numSortedSection = pHcr->sectionInfo.numSortedSection; in HcrExtendedSectionInfo()
879 UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook; in HcrExtendedSectionInfo()
881 pHcr->sectionInfo.pNumSortedCodewordInSection; in HcrExtendedSectionInfo()
882 UCHAR *pExtendedSortedCoBo = pHcr->sectionInfo.pExtendedSortedCodebook; in HcrExtendedSectionInfo()
884 pHcr->sectionInfo.pNumExtendedSortedCodewordInSection; in HcrExtendedSectionInfo()
885 UINT numSegment = pHcr->segmentInfo.numSegment; in HcrExtendedSectionInfo()
886 UCHAR *pMaxLenOfCbInExtSrtSec = pHcr->sectionInfo.pMaxLenOfCbInExtSrtSec; in HcrExtendedSectionInfo()
887 SCHAR lengthOfLongestCodeword = pHcr->decInOut.lengthOfLongestCodeword; in HcrExtendedSectionInfo()
926 pHcr->decInOut.errorLog |= EXTENDED_SORTED_COUNTER_OVERFLOW; in HcrExtendedSectionInfo()
997 static void DecodePCWs(HANDLE_FDK_BITSTREAM bs, H_HCR_INFO pHcr) { in DecodePCWs() argument
1008 pHcr->sectionInfo.pNumExtendedSortedCodewordInSection; in DecodePCWs()
1010 pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx; in DecodePCWs()
1011 UCHAR *pExtendedSortedCodebook = pHcr->sectionInfo.pExtendedSortedCodebook; in DecodePCWs()
1012 int extendedSortedCodebookIdx = pHcr->sectionInfo.extendedSortedCodebookIdx; in DecodePCWs()
1014 pHcr->sectionInfo.pNumExtendedSortedSectionsInSets; in DecodePCWs()
1016 pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx; in DecodePCWs()
1018 SPEC_LONG(pHcr->decInOut.pQuantizedSpectralCoefficientsBase); in DecodePCWs()
1020 pHcr->decInOut.quantizedSpectralCoefficientsIdx; in DecodePCWs()
1021 INT *pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment; in DecodePCWs()
1022 SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment; in DecodePCWs()
1023 UCHAR *pMaxLenOfCbInExtSrtSec = pHcr->sectionInfo.pMaxLenOfCbInExtSrtSec; in DecodePCWs()
1024 int maxLenOfCbInExtSrtSecIdx = pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx; in DecodePCWs()
1074 bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase, in DecodePCWs()
1091 pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_BITS_DECODED; in DecodePCWs()
1095 *pRemainingBitsInSegment - ERROR_PCW_BODY, pHcr, PCW_BODY, in DecodePCWs()
1118 bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase, in DecodePCWs()
1122 bs, pHcr->decInOut.bitstreamAnchor, dimension, pQuantVal, in DecodePCWs()
1131 pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_SIGN_BITS_DECODED; in DecodePCWs()
1135 *pRemainingBitsInSegment - ERROR_PCW_BODY_SIGN, pHcr, in DecodePCWs()
1160 bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase, in DecodePCWs()
1164 bs, pHcr->decInOut.bitstreamAnchor, dimension, pQuantVal, in DecodePCWs()
1179 bs, pHcr->decInOut.bitstreamAnchor, in DecodePCWs()
1183 &pHcr->decInOut.errorLog); in DecodePCWs()
1195 bs, pHcr->decInOut.bitstreamAnchor, in DecodePCWs()
1199 &pHcr->decInOut.errorLog); in DecodePCWs()
1210 pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_SIGN_ESC_BITS_DECODED; in DecodePCWs()
1214 *pRemainingBitsInSegment - ERROR_PCW_BODY_SIGN_ESC, pHcr, in DecodePCWs()
1241 pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx = in DecodePCWs()
1243 pHcr->sectionInfo.extendedSortedCodebookIdx = extendedSortedCodebookIdx; in DecodePCWs()
1244 pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx = in DecodePCWs()
1246 pHcr->decInOut.quantizedSpectralCoefficientsIdx = in DecodePCWs()
1248 pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx = maxLenOfCbInExtSrtSecIdx; in DecodePCWs()
1261 H_HCR_INFO pHcr, PCW_TYPE kind, in errDetectPcwSegmentation() argument
1269 pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY; in errDetectPcwSegmentation()
1272 pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY_SIGN; in errDetectPcwSegmentation()
1275 pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY_SIGN_ESC; in errDetectPcwSegmentation()
1293 static void errDetectWithinSegmentationFinal(H_HCR_INFO pHcr) { in errDetectWithinSegmentationFinal() argument
1296 SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment; in errDetectWithinSegmentationFinal()
1297 UINT numSegment = pHcr->segmentInfo.numSegment; in errDetectWithinSegmentationFinal()
1305 pHcr->decInOut.errorLog |= BIT_IN_SEGMENTATION_ERROR; in errDetectWithinSegmentationFinal()