comparison aac.c @ 9074:0e2f21d65473 libavcodec

AAC: Make the CPE function more consistent with the functions for other channel elements.
author alexc
date Sun, 01 Mar 2009 00:23:05 +0000
parents c6bd71120376
children 5001f33c30f3
comparison
equal deleted inserted replaced
9073:d1238ea3db6f 9074:0e2f21d65473
1073 * 1073 *
1074 * @param elem_id Identifies the instance of a syntax element. 1074 * @param elem_id Identifies the instance of a syntax element.
1075 * 1075 *
1076 * @return Returns error status. 0 - OK, !0 - error 1076 * @return Returns error status. 0 - OK, !0 - error
1077 */ 1077 */
1078 static int decode_cpe(AACContext * ac, GetBitContext * gb, int elem_id) { 1078 static int decode_cpe(AACContext * ac, GetBitContext * gb, ChannelElement * cpe) {
1079 int i, ret, common_window, ms_present = 0; 1079 int i, ret, common_window, ms_present = 0;
1080 ChannelElement * cpe; 1080
1081
1082 cpe = ac->che[TYPE_CPE][elem_id];
1083 common_window = get_bits1(gb); 1081 common_window = get_bits1(gb);
1084 if (common_window) { 1082 if (common_window) {
1085 if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1)) 1083 if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1))
1086 return -1; 1084 return -1;
1087 i = cpe->ch[1].ics.use_kb_window[0]; 1085 i = cpe->ch[1].ics.use_kb_window[0];
1593 case TYPE_SCE: 1591 case TYPE_SCE:
1594 err = decode_ics(ac, &ac->che[TYPE_SCE][elem_id]->ch[0], &gb, 0, 0); 1592 err = decode_ics(ac, &ac->che[TYPE_SCE][elem_id]->ch[0], &gb, 0, 0);
1595 break; 1593 break;
1596 1594
1597 case TYPE_CPE: 1595 case TYPE_CPE:
1598 err = decode_cpe(ac, &gb, elem_id); 1596 err = decode_cpe(ac, &gb, ac->che[TYPE_CPE][elem_id]);
1599 break; 1597 break;
1600 1598
1601 case TYPE_CCE: 1599 case TYPE_CCE:
1602 err = decode_cce(ac, &gb, ac->che[TYPE_CCE][elem_id]); 1600 err = decode_cce(ac, &gb, ac->che[TYPE_CCE][elem_id]);
1603 break; 1601 break;