commit avant la Ganguise + push en vrac
This commit is contained in:
@@ -5,6 +5,11 @@
|
||||
|
||||
#include "funcs.h"
|
||||
|
||||
/*
|
||||
* Be careful, these functions are not yet fireproof,
|
||||
* and calling conventions are fluctuating.
|
||||
*/
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
int x_upscaler(unsigned char *src, int w, int h, FloatImg *d)
|
||||
{
|
||||
@@ -13,6 +18,14 @@ int x, y, xx, yy;
|
||||
float r, g, b;
|
||||
static unsigned short modz;
|
||||
|
||||
/*
|
||||
* check in image sizes are correct
|
||||
*/
|
||||
if ( d->width != w*2 || d->height != h*2 ) {
|
||||
fprintf(stderr, "%s : dimension error\n", __func__);
|
||||
return -2;
|
||||
}
|
||||
|
||||
// rp = d->R, gp = d->G, bp = d->B;
|
||||
|
||||
for (y=0; y<h; y++) {
|
||||
@@ -49,7 +62,6 @@ for (iter=0; iter<size; iter++) {
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* --------------------------------------------------------------------- */
|
||||
int x_add_rgb2fimg(unsigned char *src, int w, int h, FloatImg *d)
|
||||
{
|
||||
int iter, size;
|
||||
@@ -64,8 +76,12 @@ for (iter=0; iter<size; iter++) {
|
||||
*bp++ += (float)*src++;
|
||||
}
|
||||
|
||||
d->count++; /* one more frame in the accumulator */
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
int x_rgb2file(unsigned char *src, int w, int h, char *fname)
|
||||
{
|
||||
FloatImg buff;
|
||||
|
||||
Reference in New Issue
Block a user