comparison aac.c @ 9052:54973ad4b7cf libavcodec

Refactor AAC unsigned band type decoding for a modest speedup.
author alexc
date Thu, 26 Feb 2009 01:51:34 +0000
parents 0cffed11ee33
children c6bd71120376
comparison
equal deleted inserted replaced
9051:0cffed11ee33 9052:54973ad4b7cf
803 if (vq_ptr[1]) coef[coef_tmp_idx + 1] = sign_lookup[get_bits1(gb)]; 803 if (vq_ptr[1]) coef[coef_tmp_idx + 1] = sign_lookup[get_bits1(gb)];
804 if (dim == 4) { 804 if (dim == 4) {
805 if (vq_ptr[2]) coef[coef_tmp_idx + 2] = sign_lookup[get_bits1(gb)]; 805 if (vq_ptr[2]) coef[coef_tmp_idx + 2] = sign_lookup[get_bits1(gb)];
806 if (vq_ptr[3]) coef[coef_tmp_idx + 3] = sign_lookup[get_bits1(gb)]; 806 if (vq_ptr[3]) coef[coef_tmp_idx + 3] = sign_lookup[get_bits1(gb)];
807 } 807 }
808 }else {
809 coef[coef_tmp_idx ] = 1.0f;
810 coef[coef_tmp_idx + 1] = 1.0f;
811 if (dim == 4) {
812 coef[coef_tmp_idx + 2] = 1.0f;
813 coef[coef_tmp_idx + 3] = 1.0f;
814 }
815 }
816 if (cur_band_type == ESC_BT) { 808 if (cur_band_type == ESC_BT) {
817 for (j = 0; j < 2; j++) { 809 for (j = 0; j < 2; j++) {
818 if (vq_ptr[j] == 64.0f) { 810 if (vq_ptr[j] == 64.0f) {
819 int n = 4; 811 int n = 4;
820 /* The total length of escape_sequence must be < 22 bits according 812 /* The total length of escape_sequence must be < 22 bits according
836 if (dim == 4) { 828 if (dim == 4) {
837 coef[coef_tmp_idx + 2] *= vq_ptr[2]; 829 coef[coef_tmp_idx + 2] *= vq_ptr[2];
838 coef[coef_tmp_idx + 3] *= vq_ptr[3]; 830 coef[coef_tmp_idx + 3] *= vq_ptr[3];
839 } 831 }
840 } 832 }
833 }else {
834 coef[coef_tmp_idx ] = vq_ptr[0];
835 coef[coef_tmp_idx + 1] = vq_ptr[1];
836 if (dim == 4) {
837 coef[coef_tmp_idx + 2] = vq_ptr[2];
838 coef[coef_tmp_idx + 3] = vq_ptr[3];
839 }
840 }
841 coef[coef_tmp_idx ] *= sf[idx]; 841 coef[coef_tmp_idx ] *= sf[idx];
842 coef[coef_tmp_idx + 1] *= sf[idx]; 842 coef[coef_tmp_idx + 1] *= sf[idx];
843 if (dim == 4) { 843 if (dim == 4) {
844 coef[coef_tmp_idx + 2] *= sf[idx]; 844 coef[coef_tmp_idx + 2] *= sf[idx];
845 coef[coef_tmp_idx + 3] *= sf[idx]; 845 coef[coef_tmp_idx + 3] *= sf[idx];