diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 6301cf6358..97e12f7274 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -63,8 +63,7 @@ enum { NB_STATS_MODE }; -#define NBITS 5 -#define HIST_SIZE (1<<(3*NBITS)) +#define HIST_SIZE (1<<15) typedef struct PaletteGenContext { const AVClass *class; @@ -387,27 +386,13 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx) return out; } -/** - * Hashing function for the color. - * It keeps the NBITS least significant bit of each component to make it - * "random" even if the scene doesn't have much different colors. - */ -static inline unsigned color_hash(uint32_t color) -{ - const uint8_t r = color >> 16 & ((1<> 8 & ((1<