| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Theora
Revision: 15215
Author: tterribe
Date: 28 Aug 2008 14:04:15
Changes:It appears Solaris's cc is ignoring the signedness of bitfield types.
Add explicit casts as a work-around.
| ... | ...@@ -831,13 +831,13 @@ | |
| 831 | 831 | ogg_int16_t p; |
| 832 | 832 | /*Why is the iquant product rounded in this case and no others? |
| 833 | 833 | Who knows.*/ |
| 834 | p=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant+15>>5); | |
| 834 | p=(ogg_int16_t)((ogg_int32_t)(ogg_int16_t)_frag->dc*_dc_iquant+15>>5); | |
| 835 | 835 | /*LOOP VECTORIZES.*/ |
| 836 | 836 | for(ci=0;ci<64;ci++)res_buf[ci]=p; |
| 837 | 837 | } |
| 838 | 838 | else{ |
| 839 | 839 | /*First, dequantize the coefficients.*/ |
| 840 | dct_buf[0]=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant); | |
| 840 | dct_buf[0]=(ogg_int16_t)((ogg_int32_t)(ogg_int16_t)_frag->dc*_dc_iquant); | |
| 841 | 841 | for(zzi=1;zzi<_ncoefs;zzi++){ |
| 842 | 842 | int ci; |
| 843 | 843 | ci=OC_FZIG_ZAG[zzi]; |
| ... | ...@@ -179,7 +179,7 @@ | |
| 179 | 179 | pflag=1<<i; |
| 180 | 180 | if((BC_MASK[bc]&pflag)&&predfr[i]->coded&& |
| 181 | 181 | OC_FRAME_FOR_MODE[predfr[i]->mbmode]==pred_frame){ |
| 182 | p[np++]=predfr[i]->dc; | |
| 182 | p[np++]=(ogg_int16_t)predfr[i]->dc; | |
| 183 | 183 | pflags|=pflag; |
| 184 | 184 | } |
| 185 | 185 | } |
| ... | ...@@ -213,7 +213,10 @@ | |
| 213 | 213 | unsigned qi:6; |
| 214 | 214 | /*The mode of the macroblock this fragment belongs to.*/ |
| 215 | 215 | int mbmode:8; |
| 216 | /*The prediction-corrected DC component.*/ | |
| 216 | /*The prediction-corrected DC component. | |
| 217 | Note that some compilers (e.g., Solaris's) will ignore the signedness of | |
| 218 | the type and treat this value as unsigned always, so it will need to be | |
| 219 | casted before being used.*/ | |
| 217 | 220 | int dc:16; |
| 218 | 221 | /*A pointer to the portion of an image covered by this fragment in several |
| 219 | 222 | images. |