Changeset 2616 for pjproject/trunk/third_party/g7221/encode/dct4_a.c
- Timestamp:
- Apr 18, 2009 2:29:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/g7221/encode/dct4_a.c
r2601 r2616 136 136 137 137 /* set_span = 1 << (DCT_LENGTH_LOG - set_count_log); */ 138 set_span = shr (dct_length,set_count_log);139 140 set_count = shl (1,set_count_log);138 set_span = shr_nocheck(dct_length,set_count_log); 139 140 set_count = shl_nocheck(1,set_count_log); 141 141 142 142 in_ptr = in_buffer; … … 169 169 in_val_low = *in_ptr++; 170 170 in_val_high = *in_ptr++; 171 acca = L_add(in_val_low,in_val_high); 172 acca = L_shr(acca,1); 171 // blp: addition of two 16bits vars, there's no way 172 // they'll overflow a 32bit var 173 //acca = L_add(in_val_low,in_val_high); 174 acca = (in_val_low + in_val_high); 175 acca = L_shr_nocheck(acca,1); 173 176 out_val_low = extract_l(acca); 174 177 175 178 acca = L_sub(in_val_low,in_val_high); 176 acca = L_shr (acca,1);179 acca = L_shr_nocheck(acca,1); 177 180 out_val_high = extract_l(acca); 178 181 … … 214 217 215 218 temp = sub(dct_length_log,1); 216 temp = shl (1,temp);219 temp = shl_nocheck(1,temp); 217 220 218 221 for (pairs_left=temp; pairs_left > 0; pairs_left--) … … 220 223 for ( k=0; k<CORE_SIZE; k++ ) 221 224 { 225 #if PJ_HAS_INT64 226 /* blp: danger danger! not really compatible but faster */ 227 pj_int64_t sum64=0; 228 move32(); 229 230 for ( i=0; i<CORE_SIZE; i++ ) 231 { 232 sum64 += L_mult(pair_ptr[i], dct_core_a[i][k]); 233 } 234 sum = L_saturate(sum64); 235 #else 222 236 sum=0L; 223 237 move32(); … … 226 240 sum = L_mac(sum, pair_ptr[i],dct_core_a[i][k]); 227 241 } 242 #endif 228 243 buffer_swap[k] = itu_round(sum); 229 244 } … … 251 266 /*===========================================================*/ 252 267 /* set_span = 1 << (DCT_LENGTH_LOG - set_count_log); */ 253 set_span = shr (dct_length,set_count_log);254 255 set_count = shl (1,set_count_log);268 set_span = shr_nocheck(dct_length,set_count_log); 269 270 set_count = shl_nocheck(1,set_count_log); 256 271 next_in_base = in_buffer; 257 272 move16(); … … 278 293 in_ptr_low = next_in_base; 279 294 move16(); 280 temp = shr (set_span,1);295 temp = shr_nocheck(set_span,1); 281 296 282 297 /* address arithmetic */
Note: See TracChangeset
for help on using the changeset viewer.