- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/Ohana/src/kapa2/src/Remap24.c
r18324 r27840 5 5 int i, j, ii, jj; 6 6 int i_start, i_end, j_start, j_end; 7 int dropback, extra; 7 int I_start, J_start; 8 int dropback, extra, inDX, inDY; 8 9 int dx, dy, DX, DY; 9 10 double expand, Ix, Iy; … … 30 31 31 32 // set up expansions 33 if (picture[0].expand == -1) picture[0].expand = 1; 32 34 assert ((picture[0].expand >= 1) || (picture[0].expand <= -2)); 33 35 expand = expand_in = expand_out = 1.0; … … 53 55 extra = 4 - (dx * 3) % 4; 54 56 55 // x, y are the closest lit screen pixel to 0,0 56 Picture_Lower (&i_start, &j_start, matrix, picture); 57 // i_start, j_start are the closest lit screen pixel to 0,0 58 // I_start, J_start are the image pixel corresponding to i_start, j_start 59 Picture_Lower (&i_start, &j_start, &I_start, &J_start, matrix, picture); 57 60 58 // x, y are the closest lit screen pixel to dx, dy 59 Picture_Upper (&i_end, &j_end, matrix, picture); 61 // i_end, j_end are the closest lit screen pixel to dx, dy 62 // I_end, J_end are the image pixel corresponding to i_end, j_end 63 Picture_Upper (&i_end, &j_end, i_start, j_start, matrix, picture); 60 64 61 // Ix,Iy are the first displayed image pixel 62 Picture_to_Image (&Ix, &Iy, i_start, j_start, picture); 65 assert (i_start <= i_end); 66 assert (j_start <= j_end); 67 68 Ix = picture[0].flipx ? I_start - 1 : I_start; 69 Iy = picture[0].flipy ? J_start - 1 : J_start; 70 71 inDX = picture[0].flipx ? -1 : +1; 72 inDY = picture[0].flipy ? -1 : +1; 63 73 64 74 dropback = expand_out - (i_end - i_start) % expand_out; … … 80 90 } 81 91 82 for (j = j_start; j < j_end; j+= expand_out, in_pix += expand_in*DX) {92 for (j = j_start; j < j_end; j+= expand_out, in_pix += inDY*expand_in*DX) { 83 93 out_pix = &data[j*(3*dx+extra)]; 84 94 … … 97 107 in_pix2 = in_pix; 98 108 if (expand_out == 1) { 99 for (i = i_start; i < i_end; i++, in_pix2+= expand_in, out_pix+=3) {109 for (i = i_start; i < i_end; i++, in_pix2+= inDX*expand_in, out_pix+=3) { 100 110 out_pix[0] = pixel1[*in_pix2]; 101 111 out_pix[1] = pixel2[*in_pix2]; … … 103 113 } 104 114 } else { 105 for (i = i_start; i < i_end; i+= expand_out, in_pix2 ++, out_pix+= 3*expand_out) {115 for (i = i_start; i < i_end; i+= expand_out, in_pix2 += inDX, out_pix+= 3*expand_out) { 106 116 pixvalue1 = pixel1[*in_pix2]; 107 117 pixvalue2 = pixel2[*in_pix2]; … … 121 131 /**** fill in area to the right of the picture ****/ 122 132 for (jj = 0; (jj < expand_out) && (j + jj < dy); jj++) { 123 // for (jj = 0; jj < expand_out; jj++) {124 133 out_pix2 = out_pix + jj*(3*dx+extra); 125 134 for (i = i_end; i < dx; i++, out_pix2+=3) {
Note:
See TracChangeset
for help on using the changeset viewer.
