Lines Matching refs:inputIndex
61 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
64 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
303 size_t inputIndex = mInputIndex;
310 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
311 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
325 if (mBuffer.frameCount > inputIndex) break;
327 inputIndex -= mBuffer.frameCount;
337 while (inputIndex == 0) {
341 Advance(&inputIndex, &phaseFraction, phaseIncrement);
350 if (inputIndex + 2 < mBuffer.frameCount) {
356 AsmStereo16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
361 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
362 out[outputIndex++] += vl * Interp(in[inputIndex*2-2],
363 in[inputIndex*2], phaseFraction);
364 out[outputIndex++] += vr * Interp(in[inputIndex*2-1],
365 in[inputIndex*2+1], phaseFraction);
366 Advance(&inputIndex, &phaseFraction, phaseIncrement);
369 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
372 if (inputIndex >= mBuffer.frameCount) {
373 inputIndex -= mBuffer.frameCount;
375 // ALOGE("buffer done, new input index %d", inputIndex);
386 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
390 mInputIndex = inputIndex;
400 size_t inputIndex = mInputIndex;
407 // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d",
408 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
416 mInputIndex = inputIndex;
421 if (mBuffer.frameCount > inputIndex) break;
423 inputIndex -= mBuffer.frameCount;
431 while (inputIndex == 0) {
436 Advance(&inputIndex, &phaseFraction, phaseIncrement);
445 if (inputIndex + 2 < mBuffer.frameCount) {
451 AsmMono16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
456 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
457 int32_t sample = Interp(in[inputIndex-1], in[inputIndex],
461 Advance(&inputIndex, &phaseFraction, phaseIncrement);
465 // ALOGE("loop done - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
468 if (inputIndex >= mBuffer.frameCount) {
469 inputIndex
471 // ALOGE("buffer done, new input index %d", inputIndex);
481 // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d", outputIndex, inputIndex);
485 mInputIndex = inputIndex;
501 * inputIndex : pointer on current input index
508 * inputIndex : index of next to use
514 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
524 " ldr r7, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
525 " ldr r7, [r7]\n" // inputIndex
544 // r7 inputIndex
562 " add r0, r1, r7, asl #1\n" /* in + inputIndex */\
563 " ldrsh r4, [r0]\n" /* in[inputIndex] */\
565 " ldrsh r0, [r0, #-2]\n" /* in[inputIndex-1] */\
567 " sub r4, r4, r0\n" /* in[inputIndex] - in[inputIndex-1] */\
576 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */\
582 " cmp r7, r3\n" // inputIndex - maxInIdx
590 " ldr r0, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
591 " str r7, [r0]\n" // inputIndex
612 * inputIndex : pointer on current input index
619 * inputIndex : index of next to use
625 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
634 " ldr r7, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
635 " ldr r7, [r7]\n" // inputIndex
654 // r7 inputIndex
672 " add r0, r1, r7, asl #2\n" /* in + 2*inputIndex */\
674 " ldrsh r4, [r0]\n" /* in[2*inputIndex] */\
676 " ldrsh r12, [r0, #-4]\n" /* in[2*inputIndex-2] */\
677 " sub r4, r4, r12\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
685 " ldrsh r12, [r0, #+2]\n" /* in[2*inputIndex+1] */\
686 " ldrsh r0, [r0, #-2]\n" /* in[2*inputIndex-1] */\
687 " sub r12, r12, r0\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
695 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */
700 " cmp r7, r3\n" // inputIndex - maxInIdx
708 " ldr r0, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
709 " str r7, [r0]\n" // inputIndex