[FFmpeg-soc] [soc]: r2403 - aacenc/aacenc.c
kostya
subversion at mplayerhq.hu
Sat Jun 7 15:16:36 CEST 2008
Author: kostya
Date: Sat Jun 7 15:16:36 2008
New Revision: 2403
Log:
Make encoder produce half-correct stereo streams
Modified:
aacenc/aacenc.c
Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c (original)
+++ aacenc/aacenc.c Sat Jun 7 15:16:36 2008
@@ -381,7 +381,7 @@ static int encode_individual_channel(AVC
}
put_bits(&s->pb, 8, s->global_gain); //global gain
- put_ics_info(avctx);
+ if(!common_window) put_ics_info(avctx);
encode_section_data(avctx, s, channel);
encode_scale_factor_data(avctx, s, channel);
put_bits(&s->pb, 1, 0); //pulse
@@ -412,8 +412,14 @@ static int aac_encode_frame(AVCodecConte
case 2:
put_bits(&s->pb, 3, ID_CPE);
put_bits(&s->pb, 4, 0); //tag
- encode_individual_channel(avctx, 0, 1);
- encode_individual_channel(avctx, 1, 1);
+ s->common_window = 1;
+ put_bits(&s->pb, 1, s->common_window);
+ if(s->common_window){
+ put_ics_info(avctx);
+ put_bits(&s->pb, 2, 0); //no MS mode for now
+ }
+ encode_individual_channel(avctx, 0, s->common_window);
+ encode_individual_channel(avctx, 1, s->common_window);
break;
default:
av_log(NULL,0,"?");
More information about the FFmpeg-soc
mailing list