void scale_bitmap_cc_asm_rle(grs_bitmap *source_bmp, grs_bitmap *dest_bmp, int x0, int y0, int x1, int y1, fix u0, fix v0, fix u1, fix v1 ) { fix dv, v; int y, last_row = -1; dv = (v1-v0) / (y1-y0); rls_stretch_scanline_setup( (int)(x1-x0), f2i(u1)-f2i(u0) ); if ( scale_ydelta_minus_1 < 1 ) return; rls_do_cc_setup_asm(); v = v0; for (y=y0; y<=y1; y++ ) { if ( f2i(v) != last_row ) { last_row = f2i(v); decode_row( source_bmp, last_row ); } //scale_source_ptr = &source_bmp->bm_data[source_bmp->bm_rowsize*f2i(v)+f2i(u0)]; scale_source_ptr = &scale_rle_data[f2i(u0)]; scale_dest_ptr = &dest_bmp->bm_data[dest_bmp->bm_rowsize*y+x0]; scale_do_cc_scanline(); v += dv; } }
void scale_up_bitmap_rle(grs_bitmap *source_bmp, grs_bitmap *dest_bmp, int x0, int y0, int x1, int y1, fix u0, fix v0, fix u1, fix v1, int orientation ) { fix dv, v; int y, last_row = -1; if (orientation & 1) { int t; t = u0; u0 = u1; u1 = t; } if (orientation & 2) { int t; t = v0; v0 = v1; v1 = t; if (v1 < v0) v0--; } dv = (v1-v0) / (y1-y0); rls_stretch_scanline_setup( (int)(x1-x0), f2i(u1)-f2i(u0) ); if ( scale_ydelta_minus_1 < 1 ) return; v = v0; for (y=y0; y<=y1; y++ ) { if ( f2i(v) != last_row ) { last_row = f2i(v); decode_row( source_bmp, last_row ); } scale_source_ptr = &scale_rle_data[f2i(u0)]; scale_dest_ptr = &dest_bmp->bm_data[dest_bmp->bm_rowsize*y+x0]; rls_stretch_scanline( ); v += dv; } }
void scale_up_bitmap(grs_bitmap *source_bmp, grs_bitmap *dest_bmp, int x0, int y0, int x1, int y1, fix u0, fix v0, fix u1, fix v1, int orientation ) { fix dv, v; int y; if (orientation & 1) { int t; t = u0; u0 = u1; u1 = t; } if (orientation & 2) { int t; t = v0; v0 = v1; v1 = t; if (v1 < v0) v0--; } v = v0; dv = (v1-v0) / (y1-y0); rls_stretch_scanline_setup( (int)(x1-x0), f2i(u1)-f2i(u0) ); if ( scale_ydelta_minus_1 < 1 ) return; v = v0; for (y=y0; y<=y1; y++ ) { scale_source_ptr = &source_bmp->bm_texBuf[source_bmp->bm_props.rowsize*f2i(v)+f2i(u0)]; scale_dest_ptr = &dest_bmp->bm_texBuf[dest_bmp->bm_props.rowsize*y+x0]; rls_stretch_scanline(); v += dv; } }