Home | History | Annotate | Download | only in src

Lines Matching refs:ch

531   unsigned ch, numMappedInChs = 0;
550 for (ch = 0; ch < numChannels; ch += 1) {
552 (channelType[ch] & 0x0F) - 1,
554 numCh[channelType[ch] >> 4][chGrp] += 1;
555 idxSum[channelType[ch] >> 4][chGrp] += channelIndices[ch];
565 for (ch = 0; ch < numChannels; ch += 1) {
566 if (channelType[ch] ==
568 channelIndices[ch] = idxCnt++;
579 for (ch = 0; ch < numChannels; ch += 1) {
583 (channelType[ch] & 0x0F) - 1,
586 spkrPos[ch] = getSpeakerPos(channelType[ch], channelIndices[ch],
587 numCh[channelType[ch] >> 4][chGrp]);
591 UINT dist = getSpeakerDistance(spkrPos[ch], spkrSlotPos[mapCh]);
599 offsetTable[mapPos] = (UCHAR)ch;
600 mapped[ch] = 1;
613 for (ch = 0; ch < (unsigned)numChannels; ch += 1) {
614 if (!mapped[ch]) {
620 UINT dist = getSpeakerDistance(spkrPos[ch], spkrSlotPos[mapCh]);
628 (((spkrPos[ch].x != 0) && (spkrSlotPos[mapPos].x != 0)) /* XOR */
629 || ((spkrPos[ch].x == 0) &&
632 offsetTable[mapPos] = (UCHAR)ch;
633 mapped[ch] = 1;
642 for (ch = startSlot; (ch < (8)) && (numMappedInChs < numChannels); ch += 1) {
643 if (offsetTable[ch] == 255) {
649 UINT dist = getSpeakerDistance(spkrPos[mapCh], spkrSlotPos[ch]);
657 offsetTable[ch] = (UCHAR)mapPos;
660 if ((spkrPos[mapPos].x == 0) && (spkrSlotPos[ch].x != 0) &&
663 ch += 1;
670 for (ch = 0; ch < (4); ch += 1) {
673 numChInGrp += numCh[plane][ch];
675 *chMode = (PCM_DMX_CHANNEL_MODE)(*chMode | (numChInGrp << (ch * 4)));
702 int chCfg, ch = 0;
762 int mappedIdx = FDK_chMapDescr_getMapValue(mapDescr, (UCHAR)ch, chCfg);
766 ch += 1;
819 int mappedIdx = FDK_chMapDescr_getMapValue(mapDescr, (UCHAR)ch, chCfg);
833 ch += 1;
893 int ch;
894 for (ch = 0; ch < (8); ch += 1) {
895 if (mixFactors[srcCh][ch] != (FIXP_DMX)0) {
896 mixFactors[dstCh][ch] =
897 FX_DBL2FX_DMX(fMult(mixFactors[srcCh][ch], factor));
898 mixScales[dstCh][ch] = mixScales[srcCh][ch] + scale;
919 int ch;
920 for (ch = 0; ch < (8); ch += 1) {
921 FIXP_DBL addFact = fMult(mixFactors[srcCh][ch], factor);
923 INT newScale = mixScales[srcCh][ch] + scale;
924 if (mixFactors[dstCh][ch] != (FIXP_DMX)0) {
925 if (newScale > mixScales[dstCh][ch]) {
926 mixFactors[dstCh][ch] >>= newScale - mixScales[dstCh][ch];
928 addFact >>= mixScales[dstCh][ch] - newScale;
929 newScale = mixScales[dstCh][ch];
932 mixFactors[dstCh][ch] += FX_DBL2FX_DMX(addFact);
933 mixScales[dstCh][ch] = newScale;
1047 /* 6.1ch: C' = C; L' = L; R' = R; LFE' = LFE;
1063 /* 7.1ch Surround Back: C' = C; L' = L; R' = R; LFE' = LFE;
1088 /* 7.1ch Front Height: C' = C; Ls' = Ls; Rs' = Rs; LFE' = LFE;
1100 /* 7.1ch Front: Ls' = Ls; Rs' = Rs; LFE' = LFE;
2225 int ch = 0;
2228 pInPcm[ch] = &pPcmBuf[inOffsetTable[inCh] * offset];
2229 map[ch++] = inCh;
2232 for (; ch < (8); ch += 1) {
2233 map[ch] = ch;
2246 ch = 0;
2249 pOutPcm[ch] = &pPcmBuf[outOffsetTable[outCh] * offset];
2250 map[ch++] = outCh;
2253 for (; ch < (8); ch += 1) {
2254 map[ch] = ch;
2364 int ch, chGrp, isCompatible = 1;
2418 for (ch = 0; ch < (8); ch += 1) {
2419 if ((outOffsetTable[ch] < 255) &&
2420 (inOffsetTable[ch] < 255)) { /* Set I/O pointer: */
2422 &pPcmBuf[inOffsetTable[ch] * offset + (frameSize - 1) * inStride];
2423 pOut[nContentCh] = &pPcmBuf[outOffsetTable[ch] * offset +
2426 channelType[outOffsetTable[ch]] = inChTypes[inOffsetTable[ch]];
2427 channelIndices[outOffsetTable[ch]] = inChIndices[inOffsetTable[ch]];
2428 inOffsetTable[ch] = 255;
2429 outOffsetTable[ch] = 255;
2436 for (ch = 0; ch < (8); ch += 1) {
2437 if (inOffsetTable[ch] < 255) {
2449 pIn[nContentCh] = &pPcmBuf[inOffsetTable[ch] * offset +
2456 channelType[outOffsetTable[outCh]] = inChTypes[inOffsetTable[ch]];
2458 inChIndices[inOffsetTable[ch]];
2459 inOffsetTable[ch] = 255;
2465 for (ch = 0; ch < (8); ch += 1) {
2466 if (outOffsetTable[ch] < 255) {
2467 pOut[nContentCh + nEmptyCh] = &pPcmBuf[outOffsetTable[ch] * offset +
2470 channelType[outOffsetTable[ch]] = ACT_NONE;
2471 channelIndices[outOffsetTable[ch]] = (UCHAR)nEmptyCh;
2472 outOffsetTable[ch] = 255;
2478 for (ch = nContentCh; ch < numOutChannels; ch += 1) {
2479 pOut[ch] = &pPcmBuf[ch * offset + (frameSize - 1) * outStride];
2481 channelType[ch] = ACT_NONE;
2482 channelIndices[ch] = (UCHAR)nEmptyCh;
2491 for (ch = 0; ch < nContentCh; ch += 1) {
2492 tIn[ch] = *pIn[ch];
2493 pIn[ch] -= inStride;
2496 for (ch = 0; ch < nContentCh; ch += 1) {
2497 *pOut[ch] = tIn[ch];
2498 pOut[ch] -= outStride;
2504 for (ch = nContentCh; ch < numOutChannels; ch += 1) {
2505 *pOut[ch] = (DMX_PCM)0;
2506 pOut[ch] -= outStride;