tuning...
This commit is contained in:
		
							parent
							
								
									3e820c8298
								
							
						
					
					
						commit
						ce02cf96bc
					
				@ -3,7 +3,7 @@
 | 
			
		||||
 *			ugly code from tTh
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define		FIMG_VERSION	110
 | 
			
		||||
#define		FIMG_VERSION	111
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *	in memory descriptor
 | 
			
		||||
@ -145,6 +145,8 @@ int fimg_desaturate(FloatImg *src, FloatImg *dst, int k);
 | 
			
		||||
/*	module funcs/geometry.c		*/
 | 
			
		||||
int fimg_halfsize_0(FloatImg *src, FloatImg *dst, int notused);
 | 
			
		||||
 | 
			
		||||
int fimg_displacement_0(FloatImg *psrc, FloatImg *pdst, int flags);
 | 
			
		||||
 | 
			
		||||
/*	module funcs/rampes.c		*/
 | 
			
		||||
int fimg_hdeg_a(FloatImg *img, double dcoef);
 | 
			
		||||
int fimg_vdeg_a(FloatImg *img, double dcoef);
 | 
			
		||||
 | 
			
		||||
@ -43,7 +43,6 @@ foo = fimg_get_minmax_rgb(psrc, minmax);
 | 
			
		||||
if (verbosity) {
 | 
			
		||||
	fimg_print_minmax(minmax, (char *)__func__);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
dltr = minmax[1] - minmax[0];
 | 
			
		||||
dltg = minmax[3] - minmax[2];
 | 
			
		||||
dltb = minmax[5] - minmax[4];
 | 
			
		||||
@ -56,10 +55,10 @@ for (y=0; y<psrc->height; y++) {
 | 
			
		||||
 | 
			
		||||
		fimg_get_rgb(psrc, x, y, rgb);
 | 
			
		||||
 | 
			
		||||
		dispx = (float)x + (rgb[1]/dltg * 10.0);
 | 
			
		||||
		dispx = (float)x + (rgb[1]/dltg * 20.0);
 | 
			
		||||
		dispy = (float)y + (rgb[2]/dltb * 10.0);
 | 
			
		||||
		dstx = (int)roundf(dispx - 5.0);
 | 
			
		||||
		dsty = (int)roundf(dispy - 5.0);
 | 
			
		||||
		dstx = (int)roundf(dispx - 10.0);
 | 
			
		||||
		dsty = (int)roundf(dispy - 10.0);
 | 
			
		||||
 | 
			
		||||
		if (		(dstx < 0) || (dsty < 0)	||
 | 
			
		||||
				(dstx >= psrc->width)		||
 | 
			
		||||
@ -69,7 +68,10 @@ for (y=0; y<psrc->height; y++) {
 | 
			
		||||
			out++;
 | 
			
		||||
			}
 | 
			
		||||
		else	{
 | 
			
		||||
			rgb[1] = rgb[2] = rgb[0];
 | 
			
		||||
			if (flags & 1) {
 | 
			
		||||
				/* going monochrome */
 | 
			
		||||
				rgb[1] = rgb[2] = rgb[0];
 | 
			
		||||
				}
 | 
			
		||||
			fimg_put_rgb(pdst, dstx, dsty, rgb);
 | 
			
		||||
			// fprintf(stderr, "%5d %5d %f\n", dstx, dsty, rgb[1]);
 | 
			
		||||
			in++;
 | 
			
		||||
@ -82,7 +84,7 @@ for (y=0; y<psrc->height; y++) {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
fprintf(stderr, "%s ------->  in %d  out %d\n", __func__, in, out);
 | 
			
		||||
if (verbosity) fprintf(stderr, "%s -> in %d out %d\n", __func__, in, out);
 | 
			
		||||
 | 
			
		||||
return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -17,8 +17,6 @@ float		global_fvalue;
 | 
			
		||||
/* --------------------------------------------------------------------- */
 | 
			
		||||
/* nouveau 24 octobre 2020, pendant le masque-flamme coronavidique       */
 | 
			
		||||
 | 
			
		||||
int fimg_displacement_0(FloatImg *psrc, FloatImg *pdst, int flags);
 | 
			
		||||
 | 
			
		||||
int essai_displacement(char *infile, char *outfile)
 | 
			
		||||
{
 | 
			
		||||
int		foo;
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ out=out.fimg
 | 
			
		||||
maxi=49
 | 
			
		||||
W="640"
 | 
			
		||||
H="480"
 | 
			
		||||
grabopt=" -s 640x480 -vv  -p 0 -n 300 -c cos01 "
 | 
			
		||||
grabopt=" -s 640x480 -vv  -p 0 -n 500 -c cos01 "
 | 
			
		||||
 | 
			
		||||
mkdir /tmp/V
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user