+
+ /* Vertical bluring */
+ p_mask = p_sys->p_mask->A_PIXELS;
+ i_height = b_line_factor ? i_mask_visible_lines>>1
+ : i_mask_visible_lines;
+ /* Make sure that we stop at least 2 lines before the picture's end
+ * (since our bluring algorithm uses the 2 next lines) */
+ i_height = __MIN( i_visible_lines - i_y - 2, i_height );
+ /* Make sure that we start at least 2 lines from the top (since our
+ * bluring algorithm uses the 2 previous lines) */
+ y = __MAX(i_y,2);
+ p_outpix = p_outpic->p[i_plane].p_pixels + (i_y+y)*i_pitch + i_x;
+ for( ; y < i_height; y++, p_mask += i_mask_pitch, p_outpix += i_pitch )
+ {
+ for( x = 0; x < i_width; x++ )
+ {
+ if( p_mask[i_plane?x<<1:x] > 127 )
+ {
+ /* Ugly bluring function */
+ p_outpix[x] =
+ ( (p_outpix[x-i_2pitch]<<1) /* 2 */
+ + (p_outpix[x-i_pitch ]<<2) /* 4 */
+ + (p_outpix[x ]<<2) /* 4 */
+ + (p_outpix[x+i_pitch ]<<2) /* 4 */
+ + (p_outpix[x+i_2pitch]<<1) )>>4; /* 2 */
+ }
+ }
+ }