comparison wmadec.c @ 7712:7c22b99dbf5e libavcodec

Fix mid/side stereo buggy output zeroing, fixes issue264 part 2.
author michael
date Thu, 28 Aug 2008 00:46:09 +0000
parents 8226017a65ae
children 04423b2f6e0b
comparison
equal deleted inserted replaced
7711:06340e09c0ba 7712:7c22b99dbf5e
687 687
688 n = s->block_len; 688 n = s->block_len;
689 n4 = s->block_len / 2; 689 n4 = s->block_len / 2;
690 if(s->channel_coded[ch]){ 690 if(s->channel_coded[ch]){
691 ff_imdct_calc(&s->mdct_ctx[bsize], s->output, s->coefs[ch]); 691 ff_imdct_calc(&s->mdct_ctx[bsize], s->output, s->coefs[ch]);
692 }else 692 }else if(!(s->ms_stereo && ch==1))
693 memset(s->output, 0, sizeof(s->output)); 693 memset(s->output, 0, sizeof(s->output));
694 694
695 /* multiply by the window and add in the frame */ 695 /* multiply by the window and add in the frame */
696 index = (s->frame_len / 2) + s->block_pos - n4; 696 index = (s->frame_len / 2) + s->block_pos - n4;
697 wma_window(s, &s->frame_out[ch][index]); 697 wma_window(s, &s->frame_out[ch][index]);
698
699 /* specific fast case for ms-stereo : add to second
700 channel if it is not coded */
701 if (s->ms_stereo && !s->channel_coded[1]) {
702 wma_window(s, &s->frame_out[1][index]);
703 }
704 } 698 }
705 699
706 /* update block number */ 700 /* update block number */
707 s->block_num++; 701 s->block_num++;
708 s->block_pos += s->block_len; 702 s->block_pos += s->block_len;