Home | History | Annotate | Download | only in audioflinger

Lines Matching refs:inputIndex

63             size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
66 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
358 size_t inputIndex = mInputIndex;
365 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
366 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
380 if (mBuffer.frameCount > inputIndex) break;
382 inputIndex -= mBuffer.frameCount;
392 while (inputIndex == 0) {
396 Advance(&inputIndex, &phaseFraction, phaseIncrement);
406 if (inputIndex + 2 < mBuffer.frameCount) {
412 AsmStereo16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
417 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
418 out[outputIndex++] += vl * Interp(in[inputIndex*2-2],
419 in[inputIndex*2], phaseFraction);
420 out[outputIndex++] += vr * Interp(in[inputIndex*2-1],
421 in[inputIndex*2+1], phaseFraction);
422 Advance(&inputIndex, &phaseFraction, phaseIncrement);
425 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
428 if (inputIndex >= mBuffer.frameCount) {
429 inputIndex -= mBuffer.frameCount;
431 // ALOGE("buffer done, new input index %d", inputIndex);
442 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
446 mInputIndex = inputIndex;
456 size_t inputIndex = mInputIndex;
463 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
464 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
472 mInputIndex = inputIndex;
477 if (mBuffer.frameCount > inputIndex) break;
479 inputIndex -= mBuffer.frameCount;
487 while (inputIndex == 0) {
492 Advance(&inputIndex, &phaseFraction, phaseIncrement);
502 if (inputIndex + 2 < mBuffer.frameCount) {
508 AsmMono16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
513 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
514 int32_t sample = Interp(in[inputIndex-1], in[inputIndex],
518 Advance(&inputIndex, &phaseFraction, phaseIncrement);
522 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
525 if (inputIndex >= mBuffer.frameCount) {
526 inputIndex -= mBuffer.frameCount;
528 // ALOGE("buffer done, new input index %d", inputIndex);
538 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
542 mInputIndex = inputIndex;
558 * inputIndex : pointer on current input index
565 * inputIndex : index of next to use
571 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
578 (void)inputIndex;
591 " ldr r7, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
592 " ldr r7, [r7]\n" // inputIndex
611 // r7 inputIndex
629 " add r0, r1, r7, asl #1\n" /* in + inputIndex */\
630 " ldrsh r4, [r0]\n" /* in[inputIndex] */\
632 " ldrsh r0, [r0, #-2]\n" /* in[inputIndex-1] */\
634 " sub r4, r4, r0\n" /* in[inputIndex] - in[inputIndex-1] */\
643 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */\
649 " cmp r7, r3\n" // inputIndex - maxInIdx
657 " ldr r0, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
658 " str r7, [r0]\n" // inputIndex
679 * inputIndex : pointer on current input index
686 * inputIndex : index of next to use
692 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
699 (void)inputIndex;
711 " ldr r7, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
712 " ldr r7, [r7]\n" // inputIndex
731 // r7 inputIndex
749 " add r0, r1, r7, asl #2\n" /* in + 2*inputIndex */\
751 " ldrsh r4, [r0]\n" /* in[2*inputIndex] */\
753 " ldrsh r12, [r0, #-4]\n" /* in[2*inputIndex-2] */\
754 " sub r4, r4, r12\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
762 " ldrsh r12, [r0, #+2]\n" /* in[2*inputIndex+1] */\
763 " ldrsh r0, [r0, #-2]\n" /* in[2*inputIndex-1] */\
764 " sub r12, r12, r0\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
772 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */
777 " cmp r7, r3\n" // inputIndex - maxInIdx
785 " ldr r0, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
786 " str r7, [r0]\n" // inputIndex