diff options
author | Bill Yi <byi@google.com> | 2018-11-28 18:34:17 -0800 |
---|---|---|
committer | Bill Yi <byi@google.com> | 2018-11-28 18:34:17 -0800 |
commit | a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c (patch) | |
tree | 66fe1fc4eb2c283bcebf91e53f365c6b22f1b47c /libAACdec/src/aacdec_hcr_bit.cpp | |
parent | f76ceebf7a0ab901ac6586d764ae47576c17e08c (diff) | |
parent | b97c2a93f288df43dd7cc0c45640509a17dddb18 (diff) | |
download | fdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.tar.gz fdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.tar.bz2 fdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.zip |
Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: If3ff263d4f628f2c6d4ad3c28d0571284ca1f56d
Diffstat (limited to 'libAACdec/src/aacdec_hcr_bit.cpp')
-rw-r--r-- | libAACdec/src/aacdec_hcr_bit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libAACdec/src/aacdec_hcr_bit.cpp b/libAACdec/src/aacdec_hcr_bit.cpp index a53ef16..0198659 100644 --- a/libAACdec/src/aacdec_hcr_bit.cpp +++ b/libAACdec/src/aacdec_hcr_bit.cpp @@ -132,13 +132,14 @@ read direction. It is called very often, therefore it makes sense to inline it return: - bit from bitstream -------------------------------------------------------------------------------------------- */ -UINT HcrGetABitFromBitstream(HANDLE_FDK_BITSTREAM bs, INT *pLeftStartOfSegment, +UINT HcrGetABitFromBitstream(HANDLE_FDK_BITSTREAM bs, const INT bsAnchor, + INT *pLeftStartOfSegment, INT *pRightStartOfSegment, UCHAR readDirection) { UINT bit; INT readBitOffset; if (readDirection == FROM_LEFT_TO_RIGHT) { - readBitOffset = *pLeftStartOfSegment - FDKgetBitCnt(bs); + readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pLeftStartOfSegment; if (readBitOffset) { FDKpushBiDirectional(bs, readBitOffset); } @@ -147,7 +148,7 @@ UINT HcrGetABitFromBitstream(HANDLE_FDK_BITSTREAM bs, INT *pLeftStartOfSegment, *pLeftStartOfSegment += 1; } else { - readBitOffset = *pRightStartOfSegment - FDKgetBitCnt(bs); + readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pRightStartOfSegment; if (readBitOffset) { FDKpushBiDirectional(bs, readBitOffset); } |