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.

59 lines
2.1KB

  1. /*
  2. * Copyright (c) 2011 Pascal Getreuer
  3. * Copyright (c) 2016 Paul B Mahol
  4. *
  5. * Redistribution and use in source and binary forms, with or without modification,
  6. * are permitted provided that the following conditions are met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above
  11. * copyright notice, this list of conditions and the following
  12. * disclaimer in the documentation and/or other materials provided
  13. * with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  16. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  17. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  18. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  19. * HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  22. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  23. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  24. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. #ifndef AVFILTER_GBLUR_H
  28. #define AVFILTER_GBLUR_H
  29. #include "avfilter.h"
  30. typedef struct GBlurContext {
  31. const AVClass *class;
  32. float sigma;
  33. float sigmaV;
  34. int steps;
  35. int planes;
  36. int flt;
  37. int depth;
  38. int planewidth[4];
  39. int planeheight[4];
  40. float *buffer;
  41. float boundaryscale;
  42. float boundaryscaleV;
  43. float postscale;
  44. float postscaleV;
  45. float nu;
  46. float nuV;
  47. int nb_planes;
  48. void (*horiz_slice)(float *buffer, int width, int height, int steps, float nu, float bscale);
  49. void (*postscale_slice)(float *buffer, int length, float postscale, float min, float max);
  50. } GBlurContext;
  51. void ff_gblur_init(GBlurContext *s);
  52. void ff_gblur_init_x86(GBlurContext *s);
  53. #endif