[xiph-commits] r12505 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Wed Feb 21 16:29:28 PST 2007
Author: xiphmont
Date: 2007-02-21 16:29:26 -0800 (Wed, 21 Feb 2007)
New Revision: 12505
Modified:
trunk/sushivision/panel-2d.c
Log:
Don't forget to guard the per-line/per-col noop cases in resmapled remaps
Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c 2007-02-22 00:07:42 UTC (rev 12504)
+++ trunk/sushivision/panel-2d.c 2007-02-22 00:29:26 UTC (rev 12505)
@@ -438,20 +438,24 @@
int y = ystart;
// first line
- l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, ydelA*xA, &out);
-
- for(; dx < xend-1; dx++)
- l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, ydelA*17, &out);
-
- if(dx<xend)
- l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, ydelA*xB, &out);
- y++;
-
- // mid lines
+ if(y<yend){
+ if(dx<xend)
+ l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, ydelA*xA, &out);
+
+ for(; dx < xend-1; dx++)
+ l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, ydelA*17, &out);
+
+ if(dx<xend)
+ l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, ydelA*xB, &out);
+ y++;
+ }
+
+ // mid lines
for(;y<yend-1;y++){
dx = xstart += dw;
xend += dw;
- l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, 15*xA, &out);
+ if(dx<xend)
+ l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, 15*xA, &out);
for(; dx < xend-1; dx++)
l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, 255, &out);
@@ -464,7 +468,8 @@
if(y<yend){
dx = xstart += dw;
xend += dw;
- l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, ydelB*xA, &out);
+ if(dx<xend)
+ l_mapping_calc(mapfunc, ol_low, ol_range, data[dx++], ol_alpha, ydelB*xA, &out);
for(; dx < xend-1; dx++)
l_mapping_calc(mapfunc, ol_low, ol_range, data[dx], ol_alpha, ydelB*17, &out);
More information about the commits
mailing list