|
@@ -74,26 +74,6 @@ static void apply_lut(EQParameters *param, uint8_t *dst, int dst_stride,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void process_c(EQParameters *param, uint8_t *dst, int dst_stride,
|
|
|
- const uint8_t *src, int src_stride, int w, int h)
|
|
|
-{
|
|
|
- int x, y, pel;
|
|
|
-
|
|
|
- int contrast = (int) (param->contrast * 256 * 16);
|
|
|
- int brightness = ((int) (100.0 * param->brightness + 100.0) * 511) / 200 - 128 - contrast / 32;
|
|
|
-
|
|
|
- for (y = 0; y < h; y++) {
|
|
|
- for (x = 0; x < w; x++) {
|
|
|
- pel = ((src[y * src_stride + x] * contrast) >> 12) + brightness;
|
|
|
-
|
|
|
- if (pel & ~255)
|
|
|
- pel = (-pel) >> 31;
|
|
|
-
|
|
|
- dst[y * dst_stride + x] = pel;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
static void check_values(EQParameters *param, EQContext *eq)
|
|
|
{
|
|
|
if (param->contrast == 1.0 && param->brightness == 0.0 && param->gamma == 1.0)
|
|
@@ -174,13 +154,6 @@ static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-void ff_eq_init(EQContext *eq)
|
|
|
-{
|
|
|
- eq->process = process_c;
|
|
|
- if (ARCH_X86)
|
|
|
- ff_eq_init_x86(eq);
|
|
|
-}
|
|
|
-
|
|
|
static int initialize(AVFilterContext *ctx)
|
|
|
{
|
|
|
EQContext *eq = ctx->priv;
|