32 #define BITSTREAM_READER_LE
66 for (i = 1; i < 64;) {
78 for (j = 0; j <
value; j++)
83 block[perm[i]] = -s->
qtable[perm[i]];
88 block[perm[i]] = s->
qtable[perm[i]];
104 block[0] += 128 << 4;
111 uint8_t *dest_y = frame->
data[0] + (mb_y * 16 * linesize) + mb_x * 16;
126 int dst_stride,
int dc)
128 int level = av_clip_uint8((dc*s->
qtable[0] + 2056) >> 4);
130 for (j = 0; j < 8; j++)
131 memset(dst + j * dst_stride, level, 8);
135 int mb_x,
int mb_y,
const int8_t *
dc)
138 uint8_t *dest_y = frame->
data[0] + (mb_y * 16 * linesize) + mb_x * 16;
143 tgq_dconly(s, dest_y + 8 * linesize, linesize, dc[2]);
144 tgq_dconly(s, dest_y + 8 * linesize + 8, linesize, dc[3]);
157 mode = bytestream2_get_byte(&s->
gb);
161 for (i = 0; i < 6; i++)
167 memset(dc, bytestream2_get_byte(&s->
gb), 4);
168 dc[4] = bytestream2_get_byte(&s->
gb);
169 dc[5] = bytestream2_get_byte(&s->
gb);
170 }
else if (mode == 6) {
172 }
else if (mode == 12) {
173 for (i = 0; i < 6; i++) {
174 dc[i] = bytestream2_get_byte(&s->
gb);
189 const int a = (14 * (100 -
quant)) / 100 + 1;
190 const int b = (11 * (100 -
quant)) / 100 + 4;
191 for (j = 0; j < 8; j++)
192 for (i = 0; i < 8; i++)
193 s->
qtable[j * 8 + i] = ((a * (j + i) / (7 + 7) + b) *
198 void *
data,
int *got_frame,
202 int buf_size = avpkt->
size;
212 big_endian =
AV_RL32(&buf[4]) > 0x000FFFFF;
215 s->
width = bytestream2_get_be16u(&s->
gb);
216 s->
height = bytestream2_get_be16u(&s->
gb);
218 s->
width = bytestream2_get_le16u(&s->
gb);
219 s->
height = bytestream2_get_le16u(&s->
gb);