4 i_img* i_transform2(int width, int height, int channels,
5 struct rm_op *ops, int ops_count,
6 double *n_regs, int n_regs_count,
7 i_color *c_regs, int c_regs_count,
8 i_img **in_imgs, int in_imgs_count)
15 /* since the number of images is variable and the image numbers
16 for getp? are fixed, we can check them here instead of in the
17 register machine - this will help performance */
18 for (i = 0; i < ops_count; ++i) {
19 switch (ops[i].code) {
23 if (ops[i].code - rbc_getp1 + 1 > in_imgs_count) {
30 new_img = i_img_empty_ch(NULL, width, height, channels);
31 for (x = 0; x < width; ++x) {
32 for (y = 0; y < height; ++y) {
35 val = rm_run(ops, ops_count, n_regs, n_regs_count, c_regs, c_regs_count,
36 in_imgs, in_imgs_count);
37 i_ppix(new_img, x, y, &val);