1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
19 ------------------------------------------------------------------------------
24 Filename: pvmp3_framedecoder.cpp
33 ------------------------------------------------------------------------------
39 ------------------------------------------------------------------------------
40 INPUT AND OUTPUT DEFINITIONS
43 pExt = pointer to the external interface structure. See the file
44 pvmp3decoder_api.h for a description of each field.
45 Data type of pointer to a tPVMP3DecoderExternal
48 pMem = void pointer to hide the internal implementation of the library
49 It is cast back to a tmp3dec_file structure. This structure
50 contains information that needs to persist between calls to
51 this function, or is too big to be placed on the stack, even
52 though the data is only needed during execution of this function
53 Data type void pointer, internally pointer to a tmp3dec_file
58 status = ERROR condition. see structure ERROR_CODE
60 Pointers and Buffers Modified:
61 pMem contents are modified.
62 pExt: (more detail in the file pvmp3decoder_api.h)
63 inputBufferUsedLength - number of array elements used up by the stream.
64 samplingRate - sampling rate in samples per sec
65 bitRate - bit rate in bits per second, varies frame to frame.
69 ------------------------------------------------------------------------------
73 frame decoder library driver
75 Decoder Initialization
79 ------------------------------------------------------------------------------
83 ------------------------------------------------------------------------------
86 [1] ISO MPEG Audio Subgroup Software Simulation Group (1996)
87 ISO 13818-3 MPEG-2 Audio Decoder - Lower Sampling Frequency Extension
89 ------------------------------------------------------------------------------
92 ------------------------------------------------------------------------------
96 /*----------------------------------------------------------------------------
98 ----------------------------------------------------------------------------*/
101 #include "pvmp3_framedecoder.h"
102 #include "pvmp3_dec_defs.h"
103 #include "pvmp3_poly_phase_synthesis.h"
104 #include "pvmp3_tables.h"
105 #include "pvmp3_imdct_synth.h"
106 #include "pvmp3_alias_reduction.h"
107 #include "pvmp3_reorder.h"
108 #include "pvmp3_dequantize_sample.h"
109 #include "pvmp3_stereo_proc.h"
110 #include "pvmp3_mpeg2_stereo_proc.h"
111 #include "pvmp3_get_side_info.h"
112 #include "pvmp3_get_scale_factors.h"
113 #include "pvmp3_mpeg2_get_scale_factors.h"
114 #include "pvmp3_decode_header.h"
115 #include "pvmp3_get_main_data_size.h"
116 #include "s_tmp3dec_file.h"
117 #include "pvmp3_getbits.h"
118 #include "mp3_mem_funcs.h"
121 /*----------------------------------------------------------------------------
123 ; Define module specific macros here
124 ----------------------------------------------------------------------------*/
127 /*----------------------------------------------------------------------------
129 ; Include all pre-processor statements here. Include conditional
130 ; compile variables also.
131 ----------------------------------------------------------------------------*/
133 /*----------------------------------------------------------------------------
134 ; LOCAL FUNCTION DEFINITIONS
135 ; Function Prototype declaration
136 ----------------------------------------------------------------------------*/
138 /*----------------------------------------------------------------------------
139 ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
140 ; Variable declaration - defined here and used outside this module
141 ----------------------------------------------------------------------------*/
143 /*----------------------------------------------------------------------------
144 ; EXTERNAL FUNCTION REFERENCES
145 ; Declare functions defined elsewhere and referenced in this module
146 ----------------------------------------------------------------------------*/
148 /*----------------------------------------------------------------------------
149 ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
150 ; Declare variables used in this module but defined elsewhere
151 ----------------------------------------------------------------------------*/
153 /*----------------------------------------------------------------------------
155 ----------------------------------------------------------------------------*/
157 ERROR_CODE pvmp3_framedecoder(tPVMP3DecoderExternal *pExt,
161 ERROR_CODE errorCode = NO_DECODING_ERROR;
163 int32 crc_error_count = 0;
165 uint32 computed_crc = 0;
167 tmp3dec_chan *pChVars[CHAN];
168 tmp3dec_file *pVars = (tmp3dec_file *)pMem;
171 mp3Header *info = &info_data;
173 pVars->inputStream.pBuffer = pExt->pInputBuffer;
176 pVars->inputStream.usedBits = pExt->inputBufferUsedLength << 3;
177 pVars->inputStream.inputBufferCurrentLength = pExt->inputBufferCurrentLength;
180 errorCode = pvmp3_decode_header(&pVars->inputStream,
184 if (errorCode != NO_DECODING_ERROR)
186 pExt->outputFrameSize = 0;
190 pVars->num_channels = (info->mode == MPG_MD_MONO) ? 1 : 2;
191 pExt->num_channels = pVars->num_channels;
193 int32 outputFrameSize = (info->version_x == MPEG_1) ?
194 2 * SUBBANDS_NUMBER * FILTERBANK_BANDS :
195 SUBBANDS_NUMBER * FILTERBANK_BANDS;
197 outputFrameSize = (info->mode == MPG_MD_MONO) ? outputFrameSize : outputFrameSize << 1;
201 * Check if output buffer has enough room to hold output PCM
203 if (pExt->outputFrameSize >= outputFrameSize)
205 pExt->outputFrameSize = outputFrameSize;
209 pExt->outputFrameSize = 0;
210 return OUTPUT_BUFFER_TOO_SMALL;
214 pChVars[ LEFT] = &pVars->perChan[ LEFT];
215 pChVars[RIGHT] = &pVars->perChan[RIGHT];
220 if (info->error_protection)
225 sent_crc = getUpTo17bits(&pVars->inputStream, 16);
229 if (info->layer_description == 3)
233 uint32 main_data_end;
234 int32 bytes_to_discard;
235 int16 *ptrOutBuffer = pExt->pOutputBuffer;
238 * Side Information must be extracted from the bitstream and store for use
239 * during the decoded of the associated frame
242 errorCode = pvmp3_get_side_info(&pVars->inputStream,
247 if (errorCode != NO_DECODING_ERROR)
249 pExt->outputFrameSize = 0;
254 * If CRC was sent, check that matches the one got while parsing data
255 * disable crc if this is the desired mode
257 if (info->error_protection)
259 if ((computed_crc != sent_crc) && pExt->crcEnabled)
266 * main data (scalefactors, Huffman coded, etc,) are not necessarily located
267 * adjacent to the side-info. Beginning of main data is located using
268 * field "main_data_begin" of the current frame. The length does not include
269 * header and side info.
270 * "main_data_begin" points to the first bit of main data of a frame. It is a negative
271 * offset in bytes from the first byte of the sync word
272 * main_data_begin = 0 <===> main data start rigth after side info.
275 int32 temp = pvmp3_get_main_data_size(info, pVars);
279 * Check if available data holds a full frame, if not flag an error
282 if ((uint32)pVars->predicted_frame_size > pVars->inputStream.inputBufferCurrentLength)
284 pExt->outputFrameSize = 0;
285 return NO_ENOUGH_MAIN_DATA_ERROR;
289 * Fill in internal circular buffer
291 fillMainDataBuf(pVars, temp);
294 main_data_end = pVars->mainDataStream.usedBits >> 3; /* in bytes */
295 if ((main_data_end << 3) < pVars->mainDataStream.usedBits)
298 pVars->mainDataStream.usedBits = main_data_end << 3;
302 bytes_to_discard = pVars->frame_start - pVars->sideInfo.main_data_begin - main_data_end;
305 if (main_data_end > BUFSIZE) /* check overflow on the buffer */
307 pVars->frame_start -= BUFSIZE;
309 pVars->mainDataStream.usedBits -= (BUFSIZE << 3);
312 pVars->frame_start += temp;
315 if (bytes_to_discard < 0 || crc_error_count)
318 * Not enough data to decode, then we should avoid reading this
319 * data ( getting/ignoring sido info and scale data)
320 * Main data could be located in the previous frame, so an unaccounted
321 * frame can cause incorrect processing
322 * Just run the polyphase filter to "clean" the history buffer
324 errorCode = NO_ENOUGH_MAIN_DATA_ERROR;
327 * Clear the input to these filters
330 pv_memset((void*)pChVars[RIGHT]->work_buf_int32,
332 SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[RIGHT]->work_buf_int32[0]));
334 pv_memset((void*)pChVars[LEFT]->work_buf_int32,
336 SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[LEFT]->work_buf_int32[0]));
338 /* clear circular buffers, to avoid any glitch */
339 pv_memset((void*)&pChVars[ LEFT]->circ_buffer[576],
341 480*sizeof(pChVars[ LEFT]->circ_buffer[0]));
342 pv_memset((void*)&pChVars[RIGHT]->circ_buffer[576],
344 480*sizeof(pChVars[RIGHT]->circ_buffer[0]));
346 pChVars[ LEFT]->used_freq_lines = 575;
347 pChVars[RIGHT]->used_freq_lines = 575;
352 pVars->mainDataStream.usedBits += (bytes_to_discard << 3);
356 * if (fr_ps->header->version_x == MPEG_1), use 2 granules, otherwise just 1
358 for (gr = 0; gr < (1 + !(info->version_x)); gr++)
360 if (errorCode != NO_ENOUGH_MAIN_DATA_ERROR)
362 for (ch = 0; ch < pVars->num_channels; ch++)
364 int32 part2_start = pVars->mainDataStream.usedBits;
366 if (info->version_x == MPEG_1)
369 pvmp3_get_scale_factors(&pVars->scaleFactors[ch],
373 &pVars->mainDataStream);
377 int32 * tmp = pVars->Scratch_mem;
378 pvmp3_mpeg2_get_scale_factors(&pVars->scaleFactors[ch],
384 &pVars->mainDataStream);
387 pChVars[ch]->used_freq_lines = pvmp3_huffman_parsing(pChVars[ch]->work_buf_int32,
388 &pVars->sideInfo.ch[ch].gran[gr],
394 pvmp3_dequantize_sample(pChVars[ch]->work_buf_int32,
395 &pVars->scaleFactors[ch],
396 &pVars->sideInfo.ch[ch].gran[gr],
397 pChVars[ch]->used_freq_lines,
403 } /* for (ch=0; ch<stereo; ch++) */
405 if (pVars->num_channels == 2)
408 int32 used_freq_lines = (pChVars[ LEFT]->used_freq_lines >
409 pChVars[RIGHT]->used_freq_lines) ?
410 pChVars[ LEFT]->used_freq_lines :
411 pChVars[RIGHT]->used_freq_lines;
413 pChVars[ LEFT]->used_freq_lines = used_freq_lines;
414 pChVars[RIGHT]->used_freq_lines = used_freq_lines;
416 if (info->version_x == MPEG_1)
418 pvmp3_stereo_proc(pChVars[ LEFT]->work_buf_int32,
419 pChVars[RIGHT]->work_buf_int32,
420 &pVars->scaleFactors[RIGHT],
421 &pVars->sideInfo.ch[LEFT].gran[gr],
427 int32 * tmp = pVars->Scratch_mem;
428 pvmp3_mpeg2_stereo_proc(pChVars[ LEFT]->work_buf_int32,
429 pChVars[RIGHT]->work_buf_int32,
430 &pVars->scaleFactors[RIGHT],
431 &pVars->sideInfo.ch[ LEFT].gran[gr],
432 &pVars->sideInfo.ch[RIGHT].gran[gr],
439 } /* if ( errorCode != NO_ENOUGH_MAIN_DATA_ERROR) */
441 for (ch = 0; ch < pVars->num_channels; ch++)
444 pvmp3_reorder(pChVars[ch]->work_buf_int32,
445 &pVars->sideInfo.ch[ch].gran[gr],
446 &pChVars[ ch]->used_freq_lines,
450 pvmp3_alias_reduction(pChVars[ch]->work_buf_int32,
451 &pVars->sideInfo.ch[ch].gran[gr],
452 &pChVars[ ch]->used_freq_lines,
460 * In case of mixed blocks, # of bands with long
461 * blocks (2 or 4) else 0
463 uint16 mixedBlocksLongBlocks = 0; /* 0 = long or short, 2=mixed, 4=mixed 2.5@8000 */
464 if (pVars->sideInfo.ch[ch].gran[gr].mixed_block_flag &&
465 pVars->sideInfo.ch[ch].gran[gr].window_switching_flag)
467 if ((info->version_x == MPEG_2_5) && (info->sampling_frequency == 2))
469 mixedBlocksLongBlocks = 4; /* mpeg2.5 @ 8 KHz */
473 mixedBlocksLongBlocks = 2;
477 pvmp3_imdct_synth(pChVars[ch]->work_buf_int32,
478 pChVars[ch]->overlap,
479 pVars->sideInfo.ch[ch].gran[gr].block_type,
480 mixedBlocksLongBlocks,
481 pChVars[ ch]->used_freq_lines,
486 * Polyphase synthesis
489 pvmp3_poly_phase_synthesis(pChVars[ch],
497 ptrOutBuffer += pVars->num_channels * SUBBANDS_NUMBER * FILTERBANK_BANDS;
498 } /* for (gr=0;gr<Max_gr;gr++) */
500 /* skip ancillary data */
501 if (info->bitrate_index > 0)
502 { /* if not free-format */
504 int32 ancillary_data_lenght = pVars->predicted_frame_size << 3;
506 ancillary_data_lenght -= pVars->inputStream.usedBits;
508 /* skip ancillary data */
509 if (ancillary_data_lenght > 0)
511 pVars->inputStream.usedBits += ancillary_data_lenght;
517 * This overrides a possible NO_ENOUGH_MAIN_DATA_ERROR
519 errorCode = NO_DECODING_ERROR;
525 * The info on the header leads to an unsupported layer, more data
526 * will not fix this, so this is a bad frame,
529 pExt->outputFrameSize = 0;
530 return UNSUPPORTED_LAYER;
533 pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3;
534 pExt->totalNumberOfBitsUsed += pVars->inputStream.usedBits;
535 pExt->version = info->version_x;
536 pExt->samplingRate = mp3_s_freq[info->version_x][info->sampling_frequency];
537 pExt->bitRate = mp3_bitrate[pExt->version][info->bitrate_index];
541 * Always verify buffer overrun condition
544 if (pExt->inputBufferUsedLength > pExt->inputBufferCurrentLength)
546 pExt->outputFrameSize = 0;
547 errorCode = NO_ENOUGH_MAIN_DATA_ERROR;
555 /*----------------------------------------------------------------------------
557 ----------------------------------------------------------------------------*/
559 __inline void fillDataBuf(tmp3Bits *pMainData,
560 uint32 val) /* val to write into the buffer */
562 pMainData->pBuffer[module(pMainData->offset++, BUFSIZE)] = (uint8)val;
566 void fillMainDataBuf(void *pMem, int32 temp)
568 tmp3dec_file *pVars = (tmp3dec_file *)pMem;
571 int32 offset = (pVars->inputStream.usedBits) >> INBUF_ARRAY_INDEX_SHIFT;
574 * Check if input circular buffer boundaries need to be enforced
576 if ((offset + temp) < BUFSIZE)
578 uint8 * ptr = pVars->inputStream.pBuffer + offset;
580 offset = pVars->mainDataStream.offset;
583 * Check if main data circular buffer boundaries need to be enforced
585 if ((offset + temp) < BUFSIZE)
587 pv_memcpy((pVars->mainDataStream.pBuffer + offset), ptr, temp*sizeof(uint8));
588 pVars->mainDataStream.offset += temp;
592 int32 tmp1 = *(ptr++);
593 for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--) /* read main data. */
595 int32 tmp2 = *(ptr++);
596 fillDataBuf(&pVars->mainDataStream, tmp1);
597 fillDataBuf(&pVars->mainDataStream, tmp2);
603 fillDataBuf(&pVars->mainDataStream, tmp1);
606 /* adjust circular buffer counter */
607 pVars->mainDataStream.offset = module(pVars->mainDataStream.offset, BUFSIZE);
612 for (int32 nBytes = temp >> 1; nBytes != 0; nBytes--) /* read main data. */
614 fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++ , BUFSIZE)));
615 fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset++ , BUFSIZE)));
619 fillDataBuf(&pVars->mainDataStream, *(pVars->inputStream.pBuffer + module(offset , BUFSIZE)));
624 pVars->inputStream.usedBits += (temp) << INBUF_ARRAY_INDEX_SHIFT;
630 /*----------------------------------------------------------------------------
632 ----------------------------------------------------------------------------*/
634 uint32 pvmp3_decoderMemRequirements(void)
638 size = (uint32) sizeof(tmp3dec_file);
644 /*----------------------------------------------------------------------------
646 ----------------------------------------------------------------------------*/
648 #include "pvmp3_decode_huff_cw.h"
650 void pvmp3_InitDecoder(tPVMP3DecoderExternal *pExt,
657 pVars = (tmp3dec_file *)pMem;
659 pVars->num_channels = 0;
661 pExt->totalNumberOfBitsUsed = 0;
662 pExt->inputBufferCurrentLength = 0;
663 pExt->inputBufferUsedLength = 0;
665 pVars->mainDataStream.offset = 0;
667 pv_memset((void*)pVars->mainDataBuffer,
669 BUFSIZE*sizeof(*pVars->mainDataBuffer));
672 pVars->inputStream.pBuffer = pExt->pInputBuffer;
675 * Initialize huffman decoding table
679 pHuff[0].linbits = 0;
680 pHuff[0].pdec_huff_tab = pvmp3_decode_huff_cw_tab0;
681 pHuff[1].linbits = 0;
682 pHuff[1].pdec_huff_tab = pvmp3_decode_huff_cw_tab1;
683 pHuff[2].linbits = 0;
684 pHuff[2].pdec_huff_tab = pvmp3_decode_huff_cw_tab2;
685 pHuff[3].linbits = 0;
686 pHuff[3].pdec_huff_tab = pvmp3_decode_huff_cw_tab3;
687 pHuff[4].linbits = 0;
688 pHuff[4].pdec_huff_tab = pvmp3_decode_huff_cw_tab0; /* tbl 4 is not used */
689 pHuff[5].linbits = 4;
690 pHuff[5].pdec_huff_tab = pvmp3_decode_huff_cw_tab5;
691 pHuff[6].linbits = 0;
692 pHuff[6].pdec_huff_tab = pvmp3_decode_huff_cw_tab6;
693 pHuff[7].linbits = 0;
694 pHuff[7].pdec_huff_tab = pvmp3_decode_huff_cw_tab7;
695 pHuff[8].linbits = 0;
696 pHuff[8].pdec_huff_tab = pvmp3_decode_huff_cw_tab8;
697 pHuff[9].linbits = 0;
698 pHuff[9].pdec_huff_tab = pvmp3_decode_huff_cw_tab9;
699 pHuff[10].linbits = 0;
700 pHuff[10].pdec_huff_tab = pvmp3_decode_huff_cw_tab10;
701 pHuff[11].linbits = 0;
702 pHuff[11].pdec_huff_tab = pvmp3_decode_huff_cw_tab11;
703 pHuff[12].linbits = 0;
704 pHuff[12].pdec_huff_tab = pvmp3_decode_huff_cw_tab12;
705 pHuff[13].linbits = 0;
706 pHuff[13].pdec_huff_tab = pvmp3_decode_huff_cw_tab13;
707 pHuff[14].linbits = 0;
708 pHuff[14].pdec_huff_tab = pvmp3_decode_huff_cw_tab0; /* tbl 14 is not used */
709 pHuff[15].linbits = 0;
710 pHuff[15].pdec_huff_tab = pvmp3_decode_huff_cw_tab15;
711 pHuff[16].linbits = 1;
712 pHuff[16].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
713 pHuff[17].linbits = 2;
714 pHuff[17].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
715 pHuff[18].linbits = 3;
716 pHuff[18].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
717 pHuff[19].linbits = 4;
718 pHuff[19].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
719 pHuff[20].linbits = 6;
720 pHuff[20].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
721 pHuff[21].linbits = 8;
722 pHuff[21].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
723 pHuff[22].linbits = 10;
724 pHuff[22].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
725 pHuff[23].linbits = 13;
726 pHuff[23].pdec_huff_tab = pvmp3_decode_huff_cw_tab16;
727 pHuff[24].linbits = 4;
728 pHuff[24].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
729 pHuff[25].linbits = 5;
730 pHuff[25].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
731 pHuff[26].linbits = 6;
732 pHuff[26].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
733 pHuff[27].linbits = 7;
734 pHuff[27].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
735 pHuff[28].linbits = 8;
736 pHuff[28].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
737 pHuff[29].linbits = 9;
738 pHuff[29].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
739 pHuff[30].linbits = 11;
740 pHuff[30].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
741 pHuff[31].linbits = 13;
742 pHuff[31].pdec_huff_tab = pvmp3_decode_huff_cw_tab24;
743 pHuff[32].linbits = 0;
744 pHuff[32].pdec_huff_tab = pvmp3_decode_huff_cw_tab32;
745 pHuff[33].linbits = 0;
746 pHuff[33].pdec_huff_tab = pvmp3_decode_huff_cw_tab33;
749 * Initialize polysynthesis circular buffer mechanism
753 pvmp3_resetDecoder(pMem);
758 /*----------------------------------------------------------------------------
760 ----------------------------------------------------------------------------*/
763 void pvmp3_resetDecoder(void *pMem)
767 tmp3dec_chan *pChVars[CHAN];
769 pVars = (tmp3dec_file *)pMem;
770 pChVars[ LEFT] = &pVars->perChan[ LEFT];
771 pChVars[RIGHT] = &pVars->perChan[RIGHT];
773 pVars->frame_start = 0;
775 pVars->mainDataStream.offset = 0;
777 pVars->mainDataStream.pBuffer = pVars->mainDataBuffer;
778 pVars->mainDataStream.usedBits = 0;
781 pVars->inputStream.usedBits = 0; // in bits
784 pChVars[ LEFT]->used_freq_lines = 575;
785 pChVars[RIGHT]->used_freq_lines = 575;
789 * Initialize polysynthesis circular buffer mechanism
792 pv_memset((void*)&pChVars[ LEFT]->circ_buffer[576],
794 480*sizeof(pChVars[ LEFT]->circ_buffer[0]));
795 pv_memset((void*)&pChVars[RIGHT]->circ_buffer[576],
797 480*sizeof(pChVars[RIGHT]->circ_buffer[0]));
800 pv_memset((void*)pChVars[ LEFT]->overlap,
802 SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[ LEFT]->overlap[0]));
805 pv_memset((void*)pChVars[ RIGHT]->overlap,
807 SUBBANDS_NUMBER*FILTERBANK_BANDS*sizeof(pChVars[ RIGHT]->overlap[0]));
814 * Clear all the structures
818 pv_memset((void*)&pVars->scaleFactors[RIGHT],
820 sizeof(mp3ScaleFactors));
822 pv_memset((void*)&pVars->scaleFactors[LEFT],
824 sizeof(mp3ScaleFactors));
826 pv_memset((void*)&pVars->sideInfo,
828 sizeof(mp3SideInfo));
830 pv_memset((void*)&pVars->sideInfo,
832 sizeof(mp3SideInfo));