Revision ec62d942

View differences:

libavcodec/bitstream.c
78 78

  
79 79
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
80 80
{
81
    const uint16_t *srcw= (const uint16_t*)src;
82 81
    int words= length>>4;
83 82
    int bits= length&15;
84 83
    int i;
......
86 85
    if(length==0) return;
87 86

  
88 87
    if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
89
        for(i=0; i<words; i++) put_bits(pb, 16, AV_RB16(&srcw[i]));
88
        for(i=0; i<words; i++) put_bits(pb, 16, AV_RB16(src + 2*i));
90 89
    }else{
91 90
        for(i=0; put_bits_count(pb)&31; i++)
92 91
            put_bits(pb, 8, src[i]);
......
95 94
        skip_put_bytes(pb, 2*words-i);
96 95
    }
97 96

  
98
    put_bits(pb, bits, AV_RB16(&srcw[words])>>(16-bits));
97
    put_bits(pb, bits, AV_RB16(src + 2*words)>>(16-bits));
99 98
}
100 99

  
101 100
/* VLC decoding */

Also available in: Unified diff