Revision a9f87158 libavcodec/dca.c

View differences:

libavcodec/dca.c
453 453
    }
454 454

  
455 455
    for (j = 0; j < s->prim_channels; j++) {
456
        uint32_t *scale_table;
456
        const uint32_t *scale_table;
457 457
        int scale_sum;
458 458

  
459 459
        memset(s->scale_factor[j], 0, s->subband_activity[j] * sizeof(s->scale_factor[0][0][0]) * 2);
460 460

  
461 461
        if (s->scalefactor_huffman[j] == 6)
462
            scale_table = (uint32_t *) scale_factor_quant7;
462
            scale_table = scale_factor_quant7;
463 463
        else
464
            scale_table = (uint32_t *) scale_factor_quant6;
464
            scale_table = scale_factor_quant6;
465 465

  
466 466
        /* When huffman coded, only the difference is encoded */
467 467
        scale_sum = 0;
......
842 842
    int k, l;
843 843
    int subsubframe = s->current_subsubframe;
844 844

  
845
    float *quant_step_table;
845
    const float *quant_step_table;
846 846

  
847 847
    /* FIXME */
848 848
    float subband_samples[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];
......
853 853

  
854 854
    /* Select quantization step size table */
855 855
    if (s->bit_rate == 0x1f)
856
        quant_step_table = (float *) lossless_quant_d;
856
        quant_step_table = lossless_quant_d;
857 857
    else
858
        quant_step_table = (float *) lossy_quant_d;
858
        quant_step_table = lossy_quant_d;
859 859

  
860 860
    for (k = 0; k < s->prim_channels; k++) {
861 861
        for (l = 0; l < s->vq_start_subband[k]; l++) {
......
1091 1091
/**
1092 1092
 * Convert bitstream to one representation based on sync marker
1093 1093
 */
1094
static int dca_convert_bitstream(uint8_t * src, int src_size, uint8_t * dst,
1094
static int dca_convert_bitstream(const uint8_t * src, int src_size, uint8_t * dst,
1095 1095
                          int max_size)
1096 1096
{
1097 1097
    uint32_t mrk;
1098 1098
    int i, tmp;
1099
    uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst;
1099
    const uint16_t *ssrc = (const uint16_t *) src;
1100
    uint16_t *sdst = (uint16_t *) dst;
1100 1101
    PutBitContext pb;
1101 1102

  
1102 1103
    if((unsigned)src_size > (unsigned)max_size) {
......
1133 1134
 */
1134 1135
static int dca_decode_frame(AVCodecContext * avctx,
1135 1136
                            void *data, int *data_size,
1136
                            uint8_t * buf, int buf_size)
1137
                            const uint8_t * buf, int buf_size)
1137 1138
{
1138 1139

  
1139 1140
    int i, j, k;

Also available in: Unified diff