blob: af3e40dff53f39f9b0a47a413d267580a8dcf7c2 [file] [log] [blame]
SathishKumar Mani12bff5d2012-09-24 11:48:11 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070017#define LOG_TAG "ResamplerCoefficients"
18#define LOG_NDEBUG 0
19
Glenn Kasten9bcb4762012-11-19 09:00:47 -080020#include <utils/Log.h>
21
22#include "filter_coefficients.h"
23
24const int32_t RESAMPLE_FIR_NUM_COEF = 16;
25const int32_t RESAMPLE_FIR_LERP_INT_BITS = 7;
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070026
27using namespace android;
Glenn Kasten9bcb4762012-11-19 09:00:47 -080028
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070029#ifdef __cplusplus
30extern "C" {
31#endif
Glenn Kasten9bcb4762012-11-19 09:00:47 -080032
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070033const int32_t* readResamplerCoefficients(bool upSample) {
34
35 ALOGV("readResamplerCoefficients");
Glenn Kasten9bcb4762012-11-19 09:00:47 -080036 if (upSample) {
37 return up_sampler_filter_coefficients;
38 } else {
39 return dn_sampler_filter_coefficients;
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070040 }
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070041
42}
43
44int32_t readResampleFirNumCoeff() {
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070045 return RESAMPLE_FIR_NUM_COEF;
46}
47
48int32_t readResampleFirLerpIntBits() {
Glenn Kasten9bcb4762012-11-19 09:00:47 -080049 return RESAMPLE_FIR_LERP_INT_BITS;
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070050}
Glenn Kasten9bcb4762012-11-19 09:00:47 -080051
SathishKumar Mani12bff5d2012-09-24 11:48:11 -070052#ifdef __cplusplus
53}
54#endif