Mercurial > libavcodec.hg
comparison ac3dec.c @ 7665:762007251900 libavcodec
cosmetics: indentation
author | jbr |
---|---|
date | Sat, 23 Aug 2008 01:55:52 +0000 |
parents | a78c2ebb8149 |
children | ce3402b964cd |
comparison
equal
deleted
inserted
replaced
7664:a78c2ebb8149 | 7665:762007251900 |
---|---|
774 | 774 |
775 /* coupling strategy */ | 775 /* coupling strategy */ |
776 if (get_bits1(gbc)) { | 776 if (get_bits1(gbc)) { |
777 memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); | 777 memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); |
778 if (!s->eac3) | 778 if (!s->eac3) |
779 s->cpl_in_use[blk] = get_bits1(gbc); | 779 s->cpl_in_use[blk] = get_bits1(gbc); |
780 if (s->cpl_in_use[blk]) { | 780 if (s->cpl_in_use[blk]) { |
781 /* coupling in use */ | 781 /* coupling in use */ |
782 int cpl_begin_freq, cpl_end_freq; | 782 int cpl_begin_freq, cpl_end_freq; |
783 | 783 |
784 if (channel_mode < AC3_CHMODE_STEREO) { | 784 if (channel_mode < AC3_CHMODE_STEREO) { |
796 /* determine which channels are coupled */ | 796 /* determine which channels are coupled */ |
797 if (s->eac3 && s->channel_mode == AC3_CHMODE_STEREO) { | 797 if (s->eac3 && s->channel_mode == AC3_CHMODE_STEREO) { |
798 s->channel_in_cpl[1] = 1; | 798 s->channel_in_cpl[1] = 1; |
799 s->channel_in_cpl[2] = 1; | 799 s->channel_in_cpl[2] = 1; |
800 } else { | 800 } else { |
801 for (ch = 1; ch <= fbw_channels; ch++) | 801 for (ch = 1; ch <= fbw_channels; ch++) |
802 s->channel_in_cpl[ch] = get_bits1(gbc); | 802 s->channel_in_cpl[ch] = get_bits1(gbc); |
803 } | 803 } |
804 | 804 |
805 /* phase flags in use */ | 805 /* phase flags in use */ |
806 if (channel_mode == AC3_CHMODE_STEREO) | 806 if (channel_mode == AC3_CHMODE_STEREO) |
807 s->phase_flags_in_use = get_bits1(gbc); | 807 s->phase_flags_in_use = get_bits1(gbc); |
818 s->start_freq[CPL_CH] = cpl_begin_freq * 12 + 37; | 818 s->start_freq[CPL_CH] = cpl_begin_freq * 12 + 37; |
819 s->end_freq[CPL_CH] = cpl_end_freq * 12 + 73; | 819 s->end_freq[CPL_CH] = cpl_end_freq * 12 + 73; |
820 | 820 |
821 /* coupling band structure */ | 821 /* coupling band structure */ |
822 if (!s->eac3 || get_bits1(gbc)) { | 822 if (!s->eac3 || get_bits1(gbc)) { |
823 for (bnd = 0; bnd < s->num_cpl_subbands - 1; bnd++) { | 823 for (bnd = 0; bnd < s->num_cpl_subbands - 1; bnd++) { |
824 s->cpl_band_struct[bnd] = get_bits1(gbc); | 824 s->cpl_band_struct[bnd] = get_bits1(gbc); |
825 } | 825 } |
826 } else if (!blk) { | 826 } else if (!blk) { |
827 } | 827 } |
828 s->cpl_band_struct[s->num_cpl_subbands-1] = 0; | 828 s->cpl_band_struct[s->num_cpl_subbands-1] = 0; |
840 s->first_cpl_leak = 1; | 840 s->first_cpl_leak = 1; |
841 s->phase_flags_in_use = 0; | 841 s->phase_flags_in_use = 0; |
842 } | 842 } |
843 } else if (!s->eac3) { | 843 } else if (!s->eac3) { |
844 if(!blk) { | 844 if(!blk) { |
845 av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must be present in block 0\n"); | 845 av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must be present in block 0\n"); |
846 return -1; | 846 return -1; |
847 } else { | 847 } else { |
848 s->cpl_in_use[blk] = s->cpl_in_use[blk-1]; | 848 s->cpl_in_use[blk] = s->cpl_in_use[blk-1]; |
849 } | 849 } |
850 } | 850 } |
851 cpl_in_use = s->cpl_in_use[blk]; | 851 cpl_in_use = s->cpl_in_use[blk]; |
852 | 852 |
853 /* coupling coordinates */ | 853 /* coupling coordinates */ |
854 if (cpl_in_use) { | 854 if (cpl_in_use) { |