comparison src/video/SDL_yuv_sw.c @ 1428:5f52867ba65c

Update for Visual C++ 6.0
author Sam Lantinga <slouken@libsdl.org>
date Fri, 24 Feb 2006 18:24:57 +0000
parents 40edc79b0926
children 51038e80ae59
comparison
equal deleted inserted replaced
1427:5f5a74d29d18 1428:5f52867ba65c
165 + colortab[ *cb + 2*256 ]; 165 + colortab[ *cb + 2*256 ];
166 cb_b = 2*768+256 + colortab[ *cb + 3*256 ]; 166 cb_b = 2*768+256 + colortab[ *cb + 3*256 ];
167 ++cr; ++cb; 167 ++cr; ++cb;
168 168
169 L = *lum++; 169 L = *lum++;
170 *row1++ = (rgb_2_pix[ L + cr_r ] | 170 *row1++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
171 rgb_2_pix[ L + crb_g ] | 171 rgb_2_pix[ L + crb_g ] |
172 rgb_2_pix[ L + cb_b ]); 172 rgb_2_pix[ L + cb_b ]);
173 173
174 L = *lum++; 174 L = *lum++;
175 *row1++ = (rgb_2_pix[ L + cr_r ] | 175 *row1++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
176 rgb_2_pix[ L + crb_g ] | 176 rgb_2_pix[ L + crb_g ] |
177 rgb_2_pix[ L + cb_b ]); 177 rgb_2_pix[ L + cb_b ]);
178 178
179 179
180 /* Now, do second row. */ 180 /* Now, do second row. */
181 181
182 L = *lum2++; 182 L = *lum2++;
183 *row2++ = (rgb_2_pix[ L + cr_r ] | 183 *row2++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
184 rgb_2_pix[ L + crb_g ] | 184 rgb_2_pix[ L + crb_g ] |
185 rgb_2_pix[ L + cb_b ]); 185 rgb_2_pix[ L + cb_b ]);
186 186
187 L = *lum2++; 187 L = *lum2++;
188 *row2++ = (rgb_2_pix[ L + cr_r ] | 188 *row2++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
189 rgb_2_pix[ L + crb_g ] | 189 rgb_2_pix[ L + crb_g ] |
190 rgb_2_pix[ L + cb_b ]); 190 rgb_2_pix[ L + cb_b ]);
191 } 191 }
192 192
193 /* 193 /*
194 * These values are at the start of the next line, (due 194 * These values are at the start of the next line, (due
195 * to the ++'s above),but they need to be at the start 195 * to the ++'s above),but they need to be at the start
636 + colortab[ *cb + 2*256 ]; 636 + colortab[ *cb + 2*256 ];
637 cb_b = 2*768+256 + colortab[ *cb + 3*256 ]; 637 cb_b = 2*768+256 + colortab[ *cb + 3*256 ];
638 cr += 4; cb += 4; 638 cr += 4; cb += 4;
639 639
640 L = *lum; lum += 2; 640 L = *lum; lum += 2;
641 *row++ = (rgb_2_pix[ L + cr_r ] | 641 *row++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
642 rgb_2_pix[ L + crb_g ] | 642 rgb_2_pix[ L + crb_g ] |
643 rgb_2_pix[ L + cb_b ]); 643 rgb_2_pix[ L + cb_b ]);
644 644
645 L = *lum; lum += 2; 645 L = *lum; lum += 2;
646 *row++ = (rgb_2_pix[ L + cr_r ] | 646 *row++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
647 rgb_2_pix[ L + crb_g ] | 647 rgb_2_pix[ L + crb_g ] |
648 rgb_2_pix[ L + cb_b ]); 648 rgb_2_pix[ L + cb_b ]);
649 649
650 } 650 }
651 651
652 row += mod; 652 row += mod;
653 } 653 }