src/video/SDL_yuv_sw.c
changeset 1428 5f52867ba65c
parent 1413 40edc79b0926
child 1643 51038e80ae59
     1.1 --- a/src/video/SDL_yuv_sw.c	Fri Feb 24 17:03:06 2006 +0000
     1.2 +++ b/src/video/SDL_yuv_sw.c	Fri Feb 24 18:24:57 2006 +0000
     1.3 @@ -167,27 +167,27 @@
     1.4              ++cr; ++cb;
     1.5  
     1.6              L = *lum++;
     1.7 -            *row1++ = (rgb_2_pix[ L + cr_r ] |
     1.8 -                       rgb_2_pix[ L + crb_g ] |
     1.9 -                       rgb_2_pix[ L + cb_b ]);
    1.10 +            *row1++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.11 +                                       rgb_2_pix[ L + crb_g ] |
    1.12 +                                       rgb_2_pix[ L + cb_b ]);
    1.13  
    1.14              L = *lum++;
    1.15 -            *row1++ = (rgb_2_pix[ L + cr_r ] |
    1.16 -                       rgb_2_pix[ L + crb_g ] |
    1.17 -                       rgb_2_pix[ L + cb_b ]);
    1.18 +            *row1++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.19 +                                       rgb_2_pix[ L + crb_g ] |
    1.20 +                                       rgb_2_pix[ L + cb_b ]);
    1.21  
    1.22  
    1.23              /* Now, do second row.  */
    1.24  
    1.25              L = *lum2++;
    1.26 -            *row2++ = (rgb_2_pix[ L + cr_r ] |
    1.27 -                       rgb_2_pix[ L + crb_g ] |
    1.28 -                       rgb_2_pix[ L + cb_b ]);
    1.29 +            *row2++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.30 +                                       rgb_2_pix[ L + crb_g ] |
    1.31 +                                       rgb_2_pix[ L + cb_b ]);
    1.32  
    1.33              L = *lum2++;
    1.34 -            *row2++ = (rgb_2_pix[ L + cr_r ] |
    1.35 -                       rgb_2_pix[ L + crb_g ] |
    1.36 -                       rgb_2_pix[ L + cb_b ]);
    1.37 +            *row2++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.38 +                                       rgb_2_pix[ L + crb_g ] |
    1.39 +                                       rgb_2_pix[ L + cb_b ]);
    1.40          }
    1.41  
    1.42          /*
    1.43 @@ -638,14 +638,14 @@
    1.44              cr += 4; cb += 4;
    1.45  
    1.46              L = *lum; lum += 2;
    1.47 -            *row++ = (rgb_2_pix[ L + cr_r ] |
    1.48 -                       rgb_2_pix[ L + crb_g ] |
    1.49 -                       rgb_2_pix[ L + cb_b ]);
    1.50 +            *row++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.51 +                                      rgb_2_pix[ L + crb_g ] |
    1.52 +                                      rgb_2_pix[ L + cb_b ]);
    1.53  
    1.54              L = *lum; lum += 2;
    1.55 -            *row++ = (rgb_2_pix[ L + cr_r ] |
    1.56 -                       rgb_2_pix[ L + crb_g ] |
    1.57 -                       rgb_2_pix[ L + cb_b ]);
    1.58 +            *row++ = (unsigned short)(rgb_2_pix[ L + cr_r ] |
    1.59 +                                      rgb_2_pix[ L + crb_g ] |
    1.60 +                                      rgb_2_pix[ L + cb_b ]);
    1.61  
    1.62          }
    1.63