Lines Matching full:inputindex
64 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
67 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
343 size_t inputIndex = mInputIndex;
350 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
351 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
364 if (mBuffer.frameCount > inputIndex) break;
366 inputIndex -= mBuffer.frameCount;
376 while (inputIndex == 0) {
380 Advance(&inputIndex, &phaseFraction, phaseIncrement);
390 if (inputIndex + 2 < mBuffer.frameCount) {
396 AsmStereo16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
401 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
402 out[outputIndex++] += vl * Interp(in[inputIndex*2-2],
403 in[inputIndex*2], phaseFraction);
404 out[outputIndex++] += vr * Interp(in[inputIndex*2-1],
405 in[inputIndex*2+1], phaseFraction);
406 Advance(&inputIndex, &phaseFraction, phaseIncrement);
409 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
412 if (inputIndex >= mBuffer.frameCount) {
413 inputIndex -= mBuffer.frameCount;
415 // ALOGE("buffer done, new input index %d", inputIndex);
426 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
430 mInputIndex = inputIndex;
441 size_t inputIndex = mInputIndex;
448 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
449 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
456 mInputIndex = inputIndex;
461 if (mBuffer.frameCount > inputIndex) break;
463 inputIndex -= mBuffer.frameCount;
471 while (inputIndex == 0) {
476 Advance(&inputIndex, &phaseFraction, phaseIncrement);
486 if (inputIndex + 2 < mBuffer.frameCount) {
492 AsmMono16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
497 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
498 int32_t sample = Interp(in[inputIndex-1], in[inputIndex],
502 Advance(&inputIndex, &phaseFraction, phaseIncrement);
506 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
509 if (inputIndex >= mBuffer.frameCount) {
510 inputIndex -= mBuffer.frameCount;
512 // ALOGE("buffer done, new input index %d", inputIndex);
522 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
526 mInputIndex = inputIndex;
543 * inputIndex : pointer on current input index
550 * inputIndex : index of next to use
556 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
563 (void)inputIndex;
576 " ldr r7, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
577 " ldr r7, [r7]\n" // inputIndex
596 // r7 inputIndex
614 " add r0, r1, r7, asl #1\n" /* in + inputIndex */\
615 " ldrsh r4, [r0]\n" /* in[inputIndex] */\
617 " ldrsh r0, [r0, #-2]\n" /* in[inputIndex-1] */\
619 " sub r4, r4, r0\n" /* in[inputIndex] - in[inputIndex-1] */\
628 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */\
634 " cmp r7, r3\n" // inputIndex - maxInIdx
642 " ldr r0, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
643 " str r7, [r0]\n" // inputIndex
664 * inputIndex : pointer on current input index
671 * inputIndex : index of next to use
677 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
684 (void)inputIndex;
696 " ldr r7, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
697 " ldr r7, [r7]\n" // inputIndex
716 // r7 inputIndex
734 " add r0, r1, r7, asl #2\n" /* in + 2*inputIndex */\
736 " ldrsh r4, [r0]\n" /* in[2*inputIndex] */\
738 " ldrsh r12, [r0, #-4]\n" /* in[2*inputIndex-2] */\
739 " sub r4, r4, r12\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
747 " ldrsh r12, [r0, #+2]\n" /* in[2*inputIndex+1] */\
748 " ldrsh r0, [r0, #-2]\n" /* in[2*inputIndex-1] */\
749 " sub r12, r12, r0\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
757 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */
762 " cmp r7, r3\n" // inputIndex - maxInIdx
770 " ldr r0, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
771 " str r7, [r0]\n" // inputIndex