Revision f5cefb21 libavcodec/ac3dec.c

View differences:

libavcodec/ac3dec.c
129 129
typedef struct {
130 130
    int acmod;
131 131
    int dsurmod;
132

  
133 132
    int blksw[AC3_MAX_CHANNELS];
134 133
    int dithflag[AC3_MAX_CHANNELS];
135 134
    int dither_all;
......
199 198
    AVCodecContext *avctx;      ///< parent context
200 199
} AC3DecodeContext;
201 200

  
202
/*********** BEGIN INIT HELPER FUNCTIONS ***********/
203 201
/**
204 202
 * Generate a Kaiser-Bessel Derived Window.
205 203
 */
......
318 316

  
319 317
    return 0;
320 318
}
321
/*********** END INIT FUNCTIONS ***********/
322 319

  
323 320
/**
324 321
 * Parses the 'sync info' and 'bit stream info' from the AC-3 bitstream.
......
506 503
    start = ctx->startmant[ch_index];
507 504
    end = ctx->endmant[ch_index];
508 505

  
509

  
510 506
    for (i = start; i < end; i++) {
511 507
        tbap = bap[i];
512 508
        switch (tbap) {
......
955 951
            }
956 952
            bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2);
957 953
        }
958

  
959 954
        for (ch = !ctx->cplinu; ch <= nfchans; ch++) {
960 955
            if (ctx->deltbae[ch] == DBA_NEW) {/*channel delta offset, len and bit allocation */
961 956
                ctx->deltnseg[ch] = get_bits(gb, 3);
......
1004 999
        while(skipl--)
1005 1000
            skip_bits(gb, 8);
1006 1001
    }
1002

  
1007 1003
    /* unpack the transform coefficients
1008 1004
     * * this also uncouples channels if coupling is in use.
1009 1005
     */
......
1096 1092
    }
1097 1093
    ctx->out_channels = avctx->channels;
1098 1094

  
1099
    //av_log(avctx, AV_LOG_INFO, "channels = %d \t bit rate = %d \t sampling rate = %d \n", avctx->channels, avctx->bit_rate * 1000, avctx->sample_rate);
1100

  
1101 1095
    //Parse the Audio Blocks.
1102 1096
    for (blk = 0; blk < NB_BLOCKS; blk++) {
1103 1097
        if (ac3_parse_audio_block(ctx, blk)) {
......
1133 1127
    .close = ac3_decode_end,
1134 1128
    .decode = ac3_decode_frame,
1135 1129
};
1136

  

Also available in: Unified diff