62 3, 4, 19, 20, 35, 36, 51, 52
66 1, 4, 3, 6, 3, 6, 3, 6
70 1, 1, 1, 1, 2, 2, 3, 3
74 4, 5, 5, 4, 5, 4, 6, 4, 5, 6, 4, 4, 4, 4, 4, 2
78 3, 5, 4, 9, 3, 7, 2, 11, 2, 3, 5, 10, 4, 8, 6, 3
82 0, 1, 2, 3, 4, 16, 17, 18, 19, 20, 32, 33, 34, 35, 48, 50, 51, 52
86 1, 3, 3, 5, 6, 4, 7, 7, 8, 9, 4, 7, 7, 8, 6, 8, 7, 9
90 1, 3, 2, 3, 4, 3, 7, 5, 4, 4, 2, 6, 4, 3, 5, 5, 3, 2
94 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0x81, 0x82, 0x83,
95 0x84, 0x85, 0x86, 0x101, 0x102, 0x103, 0x104, 0x181, 0x182, 0x183, 0x201, 0x202,
96 0x203, 0x281, 0x282, 0x283, 0x301, 0x302, 0x303, 0x381, 0x382, 0x401, 0x402,
97 0x481, 0x482, 0x501, 0x502, 0x581, 0x601, 0x681, 0x701, 0x781, 0x801, 0x881,
98 0x901, 0x981, 0xA01, 0xA81, 0xB01, 0xB81, 0xC01, 0xC81, 0xD01, 0x4001, 0x4002,
99 0x4003, 0x4081, 0x4082, 0x4101, 0x4181, 0x4201, 0x4281, 0x4301, 0x4381, 0x4401,
100 0x4481, 0x4501, 0x4581, 0x4601, 0x4681, 0x4701, 0x4781, 0x4801, 0x4881, 0x4901,
101 0x4981, 0x4A01, 0x4A81, 0x4B01, 0x4B81, 0x4C01, 0x4C81, 0x4D01, 0x4D81, 0x4E01,
102 0x4E81, 0x4F01, 0x4F81, 0x5001, 0x5081, 0x5101, 0x5181, 0x5201, 0x5281, 0x5301,
107 7, 2, 4, 6, 7, 8, 9, 9, 10, 10, 11, 11, 11, 3, 6, 8, 10, 11, 12, 4, 8,
108 10, 12, 5, 9, 10, 5, 9, 12, 5, 10, 12, 6, 10, 12, 6, 10, 6, 10, 6,
109 10, 7, 12, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 12, 12, 4, 9,
110 11, 6, 11, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,
111 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12,
116 3, 2, 15, 21, 23, 31, 37, 36, 33, 32, 7, 6, 32, 6, 20, 30, 15, 33, 80,
117 14, 29, 14, 81, 13, 35, 13, 12, 34, 82, 11, 12, 83, 19, 11, 84, 18,
118 10, 17, 9, 16, 8, 22, 85, 21, 20, 28, 27, 33, 32, 31, 30, 29, 28,
119 27, 26, 34, 35, 86, 87, 7, 25, 5, 15, 4, 14, 13, 12, 19, 18, 17, 16,
120 26, 25, 24, 23, 22, 21, 20, 19, 24, 23, 22, 21, 20, 19, 18, 17, 7,
121 6, 5, 4, 36, 37, 38, 39, 88, 89, 90, 91, 92, 93, 94, 95
144 const uint8_t *scantable =
s->intra_scantable.permutated;
145 int i, last,
len, factor2;
158 factor2 =
value & 0x7F;
159 last = (
value >> 14) & 1;
172 if (
s->hi == 2 && flag2 &&
block < 4) {
174 s->block[
block][scantable[0]] *= 2;
175 s->block[
block][scantable[1]] *= 2;
176 s->block[
block][scantable[8]] *= 2;
177 s->block[
block][scantable[16]] *= 2;
184 unsigned cbp,
int flag,
int offset,
unsigned flag2)
187 const uint8_t *scantable =
s->intra_scantable.permutated;
190 memset(
s->block, 0,
sizeof(
s->block));
192 for (
i = 0;
i < 6;
i++) {
200 s->block[
i][scantable[0]] = x;
203 if (cbp & (1 << (5 -
i))) {
223 s->factor =
s->lo * 2;
233 for (y = 0; y < avctx->
height; y += 16) {
234 for (x = 0; x < avctx->
width; x += 16) {
235 unsigned flag, cbphi, cbplo;
246 s->idsp.idct_put(
frame->data[0] + y *
frame->linesize[0] + x,
247 frame->linesize[0],
s->block[0]);
248 s->idsp.idct_put(
frame->data[0] + y *
frame->linesize[0] + x + 8,
249 frame->linesize[0],
s->block[1]);
250 s->idsp.idct_put(
frame->data[0] + (y + 8) *
frame->linesize[0] + x,
251 frame->linesize[0],
s->block[2]);
252 s->idsp.idct_put(
frame->data[0] + (y + 8) *
frame->linesize[0] + x + 8,
253 frame->linesize[0],
s->block[3]);
254 s->idsp.idct_put(
frame->data[1] + (y >> 1) *
frame->linesize[1] + (x >> 1),
255 frame->linesize[1],
s->block[4]);
256 s->idsp.idct_put(
frame->data[2] + (y >> 1) *
frame->linesize[2] + (x >> 1),
257 frame->linesize[2],
s->block[5]);
275 s->factor =
s->lo * 2;
285 for (y = 0; y < avctx->
height; y += 16) {
286 for (x = 0; x < avctx->
width; x += 16) {
288 unsigned cbphi, cbplo, flag2 = 0;
295 prev->
data[1] + (y >> 1) * prev->
linesize[1] + (x >> 1),
298 prev->
data[2] + (y >> 1) * prev->
linesize[2] + (x >> 1),
307 intra_block =
value & 0x07;
319 s->idsp.idct_put(
frame->data[0] + y *
frame->linesize[0] + x,
320 frame->linesize[0],
s->block[0]);
321 s->idsp.idct_put(
frame->data[0] + y *
frame->linesize[0] + x + 8,
322 frame->linesize[0],
s->block[1]);
323 s->idsp.idct_put(
frame->data[0] + (y + 8) *
frame->linesize[0] + x,
324 frame->linesize[0],
s->block[2]);
325 s->idsp.idct_put(
frame->data[0] + (y + 8) *
frame->linesize[0] + x + 8,
326 frame->linesize[0],
s->block[3]);
327 s->idsp.idct_put(
frame->data[1] + (y >> 1) *
frame->linesize[1] + (x >> 1),
328 frame->linesize[1],
s->block[4]);
329 s->idsp.idct_put(
frame->data[2] + (y >> 1) *
frame->linesize[2] + (x >> 1),
330 frame->linesize[2],
s->block[5]);
342 prev->
data[1] + (y >> 1) * prev->
linesize[1] + (x >> 1),
345 prev->
data[2] + (y >> 1) * prev->
linesize[2] + (x >> 1),
348 s->idsp.idct_add(
frame->data[0] + y *
frame->linesize[0] + x,
349 frame->linesize[0],
s->block[0]);
350 s->idsp.idct_add(
frame->data[0] + y *
frame->linesize[0] + x + 8,
351 frame->linesize[0],
s->block[1]);
352 s->idsp.idct_add(
frame->data[0] + (y + 8) *
frame->linesize[0] + x,
353 frame->linesize[0],
s->block[2]);
354 s->idsp.idct_add(
frame->data[0] + (y + 8) *
frame->linesize[0] + x + 8,
355 frame->linesize[0],
s->block[3]);
356 s->idsp.idct_add(
frame->data[1] + (y >> 1) *
frame->linesize[1] + (x >> 1),
357 frame->linesize[1],
s->block[4]);
358 s->idsp.idct_add(
frame->data[2] + (y >> 1) *
frame->linesize[2] + (x >> 1),
359 frame->linesize[2],
s->block[5]);
377 if (avpkt->
size <= 32)
385 s->bdsp.bswap_buf((uint32_t *)
s->bitstream,
386 (uint32_t *)avpkt->
data,
387 (avpkt->
size + 3) >> 2);
398 scaled = avpkt->
data[8];
437 frame->key_frame = 1;
441 frame->key_frame = 0;
451 if (!
frame->key_frame) {
465 if (
frame->key_frame) {
474 if (!
s->prev_frame->data[0]) {
510 for (
int i = 0;
i < 64;
i++)
539 s->bitstream_size = 0;