[FFmpeg-soc] [soc]: r1944 - aac/aac.c
andoma
subversion at mplayerhq.hu
Thu Feb 28 11:14:39 CET 2008
Author: andoma
Date: Thu Feb 28 11:14:39 2008
New Revision: 1944
Log:
Collapse single_channel_struct() and lfe_channel_struct() into one line
in aac_decode_frame()
Modified:
aac/aac.c
Modified: aac/aac.c
==============================================================================
--- aac/aac.c (original)
+++ aac/aac.c Thu Feb 28 11:14:39 2008
@@ -1413,16 +1413,6 @@ static void ms_tool(AACContext * ac, cpe
}
}
-static int single_channel_struct(AACContext * ac, GetBitContext * gb, int id) {
- sce_struct * sce;
- if (ac->che_sce[id] == NULL) {
- return -1;
- }
- sce = ac->che_sce[id];
- if (individual_channel_stream(ac, gb, 0, 0, sce))
- return -1;
- return 0;
-}
static void intensity_tool(AACContext * ac, cpe_struct * cpe) {
const ics_struct * ics = &cpe->ch[1].ics;
@@ -1559,17 +1549,6 @@ static int coupling_channel_element(AACC
return 0;
}
-static int lfe_channel_struct(AACContext * ac, GetBitContext * gb, int id) {
- sce_struct * sce;
- if (ac->che_lfe[id] == NULL) {
- return -1;
- }
- sce = ac->che_lfe[id];
- if (individual_channel_stream(ac, gb, 0, 0, sce))
- return -1;
- return 0;
-}
-
static int sbr_extension_data(AACContext * ac, GetBitContext * gb, int crc, int cnt) {
// TODO : sbr_extension implementation
av_log(ac->avccontext, AV_LOG_DEBUG, "aac: SBR not yet supported.\n");
@@ -2145,7 +2124,7 @@ static int aac_decode_frame(AVCodecConte
tag = get_bits(&gb, 4);
switch (id) {
case ID_SCE:
- err = single_channel_struct(ac, &gb, tag);
+ err = ac->che_sce[tag] && !individual_channel_stream(ac, &gb, 0, 0, ac->che_sce[tag]) ? 0 : -1;
break;
case ID_CPE:
err = channel_pair_element(ac, &gb, tag);
@@ -2167,7 +2146,7 @@ static int aac_decode_frame(AVCodecConte
err = coupling_channel_element(ac, &gb, tag);
break;
case ID_LFE:
- err = lfe_channel_struct(ac, &gb, tag);
+ err = ac->che_lfe[tag] && !individual_channel_stream(ac, &gb, 0, 0, ac->che_lfe[tag]) ? 0 : -1;
break;
default:
err = -1; /* should not happen, but keeps compiler happy */
More information about the FFmpeg-soc
mailing list