Revision 4d7a4215

View differences:

libavcodec/ac3enc.c
838 838
        if (!blk)
839 839
            frame_bits++;
840 840

  
841
        /* stereo rematrixing */
842
        if (s->channel_mode == AC3_CHMODE_STEREO)
843
            frame_bits++;
844

  
845 841
        /* exponent strategy */
846 842
        frame_bits += 2 * s->fbw_channels;
847 843
        if (s->lfe_on)
......
931 927
    /* audio blocks */
932 928
    for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
933 929
        /* stereo rematrixing */
934
        if (s->channel_mode == AC3_CHMODE_STEREO &&
935
            s->blocks[blk].new_rematrixing_strategy) {
936
            frame_bits += s->num_rematrixing_bands;
930
        if (s->channel_mode == AC3_CHMODE_STEREO) {
931
            frame_bits++;
932
            if (s->blocks[blk].new_rematrixing_strategy)
933
                frame_bits += s->num_rematrixing_bands;
937 934
        }
938 935

  
939 936
        /* bandwidth codes & gain range */

Also available in: Unified diff