blob: ade58a77c9f06de1e3197d43a15f8d37bb484847 [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
17#include <dnsampler_filter_coefficients_x128_10112011.h>
18#include <resampler_filter_coefficients_10042011.h>
19#undef LOG_TAG
20#include <utils/Log.h>
21//#include "common_log.h"
22#define LOG_TAG "ResamplerCoefficients"
23#define LOG_NDEBUG 0
24
25const int32_t RESAMPLE_FIR_NUM_COEF = 16;
26const int32_t RESAMPLE_FIR_LERP_INT_BITS = 7;
27
28using namespace android;
29#ifdef __cplusplus
30extern "C" {
31#endif
32const int32_t* readResamplerCoefficients(bool upSample) {
33
34 ALOGV("readResamplerCoefficients");
35 if(upSample) {
36 return resampler_filter_coefficients_10042011;
37 }
38 else {
39 return dnsampler_filter_coefficients_x128_10112011;
40 }
41
42}
43
44int32_t readResampleFirNumCoeff() {
45
46 return RESAMPLE_FIR_NUM_COEF;
47}
48
49int32_t readResampleFirLerpIntBits() {
50
51 return RESAMPLE_FIR_LERP_INT_BITS;
52}
53#ifdef __cplusplus
54}
55#endif