summaryrefslogtreecommitdiff
path: root/lib/rbcodec/dsp/pbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/dsp/pbe.c')
-rw-r--r--lib/rbcodec/dsp/pbe.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/rbcodec/dsp/pbe.c b/lib/rbcodec/dsp/pbe.c
index 3e2183a302..8fb893a661 100644
--- a/lib/rbcodec/dsp/pbe.c
+++ b/lib/rbcodec/dsp/pbe.c
@@ -40,7 +40,6 @@
40static int pbe_strength = 0; 40static int pbe_strength = 0;
41static int pbe_precut = 0; 41static int pbe_precut = 0;
42static int32_t tcoef1, tcoef2, tcoef3; 42static int32_t tcoef1, tcoef2, tcoef3;
43static int32_t *b0[2], *b2[2], *b3[2];
44static int b0_r[2],b2_r[2],b3_r[2],b0_w[2],b2_w[2],b3_w[2]; 43static int b0_r[2],b2_r[2],b3_r[2],b0_w[2],b2_w[2],b3_w[2];
45int32_t temp_buffer; 44int32_t temp_buffer;
46static struct dsp_filter pbe_filter[5]; 45static struct dsp_filter pbe_filter[5];
@@ -63,18 +62,6 @@ static void pbe_buffer_free(void)
63 handle = -1; 62 handle = -1;
64} 63}
65 64
66static void pbe_buffer_get_data(void)
67{
68 if (handle < 0)
69 return;
70 b0[0] = core_get_data(handle);
71 b0[1] = b0[0] + B0_SIZE;
72 b2[0] = b0[1] + B0_SIZE;
73 b2[1] = b2[0] + B2_SIZE;
74 b3[0] = b2[1] + B2_SIZE;
75 b3[1] = b3[0] + B3_SIZE;
76}
77
78static void dsp_pbe_flush(void) 65static void dsp_pbe_flush(void)
79{ 66{
80 memset(core_get_data(handle), 0, PBE_BUFSIZE); 67 memset(core_get_data(handle), 0, PBE_BUFSIZE);
@@ -153,7 +140,14 @@ static void pbe_process(struct dsp_proc_entry *this,
153 int b0_level = (B0_DLY * pbe_strength) / 100; 140 int b0_level = (B0_DLY * pbe_strength) / 100;
154 int32_t x; 141 int32_t x;
155 142
156 pbe_buffer_get_data(); 143 int32_t *b0[2], *b2[2], *b3[2];
144
145 b0[0] = core_get_data(handle);
146 b0[1] = b0[0] + B0_SIZE;
147 b2[0] = b0[1] + B0_SIZE;
148 b2[1] = b2[0] + B2_SIZE;
149 b3[0] = b2[1] + B2_SIZE;
150 b3[1] = b3[0] + B3_SIZE;
157 151
158 for(int ch = 0; ch < num_channels; ch++) 152 for(int ch = 0; ch < num_channels; ch++)
159 { 153 {