27 #define BITSTREAM_READER_LE
47 static const uint8_t LUT[256] = {
48 8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
49 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
50 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
51 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
52 7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
53 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
54 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
55 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
59 for (i = 0; i < ctx->
size; i++) {
74 allbits += ctx->
val[i];
90 int i, j, left, left_top;
92 for (i = 0; i <
height; i++) {
93 for (j = 0; j <
width; j++) {
96 int v = (1 << val[j]) +
get_bits(gb, val[j]) - 1;
97 val[j] = (v >> 1) ^ -(v & 1);
102 left_top = dst[-stride];
104 width, &left, &left_top);
107 for (j = 1; j <
width; j++)
108 dst[j] = val[j] + dst[j - 1];
124 int width_uv = avctx->
width / 2, height_uv = avctx->
height / 2;
127 if (avpkt->
size < 4 || avpkt->
size - 4 > INT_MAX/8) {
162 offset += width_uv * height_uv;