Loading media/libeffects/lvm/tests/build_and_run_all_unit_tests.sh +17 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ fs_arr=( # run multichannel effects at different configs, saving only the stereo channel # pair. error_count=0 for flags in "${flags_arr[@]}" do for fs in ${fs_arr[*]} Loading @@ -69,6 +70,13 @@ do adb shell $testdir/lvmtest -i:$testdir/sinesweepraw.raw \ -o:$testdir/sinesweep_$((chMask))_$((fs)).raw -chMask:$chMask -fs:$fs $flags shell_ret=$? if [ $shell_ret -ne 0 ]; then echo "error: $shell_ret" ((++error_count)) fi # two channel files should be identical to higher channel # computation (first 2 channels). # Do not compare cases where -bE is in flags (due to mono computation) Loading @@ -82,8 +90,17 @@ do $testdir/sinesweep_$((chMask))_$((fs)).raw -thr:90.308998 fi # both cmp and snr return EXIT_FAILURE on mismatch. shell_ret=$? if [ $shell_ret -ne 0 ]; then echo "error: $shell_ret" ((++error_count)) fi done done done adb shell rm -r $testdir echo "$error_count errors" exit $error_count media/libeffects/lvm/tests/snr.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ int main(int argc, const char *argv[]) { printf("\nError: missing input/reference files\n"); return -1; } int ret = EXIT_SUCCESS; auto sn = pcm_format == 0 ? getSignalNoise<short>(finp, fref) : getSignalNoise<float>(finp, fref); Loading @@ -92,6 +93,7 @@ int main(int argc, const char *argv[]) { // compare the measured snr value with threshold if (snr < thr) { printf("%.6f less than threshold %.6f\n", snr, thr); ret = EXIT_FAILURE; } else { printf("%.6f\n", snr); } Loading @@ -99,5 +101,5 @@ int main(int argc, const char *argv[]) { fclose(finp); fclose(fref); return 0; return ret; } Loading
media/libeffects/lvm/tests/build_and_run_all_unit_tests.sh +17 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ fs_arr=( # run multichannel effects at different configs, saving only the stereo channel # pair. error_count=0 for flags in "${flags_arr[@]}" do for fs in ${fs_arr[*]} Loading @@ -69,6 +70,13 @@ do adb shell $testdir/lvmtest -i:$testdir/sinesweepraw.raw \ -o:$testdir/sinesweep_$((chMask))_$((fs)).raw -chMask:$chMask -fs:$fs $flags shell_ret=$? if [ $shell_ret -ne 0 ]; then echo "error: $shell_ret" ((++error_count)) fi # two channel files should be identical to higher channel # computation (first 2 channels). # Do not compare cases where -bE is in flags (due to mono computation) Loading @@ -82,8 +90,17 @@ do $testdir/sinesweep_$((chMask))_$((fs)).raw -thr:90.308998 fi # both cmp and snr return EXIT_FAILURE on mismatch. shell_ret=$? if [ $shell_ret -ne 0 ]; then echo "error: $shell_ret" ((++error_count)) fi done done done adb shell rm -r $testdir echo "$error_count errors" exit $error_count
media/libeffects/lvm/tests/snr.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ int main(int argc, const char *argv[]) { printf("\nError: missing input/reference files\n"); return -1; } int ret = EXIT_SUCCESS; auto sn = pcm_format == 0 ? getSignalNoise<short>(finp, fref) : getSignalNoise<float>(finp, fref); Loading @@ -92,6 +93,7 @@ int main(int argc, const char *argv[]) { // compare the measured snr value with threshold if (snr < thr) { printf("%.6f less than threshold %.6f\n", snr, thr); ret = EXIT_FAILURE; } else { printf("%.6f\n", snr); } Loading @@ -99,5 +101,5 @@ int main(int argc, const char *argv[]) { fclose(finp); fclose(fref); return 0; return ret; }