Initializes all elements of the bit reservoir state structure.
IppStatus ippsBitReservoirInit_MP3(IppMP3BitReservoir* pDstBitResv, IppMP3FrameHeader* pFrameHeader);
pFrameHeader |
Pointer to the IppMP3FrameHeader structure that contains the header information associated with the current frame. The frame header fields bitRate and id, bit rate index and algorithm identification, respectively, must contain valid data prior to calling the function BitReservoirInit_MP3 since both are used to generate the bit reservoir initialization parameters. |
All other frame header parameters are ignored by the bit reservoir initialization function. Only MPEG‑1 (id = 1) is supported. | |
pDstBitResv |
Pointer to the initialized IppMP3BitReservoir state structure. The structure element BitsRemaining is initialized as 0. The structure element MaxBits is initialized to reflect the maximum number of bits that can be contained in the reservoir at the start of any given frame. The appropriate value of MaxBits is directly determined by the selected algorithm (MPEG-1 or MPEG-2) and the stream bit rate indicated by the field pFrameHeader.bitRate. |
The function is declared in the ippac.h file. This function initializes all elements of the bit reservoir state structure based on the coding algorithm (MPEG-1 or MPEG-2) and the average per frame bit allocation specified in the frame header.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when pDstBitResv or pFrameHeader is NULL. |
ippStsMP3FrameHeaderErr |
Indicates an error when pFrameHeader-> id != IPP_MP3_ID_MPEG1. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.