Changeset 2616 for pjproject/trunk/third_party/g7221/encode/encoder.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/encoder.c
r2563 r2616 141 141 to be exactly 3.010299957 or 20.0 times log base 10 142 142 of square root of 2. */ 143 temp = shl (mag_shift,1);143 temp = shl_nocheck(mag_shift,1); 144 144 mag_shift_offset = add(temp,REGION_POWER_TABLE_NUM_NEGATIVES); 145 145 … … 259 259 if (j >= 0) 260 260 { 261 temp = extract_l(L_shr (current_word,j));261 temp = extract_l(L_shr_nocheck(current_word,j)); 262 262 out_word = add(out_word,temp); 263 263 … … 291 291 { 292 292 accb = L_deposit_l(out_word_index); 293 accb = L_shl (accb,4);293 accb = L_shl_nocheck(accb,4); 294 294 accb = L_sub(accb,number_of_bits_per_frame); 295 295 test(); 296 296 if(accb < 0) 297 297 { 298 temp = shl (region,2);298 temp = shl_nocheck(region,2); 299 299 in_word_ptr = ®ion_mlt_bits[temp]; 300 300 region_bit_count = region_mlt_bit_counts[region]; … … 311 311 312 312 acca = L_deposit_l(out_word_index); 313 acca = L_shl (acca,4);313 acca = L_shl_nocheck(acca,4); 314 314 acca = L_sub(acca,number_of_bits_per_frame); 315 315 … … 382 382 } 383 383 acca = L_deposit_l(out_word_index); 384 acca = L_shl (acca,4);384 acca = L_shl_nocheck(acca,4); 385 385 acca = L_sub(acca,number_of_bits_per_frame); 386 386 } 387 387 accb = L_deposit_l(out_word_index); 388 accb = L_shl (accb,4);388 accb = L_shl_nocheck(accb,4); 389 389 accb = L_sub(accb,number_of_bits_per_frame); 390 390 } … … 415 415 416 416 acca = L_deposit_l(out_word_index); 417 acca = L_shl (acca,4);417 acca = L_shl_nocheck(acca,4); 418 418 acca = L_sub(acca,number_of_bits_per_frame); 419 419 } … … 462 462 { 463 463 n = sub(absolute_region_power_index[region],39); 464 n = shr (n,1);464 n = shr_nocheck(n,1); 465 465 466 466 test(); … … 473 473 for (i=0; i<REGION_SIZE; i++) 474 474 { 475 acca = L_shl (*raw_mlt_ptr,16);475 acca = L_shl_nocheck(*raw_mlt_ptr,16); 476 476 acca = L_add(acca,32768L); 477 acca = L_shr (acca,n);478 acca = L_shr (acca,16);477 acca = L_shr_nocheck(acca,n); 478 acca = L_shr_nocheck(acca,16); 479 479 *raw_mlt_ptr++ = extract_l(acca); 480 480 } 481 481 482 temp = shl (n,1);482 temp = shl_nocheck(n,1); 483 483 temp = sub(absolute_region_power_index[region],temp); 484 484 absolute_region_power_index[region] = temp; … … 568 568 { 569 569 test(); 570 long_accumulator = L_shr (long_accumulator,1);570 long_accumulator = L_shr_nocheck(long_accumulator,1); 571 571 572 572 acca = (long_accumulator & 0x7fff0000L); … … 588 588 logic16(); 589 589 590 long_accumulator = L_shl (long_accumulator,1);590 long_accumulator = L_shl_nocheck(long_accumulator,1); 591 591 acca = L_sub(long_accumulator,32767); 592 592 power_shift--; 593 593 temp = add(power_shift,15); 594 594 } 595 long_accumulator = L_shr (long_accumulator,1);595 long_accumulator = L_shr_nocheck(long_accumulator,1); 596 596 /* 28963 corresponds to square root of 2 times REGION_SIZE(20). */ 597 597 acca = L_sub(long_accumulator,28963); … … 602 602 603 603 acca = L_deposit_l(mag_shift); 604 acca = L_shl (acca,1);604 acca = L_shl_nocheck(acca,1); 605 605 acca = L_sub(power_shift,acca); 606 606 acca = L_add(35,acca); … … 786 786 787 787 /* Start in the middle of the categorization control range. */ 788 temp = shr (num_categorization_control_possibilities,1);788 temp = shr_nocheck(num_categorization_control_possibilities,1); 789 789 temp = sub(temp,1); 790 790 for (*p_categorization_control = 0; *p_categorization_control < temp; (*p_categorization_control)++) … … 809 809 region_mlt_bit_counts[region] = 810 810 vector_huffman(category, absolute_region_power_index[region],raw_mlt_ptr, 811 ®ion_mlt_bits[shl (region,2)]);811 ®ion_mlt_bits[shl_nocheck(region,2)]); 812 812 } 813 813 else … … 850 850 region_mlt_bit_counts[region] = 851 851 vector_huffman(category, absolute_region_power_index[region],raw_mlt_ptr, 852 ®ion_mlt_bits[shl (region,2)]);852 ®ion_mlt_bits[shl_nocheck(region,2)]); 853 853 } 854 854 else … … 896 896 region_mlt_bit_counts[region] = 897 897 vector_huffman(category, absolute_region_power_index[region],raw_mlt_ptr, 898 ®ion_mlt_bits[shl (region,2)]);898 ®ion_mlt_bits[shl_nocheck(region,2)]); 899 899 } 900 900 else … … 1003 1003 /* compute inverse of step size * standard deviation */ 1004 1004 acca = L_mult(step_size_inverse_table[category],standard_deviation_inverse_table[power_index]); 1005 acca = L_shr (acca,1);1005 acca = L_shr_nocheck(acca,1); 1006 1006 acca = L_add(acca,4096); 1007 acca = L_shr (acca,13);1007 acca = L_shr_nocheck(acca,13); 1008 1008 1009 1009 /* … … 1012 1012 1013 1013 mytemp = acca & 0x3; 1014 acca = L_shr (acca,2);1014 acca = L_shr_nocheck(acca,2); 1015 1015 1016 1016 inv_of_step_size_times_std_dev = extract_l(acca); … … 1033 1033 1034 1034 acca = L_mult(k,inv_of_step_size_times_std_dev); 1035 acca = L_shr (acca,1);1035 acca = L_shr_nocheck(acca,1); 1036 1036 1037 1037 /* … … 1040 1040 1041 1041 myacca = (Word16)L_mult(k,mytemp); 1042 myacca = (Word16)L_shr (myacca,1);1042 myacca = (Word16)L_shr_nocheck(myacca,1); 1043 1043 myacca = (Word16)L_add(myacca,int_dead_zone_low_bits[category]); 1044 myacca = (Word16)L_shr (myacca,2);1044 myacca = (Word16)L_shr_nocheck(myacca,2); 1045 1045 1046 1046 acca = L_add(acca,int_dead_zone[category]); … … 1051 1051 1052 1052 acca = L_add(acca,myacca); 1053 acca = L_shr (acca,13);1053 acca = L_shr_nocheck(acca,13); 1054 1054 1055 1055 k = extract_l(acca); … … 1059 1059 { 1060 1060 number_of_non_zero = add(number_of_non_zero,1); 1061 signs_index = shl (signs_index,1);1061 signs_index = shl_nocheck(signs_index,1); 1062 1062 1063 1063 test(); … … 1075 1075 } 1076 1076 } 1077 acca = L_shr (L_mult(index,(kmax_plus_one)),1);1077 acca = L_shr_nocheck(L_mult(index,(kmax_plus_one)),1); 1078 1078 index = extract_l(acca); 1079 1079 index = add(index,k); … … 1105 1105 { 1106 1106 j = negate(j); 1107 acca = L_shr (code_bits,j);1107 acca = L_shr_nocheck(code_bits,j); 1108 1108 current_word = L_add(current_word,acca); 1109 1109
Note: See TracChangeset
for help on using the changeset viewer.