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,
186 size_t inputIndex = mInputIndex;
193 // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
194 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
207 if (mBuffer.frameCount > inputIndex) break;
209 inputIndex -= mBuffer.frameCount;
219 while (inputIndex == 0) {
223 Advance(&inputIndex, &phaseFraction, phaseIncrement);
232 if (inputIndex + 2 < mBuffer.frameCount) {
238 AsmStereo16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
243 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
244 out[outputIndex++] += vl * Interp(in[inputIndex*2-2],
245 in[inputIndex*2], phaseFraction);
246 out[outputIndex++] += vr * Interp(in[inputIndex*2-1],
247 in[inputIndex*2+1], phaseFraction);
248 Advance(&inputIndex, &phaseFraction, phaseIncrement);
251 // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
254 if (inputIndex >= mBuffer.frameCount) {
255 inputIndex -= mBuffer.frameCount;
257 // LOGE("buffer done, new input index %d", inputIndex);
268 // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
272 mInputIndex = inputIndex;
282 size_t inputIndex = mInputIndex;
289 // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
290 // outFrameCount, inputIndex, phaseFraction, phaseIncrement);
297 mInputIndex = inputIndex;
302 if (mBuffer.frameCount > inputIndex) break;
304 inputIndex -= mBuffer.frameCount;
312 while (inputIndex == 0) {
317 Advance(&inputIndex, &phaseFraction, phaseIncrement);
326 if (inputIndex + 2 < mBuffer.frameCount) {
332 AsmMono16Loop(in, maxOutPt, maxInIdx, outputIndex, out, inputIndex, vl, vr,
337 while (outputIndex < outputSampleCount && inputIndex < mBuffer.frameCount) {
338 int32_t sample = Interp(in[inputIndex-1], in[inputIndex],
342 Advance(&inputIndex, &phaseFraction, phaseIncrement);
346 // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
349 if (inputIndex >= mBuffer.frameCount) {
350 inputIndex -= mBuffer.frameCount;
352 // LOGE("buffer done, new input index %d", inputIndex);
362 // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
366 mInputIndex = inputIndex;
382 * inputIndex : pointer on current input index
389 * inputIndex : index of next to use
394 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
404 " ldr r7, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
405 " ldr r7, [r7]\n" // inputIndex
424 // r7 inputIndex
442 " add r0, r1, r7, asl #1\n" /* in + inputIndex */\
443 " ldrsh r4, [r0]\n" /* in[inputIndex] */\
445 " ldrsh r0, [r0, #-2]\n" /* in[inputIndex-1] */\
447 " sub r4, r4, r0\n" /* in[inputIndex] - in[inputIndex-1] */\
456 inputIndex + phaseFraction>>30 */\
462 " cmp r7, r3\n" // inputIndex - maxInIdx
470 " ldr r0, [sp, #" MO_PARAM5 " + 8]\n" // &inputIndex
471 " str r7, [r0]\n" // inputIndex
492 * inputIndex : pointer on current input index
499 * inputIndex : index of next to use
504 size_t &outputIndex, int32_t* out, size_t &inputIndex, int32_t vl, int32_t vr,
513 " ldr r7, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
514 " ldr r7, [r7]\n" // inputIndex
533 // r7 inputIndex
551 " add r0, r1, r7, asl #2\n" /* in + 2*inputIndex */\
553 " ldrsh r4, [r0]\n" /* in[2*inputIndex] */\
555 " ldrsh r12, [r0, #-4]\n" /* in[2*inputIndex-2] */\
556 " sub r4, r4, r12\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
564 " ldrsh r12, [r0, #+2]\n" /* in[2*inputIndex+1] */\
565 " ldrsh r0, [r0, #-2]\n" /* in[2*inputIndex-1] */\
566 " sub r12, r12, r0\n" /* in[2*InputIndex] - in[2*InputIndex-2] */\
574 " add r7, r7, r6, lsr #30\n" /* inputIndex + phaseFraction>>30 */
579 " cmp r7, r3\n" // inputIndex - maxInIdx
587 " ldr r0, [sp, #" ST_PARAM5 " + 8]\n" // &inputIndex
588 " str r7, [r0]\n" // inputIndex