26 #define CACHED_BITSTREAM_READER !ARCH_X86_32 27 #define SHEER_VLC_BITS 12 46 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
49 dst_a = (uint16_t *)p->
data[3];
50 dst_y = (uint16_t *)p->
data[0];
51 dst_u = (uint16_t *)p->
data[1];
52 dst_v = (uint16_t *)p->
data[2];
54 for (y = 0; y < avctx->
height; y++) {
56 for (x = 0; x < avctx->
width; x++) {
63 int pred[4] = { 502, 512, 512, 502 };
65 for (x = 0; x < avctx->
width; x++) {
73 dst_a[x] = pred[3] = (a + pred[3]) & 0x3ff;
74 dst_y[x] = pred[0] = (y + pred[0]) & 0x3ff;
75 dst_u[x] = pred[1] = (u + pred[1]) & 0x3ff;
76 dst_v[x] = pred[2] = (v + pred[2]) & 0x3ff;
90 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
93 dst_a = (uint16_t *)p->
data[3];
94 dst_y = (uint16_t *)p->
data[0];
95 dst_u = (uint16_t *)p->
data[1];
96 dst_v = (uint16_t *)p->
data[2];
99 for (x = 0; x < avctx->
width; x++) {
106 int pred[4] = { 502, 512, 512, 502 };
108 for (x = 0; x < avctx->
width; x++) {
116 dst_a[x] = pred[3] = (a + pred[3]) & 0x3ff;
117 dst_y[x] = pred[0] = (y + pred[0]) & 0x3ff;
118 dst_u[x] = pred[1] = (u + pred[1]) & 0x3ff;
119 dst_v[x] = pred[2] = (v + pred[2]) & 0x3ff;
128 for (y = 1; y < avctx->
height; y++) {
130 for (x = 0; x < avctx->
width; x++) {
137 int pred_TL[4], pred_L[4], pred_T[4];
140 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
141 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
142 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
143 pred_TL[3] = pred_L[3] = dst_a[-p->
linesize[3] / 2];
145 for (x = 0; x < avctx->
width; x++) {
146 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
147 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x];
148 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x];
149 pred_T[3] = dst_a[-p->
linesize[3] / 2 + x];
156 dst_a[x] = pred_L[3] = (a + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0x3ff;
157 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
158 dst_u[x] = pred_L[1] = (u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
159 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
161 pred_TL[0] = pred_T[0];
162 pred_TL[1] = pred_T[1];
163 pred_TL[2] = pred_T[2];
164 pred_TL[3] = pred_T[3];
178 uint16_t *dst_y, *dst_u, *dst_v;
181 dst_y = (uint16_t *)p->
data[0];
182 dst_u = (uint16_t *)p->
data[1];
183 dst_v = (uint16_t *)p->
data[2];
187 for (x = 0; x < avctx->
width; x++) {
193 int pred[4] = { 502, 512, 512, 512 };
195 for (x = 0; x < avctx->
width; x++) {
202 dst_y[x] = pred[0] = (y + pred[0]) & 0x3ff;
203 dst_u[x] = pred[1] = (u + pred[1]) & 0x3ff;
204 dst_v[x] = pred[2] = (v + pred[2]) & 0x3ff;
217 uint16_t *dst_y, *dst_u, *dst_v;
220 dst_y = (uint16_t *)p->
data[0];
221 dst_u = (uint16_t *)p->
data[1];
222 dst_v = (uint16_t *)p->
data[2];
225 for (x = 0; x < avctx->
width; x++) {
231 int pred[4] = { 502, 512, 512, 512 };
233 for (x = 0; x < avctx->
width; x++) {
240 dst_y[x] = pred[0] = (y + pred[0]) & 0x3ff;
241 dst_u[x] = pred[1] = (u + pred[1]) & 0x3ff;
242 dst_v[x] = pred[2] = (v + pred[2]) & 0x3ff;
250 for (y = 1; y < avctx->
height; y++) {
252 for (x = 0; x < avctx->
width; x++) {
258 int pred_TL[4], pred_L[4], pred_T[4];
261 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
262 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
263 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
265 for (x = 0; x < avctx->
width; x++) {
266 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
267 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x];
268 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x];
274 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
275 dst_u[x] = pred_L[1] = (u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
276 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
278 pred_TL[0] = pred_T[0];
279 pred_TL[1] = pred_T[1];
280 pred_TL[2] = pred_T[2];
293 uint16_t *dst_y, *dst_u, *dst_v;
296 dst_y = (uint16_t *)p->
data[0];
297 dst_u = (uint16_t *)p->
data[1];
298 dst_v = (uint16_t *)p->
data[2];
302 for (x = 0; x < avctx->
width; x += 2) {
309 int pred[4] = { 502, 512, 512, 0 };
311 for (x = 0; x < avctx->
width; x += 2) {
319 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0x3ff;
320 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0x3ff;
321 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0x3ff;
322 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0x3ff;
335 uint16_t *dst_y, *dst_u, *dst_v;
338 dst_y = (uint16_t *)p->
data[0];
339 dst_u = (uint16_t *)p->
data[1];
340 dst_v = (uint16_t *)p->
data[2];
343 for (x = 0; x < avctx->
width; x += 2) {
350 int pred[4] = { 502, 512, 512, 0 };
352 for (x = 0; x < avctx->
width; x += 2) {
360 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0x3ff;
361 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0x3ff;
362 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0x3ff;
363 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0x3ff;
371 for (y = 1; y < avctx->
height; y++) {
373 for (x = 0; x < avctx->
width; x += 2) {
380 int pred_TL[6], pred_L[6], pred_T[6];
383 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
384 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
385 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
387 for (x = 0; x < avctx->
width; x += 2) {
388 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
389 pred_T[3] = dst_y[-p->
linesize[0] / 2 + x + 1];
390 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x / 2];
391 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x / 2];
398 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
399 dst_u[x / 2] = pred_L[1] = (u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0x3ff;
400 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0x3ff;
401 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0x3ff;
403 pred_TL[0] = pred_T[3];
404 pred_TL[1] = pred_T[1];
405 pred_TL[2] = pred_T[2];
418 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
421 dst_y = (uint16_t *)p->
data[0];
422 dst_u = (uint16_t *)p->
data[1];
423 dst_v = (uint16_t *)p->
data[2];
424 dst_a = (uint16_t *)p->
data[3];
426 for (y = 0; y < avctx->
height; y++) {
428 for (x = 0; x < avctx->
width; x += 2) {
437 int pred[4] = { 502, 512, 512, 502 };
439 for (x = 0; x < avctx->
width; x += 2) {
440 int y1, y2,
u, v,
a1,
a2;
449 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0x3ff;
450 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0x3ff;
451 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0x3ff;
452 dst_a[x ] = pred[3] = (a1 + pred[3]) & 0x3ff;
453 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0x3ff;
454 dst_a[x + 1] = pred[3] = (a2 + pred[3]) & 0x3ff;
468 uint16_t *dst_y, *dst_u, *dst_v, *dst_a;
471 dst_y = (uint16_t *)p->
data[0];
472 dst_u = (uint16_t *)p->
data[1];
473 dst_v = (uint16_t *)p->
data[2];
474 dst_a = (uint16_t *)p->
data[3];
477 for (x = 0; x < avctx->
width; x += 2) {
486 int pred[4] = { 502, 512, 512, 502 };
488 for (x = 0; x < avctx->
width; x += 2) {
489 int y1, y2,
u, v,
a1,
a2;
498 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0x3ff;
499 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0x3ff;
500 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0x3ff;
501 dst_a[x ] = pred[3] = (a1 + pred[3]) & 0x3ff;
502 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0x3ff;
503 dst_a[x + 1] = pred[3] = (a2 + pred[3]) & 0x3ff;
512 for (y = 1; y < avctx->
height; y++) {
514 for (x = 0; x < avctx->
width; x += 2) {
523 int pred_TL[6], pred_L[6], pred_T[6];
524 int y1, y2,
u, v,
a1,
a2;
526 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0] / 2];
527 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1] / 2];
528 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2] / 2];
529 pred_TL[4] = pred_L[4] = dst_a[-p->
linesize[3] / 2];
531 for (x = 0; x < avctx->
width; x += 2) {
532 pred_T[0] = dst_y[-p->
linesize[0] / 2 + x];
533 pred_T[3] = dst_y[-p->
linesize[0] / 2 + x + 1];
534 pred_T[1] = dst_u[-p->
linesize[1] / 2 + x / 2];
535 pred_T[2] = dst_v[-p->
linesize[2] / 2 + x / 2];
536 pred_T[4] = dst_a[-p->
linesize[3] / 2 + x];
537 pred_T[5] = dst_a[-p->
linesize[3] / 2 + x + 1];
546 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
547 dst_u[x / 2] = pred_L[1] = (u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0x3ff;
548 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0x3ff;
549 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0x3ff;
550 dst_a[x ] = pred_L[4] = (a1 + ((3 * (pred_T[4] + pred_L[4]) - 2 * pred_TL[4]) >> 2)) & 0x3ff;
551 dst_a[x + 1] = pred_L[4] = (a2 + ((3 * (pred_T[5] + pred_L[4]) - 2 * pred_T[4]) >> 2)) & 0x3ff;
553 pred_TL[0] = pred_T[3];
554 pred_TL[1] = pred_T[1];
555 pred_TL[2] = pred_T[2];
556 pred_TL[4] = pred_T[5];
570 uint8_t *dst_y, *dst_u, *dst_v, *dst_a;
578 for (y = 0; y < avctx->
height; y += 1) {
580 for (x = 0; x < avctx->
width; x += 2) {
589 int pred[4] = { 125, -128, -128, 125 };
591 for (x = 0; x < avctx->
width; x += 2) {
592 int y1, y2,
u, v,
a1,
a2;
601 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0xff;
602 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0xff;
603 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0xff;
604 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0xff;
605 dst_a[x ] = pred[3] = (a1 + pred[3]) & 0xff;
606 dst_a[x + 1] = pred[3] = (a2 + pred[3]) & 0xff;
620 uint8_t *dst_y, *dst_u, *dst_v, *dst_a;
629 for (x = 0; x < avctx->
width; x += 2) {
638 int pred[4] = { 125, -128, -128, 125 };
640 for (x = 0; x < avctx->
width; x += 2) {
641 int y1, y2,
u, v,
a1,
a2;
650 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0xff;
651 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0xff;
652 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0xff;
653 dst_a[x ] = pred[3] = (a1 + pred[3]) & 0xff;
654 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0xff;
655 dst_a[x + 1] = pred[3] = (a2 + pred[3]) & 0xff;
664 for (y = 1; y < avctx->
height; y++) {
666 for (x = 0; x < avctx->
width; x += 2) {
675 int pred_TL[6], pred_L[6], pred_T[6];
676 int y1, y2,
u, v,
a1,
a2;
678 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
679 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
680 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
681 pred_TL[4] = pred_L[4] = dst_a[-p->
linesize[3]];
683 for (x = 0; x < avctx->
width; x += 2) {
684 pred_T[0] = dst_y[-p->
linesize[0] + x];
685 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
686 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
687 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
688 pred_T[4] = dst_a[-p->
linesize[3] + x];
689 pred_T[5] = dst_a[-p->
linesize[3] + x + 1];
698 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
699 dst_u[x / 2] = pred_L[1] = (u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
700 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
701 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
702 dst_a[x ] = pred_L[4] = (a1 + ((3 * (pred_T[4] + pred_L[4]) - 2 * pred_TL[4]) >> 2)) & 0xff;
703 dst_a[x + 1] = pred_L[4] = (a2 + ((3 * (pred_T[5] + pred_L[4]) - 2 * pred_T[4]) >> 2)) & 0xff;
705 pred_TL[0] = pred_T[3];
706 pred_TL[1] = pred_T[1];
707 pred_TL[2] = pred_T[2];
708 pred_TL[4] = pred_T[5];
722 uint8_t *dst_y, *dst_u, *dst_v;
730 for (x = 0; x < avctx->
width; x += 2) {
732 dst_u[x / 2] =
get_bits(gb, 8) + 128;
734 dst_v[x / 2] =
get_bits(gb, 8) + 128;
737 int pred[4] = { -128, 128, 128, 0 };
739 for (x = 0; x < avctx->
width; x += 2) {
747 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0xff;
748 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0xff;
749 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0xff;
750 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0xff;
758 for (y = 1; y < avctx->
height; y++) {
760 for (x = 0; x < avctx->
width; x += 2) {
762 dst_u[x / 2] =
get_bits(gb, 8) + 128;
764 dst_v[x / 2] =
get_bits(gb, 8) + 128;
767 int pred_TL[4], pred_L[4], pred_T[4];
770 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
771 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
772 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
774 for (x = 0; x < avctx->
width; x += 2) {
775 pred_T[0] = dst_y[-p->
linesize[0] + x];
776 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
777 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
778 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
785 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
786 dst_u[x / 2] = pred_L[1] = (u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
787 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
788 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
790 pred_TL[0] = pred_T[3];
791 pred_TL[1] = pred_T[1];
792 pred_TL[2] = pred_T[2];
805 uint8_t *dst_y, *dst_u, *dst_v;
813 for (x = 0; x < avctx->
width; x += 2) {
820 int pred[4] = { 125, -128, -128, 0 };
822 for (x = 0; x < avctx->
width; x += 2) {
830 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0xff;
831 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0xff;
832 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0xff;
833 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0xff;
841 for (y = 1; y < avctx->
height; y++) {
843 for (x = 0; x < avctx->
width; x += 2) {
857 for (x = 0; x < avctx->
width; x += 2) {
863 dst_y[x ] = pred_L[0] = (y1 + pred_L[0]) & 0xff;
864 dst_u[x / 2] = pred_L[1] = (u + pred_L[1]) & 0xff;
865 dst_y[x + 1] = pred_L[0] = (y2 + pred_L[0]) & 0xff;
866 dst_v[x / 2] = pred_L[2] = (v + pred_L[2]) & 0xff;
879 uint8_t *dst_y, *dst_u, *dst_v;
887 for (x = 0; x < avctx->
width; x += 2) {
894 int pred[4] = { 125, -128, -128, 0 };
896 for (x = 0; x < avctx->
width; x += 2) {
904 dst_y[x ] = pred[0] = (y1 + pred[0]) & 0xff;
905 dst_u[x / 2] = pred[1] = (u + pred[1]) & 0xff;
906 dst_y[x + 1] = pred[0] = (y2 + pred[0]) & 0xff;
907 dst_v[x / 2] = pred[2] = (v + pred[2]) & 0xff;
915 for (y = 1; y < avctx->
height; y++) {
917 for (x = 0; x < avctx->
width; x += 2) {
924 int pred_TL[4], pred_L[4], pred_T[4];
927 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
928 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
929 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
931 for (x = 0; x < avctx->
width; x += 2) {
932 pred_T[0] = dst_y[-p->
linesize[0] + x];
933 pred_T[3] = dst_y[-p->
linesize[0] + x + 1];
934 pred_T[1] = dst_u[-p->
linesize[1] + x / 2];
935 pred_T[2] = dst_v[-p->
linesize[2] + x / 2];
942 dst_y[x ] = pred_L[0] = (y1 + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
943 dst_u[x / 2] = pred_L[1] = (u + (((pred_L[1] - pred_TL[1]) >> 1) + pred_T[1])) & 0xff;
944 dst_y[x + 1] = pred_L[0] = (y2 + ((3 * (pred_T[3] + pred_L[0]) - 2 * pred_T[0]) >> 2)) & 0xff;
945 dst_v[x / 2] = pred_L[2] = (v + (((pred_L[2] - pred_TL[2]) >> 1) + pred_T[2])) & 0xff;
947 pred_TL[0] = pred_T[3];
948 pred_TL[1] = pred_T[1];
949 pred_TL[2] = pred_T[2];
962 uint8_t *dst_y, *dst_u, *dst_v;
970 for (x = 0; x < avctx->
width; x++) {
976 int pred[4] = { s->
alt ? 125 : -146, -128, -128, -128 };
978 for (x = 0; x < avctx->
width; x++) {
985 dst_y[x] = pred[0] = (y + pred[0]) & 0xff;
986 dst_u[x] = pred[1] = (u + pred[1]) & 0xff;
987 dst_v[x] = pred[2] = (v + pred[2]) & 0xff;
995 for (y = 1; y < avctx->
height; y++) {
997 for (x = 0; x < avctx->
width; x++) {
1006 pred_L[0] = dst_y[-p->
linesize[0]];
1007 pred_L[1] = dst_u[-p->
linesize[1]];
1008 pred_L[2] = dst_v[-p->
linesize[2]];
1010 for (x = 0; x < avctx->
width; x++) {
1015 dst_y[x] = pred_L[0] = (y + pred_L[0]) & 0xff;
1016 dst_u[x] = pred_L[1] = (u + pred_L[1]) & 0xff;
1017 dst_v[x] = pred_L[2] = (v + pred_L[2]) & 0xff;
1030 uint8_t *dst_y, *dst_u, *dst_v;
1038 for (x = 0; x < avctx->
width; x++) {
1044 int pred[4] = { s->
alt ? 125 : -146, -128, -128, -128 };
1046 for (x = 0; x < avctx->
width; x++) {
1053 dst_y[x] = pred[0] = (y + pred[0]) & 0xff;
1054 dst_u[x] = pred[1] = (u + pred[1]) & 0xff;
1055 dst_v[x] = pred[2] = (v + pred[2]) & 0xff;
1063 for (y = 1; y < avctx->
height; y++) {
1065 for (x = 0; x < avctx->
width; x++) {
1071 int pred_TL[4], pred_L[4], pred_T[4];
1074 pred_TL[0] = pred_L[0] = dst_y[-p->
linesize[0]];
1075 pred_TL[1] = pred_L[1] = dst_u[-p->
linesize[1]];
1076 pred_TL[2] = pred_L[2] = dst_v[-p->
linesize[2]];
1078 for (x = 0; x < avctx->
width; x++) {
1079 pred_T[0] = dst_y[-p->
linesize[0] + x];
1080 pred_T[1] = dst_u[-p->
linesize[1] + x];
1081 pred_T[2] = dst_v[-p->
linesize[2] + x];
1087 dst_y[x] = pred_L[0] = (y + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1088 dst_u[x] = pred_L[1] = (u + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1089 dst_v[x] = pred_L[2] = (v + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1091 pred_TL[0] = pred_T[0];
1092 pred_TL[1] = pred_T[1];
1093 pred_TL[2] = pred_T[2];
1106 uint8_t *dst_a, *dst_y, *dst_u, *dst_v;
1115 for (x = 0; x < avctx->
width; x++) {
1122 int pred[4] = { 125, s->
alt ? 125 : -146, -128, -128 };
1124 for (x = 0; x < avctx->
width; x++) {
1132 dst_a[x] = pred[0] = (a + pred[0]) & 0xff;
1133 dst_y[x] = pred[1] = (y + pred[1]) & 0xff;
1134 dst_u[x] = pred[2] = (u + pred[2]) & 0xff;
1135 dst_v[x] = pred[3] = (v + pred[3]) & 0xff;
1144 for (y = 1; y < avctx->
height; y++) {
1146 for (x = 0; x < avctx->
width; x++) {
1156 pred_L[0] = dst_a[-p->
linesize[3]];
1157 pred_L[1] = dst_y[-p->
linesize[0]];
1158 pred_L[2] = dst_u[-p->
linesize[1]];
1159 pred_L[3] = dst_v[-p->
linesize[2]];
1161 for (x = 0; x < avctx->
width; x++) {
1167 dst_a[x] = pred_L[0] = (a + pred_L[0]) & 0xff;
1168 dst_y[x] = pred_L[1] = (y + pred_L[1]) & 0xff;
1169 dst_u[x] = pred_L[2] = (u + pred_L[2]) & 0xff;
1170 dst_v[x] = pred_L[3] = (v + pred_L[3]) & 0xff;
1184 uint8_t *dst_a, *dst_y, *dst_u, *dst_v;
1193 for (x = 0; x < avctx->
width; x++) {
1200 int pred[4] = { 125, s->
alt ? 125 : -146, -128, -128 };
1202 for (x = 0; x < avctx->
width; x++) {
1210 dst_a[x] = pred[0] = (a + pred[0]) & 0xff;
1211 dst_y[x] = pred[1] = (y + pred[1]) & 0xff;
1212 dst_u[x] = pred[2] = (u + pred[2]) & 0xff;
1213 dst_v[x] = pred[3] = (v + pred[3]) & 0xff;
1222 for (y = 1; y < avctx->
height; y++) {
1224 for (x = 0; x < avctx->
width; x++) {
1231 int pred_TL[4], pred_L[4], pred_T[4];
1234 pred_TL[0] = pred_L[0] = dst_a[-p->
linesize[3]];
1235 pred_TL[1] = pred_L[1] = dst_y[-p->
linesize[0]];
1236 pred_TL[2] = pred_L[2] = dst_u[-p->
linesize[1]];
1237 pred_TL[3] = pred_L[3] = dst_v[-p->
linesize[2]];
1239 for (x = 0; x < avctx->
width; x++) {
1240 pred_T[0] = dst_a[-p->
linesize[3] + x];
1241 pred_T[1] = dst_y[-p->
linesize[0] + x];
1242 pred_T[2] = dst_u[-p->
linesize[1] + x];
1243 pred_T[3] = dst_v[-p->
linesize[2] + x];
1250 dst_a[x] = pred_L[0] = (a + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1251 dst_y[x] = pred_L[1] = (y + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1252 dst_u[x] = pred_L[2] = (u + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1253 dst_v[x] = pred_L[3] = (v + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0xff;
1255 pred_TL[0] = pred_T[0];
1256 pred_TL[1] = pred_T[1];
1257 pred_TL[2] = pred_T[2];
1258 pred_TL[3] = pred_T[3];
1272 uint16_t *dst_r, *dst_g, *dst_b, *dst_a;
1275 dst_r = (uint16_t *)p->
data[2];
1276 dst_g = (uint16_t *)p->
data[0];
1277 dst_b = (uint16_t *)p->
data[1];
1278 dst_a = (uint16_t *)p->
data[3];
1280 for (y = 0; y < avctx->
height; y++) {
1282 for (x = 0; x < avctx->
width; x++) {
1289 int pred[4] = { 512, 512, 512, 512 };
1291 for (x = 0; x < avctx->
width; x++) {
1299 dst_a[x] = pred[3] = (a + pred[3]) & 0x3ff;
1300 dst_r[x] = pred[0] = (r + pred[0]) & 0x3ff;
1301 dst_g[x] = pred[1] = (r + g + pred[1]) & 0x3ff;
1302 dst_b[x] = pred[2] = (r + g + b + pred[2]) & 0x3ff;
1316 uint16_t *dst_r, *dst_g, *dst_b, *dst_a;
1319 dst_r = (uint16_t *)p->
data[2];
1320 dst_g = (uint16_t *)p->
data[0];
1321 dst_b = (uint16_t *)p->
data[1];
1322 dst_a = (uint16_t *)p->
data[3];
1325 for (x = 0; x < avctx->
width; x++) {
1332 int pred[4] = { 512, 512, 512, 512 };
1334 for (x = 0; x < avctx->
width; x++) {
1342 dst_a[x] = pred[3] = (a + pred[3]) & 0x3ff;
1343 dst_r[x] = pred[0] = (r + pred[0]) & 0x3ff;
1344 dst_g[x] = pred[1] = (r + g + pred[1]) & 0x3ff;
1345 dst_b[x] = pred[2] = (r + g + b + pred[2]) & 0x3ff;
1354 for (y = 1; y < avctx->
height; y++) {
1356 for (x = 0; x < avctx->
width; x++) {
1363 int pred_TL[4], pred_L[4], pred_T[4];
1366 pred_TL[0] = pred_L[0] = dst_r[-p->
linesize[2] / 2];
1367 pred_TL[1] = pred_L[1] = dst_g[-p->
linesize[0] / 2];
1368 pred_TL[2] = pred_L[2] = dst_b[-p->
linesize[1] / 2];
1369 pred_TL[3] = pred_L[3] = dst_a[-p->
linesize[3] / 2];
1371 for (x = 0; x < avctx->
width; x++) {
1372 pred_T[0] = dst_r[-p->
linesize[2] / 2 + x];
1373 pred_T[1] = dst_g[-p->
linesize[0] / 2 + x];
1374 pred_T[2] = dst_b[-p->
linesize[1] / 2 + x];
1375 pred_T[3] = dst_a[-p->
linesize[3] / 2 + x];
1382 dst_a[x] = pred_L[3] = (a + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0x3ff;
1383 dst_r[x] = pred_L[0] = (r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
1384 dst_g[x] = pred_L[1] = (r + g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
1385 dst_b[x] = pred_L[2] = (r + g + b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
1387 pred_TL[0] = pred_T[0];
1388 pred_TL[1] = pred_T[1];
1389 pred_TL[2] = pred_T[2];
1390 pred_TL[3] = pred_T[3];
1404 uint16_t *dst_r, *dst_g, *dst_b;
1407 dst_r = (uint16_t *)p->
data[2];
1408 dst_g = (uint16_t *)p->
data[0];
1409 dst_b = (uint16_t *)p->
data[1];
1413 for (x = 0; x < avctx->
width; x++) {
1419 int pred[4] = { 512, 512, 512, 0 };
1421 for (x = 0; x < avctx->
width; x++) {
1428 dst_r[x] = pred[0] = (r + pred[0]) & 0x3ff;
1429 dst_g[x] = pred[1] = (r + g + pred[1]) & 0x3ff;
1430 dst_b[x] = pred[2] = (r + g + b + pred[2]) & 0x3ff;
1443 uint16_t *dst_r, *dst_g, *dst_b;
1446 dst_r = (uint16_t *)p->
data[2];
1447 dst_g = (uint16_t *)p->
data[0];
1448 dst_b = (uint16_t *)p->
data[1];
1451 for (x = 0; x < avctx->
width; x++) {
1457 int pred[4] = { 512, 512, 512, 0 };
1459 for (x = 0; x < avctx->
width; x++) {
1466 dst_r[x] = pred[0] = (r + pred[0]) & 0x3ff;
1467 dst_g[x] = pred[1] = (r + g + pred[1]) & 0x3ff;
1468 dst_b[x] = pred[2] = (r + g + b + pred[2]) & 0x3ff;
1476 for (y = 1; y < avctx->
height; y++) {
1478 for (x = 0; x < avctx->
width; x++) {
1484 int pred_TL[4], pred_L[4], pred_T[4];
1487 pred_TL[0] = pred_L[0] = dst_r[-p->
linesize[2] / 2];
1488 pred_TL[1] = pred_L[1] = dst_g[-p->
linesize[0] / 2];
1489 pred_TL[2] = pred_L[2] = dst_b[-p->
linesize[1] / 2];
1491 for (x = 0; x < avctx->
width; x++) {
1492 pred_T[0] = dst_r[-p->
linesize[2] / 2 + x];
1493 pred_T[1] = dst_g[-p->
linesize[0] / 2 + x];
1494 pred_T[2] = dst_b[-p->
linesize[1] / 2 + x];
1500 dst_r[x] = pred_L[0] = (r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0x3ff;
1501 dst_g[x] = pred_L[1] = (r + g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0x3ff;
1502 dst_b[x] = pred_L[2] = (r + g + b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0x3ff;
1504 pred_TL[0] = pred_T[0];
1505 pred_TL[1] = pred_T[1];
1506 pred_TL[2] = pred_T[2];
1524 for (x = 0; x < avctx->
width; x++) {
1531 int pred[4] = { -128, -128, -128, -128 };
1533 for (x = 0; x < avctx->
width; x++) {
1541 dst[4 * x + 0] = pred[0] = (a + pred[0]) & 0xff;
1542 dst[4 * x + 1] = pred[1] = (r + pred[1]) & 0xff;
1543 dst[4 * x + 2] = pred[2] = (r + g + pred[2]) & 0xff;
1544 dst[4 * x + 3] = pred[3] = (r + g + b + pred[3]) & 0xff;
1549 for (y = 1; y < avctx->
height; y++) {
1551 for (x = 0; x < avctx->
width; x++) {
1561 pred_L[0] = dst[-p->
linesize[0] + 0];
1562 pred_L[1] = dst[-p->
linesize[0] + 1];
1563 pred_L[2] = dst[-p->
linesize[0] + 2];
1564 pred_L[3] = dst[-p->
linesize[0] + 3];
1566 for (x = 0; x < avctx->
width; x++) {
1572 dst[4 * x + 0] = pred_L[0] = (a + pred_L[0]) & 0xff;
1573 dst[4 * x + 1] = pred_L[1] = (r + pred_L[1]) & 0xff;
1574 dst[4 * x + 2] = pred_L[2] = (r + g + pred_L[2]) & 0xff;
1575 dst[4 * x + 3] = pred_L[3] = (r + g + b + pred_L[3]) & 0xff;
1590 for (x = 0; x < avctx->
width; x++) {
1597 int pred[4] = { -128, -128, -128, -128 };
1599 for (x = 0; x < avctx->
width; x++) {
1607 dst[4 * x + 0] = pred[0] = (a + pred[0]) & 0xff;
1608 dst[4 * x + 1] = pred[1] = (r + pred[1]) & 0xff;
1609 dst[4 * x + 2] = pred[2] = (r + g + pred[2]) & 0xff;
1610 dst[4 * x + 3] = pred[3] = (r + g + b + pred[3]) & 0xff;
1615 for (y = 1; y < avctx->
height; y++) {
1617 for (x = 0; x < avctx->
width; x++) {
1624 int pred_TL[4], pred_L[4], pred_T[4];
1627 pred_TL[0] = pred_L[0] = dst[-p->
linesize[0] + 0];
1628 pred_TL[1] = pred_L[1] = dst[-p->
linesize[0] + 1];
1629 pred_TL[2] = pred_L[2] = dst[-p->
linesize[0] + 2];
1630 pred_TL[3] = pred_L[3] = dst[-p->
linesize[0] + 3];
1632 for (x = 0; x < avctx->
width; x++) {
1633 pred_T[0] = dst[-p->
linesize[0] + 4 * x + 0];
1634 pred_T[1] = dst[-p->
linesize[0] + 4 * x + 1];
1635 pred_T[2] = dst[-p->
linesize[0] + 4 * x + 2];
1636 pred_T[3] = dst[-p->
linesize[0] + 4 * x + 3];
1643 dst[4 * x + 0] = pred_L[0] = (a + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1644 dst[4 * x + 1] = pred_L[1] = (r + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1645 dst[4 * x + 2] = pred_L[2] = (r + g + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1646 dst[4 * x + 3] = pred_L[3] = (r + g + b + ((3 * (pred_T[3] + pred_L[3]) - 2 * pred_TL[3]) >> 2)) & 0xff;
1648 pred_TL[0] = pred_T[0];
1649 pred_TL[1] = pred_T[1];
1650 pred_TL[2] = pred_T[2];
1651 pred_TL[3] = pred_T[3];
1666 for (x = 0; x < avctx->
width; x++) {
1672 int pred[4] = { -128, -128, -128, -128 };
1674 for (x = 0; x < avctx->
width; x++) {
1681 dst[4 * x + 0] = pred[0] = (r + pred[0]) & 0xff;
1682 dst[4 * x + 1] = pred[1] = (r + g + pred[1]) & 0xff;
1683 dst[4 * x + 2] = pred[2] = (r + g + b + pred[2]) & 0xff;
1688 for (y = 1; y < avctx->
height; y++) {
1690 for (x = 0; x < avctx->
width; x++) {
1699 pred_L[0] = dst[-p->
linesize[0] + 0];
1700 pred_L[1] = dst[-p->
linesize[0] + 1];
1701 pred_L[2] = dst[-p->
linesize[0] + 2];
1703 for (x = 0; x < avctx->
width; x++) {
1708 dst[4 * x + 0] = pred_L[0] = (r + pred_L[0]) & 0xff;
1709 dst[4 * x + 1] = pred_L[1] = (r + g + pred_L[1]) & 0xff;
1710 dst[4 * x + 2] = pred_L[2] = (r + g + b + pred_L[2]) & 0xff;
1725 for (x = 0; x < avctx->
width; x++) {
1731 int pred[4] = { -128, -128, -128, -128 };
1733 for (x = 0; x < avctx->
width; x++) {
1740 dst[4 * x + 0] = pred[0] = (r + pred[0]) & 0xff;
1741 dst[4 * x + 1] = pred[1] = (r + g + pred[1]) & 0xff;
1742 dst[4 * x + 2] = pred[2] = (r + g + b + pred[2]) & 0xff;
1747 for (y = 1; y < avctx->
height; y++) {
1749 for (x = 0; x < avctx->
width; x++) {
1755 int pred_TL[4], pred_L[4], pred_T[4];
1758 pred_TL[0] = pred_L[0] = dst[-p->
linesize[0] + 0];
1759 pred_TL[1] = pred_L[1] = dst[-p->
linesize[0] + 1];
1760 pred_TL[2] = pred_L[2] = dst[-p->
linesize[0] + 2];
1762 for (x = 0; x < avctx->
width; x++) {
1763 pred_T[0] = dst[-p->
linesize[0] + 4 * x + 0];
1764 pred_T[1] = dst[-p->
linesize[0] + 4 * x + 1];
1765 pred_T[2] = dst[-p->
linesize[0] + 4 * x + 2];
1771 dst[4 * x + 0] = pred_L[0] = (r + ((3 * (pred_T[0] + pred_L[0]) - 2 * pred_TL[0]) >> 2)) & 0xff;
1772 dst[4 * x + 1] = pred_L[1] = (r + g + ((3 * (pred_T[1] + pred_L[1]) - 2 * pred_TL[1]) >> 2)) & 0xff;
1773 dst[4 * x + 2] = pred_L[2] = (r + g + b + ((3 * (pred_T[2] + pred_L[2]) - 2 * pred_TL[2]) >> 2)) & 0xff;
1775 pred_TL[0] = pred_T[0];
1776 pred_TL[1] = pred_T[1];
1777 pred_TL[2] = pred_T[2];
1791 unsigned new_count =
count;
1794 new_count += table->
nb_16s;
1797 new_count += *cur++;
1799 for (; count < new_count; count++)
1805 lens,
sizeof(*lens),
NULL, 0, 0, 0, 0,
NULL);
1809 void *
data,
int *got_frame,
1820 if (avpkt->
size <= 20)
1831 case MKTAG(
' ',
'R',
'G',
'B'):
1836 case MKTAG(
' ',
'r',
'G',
'B'):
1841 case MKTAG(
'A',
'R',
'G',
'X'):
1846 case MKTAG(
'A',
'r',
'G',
'X'):
1851 case MKTAG(
'R',
'G',
'B',
'X'):
1856 case MKTAG(
'r',
'G',
'B',
'X'):
1861 case MKTAG(
'A',
'R',
'G',
'B'):
1866 case MKTAG(
'A',
'r',
'G',
'B'):
1871 case MKTAG(
'A',
'Y',
'B',
'R'):
1873 case MKTAG(
'A',
'Y',
'b',
'R'):
1878 case MKTAG(
'A',
'y',
'B',
'R'):
1880 case MKTAG(
'A',
'y',
'b',
'R'):
1885 case MKTAG(
' ',
'Y',
'B',
'R'):
1887 case MKTAG(
' ',
'Y',
'b',
'R'):
1892 case MKTAG(
' ',
'y',
'B',
'R'):
1894 case MKTAG(
' ',
'y',
'b',
'R'):
1899 case MKTAG(
'Y',
'B',
'R', 0x0a):
1904 case MKTAG(
'y',
'B',
'R', 0x0a):
1909 case MKTAG(
'C',
'A',
'4',
'p'):
1914 case MKTAG(
'C',
'A',
'4',
'i'):
1919 case MKTAG(
'B',
'Y',
'R',
'Y'):
1924 case MKTAG(
'B',
'Y',
'R',
'y'):
1929 case MKTAG(
'Y',
'b',
'Y',
'r'):
1934 case MKTAG(
'C',
'8',
'2',
'p'):
1939 case MKTAG(
'C',
'8',
'2',
'i'):
1944 case MKTAG(0xa2,
'Y',
'R',
'Y'):
1949 case MKTAG(0xa2,
'Y',
'R',
'y'):
1954 case MKTAG(
'C',
'A',
'2',
'p'):
1959 case MKTAG(
'C',
'A',
'2',
'i'):
1969 if (s->
format != format) {
2009 .
name =
"sheervideo",
static av_cold int decode_end(AVCodecContext *avctx)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void decode_c82p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
static void decode_ca2p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const SheerTable ybri[2]
static void decode_byryi(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define avpriv_request_sample(...)
static void decode_aybri(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static void decode_ybr10(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static void decode_rgbx(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
#define AV_PIX_FMT_GBRP10
static const SheerTable rgbi[2]
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static void decode_ca2i(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
AVCodec ff_sheervideo_decoder
Multithreading support functions.
#define u(width, name, range_min, range_max)
static void decode_argbi(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static void decode_rgbi(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
bitstream reader API header.
static const SheerTable ybyr[2]
static void decode_argxi(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static void decode_aybr(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const uint16_t table[]
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold int build_vlc(VLC *vlc, const SheerTable *table)
static void decode_rgb(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define av_fourcc2str(fourcc)
const char * name
Name of the codec implementation.
#define AV_PIX_FMT_YUV444P10
static const SheerTable ybr10[2]
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
static void decode_c82i(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have so the codec calls ff_thread_report set FF_CODEC_CAP_ALLOCATE_PROGRESS in AVCodec caps_internal and use ff_thread_get_buffer() to allocate frames.The frames must then be freed with ff_thread_release_buffer().Otherwise decode directly into the user-supplied frames.Call ff_thread_report_progress() after some part of the current picture has decoded.A good place to put this is where draw_horiz_band() is called-add this if it isn't called anywhere
static const SheerTable byryi[2]
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
static void decode_byry(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
static const SheerTable byry[2]
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
#define AV_PIX_FMT_YUVA444P10
static void decode_argx(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const float pred[4]
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static void decode_argb(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const SheerTable ybr10i[2]
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
static void decode_ca4p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
main external API structure.
static void decode_ca4i(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static unsigned int get_bits1(GetBitContext *s)
int ff_init_vlc_from_lengths(VLC *vlc_arg, int nb_bits, int nb_codes, const int8_t *lens, int lens_wrap, const void *symbols, int symbols_wrap, int symbols_size, int offset, int flags, void *logctx)
Build VLC decoding tables suitable for use with get_vlc2()
static void decode_ybri(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const SheerTable rgb[2]
void(* decode_frame)(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
#define AV_PIX_FMT_YUV422P10
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void decode_yry10(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
common internal api header.
static const SheerTable rgbxi[2]
static void decode_ybr10i(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
static const SheerTable ybr[2]
static const SheerTable yry10i[2]
static const SheerTable rgbx[2]
static void decode_rgbxi(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
VLC_TYPE(* table)[2]
code, bits
static void decode_ybr(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
int key_frame
1 -> keyframe, 0-> not
#define MKTAG(a, b, c, d)
static void decode_ybyr(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
void ff_free_vlc(VLC *vlc)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators...
static void decode_yry10i(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
static const SheerTable yry10[2]