You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7KB

  1. /*
  2. * Original MPlayer filters by Richard Felker, Hampa Hug, Daniel Moreno,
  3. * and Michael Niedermeyer.
  4. *
  5. * Copyright (c) 2014 James Darnley <james.darnley@gmail.com>
  6. * Copyright (c) 2015 Arwa Arif <arwaarif1994@gmail.com>
  7. *
  8. * This file is part of FFmpeg.
  9. *
  10. * FFmpeg is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * FFmpeg is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License along
  21. * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  23. */
  24. #ifndef AVFILTER_EQ_H
  25. #define AVFILTER_EQ_H
  26. #include "avfilter.h"
  27. typedef struct EQParameters {
  28. void (*adjust)(struct EQParameters *eq, uint8_t *dst, int dst_stride,
  29. const uint8_t *src, int src_stride, int w, int h);
  30. uint8_t lut[256];
  31. double brightness, contrast, gamma, gamma_weight;
  32. int lut_clean;
  33. } EQParameters;
  34. typedef struct {
  35. const AVClass *class;
  36. EQParameters param[3];
  37. double contrast;
  38. double brightness;
  39. double saturation;
  40. double gamma;
  41. double gamma_weight;
  42. double gamma_r, gamma_g, gamma_b;
  43. void (*process)(struct EQParameters *par, uint8_t *dst, int dst_stride,
  44. const uint8_t *src, int src_stride, int w, int h);
  45. } EQContext;
  46. void ff_eq_init_x86(EQContext *eq);
  47. #endif /* AVFILTER_EQ_H */