43 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
46 dst_a = (uint16_t *)p->
data[3];
47 dst_y = (uint16_t *)p->
data[0];
48 dst_u = (uint16_t *)p->
data[1];
49 dst_v = (uint16_t *)p->
data[2];
51 for (y = 0; y < avctx->
height; y++) {
53 for (x = 0; x < avctx->
width; x++) {
60 int pred[4] = { 502, 512, 512, 502 };
62 for (x = 0; x < avctx->
width; x++) {
65 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
66 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
67 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
68 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
70 dst_a[x] =
pred[3] = (
a +
pred[3]) & 0x3ff;
71 dst_y[x] =
pred[0] = (y +
pred[0]) & 0x3ff;
72 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0x3ff;
73 dst_v[x] =
pred[2] = (v +
pred[2]) & 0x3ff;
87 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
90 dst_a = (uint16_t *)p->
data[3];
91 dst_y = (uint16_t *)p->
data[0];
92 dst_u = (uint16_t *)p->
data[1];
93 dst_v = (uint16_t *)p->
data[2];
96 for (x = 0; x < avctx->
width; x++) {
103 int pred[4] = { 502, 512, 512, 502 };
105 for (x = 0; x < avctx->
width; x++) {
108 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
109 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
110 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
111 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
113 dst_a[x] =
pred[3] = (
a +
pred[3]) & 0x3ff;
114 dst_y[x] =
pred[0] = (y +
pred[0]) & 0x3ff;
115 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0x3ff;
116 dst_v[x] =
pred[2] = (v +
pred[2]) & 0x3ff;
125 for (y = 1; y < avctx->
height; y++) {
127 for (x = 0; x < avctx->
width; x++) {
134 int pred_TL[4], pred_L[4], pred_T[4];
137 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
138 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
139 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
140 pred_TL[3] = pred_L[3] = dst_a[-p->
linesize[3] / 2];
142 for (x = 0; x < avctx->
width; x++) {
143 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
144 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x];
145 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x];
146 pred_T[3] = dst_a[-p->
linesize[3] / 2 + x];
148 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
149 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
150 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
151 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
153 dst_a[x] = pred_L[3] = (
a + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0x3ff;
154 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
155 dst_u[x] = pred_L[1] = (
u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
156 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
158 pred_TL[0] = pred_T[0];
159 pred_TL[1] = pred_T[1];
160 pred_TL[2] = pred_T[2];
161 pred_TL[3] = pred_T[3];
175 uint16_t *dst_y, *dst_u, *dst_v;
178 dst_y = (uint16_t *)p->
data[0];
179 dst_u = (uint16_t *)p->
data[1];
180 dst_v = (uint16_t *)p->
data[2];
184 for (x = 0; x < avctx->
width; x++) {
190 int pred[4] = { 502, 512, 512, 512 };
192 for (x = 0; x < avctx->
width; x++) {
195 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
196 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
197 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
199 dst_y[x] =
pred[0] = (y +
pred[0]) & 0x3ff;
200 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0x3ff;
201 dst_v[x] =
pred[2] = (v +
pred[2]) & 0x3ff;
214 uint16_t *dst_y, *dst_u, *dst_v;
217 dst_y = (uint16_t *)p->
data[0];
218 dst_u = (uint16_t *)p->
data[1];
219 dst_v = (uint16_t *)p->
data[2];
222 for (x = 0; x < avctx->
width; x++) {
228 int pred[4] = { 502, 512, 512, 512 };
230 for (x = 0; x < avctx->
width; x++) {
233 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
234 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
235 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
237 dst_y[x] =
pred[0] = (y +
pred[0]) & 0x3ff;
238 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0x3ff;
239 dst_v[x] =
pred[2] = (v +
pred[2]) & 0x3ff;
247 for (y = 1; y < avctx->
height; y++) {
249 for (x = 0; x < avctx->
width; x++) {
255 int pred_TL[4], pred_L[4], pred_T[4];
258 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
259 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
260 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
262 for (x = 0; x < avctx->
width; x++) {
263 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
264 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x];
265 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x];
267 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
268 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
269 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
271 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
272 dst_u[x] = pred_L[1] = (
u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
273 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
275 pred_TL[0] = pred_T[0];
276 pred_TL[1] = pred_T[1];
277 pred_TL[2] = pred_T[2];
290 uint16_t *dst_y, *dst_u, *dst_v;
293 dst_y = (uint16_t *)p->
data[0];
294 dst_u = (uint16_t *)p->
data[1];
295 dst_v = (uint16_t *)p->
data[2];
299 for (x = 0; x < avctx->
width; x += 2) {
306 int pred[4] = { 502, 512, 512, 0 };
308 for (x = 0; x < avctx->
width; x += 2) {
311 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
312 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
313 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
314 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
316 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0x3ff;
317 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0x3ff;
318 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0x3ff;
319 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0x3ff;
332 uint16_t *dst_y, *dst_u, *dst_v;
335 dst_y = (uint16_t *)p->
data[0];
336 dst_u = (uint16_t *)p->
data[1];
337 dst_v = (uint16_t *)p->
data[2];
340 for (x = 0; x < avctx->
width; x += 2) {
347 int pred[4] = { 502, 512, 512, 0 };
349 for (x = 0; x < avctx->
width; x += 2) {
352 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
353 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
354 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
355 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
357 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0x3ff;
358 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0x3ff;
359 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0x3ff;
360 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0x3ff;
368 for (y = 1; y < avctx->
height; y++) {
370 for (x = 0; x < avctx->
width; x += 2) {
377 int pred_TL[6], pred_L[6], pred_T[6];
380 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
381 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
382 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
384 for (x = 0; x < avctx->
width; x += 2) {
385 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
386 pred_T[3] = dst_y[-p->
linesize[0] / 2 + x + 1];
387 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x / 2];
388 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x / 2];
390 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
391 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
392 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
393 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
395 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
396 dst_u[x / 2] = pred_L[1] = (
u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0x3ff;
397 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0x3ff;
398 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0x3ff;
400 pred_TL[0] = pred_T[3];
401 pred_TL[1] = pred_T[1];
402 pred_TL[2] = pred_T[2];
415 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
418 dst_y = (uint16_t *)p->
data[0];
419 dst_u = (uint16_t *)p->
data[1];
420 dst_v = (uint16_t *)p->
data[2];
421 dst_a = (uint16_t *)p->
data[3];
423 for (y = 0; y < avctx->
height; y++) {
425 for (x = 0; x < avctx->
width; x += 2) {
434 int pred[4] = { 502, 512, 512, 502 };
436 for (x = 0; x < avctx->
width; x += 2) {
437 int y1, y2,
u, v,
a1,
a2;
440 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
441 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
443 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
444 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
446 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0x3ff;
447 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0x3ff;
448 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0x3ff;
450 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0x3ff;
451 dst_a[x + 1] =
pred[3] = (
a2 +
pred[3]) & 0x3ff;
465 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
468 dst_y = (uint16_t *)p->
data[0];
469 dst_u = (uint16_t *)p->
data[1];
470 dst_v = (uint16_t *)p->
data[2];
471 dst_a = (uint16_t *)p->
data[3];
474 for (x = 0; x < avctx->
width; x += 2) {
483 int pred[4] = { 502, 512, 512, 502 };
485 for (x = 0; x < avctx->
width; x += 2) {
486 int y1, y2,
u, v,
a1,
a2;
489 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
490 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
492 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
493 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
495 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0x3ff;
496 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0x3ff;
497 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0x3ff;
499 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0x3ff;
500 dst_a[x + 1] =
pred[3] = (
a2 +
pred[3]) & 0x3ff;
509 for (y = 1; y < avctx->
height; y++) {
511 for (x = 0; x < avctx->
width; x += 2) {
520 int pred_TL[6], pred_L[6], pred_T[6];
521 int y1, y2,
u, v,
a1,
a2;
523 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
524 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
525 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
526 pred_TL[4] = pred_L[4] = dst_a[-p->
linesize[3] / 2];
528 for (x = 0; x < avctx->
width; x += 2) {
529 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
530 pred_T[3] = dst_y[-p->
linesize[0] / 2 + x + 1];
531 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x / 2];
532 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x / 2];
533 pred_T[4] = dst_a[-p->
linesize[3] / 2 + x];
534 pred_T[5] = dst_a[-p->
linesize[3] / 2 + x + 1];
537 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
538 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
540 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
541 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
543 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
544 dst_u[x / 2] = pred_L[1] = (
u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0x3ff;
545 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0x3ff;
546 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0x3ff;
547 dst_a[x ] = pred_L[4] = (
a1 + ((3 * (pred_T[4] + pred_L[4]) - 2 * pred_TL[4]) >> 2)) & 0x3ff;
548 dst_a[x + 1] = pred_L[4] = (
a2 + ((3 * (pred_T[5] + pred_L[4]) - 2 * pred_T[4]) >> 2)) & 0x3ff;
550 pred_TL[0] = pred_T[3];
551 pred_TL[1] = pred_T[1];
552 pred_TL[2] = pred_T[2];
553 pred_TL[4] = pred_T[5];
567 uint8_t *dst_y, *dst_u, *dst_v, *dst_a;
575 for (y = 0; y < avctx->
height; y += 1) {
577 for (x = 0; x < avctx->
width; x += 2) {
586 int pred[4] = { 125, -128, -128, 125 };
588 for (x = 0; x < avctx->
width; x += 2) {
589 int y1, y2,
u, v,
a1,
a2;
592 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
593 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
595 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
596 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
598 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0xff;
599 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0xff;
600 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0xff;
601 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0xff;
603 dst_a[x + 1] =
pred[3] = (
a2 +
pred[3]) & 0xff;
617 uint8_t *dst_y, *dst_u, *dst_v, *dst_a;
626 for (x = 0; x < avctx->
width; x += 2) {
635 int pred[4] = { 125, -128, -128, 125 };
637 for (x = 0; x < avctx->
width; x += 2) {
638 int y1, y2,
u, v,
a1,
a2;
641 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
642 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
644 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
645 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
647 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0xff;
648 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0xff;
649 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0xff;
651 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0xff;
652 dst_a[x + 1] =
pred[3] = (
a2 +
pred[3]) & 0xff;
661 for (y = 1; y < avctx->
height; y++) {
663 for (x = 0; x < avctx->
width; x += 2) {
672 int pred_TL[6], pred_L[6], pred_T[6];
673 int y1, y2,
u, v,
a1,
a2;
675 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
676 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
677 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
678 pred_TL[4] = pred_L[4] = dst_a[-p->
linesize[3]];
680 for (x = 0; x < avctx->
width; x += 2) {
681 pred_T[0] = dst_y[-p->
linesize[0] + x];
682 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
683 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
684 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
685 pred_T[4] = dst_a[-p->
linesize[3] + x];
686 pred_T[5] = dst_a[-p->
linesize[3] + x + 1];
689 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
690 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
692 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
693 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
695 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
696 dst_u[x / 2] = pred_L[1] = (
u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
697 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
698 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
699 dst_a[x ] = pred_L[4] = (
a1 + ((3 * (pred_T[4] + pred_L[4]) - 2 * pred_TL[4]) >> 2)) & 0xff;
700 dst_a[x + 1] = pred_L[4] = (
a2 + ((3 * (pred_T[5] + pred_L[4]) - 2 * pred_T[4]) >> 2)) & 0xff;
702 pred_TL[0] = pred_T[3];
703 pred_TL[1] = pred_T[1];
704 pred_TL[2] = pred_T[2];
705 pred_TL[4] = pred_T[5];
719 uint8_t *dst_y, *dst_u, *dst_v;
727 for (x = 0; x < avctx->
width; x += 2) {
729 dst_u[x / 2] =
get_bits(gb, 8) + 128;
731 dst_v[x / 2] =
get_bits(gb, 8) + 128;
734 int pred[4] = { -128, 128, 128, 0 };
736 for (x = 0; x < avctx->
width; x += 2) {
739 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
740 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
741 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
742 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
744 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0xff;
745 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0xff;
746 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0xff;
747 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0xff;
755 for (y = 1; y < avctx->
height; y++) {
757 for (x = 0; x < avctx->
width; x += 2) {
759 dst_u[x / 2] =
get_bits(gb, 8) + 128;
761 dst_v[x / 2] =
get_bits(gb, 8) + 128;
764 int pred_TL[4], pred_L[4], pred_T[4];
767 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
768 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
769 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
771 for (x = 0; x < avctx->
width; x += 2) {
772 pred_T[0] = dst_y[-p->
linesize[0] + x];
773 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
774 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
775 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
777 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
778 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
779 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
780 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
782 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
783 dst_u[x / 2] = pred_L[1] = (
u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
784 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
785 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
787 pred_TL[0] = pred_T[3];
788 pred_TL[1] = pred_T[1];
789 pred_TL[2] = pred_T[2];
802 uint8_t *dst_y, *dst_u, *dst_v;
810 for (x = 0; x < avctx->
width; x += 2) {
817 int pred[4] = { 125, -128, -128, 0 };
819 for (x = 0; x < avctx->
width; x += 2) {
822 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
823 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
824 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
825 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
827 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0xff;
828 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0xff;
829 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0xff;
830 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0xff;
838 for (y = 1; y < avctx->
height; y++) {
840 for (x = 0; x < avctx->
width; x += 2) {
854 for (x = 0; x < avctx->
width; x += 2) {
855 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
856 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
857 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
858 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
860 dst_y[x ] = pred_L[0] = (y1 + pred_L[0]) & 0xff;
861 dst_u[x / 2] = pred_L[1] = (
u + pred_L[1]) & 0xff;
862 dst_y[x + 1] = pred_L[0] = (y2 + pred_L[0]) & 0xff;
863 dst_v[x / 2] = pred_L[2] = (v + pred_L[2]) & 0xff;
876 uint8_t *dst_y, *dst_u, *dst_v;
884 for (x = 0; x < avctx->
width; x += 2) {
891 int pred[4] = { 125, -128, -128, 0 };
893 for (x = 0; x < avctx->
width; x += 2) {
896 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
897 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
898 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
899 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
901 dst_y[x ] =
pred[0] = (y1 +
pred[0]) & 0xff;
902 dst_u[x / 2] =
pred[1] = (
u +
pred[1]) & 0xff;
903 dst_y[x + 1] =
pred[0] = (y2 +
pred[0]) & 0xff;
904 dst_v[x / 2] =
pred[2] = (v +
pred[2]) & 0xff;
912 for (y = 1; y < avctx->
height; y++) {
914 for (x = 0; x < avctx->
width; x += 2) {
921 int pred_TL[4], pred_L[4], pred_T[4];
924 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
925 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
926 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
928 for (x = 0; x < avctx->
width; x += 2) {
929 pred_T[0] = dst_y[-p->
linesize[0] + x];
930 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
931 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
932 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
934 y1 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
935 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
936 y2 =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
937 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
939 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
940 dst_u[x / 2] = pred_L[1] = (
u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
941 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
942 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
944 pred_TL[0] = pred_T[3];
945 pred_TL[1] = pred_T[1];
946 pred_TL[2] = pred_T[2];
959 uint8_t *dst_y, *dst_u, *dst_v;
967 for (x = 0; x < avctx->
width; x++) {
973 int pred[4] = {
s->alt ? 125 : -146, -128, -128, -128 };
975 for (x = 0; x < avctx->
width; x++) {
978 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
979 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
980 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
982 dst_y[x] =
pred[0] = (y +
pred[0]) & 0xff;
983 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0xff;
984 dst_v[x] =
pred[2] = (v +
pred[2]) & 0xff;
992 for (y = 1; y < avctx->
height; y++) {
994 for (x = 0; x < avctx->
width; x++) {
1003 pred_L[0] = dst_y[-p->
linesize[0]];
1004 pred_L[1] = dst_u[-p->
linesize[1]];
1005 pred_L[2] = dst_v[-p->
linesize[2]];
1007 for (x = 0; x < avctx->
width; x++) {
1008 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1009 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1010 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1012 dst_y[x] = pred_L[0] = (y + pred_L[0]) & 0xff;
1013 dst_u[x] = pred_L[1] = (
u + pred_L[1]) & 0xff;
1014 dst_v[x] = pred_L[2] = (v + pred_L[2]) & 0xff;
1027 uint8_t *dst_y, *dst_u, *dst_v;
1035 for (x = 0; x < avctx->
width; x++) {
1041 int pred[4] = {
s->alt ? 125 : -146, -128, -128, -128 };
1043 for (x = 0; x < avctx->
width; x++) {
1046 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1047 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1048 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1050 dst_y[x] =
pred[0] = (y +
pred[0]) & 0xff;
1051 dst_u[x] =
pred[1] = (
u +
pred[1]) & 0xff;
1052 dst_v[x] =
pred[2] = (v +
pred[2]) & 0xff;
1060 for (y = 1; y < avctx->
height; y++) {
1062 for (x = 0; x < avctx->
width; x++) {
1068 int pred_TL[4], pred_L[4], pred_T[4];
1071 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
1072 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
1073 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
1075 for (x = 0; x < avctx->
width; x++) {
1076 pred_T[0] = dst_y[-p->
linesize[0] + x];
1077 pred_T[1] = dst_u[-p->
linesize[1] + x];
1078 pred_T[2] = dst_v[-p->
linesize[2] + x];
1080 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1081 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1082 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1084 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1085 dst_u[x] = pred_L[1] = (
u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1086 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1088 pred_TL[0] = pred_T[0];
1089 pred_TL[1] = pred_T[1];
1090 pred_TL[2] = pred_T[2];
1103 uint8_t *dst_a, *dst_y, *dst_u, *dst_v;
1112 for (x = 0; x < avctx->
width; x++) {
1119 int pred[4] = { 125,
s->alt ? 125 : -146, -128, -128 };
1121 for (x = 0; x < avctx->
width; x++) {
1124 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1125 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1126 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1127 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1129 dst_a[x] =
pred[0] = (
a +
pred[0]) & 0xff;
1130 dst_y[x] =
pred[1] = (y +
pred[1]) & 0xff;
1131 dst_u[x] =
pred[2] = (
u +
pred[2]) & 0xff;
1132 dst_v[x] =
pred[3] = (v +
pred[3]) & 0xff;
1141 for (y = 1; y < avctx->
height; y++) {
1143 for (x = 0; x < avctx->
width; x++) {
1153 pred_L[0] = dst_a[-p->
linesize[3]];
1154 pred_L[1] = dst_y[-p->
linesize[0]];
1155 pred_L[2] = dst_u[-p->
linesize[1]];
1156 pred_L[3] = dst_v[-p->
linesize[2]];
1158 for (x = 0; x < avctx->
width; x++) {
1159 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1160 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1161 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1162 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1164 dst_a[x] = pred_L[0] = (
a + pred_L[0]) & 0xff;
1165 dst_y[x] = pred_L[1] = (y + pred_L[1]) & 0xff;
1166 dst_u[x] = pred_L[2] = (
u + pred_L[2]) & 0xff;
1167 dst_v[x] = pred_L[3] = (v + pred_L[3]) & 0xff;
1181 uint8_t *dst_a, *dst_y, *dst_u, *dst_v;
1190 for (x = 0; x < avctx->
width; x++) {
1197 int pred[4] = { 125,
s->alt ? 125 : -146, -128, -128 };
1199 for (x = 0; x < avctx->
width; x++) {
1202 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1203 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1204 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1205 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1207 dst_a[x] =
pred[0] = (
a +
pred[0]) & 0xff;
1208 dst_y[x] =
pred[1] = (y +
pred[1]) & 0xff;
1209 dst_u[x] =
pred[2] = (
u +
pred[2]) & 0xff;
1210 dst_v[x] =
pred[3] = (v +
pred[3]) & 0xff;
1219 for (y = 1; y < avctx->
height; y++) {
1221 for (x = 0; x < avctx->
width; x++) {
1228 int pred_TL[4], pred_L[4], pred_T[4];
1231 pred_TL[0] = pred_L[0] = dst_a[-p->
linesize[3]];
1232 pred_TL[1] = pred_L[1] = dst_y[-p->
linesize[0]];
1233 pred_TL[2] = pred_L[2] = dst_u[-p->
linesize[1]];
1234 pred_TL[3] = pred_L[3] = dst_v[-p->
linesize[2]];
1236 for (x = 0; x < avctx->
width; x++) {
1237 pred_T[0] = dst_a[-p->
linesize[3] + x];
1238 pred_T[1] = dst_y[-p->
linesize[0] + x];
1239 pred_T[2] = dst_u[-p->
linesize[1] + x];
1240 pred_T[3] = dst_v[-p->
linesize[2] + x];
1242 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1243 y =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1244 u =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1245 v =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1247 dst_a[x] = pred_L[0] = (
a + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1248 dst_y[x] = pred_L[1] = (y + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1249 dst_u[x] = pred_L[2] = (
u + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1250 dst_v[x] = pred_L[3] = (v + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0xff;
1252 pred_TL[0] = pred_T[0];
1253 pred_TL[1] = pred_T[1];
1254 pred_TL[2] = pred_T[2];
1255 pred_TL[3] = pred_T[3];
1269 uint16_t *dst_r, *dst_g, *dst_b, *dst_a;
1272 dst_r = (uint16_t *)p->
data[2];
1273 dst_g = (uint16_t *)p->
data[0];
1274 dst_b = (uint16_t *)p->
data[1];
1275 dst_a = (uint16_t *)p->
data[3];
1277 for (y = 0; y < avctx->
height; y++) {
1279 for (x = 0; x < avctx->
width; x++) {
1286 int pred[4] = { 512, 512, 512, 512 };
1288 for (x = 0; x < avctx->
width; x++) {
1291 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1292 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1293 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1294 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1296 dst_a[x] =
pred[3] = (
a +
pred[3]) & 0x3ff;
1297 dst_r[x] =
pred[0] = (
r +
pred[0]) & 0x3ff;
1298 dst_g[x] =
pred[1] = (
r +
g +
pred[1]) & 0x3ff;
1299 dst_b[x] =
pred[2] = (
r +
g +
b +
pred[2]) & 0x3ff;
1313 uint16_t *dst_r, *dst_g, *dst_b, *dst_a;
1316 dst_r = (uint16_t *)p->
data[2];
1317 dst_g = (uint16_t *)p->
data[0];
1318 dst_b = (uint16_t *)p->
data[1];
1319 dst_a = (uint16_t *)p->
data[3];
1322 for (x = 0; x < avctx->
width; x++) {
1329 int pred[4] = { 512, 512, 512, 512 };
1331 for (x = 0; x < avctx->
width; x++) {
1334 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1335 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1336 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1337 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1339 dst_a[x] =
pred[3] = (
a +
pred[3]) & 0x3ff;
1340 dst_r[x] =
pred[0] = (
r +
pred[0]) & 0x3ff;
1341 dst_g[x] =
pred[1] = (
r +
g +
pred[1]) & 0x3ff;
1342 dst_b[x] =
pred[2] = (
r +
g +
b +
pred[2]) & 0x3ff;
1351 for (y = 1; y < avctx->
height; y++) {
1353 for (x = 0; x < avctx->
width; x++) {
1360 int pred_TL[4], pred_L[4], pred_T[4];
1363 pred_TL[0] = pred_L[0] = dst_r[-p->
linesize[2] / 2];
1364 pred_TL[1] = pred_L[1] = dst_g[-p->
linesize[0] / 2];
1365 pred_TL[2] = pred_L[2] = dst_b[-p->
linesize[1] / 2];
1366 pred_TL[3] = pred_L[3] = dst_a[-p->
linesize[3] / 2];
1368 for (x = 0; x < avctx->
width; x++) {
1369 pred_T[0] = dst_r[-p->
linesize[2] / 2 + x];
1370 pred_T[1] = dst_g[-p->
linesize[0] / 2 + x];
1371 pred_T[2] = dst_b[-p->
linesize[1] / 2 + x];
1372 pred_T[3] = dst_a[-p->
linesize[3] / 2 + x];
1374 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1375 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1376 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1377 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1379 dst_a[x] = pred_L[3] = (
a + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0x3ff;
1380 dst_r[x] = pred_L[0] = (
r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
1381 dst_g[x] = pred_L[1] = (
r +
g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
1382 dst_b[x] = pred_L[2] = (
r +
g +
b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
1384 pred_TL[0] = pred_T[0];
1385 pred_TL[1] = pred_T[1];
1386 pred_TL[2] = pred_T[2];
1387 pred_TL[3] = pred_T[3];
1401 uint16_t *dst_r, *dst_g, *dst_b;
1404 dst_r = (uint16_t *)p->
data[2];
1405 dst_g = (uint16_t *)p->
data[0];
1406 dst_b = (uint16_t *)p->
data[1];
1410 for (x = 0; x < avctx->
width; x++) {
1416 int pred[4] = { 512, 512, 512, 0 };
1418 for (x = 0; x < avctx->
width; x++) {
1421 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1422 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1423 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1425 dst_r[x] =
pred[0] = (
r +
pred[0]) & 0x3ff;
1426 dst_g[x] =
pred[1] = (
r +
g +
pred[1]) & 0x3ff;
1427 dst_b[x] =
pred[2] = (
r +
g +
b +
pred[2]) & 0x3ff;
1440 uint16_t *dst_r, *dst_g, *dst_b;
1443 dst_r = (uint16_t *)p->
data[2];
1444 dst_g = (uint16_t *)p->
data[0];
1445 dst_b = (uint16_t *)p->
data[1];
1448 for (x = 0; x < avctx->
width; x++) {
1454 int pred[4] = { 512, 512, 512, 0 };
1456 for (x = 0; x < avctx->
width; x++) {
1459 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1460 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1461 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1463 dst_r[x] =
pred[0] = (
r +
pred[0]) & 0x3ff;
1464 dst_g[x] =
pred[1] = (
r +
g +
pred[1]) & 0x3ff;
1465 dst_b[x] =
pred[2] = (
r +
g +
b +
pred[2]) & 0x3ff;
1473 for (y = 1; y < avctx->
height; y++) {
1475 for (x = 0; x < avctx->
width; x++) {
1481 int pred_TL[4], pred_L[4], pred_T[4];
1484 pred_TL[0] = pred_L[0] = dst_r[-p->
linesize[2] / 2];
1485 pred_TL[1] = pred_L[1] = dst_g[-p->
linesize[0] / 2];
1486 pred_TL[2] = pred_L[2] = dst_b[-p->
linesize[1] / 2];
1488 for (x = 0; x < avctx->
width; x++) {
1489 pred_T[0] = dst_r[-p->
linesize[2] / 2 + x];
1490 pred_T[1] = dst_g[-p->
linesize[0] / 2 + x];
1491 pred_T[2] = dst_b[-p->
linesize[1] / 2 + x];
1493 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1494 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1495 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1497 dst_r[x] = pred_L[0] = (
r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
1498 dst_g[x] = pred_L[1] = (
r +
g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
1499 dst_b[x] = pred_L[2] = (
r +
g +
b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
1501 pred_TL[0] = pred_T[0];
1502 pred_TL[1] = pred_T[1];
1503 pred_TL[2] = pred_T[2];
1521 for (x = 0; x < avctx->
width; x++) {
1528 int pred[4] = { -128, -128, -128, -128 };
1530 for (x = 0; x < avctx->
width; x++) {
1533 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1534 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1535 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1536 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1538 dst[4 * x + 0] =
pred[0] = (
a +
pred[0]) & 0xff;
1539 dst[4 * x + 1] =
pred[1] = (
r +
pred[1]) & 0xff;
1540 dst[4 * x + 2] =
pred[2] = (
r +
g +
pred[2]) & 0xff;
1541 dst[4 * x + 3] =
pred[3] = (
r +
g +
b +
pred[3]) & 0xff;
1546 for (y = 1; y < avctx->
height; y++) {
1548 for (x = 0; x < avctx->
width; x++) {
1558 pred_L[0] = dst[-p->
linesize[0] + 0];
1559 pred_L[1] = dst[-p->
linesize[0] + 1];
1560 pred_L[2] = dst[-p->
linesize[0] + 2];
1561 pred_L[3] = dst[-p->
linesize[0] + 3];
1563 for (x = 0; x < avctx->
width; x++) {
1564 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1565 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1566 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1567 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1569 dst[4 * x + 0] = pred_L[0] = (
a + pred_L[0]) & 0xff;
1570 dst[4 * x + 1] = pred_L[1] = (
r + pred_L[1]) & 0xff;
1571 dst[4 * x + 2] = pred_L[2] = (
r +
g + pred_L[2]) & 0xff;
1572 dst[4 * x + 3] = pred_L[3] = (
r +
g +
b + pred_L[3]) & 0xff;
1587 for (x = 0; x < avctx->
width; x++) {
1594 int pred[4] = { -128, -128, -128, -128 };
1596 for (x = 0; x < avctx->
width; x++) {
1599 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1600 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1601 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1602 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1604 dst[4 * x + 0] =
pred[0] = (
a +
pred[0]) & 0xff;
1605 dst[4 * x + 1] =
pred[1] = (
r +
pred[1]) & 0xff;
1606 dst[4 * x + 2] =
pred[2] = (
r +
g +
pred[2]) & 0xff;
1607 dst[4 * x + 3] =
pred[3] = (
r +
g +
b +
pred[3]) & 0xff;
1612 for (y = 1; y < avctx->
height; y++) {
1614 for (x = 0; x < avctx->
width; x++) {
1621 int pred_TL[4], pred_L[4], pred_T[4];
1624 pred_TL[0] = pred_L[0] = dst[-p->
linesize[0] + 0];
1625 pred_TL[1] = pred_L[1] = dst[-p->
linesize[0] + 1];
1626 pred_TL[2] = pred_L[2] = dst[-p->
linesize[0] + 2];
1627 pred_TL[3] = pred_L[3] = dst[-p->
linesize[0] + 3];
1629 for (x = 0; x < avctx->
width; x++) {
1630 pred_T[0] = dst[-p->
linesize[0] + 4 * x + 0];
1631 pred_T[1] = dst[-p->
linesize[0] + 4 * x + 1];
1632 pred_T[2] = dst[-p->
linesize[0] + 4 * x + 2];
1633 pred_T[3] = dst[-p->
linesize[0] + 4 * x + 3];
1635 a =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1636 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1637 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1638 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1640 dst[4 * x + 0] = pred_L[0] = (
a + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1641 dst[4 * x + 1] = pred_L[1] = (
r + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1642 dst[4 * x + 2] = pred_L[2] = (
r +
g + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1643 dst[4 * x + 3] = pred_L[3] = (
r +
g +
b + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0xff;
1645 pred_TL[0] = pred_T[0];
1646 pred_TL[1] = pred_T[1];
1647 pred_TL[2] = pred_T[2];
1648 pred_TL[3] = pred_T[3];
1663 for (x = 0; x < avctx->
width; x++) {
1669 int pred[4] = { -128, -128, -128, -128 };
1671 for (x = 0; x < avctx->
width; x++) {
1674 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1675 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1676 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1678 dst[4 * x + 0] =
pred[0] = (
r +
pred[0]) & 0xff;
1679 dst[4 * x + 1] =
pred[1] = (
r +
g +
pred[1]) & 0xff;
1680 dst[4 * x + 2] =
pred[2] = (
r +
g +
b +
pred[2]) & 0xff;
1685 for (y = 1; y < avctx->
height; y++) {
1687 for (x = 0; x < avctx->
width; x++) {
1696 pred_L[0] = dst[-p->
linesize[0] + 0];
1697 pred_L[1] = dst[-p->
linesize[0] + 1];
1698 pred_L[2] = dst[-p->
linesize[0] + 2];
1700 for (x = 0; x < avctx->
width; x++) {
1701 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1702 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1703 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1705 dst[4 * x + 0] = pred_L[0] = (
r + pred_L[0]) & 0xff;
1706 dst[4 * x + 1] = pred_L[1] = (
r +
g + pred_L[1]) & 0xff;
1707 dst[4 * x + 2] = pred_L[2] = (
r +
g +
b + pred_L[2]) & 0xff;
1722 for (x = 0; x < avctx->
width; x++) {
1728 int pred[4] = { -128, -128, -128, -128 };
1730 for (x = 0; x < avctx->
width; x++) {
1733 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1734 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1735 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1737 dst[4 * x + 0] =
pred[0] = (
r +
pred[0]) & 0xff;
1738 dst[4 * x + 1] =
pred[1] = (
r +
g +
pred[1]) & 0xff;
1739 dst[4 * x + 2] =
pred[2] = (
r +
g +
b +
pred[2]) & 0xff;
1744 for (y = 1; y < avctx->
height; y++) {
1746 for (x = 0; x < avctx->
width; x++) {
1752 int pred_TL[4], pred_L[4], pred_T[4];
1755 pred_TL[0] = pred_L[0] = dst[-p->
linesize[0] + 0];
1756 pred_TL[1] = pred_L[1] = dst[-p->
linesize[0] + 1];
1757 pred_TL[2] = pred_L[2] = dst[-p->
linesize[0] + 2];
1759 for (x = 0; x < avctx->
width; x++) {
1760 pred_T[0] = dst[-p->
linesize[0] + 4 * x + 0];
1761 pred_T[1] = dst[-p->
linesize[0] + 4 * x + 1];
1762 pred_T[2] = dst[-p->
linesize[0] + 4 * x + 2];
1764 r =
get_vlc2(gb,
s->vlc[0].table,
s->vlc[0].bits, 2);
1765 g =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1766 b =
get_vlc2(gb,
s->vlc[1].table,
s->vlc[1].bits, 2);
1768 dst[4 * x + 0] = pred_L[0] = (
r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1769 dst[4 * x + 1] = pred_L[1] = (
r +
g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1770 dst[4 * x + 2] = pred_L[2] = (
r +
g +
b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1772 pred_TL[0] = pred_T[0];
1773 pred_TL[1] = pred_T[1];
1774 pred_TL[2] = pred_T[2];
1783 uint32_t codes[1024];
1785 uint16_t syms[1024];
1800 codes,
sizeof(*codes),
sizeof(*codes),
1801 syms,
sizeof(*syms),
sizeof(*syms), 0);
1805 void *
data,
int *got_frame,
1815 if (avpkt->
size <= 20)
1826 case MKTAG(
' ',
'R',
'G',
'B'):
1834 case MKTAG(
' ',
'r',
'G',
'B'):
1842 case MKTAG(
'A',
'R',
'G',
'X'):
1850 case MKTAG(
'A',
'r',
'G',
'X'):
1858 case MKTAG(
'R',
'G',
'B',
'X'):
1866 case MKTAG(
'r',
'G',
'B',
'X'):
1874 case MKTAG(
'A',
'R',
'G',
'B'):
1882 case MKTAG(
'A',
'r',
'G',
'B'):
1890 case MKTAG(
'A',
'Y',
'B',
'R'):
1892 case MKTAG(
'A',
'Y',
'b',
'R'):
1900 case MKTAG(
'A',
'y',
'B',
'R'):
1902 case MKTAG(
'A',
'y',
'b',
'R'):
1910 case MKTAG(
' ',
'Y',
'B',
'R'):
1912 case MKTAG(
' ',
'Y',
'b',
'R'):
1920 case MKTAG(
' ',
'y',
'B',
'R'):
1922 case MKTAG(
' ',
'y',
'b',
'R'):
1930 case MKTAG(
'Y',
'B',
'R', 0x0a):
1938 case MKTAG(
'y',
'B',
'R', 0x0a):
1946 case MKTAG(
'C',
'A',
'4',
'p'):
1954 case MKTAG(
'C',
'A',
'4',
'i'):
1962 case MKTAG(
'B',
'Y',
'R',
'Y'):
1970 case MKTAG(
'B',
'Y',
'R',
'y'):
1978 case MKTAG(
'Y',
'b',
'Y',
'r'):
1986 case MKTAG(
'C',
'8',
'2',
'p'):
1994 case MKTAG(
'C',
'8',
'2',
'i'):
2002 case MKTAG(0xa2,
'Y',
'R',
'Y'):
2010 case MKTAG(0xa2,
'Y',
'R',
'y'):
2018 case MKTAG(
'C',
'A',
'2',
'p'):
2026 case MKTAG(
'C',
'A',
'2',
'i'):
2059 s->decode_frame(avctx, p, &gb);
2072 memset(&
s->vlc[0], 0,
sizeof(
s->vlc[0]));
2073 memset(&
s->vlc[1], 0,
sizeof(
s->vlc[1]));
2090 .
name =
"sheervideo",