#include <math.h>
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/lfg.h"
#include "libavutil/mem.h"
av_freep(cp);
}
-static void dither_init(DitherDSPContext *ddsp,
- enum AVResampleDitherMethod method)
+static av_cold void dither_init(DitherDSPContext *ddsp,
+ enum AVResampleDitherMethod method)
{
ddsp->quantize = quantize_c;
ddsp->ptr_align = 1;
ddsp->dither_int_to_float = dither_int_to_float_rectangular_c;
else
ddsp->dither_int_to_float = dither_int_to_float_triangular_c;
+
+ if (ARCH_X86)
+ ff_dither_init_x86(ddsp, method);
}
DitherContext *ff_dither_alloc(AVAudioResampleContext *avr,