frac32buffer.bipolar in
frac32buffer.bipolar out
int32_t buf5[5];
int32_t buf3[3];
int32_t pos5;
int32_t pos3;
int32_t sum5;
int32_t sum3;
int i;
for (i = 0; i < 5; i++)
buf5[i] = 0;
for (i = 0; i < 3; i++)
buf3[i] = 0;
pos5 = 0;
pos3 = 0;
sum5 = 0;
sum3 = 0;
sum5 += inlet_in;
pos5++;
if (pos5 > 4)
pos5 = 0;
sum5 -= buf5[pos5];
buf5[pos5] = inlet_in;
sum3 += sum5;
pos3++;
if (pos3 > 2)
pos3 = 0;
sum3 -= buf3[pos3];
buf3[pos3] = sum5;
outlet_out = sum3 >> 4;