X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_boxblur.h;h=c043dc3c121290b7e907f562cad94ecbba618cf1;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=392726af58ca00476749ade9cc607b81fca8455f;hpb=b3016b249333ac0ab0008d8c6c4d9029b2ff30c9;p=synfig.git diff --git a/ETL/trunk/ETL/_boxblur.h b/ETL/trunk/ETL/_boxblur.h index 392726a..c043dc3 100644 --- a/ETL/trunk/ETL/_boxblur.h +++ b/ETL/trunk/ETL/_boxblur.h @@ -1,7 +1,7 @@ /*! ======================================================================== ** Extended Template Library ** Box Blur Template Implementation -** $Id: _boxblur.h,v 1.1.1.1 2005/01/04 01:31:46 darco Exp $ +** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. ** @@ -24,8 +24,8 @@ /* === S T A R T =========================================================== */ -#ifndef __ETL_BOXBLUR_H -#define __ETL_BOXBLUR_H +#ifndef __ETL__BOXBLUR_H +#define __ETL__BOXBLUR_H /* === H E A D E R S ======================================================= */ @@ -45,19 +45,19 @@ hbox_blur(T1 pen,int w, int h, int length, T2 outpen) length=std::min(w,length); const float divisor(1.0f/(length*2+1)); - + for(y=0;ylength) ? iter[-length-1] : *pen.x(); tot += ((x+length)length) ? iter[-length-1] : *pen.y(); tot += ((y+length)%.3f),",y,&iter[y],iter[y],tot); } iter=pen.y(); - + //printf(" tot=%.3f\n",tot); - + biter = iter+(-length-1); //get the first one... eiter = iter+length; - + //y will always be > length //T2 open = outpen; for (y=0;ylength) + + if (y>length) { typename T1::value_type &v = *biter; /*if( (char*)&v < beginptr || @@ -174,25 +174,25 @@ vbox_blur(T1 pen,int w, int h, int length,T2 outpen) //printf("[%.3f,",bval); } - if (y+length= endptr) printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/ tot += v; //printf("%.3f]",v); } - else + else { tot += eval; //printf("%.3f]",eval); } - + //test handled in the previous case... //tot -= (y>length) ? *biter : bval; //tot += (y+length