UnpackScaleFactors_MP3

Unpacks scalefactors.

Syntax

IppStatus ippsUnpackScaleFactors_MP3_1u8s(Ipp8u** ppBitStream, int* pOffset, Ipp8s* pDstScaleFactor, IppMP3SideInfo* pSideInfo, int* pScfsi, IppMP3FrameHeader* pFrameHeader, int granule, int channel);

Parameters

ppBitStream

Pointer to the pointer to the first bitstream buffer byte associated with the scale factors for the current frame, granule, and channel. The function updates this parameter.

pOffSet

Pointer to the next bit in the byte referenced by ppBitStream. Valid within the range of 0 to 7, where 0 corresponds to the most significant bit and 7 corresponds to the least significant bit. The function updates this parameter.

pSideInfo

Pointer to the MP3 side information structure associated with the current granule and channel.

pScfsi

Pointer to scale factor selection information for the current channel.

channel

Channel index. Can take the values of either 0 or 1.

granule

Granule index. Can take the values of either 0 or 1.

pFrameHeader

Pointer to MP3 frame header structure for the current frame.

pDstScaleFactor

Pointer to the scalefactor vector for long and/or short blocks.

Description

The function ippsUnpackScaleFactors_MP3 is declared in the ippac.h file. This function unpacks short and/or long block scalefactors for one granule of one channel and places the results in the vector pDstScaleFactor. Before returning to the caller, the function updates ppBitStream and pOffset so that they point to the next available bit in the input bitstream.

Note iconNote

MPEG-2 intensity mode: if the intensity position is equal to the maximum value, or illegal position, the illegal position sets to negative. Consequently, in the requantization module, negative positions indicate illegal positions. Scalefactors that are not treated as intensity positions must be set to positive before using them.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the pointers ppBitStream, pOffset, pDstScaleFactor, pSideInfo, pScfsi, ppBitStream, or pFrameHeader is NULL.

ippStsBadArgErr

Indicates an error when pOffset > 7 , or pOffset < 0 , or granule and/or channel exceeds [0, 1].

ippStsMP3FrameHeaderErr

Indicates an error when pFrameHeader->id != IPP_MP3_ID_MPEG1 pFrameHeader->id != IPP_MP3_ID_MPEG2 pFrameHeader->mode exceeds [0..3].

ippStsMP3SideInfoErr

Indicates an error when pSideInfo->blockType exceeds [0, 3] , or pSideInfo->mixedBlock exceeds [0, 1], or pSideInfo-> sfCompress exceeds [0, 15]; or pScfsi[0..3] exceeds [0, 1] when pFrameHeader indicates the bitstream is MPEG-1, or pSideInfo-> sfCompress exceeds [0, 511] when pFrameHeader indicates the bitstream is MPEG-2.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.