X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=compress_filter.c;h=90af8abdcc8bec3faac008eef4e7720cc27cc761;hp=2e263e87b0c6af2da12bd6226affe9f1b733e944;hb=1e012cf40238883621692051a22fb9c7cad5e944;hpb=8ea8abb73199b32fdd7afdf8825afa42ed8de244;ds=inline diff --git a/compress_filter.c b/compress_filter.c index 2e263e87..90af8abd 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -11,12 +11,14 @@ */ #include +#include #include "para.h" #include "compress_filter.cmdline.h" #include "list.h" #include "sched.h" #include "ggo.h" +#include "buffer_tree.h" #include "filter.h" #include "string.h" #include "error.h" @@ -53,7 +55,7 @@ static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn) /* be careful in that heat, my dear */ int sample = *ip++, adjusted_sample = (PARA_ABS(sample) * pcd->current_gain) >> gain_shift; - if (unlikely(adjusted_sample > 32767)) { /* clip */ + if (adjusted_sample > 32767) { /* clip */ PARA_NOTICE_LOG("clip: sample: %d, adjusted sample: %d\n", sample, adjusted_sample); adjusted_sample = 32767; @@ -63,7 +65,7 @@ static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn) } else pcd->peak = PARA_MAX(pcd->peak, adjusted_sample); *op++ = sample >= 0? adjusted_sample : -adjusted_sample; - if (likely(++pcd->num_samples & mask)) + if (++pcd->num_samples & mask) continue; // PARA_DEBUG_LOG("gain: %u, peak: %u\n", pcd->current_gain, // pcd->peak);