convolve.h 415 B

123456789101112131415161718192021222324
  1. #ifndef _CONVOLVE_H
  2. #define _CONVOLVE_H
  3. #include "platform/types.h"
  4. // world's slowest crappiest convolve :P think it sucks? write a better one
  5. // and send it to me
  6. class Convolve3x3 {
  7. public:
  8. Convolve3x3(ARGB32 *bits, int w, int h);
  9. void setPos(int x, int y, float v);
  10. void setMultiplier(int m);
  11. void convolve();
  12. private:
  13. ARGB32 *bits;
  14. int w, h;
  15. float vals[3][3];
  16. float multiplier;
  17. };
  18. #endif