Libvje / refactor : dither (fix)

* w,h <--- const unsign
* clean headers
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-07-30 14:38:12 +02:00
parent b4bb3579e2
commit 65f144e804
2 changed files with 4 additions and 10 deletions

View File

@@ -17,12 +17,10 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA.
*/ */
#include <stdint.h>
#include <stdio.h> #include "common.h"
#include <stdlib.h>
#include <libvjmem/vjmem.h> #include <libvjmem/vjmem.h>
#include "dither.h" #include "dither.h"
#include "common.h"
vj_effect *dither_init(int w, int h) vj_effect *dither_init(int w, int h)
{ {
@@ -60,8 +58,8 @@ void dither_apply(VJFrame *frame, int size, int random_on)
long int dith[size][size]; long int dith[size][size];
long int i, j, d, v, l, m; long int i, j, d, v, l, m;
uint8_t *Y = frame->data[0]; uint8_t *Y = frame->data[0];
int width, height; const unsigned int width = frame->width;
width=frame->width; height = frame->height; const unsigned int height = frame->height;
if( last_size != size || random_on ) if( last_size != size || random_on )
{ {

View File

@@ -20,10 +20,6 @@
#ifndef DITHER_H #ifndef DITHER_H
#define DITHER_H #define DITHER_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *dither_init(); vj_effect *dither_init();
void dither_apply(VJFrame *frame, int size, int n); void dither_apply(VJFrame *frame, int size, int n);
#endif #endif