Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4c78454 authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "libeffects: use memmove in Copy_Float" am: 76e856ba

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1538209

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8442d77c22215928b0411f81a4138af899dafe5c
parents d13082ef 76e856ba
Loading
Loading
Loading
Loading
+2 −19
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
/**********************************************************************************
   INCLUDE FILES
***********************************************************************************/

#include <string.h>
#include "VectorArithmetic.h"

/**********************************************************************************
@@ -47,24 +47,7 @@ void Copy_16(const LVM_INT16* src, LVM_INT16* dst, LVM_INT16 n) {
    return;
}
void Copy_Float(const LVM_FLOAT* src, LVM_FLOAT* dst, LVM_INT16 n) {
    LVM_INT16 ii;

    if (src > dst) {
        for (ii = n; ii != 0; ii--) {
            *dst = *src;
            dst++;
            src++;
        }
    } else {
        src += n - 1;
        dst += n - 1;
        for (ii = n; ii != 0; ii--) {
            *dst = *src;
            dst--;
            src--;
        }
    }

    memmove(dst, src, n * sizeof(LVM_FLOAT));
    return;
}
// Extract out the stereo channel pair from multichannel source.