Lines Matching refs:pPce

98 void CProgramConfig_Reset(CProgramConfig *pPce)  in CProgramConfig_Reset()  argument
100 pPce->elCounter = 0; in CProgramConfig_Reset()
103 void CProgramConfig_Init(CProgramConfig *pPce) in CProgramConfig_Init() argument
105 FDKmemclear(pPce, sizeof(CProgramConfig)); in CProgramConfig_Init()
107 pPce->SamplingFrequencyIndex = 0xf; in CProgramConfig_Init()
111 int CProgramConfig_IsValid ( const CProgramConfig *pPce ) in CProgramConfig_IsValid() argument
113 return ( (pPce->isValid) ? 1 : 0); in CProgramConfig_IsValid()
125 CProgramConfig *pPce, in CProgramConfig_ReadHeightExt() argument
138 FDK_ASSERT(pPce != NULL); in CProgramConfig_ReadHeightExt()
147 for (i=0; i < pPce->NumFrontChannelElements; i++) in CProgramConfig_ReadHeightExt()
149 pPce->FrontElementHeightInfo[i] = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_ReadHeightExt()
151 for (i=0; i < pPce->NumSideChannelElements; i++) in CProgramConfig_ReadHeightExt()
153 pPce->SideElementHeightInfo[i] = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_ReadHeightExt()
155 for (i=0; i < pPce->NumBackChannelElements; i++) in CProgramConfig_ReadHeightExt()
157 pPce->BackElementHeightInfo[i] = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_ReadHeightExt()
179 CProgramConfig *pPce, in CProgramConfig_Read() argument
187 pPce->NumEffectiveChannels = 0; in CProgramConfig_Read()
188 pPce->NumChannels = 0; in CProgramConfig_Read()
189 pPce->ElementInstanceTag = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
190 pPce->Profile = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_Read()
191 pPce->SamplingFrequencyIndex = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
192 pPce->NumFrontChannelElements = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
193 pPce->NumSideChannelElements = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
194 pPce->NumBackChannelElements = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
195 pPce->NumLfeChannelElements = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_Read()
196 pPce->NumAssocDataElements = (UCHAR) FDKreadBits(bs,3); in CProgramConfig_Read()
197 pPce->NumValidCcElements = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
199 if ((pPce->MonoMixdownPresent = (UCHAR) FDKreadBits(bs,1)) != 0) in CProgramConfig_Read()
201 pPce->MonoMixdownElementNumber = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
204 if ((pPce->StereoMixdownPresent = (UCHAR) FDKreadBits(bs,1)) != 0) in CProgramConfig_Read()
206 pPce->StereoMixdownElementNumber = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
209 if ((pPce->MatrixMixdownIndexPresent = (UCHAR) FDKreadBits(bs,1)) != 0) in CProgramConfig_Read()
211 pPce->MatrixMixdownIndex = (UCHAR) FDKreadBits(bs,2); in CProgramConfig_Read()
212 pPce->PseudoSurroundEnable = (UCHAR) FDKreadBits(bs,1); in CProgramConfig_Read()
215 for (i=0; i < pPce->NumFrontChannelElements; i++) in CProgramConfig_Read()
217 pPce->FrontElementIsCpe[i] = (UCHAR) FDKreadBits(bs,1); in CProgramConfig_Read()
218 pPce->FrontElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
219 pPce->NumChannels += pPce->FrontElementIsCpe[i] ? 2 : 1; in CProgramConfig_Read()
222 for (i=0; i < pPce->NumSideChannelElements; i++) in CProgramConfig_Read()
224 pPce->SideElementIsCpe[i] = (UCHAR) FDKreadBits(bs,1); in CProgramConfig_Read()
225 pPce->SideElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
226 pPce->NumChannels += pPce->SideElementIsCpe[i] ? 2 : 1; in CProgramConfig_Read()
229 for (i=0; i < pPce->NumBackChannelElements; i++) in CProgramConfig_Read()
231 pPce->BackElementIsCpe[i] = (UCHAR) FDKreadBits(bs,1); in CProgramConfig_Read()
232 pPce->BackElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
233 pPce->NumChannels += pPce->BackElementIsCpe[i] ? 2 : 1; in CProgramConfig_Read()
236 pPce->NumEffectiveChannels = pPce->NumChannels; in CProgramConfig_Read()
238 for (i=0; i < pPce->NumLfeChannelElements; i++) in CProgramConfig_Read()
240 pPce->LfeElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
241 pPce->NumChannels += 1; in CProgramConfig_Read()
244 for (i=0; i < pPce->NumAssocDataElements; i++) in CProgramConfig_Read()
246 pPce->AssocDataElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
249 for (i=0; i < pPce->NumValidCcElements; i++) in CProgramConfig_Read()
251 pPce->CcElementIsIndSw[i] = (UCHAR) FDKreadBits(bs,1); in CProgramConfig_Read()
252 pPce->ValidCcElementTagSelect[i] = (UCHAR) FDKreadBits(bs,4); in CProgramConfig_Read()
257 pPce->CommentFieldBytes = (UCHAR) FDKreadBits(bs,8); in CProgramConfig_Read()
258 commentBytes = pPce->CommentFieldBytes; in CProgramConfig_Read()
261 err = CProgramConfig_ReadHeightExt( pPce, bs, &commentBytes, alignmentAnchor ); in CProgramConfig_Read()
271 pPce->Comment[i] = text; in CProgramConfig_Read()
275 pPce->isValid = (err) ? 0 : 1; in CProgramConfig_Read()
363 void CProgramConfig_GetDefault( CProgramConfig *pPce, in CProgramConfig_GetDefault() argument
366 FDK_ASSERT(pPce != NULL); in CProgramConfig_GetDefault()
369 CProgramConfig_Init(pPce); in CProgramConfig_GetDefault()
370 pPce->Profile = 1; /* Set AAC LC because it is the only supported object type. */ in CProgramConfig_GetDefault()
375 pPce->NumFrontChannelElements = 2; in CProgramConfig_GetDefault()
376 pPce->FrontElementIsCpe[0] = 0; in CProgramConfig_GetDefault()
377 pPce->FrontElementIsCpe[1] = 1; in CProgramConfig_GetDefault()
378 pPce->NumSideChannelElements = 1; in CProgramConfig_GetDefault()
379 pPce->SideElementIsCpe[0] = 1; in CProgramConfig_GetDefault()
380 pPce->NumBackChannelElements = 1; in CProgramConfig_GetDefault()
381 pPce->BackElementIsCpe[0] = 1; in CProgramConfig_GetDefault()
382 pPce->NumLfeChannelElements = 1; in CProgramConfig_GetDefault()
383 pPce->NumChannels = 8; in CProgramConfig_GetDefault()
384 pPce->NumEffectiveChannels = 7; in CProgramConfig_GetDefault()
385 pPce->isValid = 1; in CProgramConfig_GetDefault()
389 pPce->BackElementIsCpe[1] = 1; in CProgramConfig_GetDefault()
390 pPce->NumChannels += 1; in CProgramConfig_GetDefault()
391 pPce->NumEffectiveChannels += 1; in CProgramConfig_GetDefault()
393 pPce->NumFrontChannelElements += 2; in CProgramConfig_GetDefault()
394 pPce->FrontElementIsCpe[0] = 0; in CProgramConfig_GetDefault()
395 pPce->FrontElementIsCpe[1] = 1; in CProgramConfig_GetDefault()
396 pPce->NumBackChannelElements += 2; in CProgramConfig_GetDefault()
397 pPce->BackElementIsCpe[0] = 1; in CProgramConfig_GetDefault()
398 pPce->BackElementIsCpe[1] += 0; in CProgramConfig_GetDefault()
399 pPce->NumLfeChannelElements += 1; in CProgramConfig_GetDefault()
400 pPce->NumChannels += 7; in CProgramConfig_GetDefault()
401 pPce->NumEffectiveChannels += 6; in CProgramConfig_GetDefault()
402 pPce->isValid = 1; in CProgramConfig_GetDefault()
406 pPce->FrontElementHeightInfo[2] = 1; /* Top speaker */ in CProgramConfig_GetDefault()
408 pPce->NumFrontChannelElements += 1; in CProgramConfig_GetDefault()
409 pPce->FrontElementIsCpe[2] = 1; in CProgramConfig_GetDefault()
410 pPce->NumChannels += 2; in CProgramConfig_GetDefault()
411 pPce->NumEffectiveChannels += 2; in CProgramConfig_GetDefault()
413 pPce->NumLfeChannelElements += 1; in CProgramConfig_GetDefault()
414 pPce->NumChannels += 1; in CProgramConfig_GetDefault()
417 pPce->NumBackChannelElements += 1; in CProgramConfig_GetDefault()
418 pPce->BackElementIsCpe[0] = (channelConfig>4) ? 1 : 0; in CProgramConfig_GetDefault()
419 pPce->NumChannels += (channelConfig>4) ? 2 : 1; in CProgramConfig_GetDefault()
420 pPce->NumEffectiveChannels += (channelConfig>4) ? 2 : 1; in CProgramConfig_GetDefault()
422 pPce->NumFrontChannelElements += 1; in CProgramConfig_GetDefault()
423 pPce->FrontElementIsCpe[1] = 1; in CProgramConfig_GetDefault()
424 pPce->NumChannels += 2; in CProgramConfig_GetDefault()
425 pPce->NumEffectiveChannels += 2; in CProgramConfig_GetDefault()
427 pPce->NumFrontChannelElements += 1; in CProgramConfig_GetDefault()
428 pPce->FrontElementIsCpe[0] = 0; in CProgramConfig_GetDefault()
429 pPce->NumChannels += 1; in CProgramConfig_GetDefault()
430 pPce->NumEffectiveChannels += 1; in CProgramConfig_GetDefault()
431 pPce->isValid = 1; in CProgramConfig_GetDefault()
435 pPce->NumFrontChannelElements = 1; in CProgramConfig_GetDefault()
436 pPce->FrontElementIsCpe[0] = 1; in CProgramConfig_GetDefault()
437 pPce->NumChannels += 2; in CProgramConfig_GetDefault()
438 pPce->NumEffectiveChannels += 2; in CProgramConfig_GetDefault()
439 pPce->isValid = 1; in CProgramConfig_GetDefault()
443 pPce->isValid = 0; /* To be explicit! */ in CProgramConfig_GetDefault()
447 if (pPce->isValid) { in CProgramConfig_GetDefault()
451 for (el = 0; el < pPce->NumFrontChannelElements; el += 1) { in CProgramConfig_GetDefault()
452 pPce->FrontElementTagSelect[el] = (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++; in CProgramConfig_GetDefault()
454 for (el = 0; el < pPce->NumSideChannelElements; el += 1) { in CProgramConfig_GetDefault()
455 pPce->SideElementTagSelect[el] = (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++; in CProgramConfig_GetDefault()
457 for (el = 0; el < pPce->NumBackChannelElements; el += 1) { in CProgramConfig_GetDefault()
458 pPce->BackElementTagSelect[el] = (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++; in CProgramConfig_GetDefault()
461 for (el = 0; el < pPce->NumLfeChannelElements; el += 1) { in CProgramConfig_GetDefault()
462 pPce->LfeElementTagSelect[el] = elTagSce++; in CProgramConfig_GetDefault()
564 CProgramConfig *pPce, in CProgramConfig_LookupElement() argument
584 *elMapping = pPce->elCounter; in CProgramConfig_LookupElement()
585 if (elList[pPce->elCounter] != elType) { in CProgramConfig_LookupElement()
601 pPce->elCounter++; in CProgramConfig_LookupElement()
609 if (!pPce->isValid) in CProgramConfig_LookupElement()
618 elList[pPce->elCounter] = elType; in CProgramConfig_LookupElement()
619 *elMapping = pPce->elCounter++; in CProgramConfig_LookupElement()
651 for (i = 0; i < pPce->NumFrontChannelElements; i++) { in CProgramConfig_LookupElement()
652 int heightLayer = pPce->FrontElementHeightInfo[i]; in CProgramConfig_LookupElement()
653 if (isCpe == pPce->FrontElementIsCpe[i] && pPce->FrontElementTagSelect[i] == tag) { in CProgramConfig_LookupElement()
659 for (el = 0; el < pPce->NumFrontChannelElements; el+=1) { in CProgramConfig_LookupElement()
660 if (pPce->FrontElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
662 chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
666 for (el = 0; el < pPce->NumSideChannelElements; el+=1) { in CProgramConfig_LookupElement()
667 if (pPce->SideElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
669 chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
673 for (el = 0; el < pPce->NumBackChannelElements; el+=1) { in CProgramConfig_LookupElement()
674 if (pPce->BackElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
676 chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
680 elIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
681 chIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
696 if (pPce->FrontElementIsCpe[i]) { in CProgramConfig_LookupElement()
705 for (i = 0; i < pPce->NumSideChannelElements; i++) { in CProgramConfig_LookupElement()
706 int heightLayer = pPce->SideElementHeightInfo[i]; in CProgramConfig_LookupElement()
707 if (isCpe == pPce->SideElementIsCpe[i] && pPce->SideElementTagSelect[i] == tag) { in CProgramConfig_LookupElement()
713 for (el = 0; el < pPce->NumFrontChannelElements; el+=1) { in CProgramConfig_LookupElement()
714 if (pPce->FrontElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
716 chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
720 for (el = 0; el < pPce->NumSideChannelElements; el+=1) { in CProgramConfig_LookupElement()
721 if (pPce->SideElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
723 chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
727 for (el = 0; el < pPce->NumBackChannelElements; el+=1) { in CProgramConfig_LookupElement()
728 if (pPce->BackElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
730 chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
734 elIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
735 chIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
750 if (pPce->SideElementIsCpe[i]) { in CProgramConfig_LookupElement()
759 for (i = 0; i < pPce->NumBackChannelElements; i++) { in CProgramConfig_LookupElement()
760 int heightLayer = pPce->BackElementHeightInfo[i]; in CProgramConfig_LookupElement()
761 if (isCpe == pPce->BackElementIsCpe[i] && pPce->BackElementTagSelect[i] == tag) { in CProgramConfig_LookupElement()
767 for (el = 0; el < pPce->NumFrontChannelElements; el+=1) { in CProgramConfig_LookupElement()
768 if (pPce->FrontElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
770 chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
774 for (el = 0; el < pPce->NumSideChannelElements; el+=1) { in CProgramConfig_LookupElement()
775 if (pPce->SideElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
777 chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
781 for (el = 0; el < pPce->NumBackChannelElements; el+=1) { in CProgramConfig_LookupElement()
782 if (pPce->BackElementHeightInfo[el] == h) { in CProgramConfig_LookupElement()
784 chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1; in CProgramConfig_LookupElement()
788 elIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
789 chIdx += pPce->NumLfeChannelElements; in CProgramConfig_LookupElement()
804 if (pPce->BackElementIsCpe[i]) { in CProgramConfig_LookupElement()
818 for (i = 0; i < pPce->NumFrontChannelElements; i+=1) { in CProgramConfig_LookupElement()
819 int heightLayer = pPce->FrontElementHeightInfo[i]; in CProgramConfig_LookupElement()
821 cc[heightLayer] += (pPce->FrontElementIsCpe[i]) ? 2 : 1; in CProgramConfig_LookupElement()
824 for (i = 0; i < pPce->NumSideChannelElements; i+=1) { in CProgramConfig_LookupElement()
825 int heightLayer = pPce->SideElementHeightInfo[i]; in CProgramConfig_LookupElement()
827 cc[heightLayer] += (pPce->SideElementIsCpe[i]) ? 2 : 1; in CProgramConfig_LookupElement()
830 for (i = 0; i < pPce->NumBackChannelElements; i+=1) { in CProgramConfig_LookupElement()
831 int heightLayer = pPce->BackElementHeightInfo[i]; in CProgramConfig_LookupElement()
833 cc[heightLayer] += (pPce->BackElementIsCpe[i]) ? 2 : 1; in CProgramConfig_LookupElement()
837 for (i = 0; i < pPce->NumLfeChannelElements; i++) { in CProgramConfig_LookupElement()
840 if ( pPce->LfeElementTagSelect[i] == tag ) { in CProgramConfig_LookupElement()
856 for (i = 0; i < pPce->NumValidCcElements; i++) { in CProgramConfig_LookupElement()
857 if (pPce->ValidCcElementTagSelect[i] == tag) { in CProgramConfig_LookupElement()
864 for (i = 0; i < pPce->NumAssocDataElements; i++) { in CProgramConfig_LookupElement()
865 if (pPce->AssocDataElementTagSelect[i] == tag) { in CProgramConfig_LookupElement()
883 const CProgramConfig *pPce, in CProgramConfig_GetElementTable() argument
897 …< pPce->NumFrontChannelElements + pPce->NumSideChannelElements + pPce->NumBackChannelElements + pP… in CProgramConfig_GetElementTable()
903 for (i=0; i < pPce->NumFrontChannelElements; i++) in CProgramConfig_GetElementTable()
905 elList[el++] = (pPce->FrontElementIsCpe[i]) ? ID_CPE : ID_SCE; in CProgramConfig_GetElementTable()
908 for (i=0; i < pPce->NumSideChannelElements; i++) in CProgramConfig_GetElementTable()
910 elList[el++] = (pPce->SideElementIsCpe[i]) ? ID_CPE : ID_SCE; in CProgramConfig_GetElementTable()
913 for (i=0; i < pPce->NumBackChannelElements; i++) in CProgramConfig_GetElementTable()
915 elList[el++] = (pPce->BackElementIsCpe[i]) ? ID_CPE : ID_SCE; in CProgramConfig_GetElementTable()
918 for (i=0; i < pPce->NumLfeChannelElements; i++) in CProgramConfig_GetElementTable()
925 switch (pPce->NumChannels) { in CProgramConfig_GetElementTable()
929 *pChMapIdx = pPce->NumChannels; in CProgramConfig_GetElementTable()
937 *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce)&0xE)) ? 11 : 0; in CProgramConfig_GetElementTable()
950 if (!(CProgramConfig_Compare(pPce, tmpPce)&0xE)) { in CProgramConfig_GetElementTable()