Add btr support to the oggdec filter.
[paraslash.git] / compress_filter.c
index 2e263e87b0c6af2da12bd6226affe9f1b733e944..90af8abdcc8bec3faac008eef4e7720cc27cc761 100644 (file)
  */
 
 #include <regex.h>
+#include <stdbool.h>
 
 #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);