94 int shift_w[4], shift_h[4];
100 int offset_y,
int offset_x,
107 #define OFFSET(x) offsetof(WaveformContext, x) 108 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM 288 int depth, rgb, i, ret,
ncomp;
331 else if (rgb && depth == 8 && ncomp > 2)
333 else if (rgb && depth == 9 && ncomp > 2)
335 else if (rgb && depth == 10 && ncomp > 2)
337 else if (rgb && depth == 12 && ncomp > 2)
339 else if (depth == 8 && ncomp > 2)
341 else if (depth == 9 && ncomp > 2)
343 else if (depth == 10 && ncomp > 2)
345 else if (depth == 12 && ncomp > 2)
357 const int dst_linesize = out->
linesize[component] / 2;
358 const int bg = s->
bg_color[component] * (s->
max / 256);
359 const int limit = s->
max - 1;
368 for (x = offset; x < offset + dst_w; x++) {
369 for (y = start; y <
end; y++) {
370 dst = (uint16_t *)out->
data[component] + y * dst_linesize + x;
376 for (y = end - 1; y >=
start; y--) {
377 dst = (uint16_t *)out->
data[component] + y * dst_linesize + x;
385 for (y = offset; y < offset + dst_h; y++) {
386 dst = (uint16_t *)out->
data[component] + y * dst_linesize;
387 for (x = start; x <
end; x++) {
393 for (x = end - 1; x >=
start; x--) {
405 const int dst_linesize = out->
linesize[component];
415 for (x = offset; x < offset + dst_w; x++) {
416 for (y = start; y <
end; y++) {
417 dst = out->
data[component] + y * dst_linesize + x;
423 for (y = end - 1; y >=
start; y--) {
424 dst = out->
data[component] + y * dst_linesize + x;
432 for (y = offset; y < offset + dst_h; y++) {
433 dst = out->
data[component] + y * dst_linesize;
434 for (x = start; x <
end; x++) {
440 for (x = end - 1; x >=
start; x--) {
452 const int dst_linesize = out->
linesize[component] / 2;
453 const int bg = s->
bg_color[component] * (s->
max / 256);
454 const int limit = s->
max - 1;
465 for (x = offset; x < offset + dst_w; x++) {
466 for (y = start; y < end && y < emin[x -
offset]; y++) {
467 dst = (uint16_t *)out->
data[component] + y * dst_linesize + x;
473 for (y = end - 1; y >= start && y >= emax[x -
offset]; y--) {
474 dst = (uint16_t *)out->
data[component] + y * dst_linesize + x;
485 for (x = offset; x < offset + dst_w; x++) {
486 dst = (uint16_t *)out->
data[component] + emin[x - offset] * dst_linesize + x;
488 dst = (uint16_t *)out->
data[component] + emax[x -
offset] * dst_linesize + x;
492 for (y = offset; y < offset + dst_h; y++) {
493 dst = (uint16_t *)out->
data[component] + y * dst_linesize;
494 for (x = start; x < end && x < emin[y -
offset]; x++) {
500 for (x = end - 1; x >= start && x >= emax[y -
offset]; x--) {
511 for (y = offset; y < offset + dst_h; y++) {
512 dst = (uint16_t *)out->
data[component] + y * dst_linesize + emin[y - offset];
514 dst = (uint16_t *)out->
data[component] + y * dst_linesize + emax[y -
offset];
522 const int dst_linesize = out->
linesize[component];
523 const int bg = s->
bg_color[component];
534 for (x = offset; x < offset + dst_w; x++) {
535 for (y = start; y < end && y < emin[x -
offset]; y++) {
536 dst = out->
data[component] + y * dst_linesize + x;
542 for (y = end - 1; y >= start && y >= emax[x -
offset]; y--) {
543 dst = out->
data[component] + y * dst_linesize + x;
554 for (x = offset; x < offset + dst_w; x++) {
555 dst = out->
data[component] + emin[x -
offset] * dst_linesize + x;
557 dst = out->
data[component] + emax[x -
offset] * dst_linesize + x;
561 for (y = offset; y < offset + dst_h; y++) {
562 dst = out->
data[component] + y * dst_linesize;
563 for (x = start; x < end && x < emin[y -
offset]; x++) {
569 for (x = end - 1; x >= start && x >= emax[y -
offset]; x--) {
580 for (y = offset; y < offset + dst_h; y++) {
581 dst = out->
data[component] + y * dst_linesize + emin[y -
offset];
583 dst = out->
data[component] + y * dst_linesize + emax[y -
offset];
629 if (*target - intensity > 0)
637 if (*target - intensity > 0)
646 int offset_y,
int offset_x,
654 const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
655 const int limit = s->
max - 1;
659 const uint16_t *src_data = (
const uint16_t *)in->
data[plane];
660 uint16_t *dst_data = (uint16_t *)out->
data[
plane] + offset_y * dst_linesize + offset_x;
661 uint16_t *
const dst_bottom_line = dst_data + dst_linesize * (s->
size - 1);
662 uint16_t *
const dst_line = (mirror ? dst_bottom_line : dst_data);
667 if (!column && mirror)
670 for (y = 0; y < src_h; y++) {
671 const uint16_t *src_data_end = src_data + src_w;
672 uint16_t *dst = dst_line;
674 for (p = src_data; p < src_data_end; p++) {
676 int i = 0, v =
FFMIN(*p, limit);
680 target = dst++ + dst_signed_linesize * v;
681 update16(target, max, intensity, limit);
682 }
while (++i < step);
684 uint16_t *row = dst_data;
687 target = row - v - 1;
690 update16(target, max, intensity, limit);
692 }
while (++i < step);
695 src_data += src_linesize;
696 dst_data += dst_linesize * step;
699 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
702 #define LOWPASS16_FUNC(name, column, mirror) \ 703 static void lowpass16_##name(WaveformContext *s, \ 704 AVFrame *in, AVFrame *out, \ 705 int component, int intensity, \ 706 int offset_y, int offset_x, \ 707 int unused1, int unused2) \ 709 lowpass16(s, in, out, component, intensity, \ 710 offset_y, offset_x, column, mirror); \ 721 int offset_y,
int offset_x,
724 const int plane = s->desc->comp[component].plane;
725 const int shift_w = s->shift_w[component];
726 const int shift_h = s->shift_h[component];
727 const int src_linesize = in->linesize[
plane];
728 const int dst_linesize = out->linesize[
plane];
729 const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
734 uint8_t *dst_data = out->data[
plane] + offset_y * dst_linesize + offset_x;
735 uint8_t *
const dst_bottom_line = dst_data + dst_linesize * (s->size - 1);
736 uint8_t *
const dst_line = (mirror ? dst_bottom_line : dst_data);
741 if (!column && mirror)
744 for (y = 0; y < src_h; y++) {
745 const uint8_t *src_data_end = src_data + src_w;
748 for (p = src_data; p < src_data_end; p++) {
751 target = dst + dst_signed_linesize * *p;
753 update(target, max, intensity);
757 target = row - *p - 1;
760 update(target, max, intensity);
764 src_data += src_linesize;
765 dst_data += dst_linesize * step;
768 if (column && step > 1) {
769 const int dst_w = s->display ==
PARADE ? out->width / s->acomp : out->width;
770 const int dst_h = 256;
774 dst = out->data[
plane] + offset_y * dst_linesize + offset_x;
775 for (y = 0; y < dst_h; y++) {
776 for (x = 0; x < dst_w; x+=step) {
777 for (z = 1; z < step; z++) {
783 }
else if (step > 1) {
784 const int dst_h = s->display ==
PARADE ? out->height / s->acomp : out->height;
785 const int dst_w = 256;
789 dst = out->data[
plane] + offset_y * dst_linesize + offset_x;
790 for (y = 0; y < dst_h; y+=step) {
791 for (z = 1; z < step; z++)
792 memcpy(dst + dst_linesize * z, dst, dst_w);
793 dst += dst_linesize * step;
797 envelope(s, out, plane, plane, column ? offset_x : offset_y);
800 #define LOWPASS_FUNC(name, column, mirror) \ 801 static void lowpass_##name(WaveformContext *s, \ 802 AVFrame *in, AVFrame *out, \ 803 int component, int intensity, \ 804 int offset_y, int offset_x, \ 805 int unused1, int unused2) \ 807 lowpass(s, in, out, component, intensity, \ 808 offset_y, offset_x, column, mirror); \ 819 int offset_y,
int offset_x,
822 const int plane = s->desc->comp[component].plane;
823 const int c0_linesize = in->linesize[ plane + 0 ] / 2;
824 const int c1_linesize = in->linesize[(plane + 1) % s->ncomp] / 2;
825 const int c2_linesize = in->linesize[(plane + 2) % s->ncomp] / 2;
826 const int c0_shift_w = s->shift_w[ component + 0 ];
827 const int c1_shift_w = s->shift_w[(component + 1) % s->ncomp];
828 const int c2_shift_w = s->shift_w[(component + 2) % s->ncomp];
829 const int c0_shift_h = s->shift_h[ component + 0 ];
830 const int c1_shift_h = s->shift_h[(component + 1) % s->ncomp];
831 const int c2_shift_h = s->shift_h[(component + 2) % s->ncomp];
832 const int d0_linesize = out->linesize[ plane + 0 ] / 2;
833 const int d1_linesize = out->linesize[(plane + 1) % s->ncomp] / 2;
834 const int limit = s->max - 1;
835 const int max = limit - intensity;
836 const int mid = s->max / 2;
837 const int src_h = in->height;
838 const int src_w = in->width;
842 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
843 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
845 for (x = 0; x < src_w; x++) {
846 const uint16_t *c0_data = (uint16_t *)in->data[plane + 0];
847 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 1) % s->ncomp];
848 const uint16_t *c2_data = (uint16_t *)in->data[(plane + 2) % s->ncomp];
849 uint16_t *d0_data = (uint16_t *)(out->data[
plane]) + offset_y * d0_linesize + offset_x;
850 uint16_t *d1_data = (uint16_t *)(out->data[(plane + 1) % s->ncomp]) + offset_y * d1_linesize + offset_x;
851 uint16_t *
const d0_bottom_line = d0_data + d0_linesize * (s->size - 1);
852 uint16_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
853 uint16_t *
const d1_bottom_line = d1_data + d1_linesize * (s->size - 1);
854 uint16_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
856 for (y = 0; y < src_h; y++) {
857 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit) + s->max;
858 const int c1 =
FFMIN(
FFABS(c1_data[x >> c1_shift_w] - mid) +
FFABS(c2_data[x >> c2_shift_w] - mid), limit);
861 target = d0 + x + d0_signed_linesize * c0;
863 target = d1 + x + d1_signed_linesize * (c0 -
c1);
865 target = d1 + x + d1_signed_linesize * (c0 +
c1);
868 if (!c0_shift_h || (y & c0_shift_h))
869 c0_data += c0_linesize;
870 if (!c1_shift_h || (y & c1_shift_h))
871 c1_data += c1_linesize;
872 if (!c2_shift_h || (y & c2_shift_h))
873 c2_data += c2_linesize;
874 d0_data += d0_linesize;
875 d1_data += d1_linesize;
879 const uint16_t *c0_data = (uint16_t *)in->data[plane];
880 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 1) % s->ncomp];
881 const uint16_t *c2_data = (uint16_t *)in->data[(plane + 2) % s->ncomp];
882 uint16_t *d0_data = (uint16_t *)(out->data[
plane]) + offset_y * d0_linesize + offset_x;
883 uint16_t *d1_data = (uint16_t *)(out->data[(plane + 1) % s->ncomp]) + offset_y * d1_linesize + offset_x;
886 d0_data += s->size - 1;
887 d1_data += s->size - 1;
890 for (y = 0; y < src_h; y++) {
891 for (x = 0; x < src_w; x++) {
892 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit) + s->max;
893 const int c1 =
FFMIN(
FFABS(c1_data[x >> c1_shift_w] - mid) +
FFABS(c2_data[x >> c2_shift_w] - mid), limit);
897 target = d0_data - c0;
899 target = d1_data - (c0 -
c1);
901 target = d1_data - (c0 +
c1);
904 target = d0_data + c0;
906 target = d1_data + (c0 -
c1);
908 target = d1_data + (c0 +
c1);
913 if (!c0_shift_h || (y & c0_shift_h))
914 c0_data += c0_linesize;
915 if (!c1_shift_h || (y & c1_shift_h))
916 c1_data += c1_linesize;
917 if (!c2_shift_h || (y & c2_shift_h))
918 c2_data += c2_linesize;
919 d0_data += d0_linesize;
920 d1_data += d1_linesize;
924 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
925 envelope16(s, out, plane, (plane + 1) % s->ncomp, column ? offset_x : offset_y);
931 int offset_y,
int offset_x,
935 const int c0_linesize = in->
linesize[ plane + 0 ];
936 const int c1_linesize = in->
linesize[(plane + 1) % s->
ncomp];
937 const int c2_linesize = in->
linesize[(plane + 2) % s->
ncomp];
938 const int c0_shift_w = s->
shift_w[ component + 0 ];
939 const int c1_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
940 const int c2_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
941 const int c0_shift_h = s->
shift_h[ component + 0 ];
942 const int c1_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
943 const int c2_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
944 const int d0_linesize = out->
linesize[ plane + 0 ];
945 const int d1_linesize = out->
linesize[(plane + 1) % s->
ncomp];
946 const int max = 255 - intensity;
947 const int src_h = in->
height;
948 const int src_w = in->
width;
952 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
953 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
955 for (x = 0; x < src_w; x++) {
960 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
961 uint8_t *
const d0_bottom_line = d0_data + d0_linesize * (s->
size - 1);
962 uint8_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
963 uint8_t *
const d1_bottom_line = d1_data + d1_linesize * (s->
size - 1);
964 uint8_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
966 for (y = 0; y < src_h; y++) {
967 const int c0 = c0_data[x >> c0_shift_w] + 256;
968 const int c1 =
FFABS(c1_data[x >> c1_shift_w] - 128) +
FFABS(c2_data[x >> c2_shift_w] - 128);
971 target = d0 + x + d0_signed_linesize * c0;
973 target = d1 + x + d1_signed_linesize * (c0 -
c1);
975 target = d1 + x + d1_signed_linesize * (c0 +
c1);
978 if (!c0_shift_h || (y & c0_shift_h))
979 c0_data += c0_linesize;
980 if (!c1_shift_h || (y & c1_shift_h))
981 c1_data += c1_linesize;
982 if (!c2_shift_h || (y & c2_shift_h))
983 c2_data += c2_linesize;
984 d0_data += d0_linesize;
985 d1_data += d1_linesize;
993 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
996 d0_data += s->
size - 1;
997 d1_data += s->
size - 1;
1000 for (y = 0; y < src_h; y++) {
1001 for (x = 0; x < src_w; x++) {
1002 int c0 = c0_data[x >> c0_shift_w] + 256;
1003 const int c1 =
FFABS(c1_data[x >> c1_shift_w] - 128) +
FFABS(c2_data[x >> c2_shift_w] - 128);
1007 target = d0_data - c0;
1009 target = d1_data - (c0 -
c1);
1011 target = d1_data - (c0 +
c1);
1014 target = d0_data + c0;
1016 target = d1_data + (c0 -
c1);
1018 target = d1_data + (c0 +
c1);
1023 if (!c0_shift_h || (y & c0_shift_h))
1024 c0_data += c0_linesize;
1025 if (!c1_shift_h || (y & c1_shift_h))
1026 c1_data += c1_linesize;
1027 if (!c2_shift_h || (y & c2_shift_h))
1028 c2_data += c2_linesize;
1029 d0_data += d0_linesize;
1030 d1_data += d1_linesize;
1034 envelope(s, out, plane, plane, column ? offset_x : offset_y);
1035 envelope(s, out, plane, (plane + 1) % s->
ncomp, column ? offset_x : offset_y);
1038 #define AFLAT16(name, update_cr, column, mirror) \ 1039 static av_always_inline void name (WaveformContext *s, \ 1040 AVFrame *in, AVFrame *out, \ 1041 int component, int intensity, \ 1042 int offset_y, int offset_x, \ 1043 int unused1, int unused2) \ 1045 const int plane = s->desc->comp[component].plane; \ 1046 const int c0_linesize = in->linesize[ plane + 0 ] / 2; \ 1047 const int c1_linesize = in->linesize[(plane + 1) % s->ncomp] / 2; \ 1048 const int c2_linesize = in->linesize[(plane + 2) % s->ncomp] / 2; \ 1049 const int c0_shift_w = s->shift_w[ component + 0 ]; \ 1050 const int c1_shift_w = s->shift_w[(component + 1) % s->ncomp]; \ 1051 const int c2_shift_w = s->shift_w[(component + 2) % s->ncomp]; \ 1052 const int c0_shift_h = s->shift_h[ component + 0 ]; \ 1053 const int c1_shift_h = s->shift_h[(component + 1) % s->ncomp]; \ 1054 const int c2_shift_h = s->shift_h[(component + 2) % s->ncomp]; \ 1055 const int d0_linesize = out->linesize[ plane + 0 ] / 2; \ 1056 const int d1_linesize = out->linesize[(plane + 1) % s->ncomp] / 2; \ 1057 const int d2_linesize = out->linesize[(plane + 2) % s->ncomp] / 2; \ 1058 const int limit = s->max - 1; \ 1059 const int max = limit - intensity; \ 1060 const int mid = s->max / 2; \ 1061 const int src_h = in->height; \ 1062 const int src_w = in->width; \ 1066 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1); \ 1067 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1); \ 1068 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1); \ 1070 for (x = 0; x < src_w; x++) { \ 1071 const uint16_t *c0_data = (uint16_t *)in->data[plane + 0]; \ 1072 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 1) % s->ncomp]; \ 1073 const uint16_t *c2_data = (uint16_t *)in->data[(plane + 2) % s->ncomp]; \ 1074 uint16_t *d0_data = (uint16_t *)out->data[plane] + offset_y * d0_linesize + offset_x; \ 1075 uint16_t *d1_data = (uint16_t *)out->data[(plane + 1) % s->ncomp] + offset_y * d1_linesize + offset_x; \ 1076 uint16_t *d2_data = (uint16_t *)out->data[(plane + 2) % s->ncomp] + offset_y * d2_linesize + offset_x; \ 1077 uint16_t * const d0_bottom_line = d0_data + d0_linesize * (s->size - 1); \ 1078 uint16_t * const d0 = (mirror ? d0_bottom_line : d0_data); \ 1079 uint16_t * const d1_bottom_line = d1_data + d1_linesize * (s->size - 1); \ 1080 uint16_t * const d1 = (mirror ? d1_bottom_line : d1_data); \ 1081 uint16_t * const d2_bottom_line = d2_data + d2_linesize * (s->size - 1); \ 1082 uint16_t * const d2 = (mirror ? d2_bottom_line : d2_data); \ 1084 for (y = 0; y < src_h; y++) { \ 1085 const int c0 = FFMIN(c0_data[x >> c0_shift_w], limit) + mid; \ 1086 const int c1 = FFMIN(c1_data[x >> c1_shift_w], limit) - mid; \ 1087 const int c2 = FFMIN(c2_data[x >> c2_shift_w], limit) - mid; \ 1090 target = d0 + x + d0_signed_linesize * c0; \ 1091 update16(target, max, intensity, limit); \ 1093 target = d1 + x + d1_signed_linesize * (c0 + c1); \ 1094 update16(target, max, intensity, limit); \ 1096 target = d2 + x + d2_signed_linesize * (c0 + c2); \ 1097 update_cr(target, max, intensity, limit); \ 1099 if (!c0_shift_h || (y & c0_shift_h)) \ 1100 c0_data += c0_linesize; \ 1101 if (!c1_shift_h || (y & c1_shift_h)) \ 1102 c1_data += c1_linesize; \ 1103 if (!c2_shift_h || (y & c2_shift_h)) \ 1104 c2_data += c2_linesize; \ 1105 d0_data += d0_linesize; \ 1106 d1_data += d1_linesize; \ 1107 d2_data += d2_linesize; \ 1111 const uint16_t *c0_data = (uint16_t *)in->data[plane]; \ 1112 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 1) % s->ncomp]; \ 1113 const uint16_t *c2_data = (uint16_t *)in->data[(plane + 2) % s->ncomp]; \ 1114 uint16_t *d0_data = (uint16_t *)out->data[plane] + offset_y * d0_linesize + offset_x; \ 1115 uint16_t *d1_data = (uint16_t *)out->data[(plane + 1) % s->ncomp] + offset_y * d1_linesize + offset_x; \ 1116 uint16_t *d2_data = (uint16_t *)out->data[(plane + 2) % s->ncomp] + offset_y * d2_linesize + offset_x; \ 1119 d0_data += s->size - 1; \ 1120 d1_data += s->size - 1; \ 1121 d2_data += s->size - 1; \ 1124 for (y = 0; y < src_h; y++) { \ 1125 for (x = 0; x < src_w; x++) { \ 1126 const int c0 = FFMIN(c0_data[x >> c0_shift_w], limit) + mid; \ 1127 const int c1 = FFMIN(c1_data[x >> c1_shift_w], limit) - mid; \ 1128 const int c2 = FFMIN(c2_data[x >> c2_shift_w], limit) - mid; \ 1132 target = d0_data - c0; \ 1133 update16(target, max, intensity, limit); \ 1134 target = d1_data - (c0 + c1); \ 1135 update16(target, max, intensity, limit); \ 1136 target = d2_data - (c0 + c2); \ 1137 update_cr(target, max, intensity, limit); \ 1139 target = d0_data + c0; \ 1140 update16(target, max, intensity, limit); \ 1141 target = d1_data + (c0 + c1); \ 1142 update16(target, max, intensity, limit); \ 1143 target = d2_data + (c0 + c2); \ 1144 update_cr(target, max, intensity, limit); \ 1148 if (!c0_shift_h || (y & c0_shift_h)) \ 1149 c0_data += c0_linesize; \ 1150 if (!c1_shift_h || (y & c1_shift_h)) \ 1151 c1_data += c1_linesize; \ 1152 if (!c2_shift_h || (y & c2_shift_h)) \ 1153 c2_data += c2_linesize; \ 1154 d0_data += d0_linesize; \ 1155 d1_data += d1_linesize; \ 1156 d2_data += d2_linesize; \ 1160 envelope16(s, out, plane, (plane + 0) % s->ncomp, column ? offset_x : offset_y); \ 1161 envelope16(s, out, plane, (plane + 1) % s->ncomp, column ? offset_x : offset_y); \ 1162 envelope16(s, out, plane, (plane + 2) % s->ncomp, column ? offset_x : offset_y); \ 1165 #define AFLAT(name, update_cr, column, mirror) \ 1166 static av_always_inline void name(WaveformContext *s, \ 1167 AVFrame *in, AVFrame *out, \ 1168 int component, int intensity, \ 1169 int offset_y, int offset_x, \ 1170 int unused1, int unused2) \ 1172 const int plane = s->desc->comp[component].plane; \ 1173 const int c0_linesize = in->linesize[ plane + 0 ]; \ 1174 const int c1_linesize = in->linesize[(plane + 1) % s->ncomp]; \ 1175 const int c2_linesize = in->linesize[(plane + 2) % s->ncomp]; \ 1176 const int c0_shift_w = s->shift_w[ component + 0 ]; \ 1177 const int c1_shift_w = s->shift_w[(component + 1) % s->ncomp]; \ 1178 const int c2_shift_w = s->shift_w[(component + 2) % s->ncomp]; \ 1179 const int c0_shift_h = s->shift_h[ component + 0 ]; \ 1180 const int c1_shift_h = s->shift_h[(component + 1) % s->ncomp]; \ 1181 const int c2_shift_h = s->shift_h[(component + 2) % s->ncomp]; \ 1182 const int d0_linesize = out->linesize[ plane + 0 ]; \ 1183 const int d1_linesize = out->linesize[(plane + 1) % s->ncomp]; \ 1184 const int d2_linesize = out->linesize[(plane + 2) % s->ncomp]; \ 1185 const int max = 255 - intensity; \ 1186 const int src_h = in->height; \ 1187 const int src_w = in->width; \ 1191 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1); \ 1192 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1); \ 1193 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1); \ 1195 for (x = 0; x < src_w; x++) { \ 1196 const uint8_t *c0_data = in->data[plane + 0]; \ 1197 const uint8_t *c1_data = in->data[(plane + 1) % s->ncomp]; \ 1198 const uint8_t *c2_data = in->data[(plane + 2) % s->ncomp]; \ 1199 uint8_t *d0_data = out->data[plane] + offset_y * d0_linesize + offset_x; \ 1200 uint8_t *d1_data = out->data[(plane + 1) % s->ncomp] + offset_y * d1_linesize + offset_x; \ 1201 uint8_t *d2_data = out->data[(plane + 2) % s->ncomp] + offset_y * d2_linesize + offset_x; \ 1202 uint8_t * const d0_bottom_line = d0_data + d0_linesize * (s->size - 1); \ 1203 uint8_t * const d0 = (mirror ? d0_bottom_line : d0_data); \ 1204 uint8_t * const d1_bottom_line = d1_data + d1_linesize * (s->size - 1); \ 1205 uint8_t * const d1 = (mirror ? d1_bottom_line : d1_data); \ 1206 uint8_t * const d2_bottom_line = d2_data + d2_linesize * (s->size - 1); \ 1207 uint8_t * const d2 = (mirror ? d2_bottom_line : d2_data); \ 1209 for (y = 0; y < src_h; y++) { \ 1210 const int c0 = c0_data[x >> c0_shift_w] + 128; \ 1211 const int c1 = c1_data[x >> c1_shift_w] - 128; \ 1212 const int c2 = c2_data[x >> c2_shift_w] - 128; \ 1215 target = d0 + x + d0_signed_linesize * c0; \ 1216 update(target, max, intensity); \ 1218 target = d1 + x + d1_signed_linesize * (c0 + c1); \ 1219 update(target, max, intensity); \ 1221 target = d2 + x + d2_signed_linesize * (c0 + c2); \ 1222 update_cr(target, max, intensity); \ 1224 if (!c0_shift_h || (y & c0_shift_h)) \ 1225 c0_data += c0_linesize; \ 1226 if (!c1_shift_h || (y & c1_shift_h)) \ 1227 c1_data += c1_linesize; \ 1228 if (!c1_shift_h || (y & c1_shift_h)) \ 1229 c2_data += c1_linesize; \ 1230 d0_data += d0_linesize; \ 1231 d1_data += d1_linesize; \ 1232 d2_data += d2_linesize; \ 1236 const uint8_t *c0_data = in->data[plane]; \ 1237 const uint8_t *c1_data = in->data[(plane + 1) % s->ncomp]; \ 1238 const uint8_t *c2_data = in->data[(plane + 2) % s->ncomp]; \ 1239 uint8_t *d0_data = out->data[plane] + offset_y * d0_linesize + offset_x; \ 1240 uint8_t *d1_data = out->data[(plane + 1) % s->ncomp] + offset_y * d1_linesize + offset_x; \ 1241 uint8_t *d2_data = out->data[(plane + 2) % s->ncomp] + offset_y * d2_linesize + offset_x; \ 1244 d0_data += s->size - 1; \ 1245 d1_data += s->size - 1; \ 1246 d2_data += s->size - 1; \ 1249 for (y = 0; y < src_h; y++) { \ 1250 for (x = 0; x < src_w; x++) { \ 1251 const int c0 = c0_data[x >> c0_shift_w] + 128; \ 1252 const int c1 = c1_data[x >> c1_shift_w] - 128; \ 1253 const int c2 = c2_data[x >> c2_shift_w] - 128; \ 1257 target = d0_data - c0; \ 1258 update(target, max, intensity); \ 1259 target = d1_data - (c0 + c1); \ 1260 update(target, max, intensity); \ 1261 target = d2_data - (c0 + c2); \ 1262 update_cr(target, max, intensity); \ 1264 target = d0_data + c0; \ 1265 update(target, max, intensity); \ 1266 target = d1_data + (c0 + c1); \ 1267 update(target, max, intensity); \ 1268 target = d2_data + (c0 + c2); \ 1269 update_cr(target, max, intensity); \ 1273 if (!c0_shift_h || (y & c0_shift_h)) \ 1274 c0_data += c0_linesize; \ 1275 if (!c1_shift_h || (y & c1_shift_h)) \ 1276 c1_data += c1_linesize; \ 1277 if (!c2_shift_h || (y & c2_shift_h)) \ 1278 c2_data += c2_linesize; \ 1279 d0_data += d0_linesize; \ 1280 d1_data += d1_linesize; \ 1281 d2_data += d2_linesize; \ 1285 envelope(s, out, plane, (plane + 0) % s->ncomp, column ? offset_x : offset_y); \ 1286 envelope(s, out, plane, (plane + 1) % s->ncomp, column ? offset_x : offset_y); \ 1287 envelope(s, out, plane, (plane + 2) % s->ncomp, column ? offset_x : offset_y); \ 1292 AFLAT16(aflat16_column, update16, 1, 0)
1293 AFLAT16(aflat16_column_mirror, update16, 1, 1)
1295 AFLAT16(xflat16_row_mirror, update16_cr, 0, 1)
1296 AFLAT16(xflat16_column, update16_cr, 1, 0)
1297 AFLAT16(xflat16_column_mirror, update16_cr, 1, 1)
1300 AFLAT(aflat_row_mirror, update, 0, 1)
1301 AFLAT(aflat_column, update, 1, 0)
1302 AFLAT(aflat_column_mirror, update, 1, 1)
1304 AFLAT(xflat_row_mirror, update_cr, 0, 1)
1305 AFLAT(xflat_column, update_cr, 1, 0)
1306 AFLAT(xflat_column_mirror, update_cr, 1, 1)
1311 int offset_y,
int offset_x,
1314 const int plane = s->desc->comp[component].plane;
1315 const int c0_linesize = in->linesize[(plane + 1) % s->ncomp] / 2;
1316 const int c1_linesize = in->linesize[(plane + 2) % s->ncomp] / 2;
1317 const int dst_linesize = out->linesize[
plane] / 2;
1318 const int limit = s->max - 1;
1320 const int mid = s->max / 2;
1321 const int c0_shift_w = s->shift_w[(component + 1) % s->ncomp];
1322 const int c1_shift_w = s->shift_w[(component + 2) % s->ncomp];
1323 const int c0_shift_h = s->shift_h[(component + 1) % s->ncomp];
1324 const int c1_shift_h = s->shift_h[(component + 2) % s->ncomp];
1325 const int src_h = in->height;
1326 const int src_w = in->width;
1330 const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
1332 for (x = 0; x < src_w; x++) {
1333 const uint16_t *c0_data = (uint16_t *)in->data[(plane + 1) % s->ncomp];
1334 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 2) % s->ncomp];
1335 uint16_t *dst_data = (uint16_t *)out->data[plane] + offset_y * dst_linesize + offset_x;
1336 uint16_t *
const dst_bottom_line = dst_data + dst_linesize * (s->size - 1);
1337 uint16_t *
const dst_line = (mirror ? dst_bottom_line : dst_data);
1338 uint16_t *dst = dst_line;
1340 for (y = 0; y < src_h; y++) {
1341 const int sum =
FFMIN(
FFABS(c0_data[x >> c0_shift_w] - mid) +
FFABS(c1_data[x >> c1_shift_w] - mid - 1), limit);
1344 target = dst + x + dst_signed_linesize * sum;
1345 update16(target, max, intensity, limit);
1347 if (!c0_shift_h || (y & c0_shift_h))
1348 c0_data += c0_linesize;
1349 if (!c1_shift_h || (y & c1_shift_h))
1350 c1_data += c1_linesize;
1351 dst_data += dst_linesize;
1355 const uint16_t *c0_data = (uint16_t *)in->data[(plane + 1) % s->ncomp];
1356 const uint16_t *c1_data = (uint16_t *)in->data[(plane + 2) % s->ncomp];
1357 uint16_t *dst_data = (uint16_t *)out->data[plane] + offset_y * dst_linesize + offset_x;
1360 dst_data += s->size - 1;
1361 for (y = 0; y < src_h; y++) {
1362 for (x = 0; x < src_w; x++) {
1363 const int sum =
FFMIN(
FFABS(c0_data[x >> c0_shift_w] - mid) +
FFABS(c1_data[x >> c1_shift_w] - mid - 1), limit);
1367 target = dst_data - sum;
1368 update16(target, max, intensity, limit);
1370 target = dst_data + sum;
1371 update16(target, max, intensity, limit);
1375 if (!c0_shift_h || (y & c0_shift_h))
1376 c0_data += c0_linesize;
1377 if (!c1_shift_h || (y & c1_shift_h))
1378 c1_data += c1_linesize;
1379 dst_data += dst_linesize;
1383 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
1389 int offset_y,
int offset_x,
1393 const int c0_linesize = in->
linesize[(plane + 1) % s->
ncomp];
1394 const int c1_linesize = in->
linesize[(plane + 2) % s->
ncomp];
1397 const int c0_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
1398 const int c1_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
1399 const int c0_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
1400 const int c1_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
1401 const int src_h = in->
height;
1402 const int src_w = in->
width;
1406 const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
1408 for (x = 0; x < src_w; x++) {
1412 uint8_t *
const dst_bottom_line = dst_data + dst_linesize * (s->
size - 1);
1413 uint8_t *
const dst_line = (mirror ? dst_bottom_line : dst_data);
1416 for (y = 0; y < src_h; y++) {
1417 const int sum =
FFABS(c0_data[x >> c0_shift_w] - 128) +
FFABS(c1_data[x >> c1_shift_w] - 127);
1420 target = dst + x + dst_signed_linesize * sum;
1421 update(target, max, intensity);
1423 if (!c0_shift_h || (y & c0_shift_h))
1424 c0_data += c0_linesize;
1425 if (!c1_shift_h || (y & c1_shift_h))
1426 c1_data += c1_linesize;
1427 dst_data += dst_linesize;
1436 dst_data += s->
size - 1;
1437 for (y = 0; y < src_h; y++) {
1438 for (x = 0; x < src_w; x++) {
1439 const int sum =
FFABS(c0_data[x >> c0_shift_w] - 128) +
FFABS(c1_data[x >> c1_shift_w] - 127);
1443 target = dst_data - sum;
1444 update(target, max, intensity);
1446 target = dst_data + sum;
1447 update(target, max, intensity);
1451 if (!c0_shift_h || (y & c0_shift_h))
1452 c0_data += c0_linesize;
1453 if (!c1_shift_h || (y & c1_shift_h))
1454 c1_data += c1_linesize;
1455 dst_data += dst_linesize;
1459 envelope(s, out, plane, plane, column ? offset_x : offset_y);
1465 int offset_y,
int offset_x,
1469 const int limit = s->
max - 1;
1470 const uint16_t *c0_data = (
const uint16_t *)in->
data[plane + 0];
1471 const uint16_t *c1_data = (
const uint16_t *)in->
data[(plane + 1) % s->
ncomp];
1472 const uint16_t *c2_data = (
const uint16_t *)in->
data[(plane + 2) % s->
ncomp];
1473 const int c0_linesize = in->
linesize[ plane + 0 ] / 2;
1474 const int c1_linesize = in->
linesize[(plane + 1) % s->
ncomp] / 2;
1475 const int c2_linesize = in->
linesize[(plane + 2) % s->
ncomp] / 2;
1476 const int d0_linesize = out->
linesize[ plane + 0 ] / 2;
1477 const int d1_linesize = out->
linesize[(plane + 1) % s->
ncomp] / 2;
1478 const int d2_linesize = out->
linesize[(plane + 2) % s->
ncomp] / 2;
1479 const int c0_shift_w = s->
shift_w[ component + 0 ];
1480 const int c1_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
1481 const int c2_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
1482 const int c0_shift_h = s->
shift_h[ component + 0 ];
1483 const int c1_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
1484 const int c2_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
1485 const int src_h = in->
height;
1486 const int src_w = in->
width;
1490 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
1491 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
1492 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1);
1493 uint16_t *d0_data = (uint16_t *)out->
data[plane] + offset_y * d0_linesize + offset_x;
1494 uint16_t *d1_data = (uint16_t *)out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1495 uint16_t *d2_data = (uint16_t *)out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1496 uint16_t *
const d0_bottom_line = d0_data + d0_linesize * (s->
size - 1);
1497 uint16_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
1498 uint16_t *
const d1_bottom_line = d1_data + d1_linesize * (s->
size - 1);
1499 uint16_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
1500 uint16_t *
const d2_bottom_line = d2_data + d2_linesize * (s->
size - 1);
1501 uint16_t *
const d2 = (mirror ? d2_bottom_line : d2_data);
1503 for (y = 0; y < src_h; y++) {
1504 for (x = 0; x < src_w; x++) {
1505 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit);
1506 const int c1 = c1_data[x >> c1_shift_w];
1507 const int c2 = c2_data[x >> c2_shift_w];
1509 *(d0 + d0_signed_linesize * c0 + x) = c0;
1510 *(d1 + d1_signed_linesize * c0 + x) = c1;
1511 *(d2 + d2_signed_linesize * c0 + x) = c2;
1514 if (!c0_shift_h || (y & c0_shift_h))
1515 c0_data += c0_linesize;
1516 if (!c1_shift_h || (y & c1_shift_h))
1517 c1_data += c1_linesize;
1518 if (!c2_shift_h || (y & c2_shift_h))
1519 c2_data += c2_linesize;
1520 d0_data += d0_linesize;
1521 d1_data += d1_linesize;
1522 d2_data += d2_linesize;
1525 uint16_t *d0_data = (uint16_t *)out->
data[plane] + offset_y * d0_linesize + offset_x;
1526 uint16_t *d1_data = (uint16_t *)out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1527 uint16_t *d2_data = (uint16_t *)out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1530 d0_data += s->
size - 1;
1531 d1_data += s->
size - 1;
1532 d2_data += s->
size - 1;
1535 for (y = 0; y < src_h; y++) {
1536 for (x = 0; x < src_w; x++) {
1537 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit);
1538 const int c1 = c1_data[x >> c1_shift_w];
1539 const int c2 = c2_data[x >> c2_shift_w];
1542 *(d0_data - c0) = c0;
1543 *(d1_data - c0) = c1;
1544 *(d2_data - c0) = c2;
1546 *(d0_data + c0) = c0;
1547 *(d1_data + c0) = c1;
1548 *(d2_data + c0) = c2;
1552 if (!c0_shift_h || (y & c0_shift_h))
1553 c0_data += c0_linesize;
1554 if (!c1_shift_h || (y & c1_shift_h))
1555 c1_data += c1_linesize;
1556 if (!c2_shift_h || (y & c2_shift_h))
1557 c2_data += c2_linesize;
1558 d0_data += d0_linesize;
1559 d1_data += d1_linesize;
1560 d2_data += d2_linesize;
1564 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
1570 int offset_y,
int offset_x,
1577 const int c0_linesize = in->
linesize[ plane + 0 ];
1578 const int c1_linesize = in->
linesize[(plane + 1) % s->
ncomp];
1579 const int c2_linesize = in->
linesize[(plane + 2) % s->
ncomp];
1580 const int d0_linesize = out->
linesize[ plane + 0 ];
1581 const int d1_linesize = out->
linesize[(plane + 1) % s->
ncomp];
1582 const int d2_linesize = out->
linesize[(plane + 2) % s->
ncomp];
1583 const int c0_shift_w = s->
shift_w[ component + 0 ];
1584 const int c1_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
1585 const int c2_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
1586 const int c0_shift_h = s->
shift_h[ component + 0 ];
1587 const int c1_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
1588 const int c2_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
1589 const int src_h = in->
height;
1590 const int src_w = in->
width;
1594 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
1595 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
1596 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1);
1598 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1599 uint8_t *d2_data = out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1600 uint8_t *
const d0_bottom_line = d0_data + d0_linesize * (s->
size - 1);
1601 uint8_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
1602 uint8_t *
const d1_bottom_line = d1_data + d1_linesize * (s->
size - 1);
1603 uint8_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
1604 uint8_t *
const d2_bottom_line = d2_data + d2_linesize * (s->
size - 1);
1605 uint8_t *
const d2 = (mirror ? d2_bottom_line : d2_data);
1607 for (y = 0; y < src_h; y++) {
1608 for (x = 0; x < src_w; x++) {
1609 const int c0 = c0_data[x >> c0_shift_w];
1610 const int c1 = c1_data[x >> c1_shift_w];
1611 const int c2 = c2_data[x >> c2_shift_w];
1613 *(d0 + d0_signed_linesize * c0 + x) = c0;
1614 *(d1 + d1_signed_linesize * c0 + x) = c1;
1615 *(d2 + d2_signed_linesize * c0 + x) = c2;
1618 if (!c0_shift_h || (y & c0_shift_h))
1619 c0_data += c0_linesize;
1620 if (!c1_shift_h || (y & c1_shift_h))
1621 c1_data += c1_linesize;
1622 if (!c2_shift_h || (y & c2_shift_h))
1623 c2_data += c2_linesize;
1624 d0_data += d0_linesize;
1625 d1_data += d1_linesize;
1626 d2_data += d2_linesize;
1630 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1631 uint8_t *d2_data = out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1634 d0_data += s->
size - 1;
1635 d1_data += s->
size - 1;
1636 d2_data += s->
size - 1;
1639 for (y = 0; y < src_h; y++) {
1640 for (x = 0; x < src_w; x++) {
1641 const int c0 = c0_data[x >> c0_shift_w];
1642 const int c1 = c1_data[x >> c1_shift_w];
1643 const int c2 = c2_data[x >> c2_shift_w];
1646 *(d0_data - c0) = c0;
1647 *(d1_data - c0) = c1;
1648 *(d2_data - c0) = c2;
1650 *(d0_data + c0) = c0;
1651 *(d1_data + c0) = c1;
1652 *(d2_data + c0) = c2;
1656 if (!c0_shift_h || (y & c0_shift_h))
1657 c0_data += c0_linesize;
1658 if (!c1_shift_h || (y & c1_shift_h))
1659 c1_data += c1_linesize;
1660 if (!c2_shift_h || (y & c2_shift_h))
1661 c2_data += c2_linesize;
1662 d0_data += d0_linesize;
1663 d1_data += d1_linesize;
1664 d2_data += d2_linesize;
1668 envelope(s, out, plane, plane, column ? offset_x : offset_y);
1674 int offset_y,
int offset_x,
1678 const int limit = s->
max - 1;
1680 const uint16_t *c0_data = (
const uint16_t *)in->
data[plane + 0];
1681 const uint16_t *c1_data = (
const uint16_t *)in->
data[(plane + 1) % s->
ncomp];
1682 const uint16_t *c2_data = (
const uint16_t *)in->
data[(plane + 2) % s->
ncomp];
1683 const int c0_linesize = in->
linesize[ plane + 0 ] / 2;
1684 const int c1_linesize = in->
linesize[(plane + 1) % s->
ncomp] / 2;
1685 const int c2_linesize = in->
linesize[(plane + 2) % s->
ncomp] / 2;
1686 const int d0_linesize = out->
linesize[ plane + 0 ] / 2;
1687 const int d1_linesize = out->
linesize[(plane + 1) % s->
ncomp] / 2;
1688 const int d2_linesize = out->
linesize[(plane + 2) % s->
ncomp] / 2;
1689 const int c0_shift_w = s->
shift_w[ component + 0 ];
1690 const int c1_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
1691 const int c2_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
1692 const int c0_shift_h = s->
shift_h[ component + 0 ];
1693 const int c1_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
1694 const int c2_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
1695 const int src_h = in->
height;
1696 const int src_w = in->
width;
1700 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
1701 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
1702 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1);
1703 uint16_t *d0_data = (uint16_t *)out->
data[plane] + offset_y * d0_linesize + offset_x;
1704 uint16_t *d1_data = (uint16_t *)out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1705 uint16_t *d2_data = (uint16_t *)out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1706 uint16_t *
const d0_bottom_line = d0_data + d0_linesize * (s->
size - 1);
1707 uint16_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
1708 uint16_t *
const d1_bottom_line = d1_data + d1_linesize * (s->
size - 1);
1709 uint16_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
1710 uint16_t *
const d2_bottom_line = d2_data + d2_linesize * (s->
size - 1);
1711 uint16_t *
const d2 = (mirror ? d2_bottom_line : d2_data);
1713 for (y = 0; y < src_h; y++) {
1714 for (x = 0; x < src_w; x++) {
1715 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit);
1716 const int c1 = c1_data[x >> c1_shift_w];
1717 const int c2 = c2_data[x >> c2_shift_w];
1719 update16(d0 + d0_signed_linesize * c0 + x, max, intensity, limit);
1720 *(d1 + d1_signed_linesize * c0 + x) = c1;
1721 *(d2 + d2_signed_linesize * c0 + x) = c2;
1724 if (!c0_shift_h || (y & c0_shift_h))
1725 c0_data += c0_linesize;
1726 if (!c1_shift_h || (y & c1_shift_h))
1727 c1_data += c1_linesize;
1728 if (!c2_shift_h || (y & c2_shift_h))
1729 c2_data += c2_linesize;
1730 d0_data += d0_linesize;
1731 d1_data += d1_linesize;
1732 d2_data += d2_linesize;
1735 uint16_t *d0_data = (uint16_t *)out->
data[plane] + offset_y * d0_linesize + offset_x;
1736 uint16_t *d1_data = (uint16_t *)out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1737 uint16_t *d2_data = (uint16_t *)out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1740 d0_data += s->
size - 1;
1741 d1_data += s->
size - 1;
1742 d2_data += s->
size - 1;
1745 for (y = 0; y < src_h; y++) {
1746 for (x = 0; x < src_w; x++) {
1747 const int c0 =
FFMIN(c0_data[x >> c0_shift_w], limit);
1748 const int c1 = c1_data[x >> c1_shift_w];
1749 const int c2 = c2_data[x >> c2_shift_w];
1752 update16(d0_data - c0, max, intensity, limit);
1753 *(d1_data - c0) = c1;
1754 *(d2_data - c0) = c2;
1756 update16(d0_data + c0, max, intensity, limit);
1757 *(d1_data + c0) = c1;
1758 *(d2_data + c0) = c2;
1762 if (!c0_shift_h || (y & c0_shift_h))
1763 c0_data += c0_linesize;
1764 if (!c1_shift_h || (y & c1_shift_h))
1765 c1_data += c1_linesize;
1766 if (!c2_shift_h || (y & c2_shift_h))
1767 c2_data += c2_linesize;
1768 d0_data += d0_linesize;
1769 d1_data += d1_linesize;
1770 d2_data += d2_linesize;
1774 envelope16(s, out, plane, plane, column ? offset_x : offset_y);
1780 int offset_y,
int offset_x,
1787 const int c0_linesize = in->
linesize[ plane + 0 ];
1788 const int c1_linesize = in->
linesize[(plane + 1) % s->
ncomp];
1789 const int c2_linesize = in->
linesize[(plane + 2) % s->
ncomp];
1790 const int d0_linesize = out->
linesize[ plane + 0 ];
1791 const int d1_linesize = out->
linesize[(plane + 1) % s->
ncomp];
1792 const int d2_linesize = out->
linesize[(plane + 2) % s->
ncomp];
1793 const int c0_shift_w = s->
shift_w[ component + 0 ];
1794 const int c1_shift_w = s->
shift_w[(component + 1) % s->
ncomp];
1795 const int c2_shift_w = s->
shift_w[(component + 2) % s->
ncomp];
1796 const int c0_shift_h = s->
shift_h[ component + 0 ];
1797 const int c1_shift_h = s->
shift_h[(component + 1) % s->
ncomp];
1798 const int c2_shift_h = s->
shift_h[(component + 2) % s->
ncomp];
1800 const int src_h = in->
height;
1801 const int src_w = in->
width;
1805 const int d0_signed_linesize = d0_linesize * (mirror == 1 ? -1 : 1);
1806 const int d1_signed_linesize = d1_linesize * (mirror == 1 ? -1 : 1);
1807 const int d2_signed_linesize = d2_linesize * (mirror == 1 ? -1 : 1);
1809 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1810 uint8_t *d2_data = out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1811 uint8_t *
const d0_bottom_line = d0_data + d0_linesize * (s->
size - 1);
1812 uint8_t *
const d0 = (mirror ? d0_bottom_line : d0_data);
1813 uint8_t *
const d1_bottom_line = d1_data + d1_linesize * (s->
size - 1);
1814 uint8_t *
const d1 = (mirror ? d1_bottom_line : d1_data);
1815 uint8_t *
const d2_bottom_line = d2_data + d2_linesize * (s->
size - 1);
1816 uint8_t *
const d2 = (mirror ? d2_bottom_line : d2_data);
1818 for (y = 0; y < src_h; y++) {
1819 for (x = 0; x < src_w; x++) {
1820 const int c0 = c0_data[x >> c0_shift_w];
1821 const int c1 = c1_data[x >> c1_shift_w];
1822 const int c2 = c2_data[x >> c2_shift_w];
1824 update(d0 + d0_signed_linesize * c0 + x, max, intensity);
1825 *(d1 + d1_signed_linesize * c0 + x) = c1;
1826 *(d2 + d2_signed_linesize * c0 + x) = c2;
1829 if (!c0_shift_h || (y & c0_shift_h))
1830 c0_data += c0_linesize;
1831 if (!c1_shift_h || (y & c1_shift_h))
1832 c1_data += c1_linesize;
1833 if (!c2_shift_h || (y & c2_shift_h))
1834 c2_data += c2_linesize;
1835 d0_data += d0_linesize;
1836 d1_data += d1_linesize;
1837 d2_data += d2_linesize;
1841 uint8_t *d1_data = out->
data[(plane + 1) % s->
ncomp] + offset_y * d1_linesize + offset_x;
1842 uint8_t *d2_data = out->
data[(plane + 2) % s->
ncomp] + offset_y * d2_linesize + offset_x;
1845 d0_data += s->
size - 1;
1846 d1_data += s->
size - 1;
1847 d2_data += s->
size - 1;
1850 for (y = 0; y < src_h; y++) {
1851 for (x = 0; x < src_w; x++) {
1852 const int c0 = c0_data[x >> c0_shift_w];
1853 const int c1 = c1_data[x >> c1_shift_w];
1854 const int c2 = c2_data[x >> c2_shift_w];
1857 update(d0_data - c0, max, intensity);
1858 *(d1_data - c0) = c1;
1859 *(d2_data - c0) = c2;
1861 update(d0_data + c0, max, intensity);
1862 *(d1_data + c0) = c1;
1863 *(d2_data + c0) = c2;
1867 if (!c0_shift_h || (y & c0_shift_h))
1868 c0_data += c0_linesize;
1869 if (!c1_shift_h || (y & c1_shift_h))
1870 c1_data += c1_linesize;
1871 if (!c2_shift_h || (y & c2_shift_h))
1872 c2_data += c2_linesize;
1873 d0_data += d0_linesize;
1874 d1_data += d1_linesize;
1875 d2_data += d2_linesize;
1879 envelope(s, out, plane, plane, column ? offset_x : offset_y);
1886 { { {
"16", 16+128 }, {
"16", 16+128 }, {
"16", 16+128 }, {
"0", 0+128 } } },
1887 { { {
"128", 128+128 }, {
"128", 128+128 }, {
"128", 128+128 }, {
"128", 128+128 } } },
1888 { { {
"235", 235+128 }, {
"240", 240+128 }, {
"240", 240+128 }, {
"255", 255+128 } } },
1892 { { {
"32", 32+256 }, {
"32", 32+256 }, {
"32", 32+256 }, {
"0", 0+256 } } },
1893 { { {
"256", 256+256 }, {
"256", 256+256 }, {
"256", 256+256 }, {
"256", 256+256 } } },
1894 { { {
"470", 470+256 }, {
"480", 480+256 }, {
"480", 480+256 }, {
"511", 511+256 } } },
1898 { { {
"64", 64+512 }, {
"64", 64+512 }, {
"64", 64+512 }, {
"0", 0+512 } } },
1899 { { {
"512", 512+512 }, {
"512", 512+512 }, {
"512", 512+512 }, {
"512", 512+512 } } },
1900 { { {
"940", 940+512 }, {
"960", 960+512 }, {
"960", 960+512 }, {
"1023", 1023+512 } } },
1904 { { {
"256", 256+2048 }, {
"256", 256+2048 }, {
"256", 256+2048 }, {
"0", 0+2048 } } },
1905 { { {
"2048", 2048+2048 }, {
"2048", 2048+2048 }, {
"2048", 2048+2048 }, {
"2048", 2048+2048 } } },
1906 { { {
"3760", 3760+2048 }, {
"3840", 3840+2048 }, {
"3840", 3840+2048 }, {
"4095", 4095+2048 } } },
1910 { { {
"0", 16+128 }, {
"0", 16+128 }, {
"0", 16+128 }, {
"0", 0+128 } } },
1911 { { {
"175", 71+128 }, {
"175", 72+128 }, {
"175", 72+128 }, {
"175", 64+128 } } },
1912 { { {
"350", 126+128 }, {
"350", 128+128 }, {
"350", 128+128 }, {
"350", 128+128 } } },
1913 { { {
"525", 180+128 }, {
"525", 184+128 }, {
"525", 184+128 }, {
"525", 192+128 } } },
1914 { { {
"700", 235+128 }, {
"700", 240+128 }, {
"700", 240+128 }, {
"700", 255+128 } } },
1918 { { {
"0", 32+256 }, {
"0", 32+256 }, {
"0", 32+256 }, {
"0", 0+256 } } },
1919 { { {
"175", 142+256 }, {
"175", 144+256 }, {
"175", 144+256 }, {
"175", 128+256 } } },
1920 { { {
"350", 251+256 }, {
"350", 256+256 }, {
"350", 256+256 }, {
"350", 256+256 } } },
1921 { { {
"525", 361+256 }, {
"525", 368+256 }, {
"525", 368+256 }, {
"525", 384+256 } } },
1922 { { {
"700", 470+256 }, {
"700", 480+256 }, {
"700", 480+256 }, {
"700", 511+256 } } },
1926 { { {
"0", 64+512 }, {
"0", 64+512 }, {
"0", 64+512 }, {
"0", 0+512 } } },
1927 { { {
"175", 283+512 }, {
"175", 288+512 }, {
"175", 288+512 }, {
"175", 256+512 } } },
1928 { { {
"350", 502+512 }, {
"350", 512+512 }, {
"350", 512+512 }, {
"350", 512+512 } } },
1929 { { {
"525", 721+512 }, {
"525", 736+512 }, {
"525", 736+512 }, {
"525", 768+512 } } },
1930 { { {
"700", 940+512 }, {
"700", 960+512 }, {
"700", 960+512 }, {
"700", 1023+512 } } },
1934 { { {
"0", 256+2048 }, {
"0", 256+2048 }, {
"0", 256+2048 }, {
"0", 0+2048 } } },
1935 { { {
"175", 1132+2048 }, {
"175", 1152+2048 }, {
"175", 1152+2048 }, {
"175", 1024+2048 } } },
1936 { { {
"350", 2008+2048 }, {
"350", 2048+2048 }, {
"350", 2048+2048 }, {
"350", 2048+2048 } } },
1937 { { {
"525", 2884+2048 }, {
"525", 2944+2048 }, {
"525", 2944+2048 }, {
"525", 3072+2048 } } },
1938 { { {
"700", 3760+2048 }, {
"700", 3840+2048 }, {
"700", 3840+2048 }, {
"700", 4095+2048 } } },
1942 { { {
"-25", -39+128 }, {
"-25", -40+128 }, {
"-25", -40+128 }, {
"-25", -64+128 } } },
1943 { { {
"0", 16+128 }, {
"0", 16+128 }, {
"0", 16+128 }, {
"0", 0+128 } } },
1944 { { {
"25", 71+128 }, {
"25", 72+128 }, {
"25", 72+128 }, {
"25", 64+128 } } },
1945 { { {
"50", 126+128 }, {
"50", 128+128 }, {
"50", 128+128 }, {
"50", 128+128 } } },
1946 { { {
"75", 180+128 }, {
"75", 184+128 }, {
"75", 184+128 }, {
"75", 192+128 } } },
1947 { { {
"100", 235+128 }, {
"100", 240+128 }, {
"100", 240+128 }, {
"100", 256+128 } } },
1948 { { {
"125", 290+128 }, {
"125", 296+128 }, {
"125", 296+128 }, {
"125", 320+128 } } },
1952 { { {
"-25", -78+256 }, {
"-25", -80+256 }, {
"-25", -80+256 }, {
"-25",-128+256 } } },
1953 { { {
"0", 32+256 }, {
"0", 32+256 }, {
"0", 32+256 }, {
"0", 0+256 } } },
1954 { { {
"25", 142+256 }, {
"25", 144+256 }, {
"25", 144+256 }, {
"25", 128+256 } } },
1955 { { {
"50", 251+256 }, {
"50", 256+256 }, {
"50", 256+256 }, {
"50", 256+256 } } },
1956 { { {
"75", 361+256 }, {
"75", 368+256 }, {
"75", 368+256 }, {
"75", 384+256 } } },
1957 { { {
"100", 470+256 }, {
"100", 480+256 }, {
"100", 480+256 }, {
"100", 512+256 } } },
1958 { { {
"125", 580+256 }, {
"125", 592+256 }, {
"125", 592+256 }, {
"125", 640+256 } } },
1962 { { {
"-25",-156+512 }, {
"-25",-160+512 }, {
"-25",-160+512 }, {
"-25", -256+512 } } },
1963 { { {
"0", 64+512 }, {
"0", 64+512 }, {
"0", 64+512 }, {
"0", 0+512 } } },
1964 { { {
"25", 283+512 }, {
"25", 288+512 }, {
"25", 288+512 }, {
"25", 256+512 } } },
1965 { { {
"50", 502+512 }, {
"50", 512+512 }, {
"50", 512+512 }, {
"50", 512+512 } } },
1966 { { {
"75", 721+512 }, {
"75", 736+512 }, {
"75", 736+512 }, {
"75", 768+512 } } },
1967 { { {
"100", 940+512 }, {
"100", 960+512 }, {
"100", 960+512 }, {
"100", 1024+512 } } },
1968 { { {
"125",1160+512 }, {
"125",1184+512 }, {
"125",1184+512 }, {
"125", 1280+512 } } },
1972 { { {
"-25", -624+2048 }, {
"-25", -640+2048 }, {
"-25", -640+2048 }, {
"-25",-1024+2048 } } },
1973 { { {
"0", 256+2048 }, {
"0", 256+2048 }, {
"0", 256+2048 }, {
"0", 0+2048 } } },
1974 { { {
"25", 1132+2048 }, {
"25", 1152+2048 }, {
"25", 1152+2048 }, {
"25", 1024+2048 } } },
1975 { { {
"50", 2008+2048 }, {
"50", 2048+2048 }, {
"50", 2048+2048 }, {
"50", 2048+2048 } } },
1976 { { {
"75", 2884+2048 }, {
"75", 2944+2048 }, {
"75", 2944+2048 }, {
"75", 3072+2048 } } },
1977 { { {
"100", 3760+2048 }, {
"100", 3840+2048 }, {
"100", 3840+2048 }, {
"100", 4096+2048 } } },
1978 { { {
"125", 4640+2048 }, {
"125", 4736+2048 }, {
"125", 4736+2048 }, {
"125", 5120+2048 } } },
1982 { { {
"16", 16+256 }, {
"16", 16+256 }, {
"16", 16+256 }, {
"0", 0+256 } } },
1983 { { {
"128", 128+256 }, {
"128", 128+256 }, {
"128", 128+256 }, {
"128", 128+256 } } },
1984 { { {
"235", 235+256 }, {
"240", 240+256 }, {
"240", 240+256 }, {
"255", 255+256 } } },
1988 { { {
"32", 32+512 }, {
"32", 32+512 }, {
"32", 32+512 }, {
"0", 0+512 } } },
1989 { { {
"256", 256+512 }, {
"256", 256+512 }, {
"256", 256+512 }, {
"256", 256+512 } } },
1990 { { {
"470", 470+512 }, {
"480", 480+512 }, {
"480", 480+512 }, {
"511", 511+512 } } },
1994 { { {
"64", 64+1024 }, {
"64", 64+1024 }, {
"64", 64+1024 }, {
"0", 0+1024 } } },
1995 { { {
"512", 512+1024 }, {
"512", 512+1024 }, {
"512", 512+1024 }, {
"512", 512+1024 } } },
1996 { { {
"940", 940+1024 }, {
"960", 960+1024 }, {
"960", 960+1024 }, {
"1023", 1023+1024 } } },
2000 { { {
"256", 256+4096 }, {
"256", 256+4096 }, {
"256", 256+4096 }, {
"0", 0+4096 } } },
2001 { { {
"2048", 2048+4096 }, {
"2048", 2048+4096 }, {
"2048", 2048+4096 }, {
"2048", 2048+4096 } } },
2002 { { {
"3760", 3760+4096 }, {
"3840", 3840+4096 }, {
"3840", 3840+4096 }, {
"4095", 4095+4096 } } },
2006 { { {
"0", 16+256 }, {
"0", 16+256 }, {
"0", 16+256 }, {
"0", 0+256 } } },
2007 { { {
"175", 71+256 }, {
"175", 72+256 }, {
"175", 72+256 }, {
"175", 64+256 } } },
2008 { { {
"350", 126+256 }, {
"350", 128+256 }, {
"350", 128+256 }, {
"350", 128+256 } } },
2009 { { {
"525", 180+256 }, {
"525", 184+256 }, {
"525", 184+256 }, {
"525", 192+256 } } },
2010 { { {
"700", 235+256 }, {
"700", 240+256 }, {
"700", 240+256 }, {
"700", 255+256 } } },
2014 { { {
"0", 32+512 }, {
"0", 32+512 }, {
"0", 32+512 }, {
"0", 0+512 } } },
2015 { { {
"175", 142+512 }, {
"175", 144+512 }, {
"175", 144+512 }, {
"175", 128+512 } } },
2016 { { {
"350", 251+512 }, {
"350", 256+512 }, {
"350", 256+512 }, {
"350", 256+512 } } },
2017 { { {
"525", 361+512 }, {
"525", 368+512 }, {
"525", 368+512 }, {
"525", 384+512 } } },
2018 { { {
"700", 470+512 }, {
"700", 480+512 }, {
"700", 480+512 }, {
"700", 511+512 } } },
2022 { { {
"0", 64+1024 }, {
"0", 64+1024 }, {
"0", 64+1024 }, {
"0", 0+1024 } } },
2023 { { {
"175", 283+1024 }, {
"175", 288+1024 }, {
"175", 288+1024 }, {
"175", 256+1024 } } },
2024 { { {
"350", 502+1024 }, {
"350", 512+1024 }, {
"350", 512+1024 }, {
"350", 512+1024 } } },
2025 { { {
"525", 721+1024 }, {
"525", 736+1024 }, {
"525", 736+1024 }, {
"525", 768+1024 } } },
2026 { { {
"700", 940+1024 }, {
"700", 960+1024 }, {
"700", 960+1024 }, {
"700", 1023+1024 } } },
2030 { { {
"0", 256+4096 }, {
"0", 256+4096 }, {
"0", 256+4096 }, {
"0", 0+4096 } } },
2031 { { {
"175", 1132+4096 }, {
"175", 1152+4096 }, {
"175", 1152+4096 }, {
"175", 1024+4096 } } },
2032 { { {
"350", 2008+4096 }, {
"350", 2048+4096 }, {
"350", 2048+4096 }, {
"350", 2048+4096 } } },
2033 { { {
"525", 2884+4096 }, {
"525", 2944+4096 }, {
"525", 2944+4096 }, {
"525", 3072+4096 } } },
2034 { { {
"700", 3760+4096 }, {
"700", 3840+4096 }, {
"700", 3840+4096 }, {
"700", 4095+4096 } } },
2038 { { {
"-25", -39+256 }, {
"-25", -40+256 }, {
"-25", -40+256 }, {
"-25", -64+256 } } },
2039 { { {
"0", 16+256 }, {
"0", 16+256 }, {
"0", 16+256 }, {
"0", 0+256 } } },
2040 { { {
"25", 71+256 }, {
"25", 72+256 }, {
"25", 72+256 }, {
"25", 64+256 } } },
2041 { { {
"50", 126+256 }, {
"50", 128+256 }, {
"50", 128+256 }, {
"50", 128+256 } } },
2042 { { {
"75", 180+256 }, {
"75", 184+256 }, {
"75", 184+256 }, {
"75", 192+256 } } },
2043 { { {
"100", 235+256 }, {
"100", 240+256 }, {
"100", 240+256 }, {
"100", 256+256 } } },
2044 { { {
"125", 290+256 }, {
"125", 296+256 }, {
"125", 296+256 }, {
"125", 320+256 } } },
2048 { { {
"-25", -78+512 }, {
"-25", -80+512 }, {
"-25", -80+512 }, {
"-25",-128+512 } } },
2049 { { {
"0", 32+512 }, {
"0", 32+512 }, {
"0", 32+512 }, {
"0", 0+512 } } },
2050 { { {
"25", 142+512 }, {
"25", 144+512 }, {
"25", 144+512 }, {
"25", 128+512 } } },
2051 { { {
"50", 251+512 }, {
"50", 256+512 }, {
"50", 256+512 }, {
"50", 256+512 } } },
2052 { { {
"75", 361+512 }, {
"75", 368+512 }, {
"75", 368+512 }, {
"75", 384+512 } } },
2053 { { {
"100", 470+512 }, {
"100", 480+512 }, {
"100", 480+512 }, {
"100", 512+512 } } },
2054 { { {
"125", 580+512 }, {
"125", 592+512 }, {
"125", 592+512 }, {
"125", 640+512 } } },
2058 { { {
"-25",-156+1024 }, {
"-25",-160+1024 }, {
"-25",-160+1024 }, {
"-25", -256+1024 } } },
2059 { { {
"0", 64+1024 }, {
"0", 64+1024 }, {
"0", 64+1024 }, {
"0", 0+1024 } } },
2060 { { {
"25", 283+1024 }, {
"25", 288+1024 }, {
"25", 288+1024 }, {
"25", 256+1024 } } },
2061 { { {
"50", 502+1024 }, {
"50", 512+1024 }, {
"50", 512+1024 }, {
"50", 512+1024 } } },
2062 { { {
"75", 721+1024 }, {
"75", 736+1024 }, {
"75", 736+1024 }, {
"75", 768+1024 } } },
2063 { { {
"100", 940+1024 }, {
"100", 960+1024 }, {
"100", 960+1024 }, {
"100", 1024+1024 } } },
2064 { { {
"125",1160+1024 }, {
"125",1184+1024 }, {
"125",1184+1024 }, {
"125", 1280+1024 } } },
2068 { { {
"-25", -624+4096 }, {
"-25", -640+4096 }, {
"-25", -640+4096 }, {
"-25",-1024+4096 } } },
2069 { { {
"0", 256+4096 }, {
"0", 256+4096 }, {
"0", 256+4096 }, {
"0", 0+4096 } } },
2070 { { {
"25", 1132+4096 }, {
"25", 1152+4096 }, {
"25", 1152+4096 }, {
"25", 1024+4096 } } },
2071 { { {
"50", 2008+4096 }, {
"50", 2048+4096 }, {
"50", 2048+4096 }, {
"50", 2048+4096 } } },
2072 { { {
"75", 2884+4096 }, {
"75", 2944+4096 }, {
"75", 2944+4096 }, {
"75", 3072+4096 } } },
2073 { { {
"100", 3760+4096 }, {
"100", 3840+4096 }, {
"100", 3840+4096 }, {
"100", 4096+4096 } } },
2074 { { {
"125", 4640+4096 }, {
"125", 4736+4096 }, {
"125", 4736+4096 }, {
"125", 5120+4096 } } },
2078 { { {
"16", 16 }, {
"16", 16 }, {
"16", 16 }, {
"0", 0 } } },
2079 { { {
"128", 128 }, {
"128", 128 }, {
"128", 128 }, {
"128", 128 } } },
2080 { { {
"235", 235 }, {
"240", 240 }, {
"240", 240 }, {
"255", 255 } } },
2084 { { {
"32", 32 }, {
"32", 32 }, {
"32", 32 }, {
"0", 0 } } },
2085 { { {
"256", 256 }, {
"256", 256 }, {
"256", 256 }, {
"256", 256 } } },
2086 { { {
"470", 470 }, {
"480", 480 }, {
"480", 480 }, {
"511", 511 } } },
2090 { { {
"64", 64 }, {
"64", 64 }, {
"64", 64 }, {
"0", 0 } } },
2091 { { {
"512", 512 }, {
"512", 512 }, {
"512", 512 }, {
"512", 512 } } },
2092 { { {
"940", 940 }, {
"960", 960 }, {
"960", 960 }, {
"1023", 1023 } } },
2096 { { {
"256", 256 }, {
"256", 256 }, {
"256", 256 }, {
"0", 0 } } },
2097 { { {
"2048", 2048 }, {
"2048", 2048 }, {
"2048", 2048 }, {
"2048", 2048 } } },
2098 { { {
"3760", 3760 }, {
"3840", 3840 }, {
"3840", 3840 }, {
"4095", 4095 } } },
2102 { { {
"0", 16 }, {
"0", 16 }, {
"0", 16 }, {
"0", 0 } } },
2103 { { {
"175", 71 }, {
"175", 72 }, {
"175", 72 }, {
"175", 64 } } },
2104 { { {
"350", 126 }, {
"350", 128 }, {
"350", 128 }, {
"350", 128 } } },
2105 { { {
"525", 180 }, {
"525", 184 }, {
"525", 184 }, {
"525", 192 } } },
2106 { { {
"700", 235 }, {
"700", 240 }, {
"700", 240 }, {
"700", 255 } } },
2110 { { {
"0", 32 }, {
"0", 32 }, {
"0", 32 }, {
"0", 0 } } },
2111 { { {
"175", 142 }, {
"175", 144 }, {
"175", 144 }, {
"175", 128 } } },
2112 { { {
"350", 251 }, {
"350", 256 }, {
"350", 256 }, {
"350", 256 } } },
2113 { { {
"525", 361 }, {
"525", 368 }, {
"525", 368 }, {
"525", 384 } } },
2114 { { {
"700", 470 }, {
"700", 480 }, {
"700", 480 }, {
"700", 511 } } },
2118 { { {
"0", 64 }, {
"0", 64 }, {
"0", 64 }, {
"0", 0 } } },
2119 { { {
"175", 283 }, {
"175", 288 }, {
"175", 288 }, {
"175", 256 } } },
2120 { { {
"350", 502 }, {
"350", 512 }, {
"350", 512 }, {
"350", 512 } } },
2121 { { {
"525", 721 }, {
"525", 736 }, {
"525", 736 }, {
"525", 768 } } },
2122 { { {
"700", 940 }, {
"700", 960 }, {
"700", 960 }, {
"700", 1023 } } },
2126 { { {
"0", 256 }, {
"0", 256 }, {
"0", 256 }, {
"0", 0 } } },
2127 { { {
"175", 1132 }, {
"175", 1152 }, {
"175", 1152 }, {
"175", 1024 } } },
2128 { { {
"350", 2008 }, {
"350", 2048 }, {
"350", 2048 }, {
"350", 2048 } } },
2129 { { {
"525", 2884 }, {
"525", 2944 }, {
"525", 2944 }, {
"525", 3072 } } },
2130 { { {
"700", 3760 }, {
"700", 3840 }, {
"700", 3840 }, {
"700", 4095 } } },
2134 { { {
"0", 16 }, {
"0", 16 }, {
"0", 16 }, {
"0", 0 } } },
2135 { { {
"25", 71 }, {
"25", 72 }, {
"25", 72 }, {
"25", 64 } } },
2136 { { {
"50", 126 }, {
"50", 128 }, {
"50", 128 }, {
"50", 128 } } },
2137 { { {
"75", 180 }, {
"75", 184 }, {
"75", 184 }, {
"75", 192 } } },
2138 { { {
"100", 235 }, {
"100", 240 }, {
"100", 240 }, {
"100", 255 } } },
2142 { { {
"0", 32 }, {
"0", 32 }, {
"0", 32 }, {
"0", 0 } } },
2143 { { {
"25", 142 }, {
"25", 144 }, {
"25", 144 }, {
"25", 128 } } },
2144 { { {
"50", 251 }, {
"50", 256 }, {
"50", 256 }, {
"50", 256 } } },
2145 { { {
"75", 361 }, {
"75", 368 }, {
"75", 368 }, {
"75", 384 } } },
2146 { { {
"100", 470 }, {
"100", 480 }, {
"100", 480 }, {
"100", 511 } } },
2150 { { {
"0", 64 }, {
"0", 64 }, {
"0", 64 }, {
"0", 0 } } },
2151 { { {
"25", 283 }, {
"25", 288 }, {
"25", 288 }, {
"25", 256 } } },
2152 { { {
"50", 502 }, {
"50", 512 }, {
"50", 512 }, {
"50", 512 } } },
2153 { { {
"75", 721 }, {
"75", 736 }, {
"75", 736 }, {
"75", 768 } } },
2154 { { {
"100", 940 }, {
"100", 960 }, {
"100", 960 }, {
"100", 1023 } } },
2158 { { {
"0", 256 }, {
"0", 256 }, {
"0", 256 }, {
"0", 0 } } },
2159 { { {
"25", 1132 }, {
"25", 1152 }, {
"25", 1152 }, {
"25", 1024 } } },
2160 { { {
"50", 2008 }, {
"50", 2048 }, {
"50", 2048 }, {
"50", 2048 } } },
2161 { { {
"75", 2884 }, {
"75", 2944 }, {
"75", 2944 }, {
"75", 3072 } } },
2162 { { {
"100", 3760 }, {
"100", 3840 }, {
"100", 3840 }, {
"100", 4095 } } },
2166 { { {
"50", 50 }, {
"50", 50 }, {
"50", 50 }, {
"50", 50 } } },
2167 { { {
"100", 100 }, {
"100", 100 }, {
"100", 100 }, {
"100", 100 } } },
2168 { { {
"150", 150 }, {
"150", 150 }, {
"150", 150 }, {
"150", 150 } } },
2169 { { {
"200", 200 }, {
"200", 200 }, {
"200", 200 }, {
"200", 200 } } },
2170 { { {
"255", 255 }, {
"255", 255 }, {
"255", 255 }, {
"255", 255 } } },
2174 { { {
"100", 100 }, {
"100", 100 }, {
"100", 100 }, {
"100", 100 } } },
2175 { { {
"200", 200 }, {
"200", 200 }, {
"200", 200 }, {
"200", 200 } } },
2176 { { {
"300", 300 }, {
"300", 300 }, {
"300", 300 }, {
"300", 300 } } },
2177 { { {
"400", 400 }, {
"400", 400 }, {
"400", 400 }, {
"400", 400 } } },
2178 { { {
"500", 500 }, {
"500", 500 }, {
"500", 500 }, {
"500", 500 } } },
2182 { { {
"200", 200 }, {
"200", 200 }, {
"200", 200 }, {
"200", 200 } } },
2183 { { {
"400", 400 }, {
"400", 400 }, {
"400", 400 }, {
"400", 400 } } },
2184 { { {
"600", 600 }, {
"600", 600 }, {
"600", 600 }, {
"600", 600 } } },
2185 { { {
"800", 800 }, {
"800", 800 }, {
"800", 800 }, {
"800", 800 } } },
2186 { { {
"1000",1000 }, {
"1000",1000 }, {
"1000",1000 }, {
"1000",1000 } } },
2190 { { {
"800", 800 }, {
"800", 800 }, {
"800", 800 }, {
"800", 800 } } },
2191 { { {
"1600", 1600 }, {
"1600", 1600 }, {
"1600", 1600 }, {
"1600", 1600 } } },
2192 { { {
"2400", 2400 }, {
"2400", 2400 }, {
"2400", 2400 }, {
"2400", 2400 } } },
2193 { { {
"3200", 3200 }, {
"3200", 3200 }, {
"3200", 3200 }, {
"3200", 3200 } } },
2194 { { {
"4000", 4000 }, {
"4000", 4000 }, {
"4000", 4000 }, {
"4000", 4000 } } },
2201 for (y = 0; y <
height; y += step) {
2202 dst[0] = v * o1 + dst[0] * o2;
2204 dst += linesize * step;
2212 for (y = 0; y <
height; y += step) {
2213 dst[0] = v * o1 + dst[0] * o2;
2215 dst += (linesize / 2) * step;
2223 for (x = 0; x <
width; x += step) {
2224 dst[x] = v * o1 + dst[x] * o2;
2232 for (x = 0; x <
width; x += step) {
2233 dst[x] = v * o1 + dst[x] * o2;
2245 for (plane = 0; plane < 4 && out->
data[
plane]; plane++) {
2246 for (i = 0; txt[i]; i++) {
2248 int v = color[
plane];
2251 for (char_y = 0; char_y < font_height; char_y++) {
2252 for (mask = 0x80;
mask; mask >>= 1) {
2253 if (font[txt[i] * font_height + char_y] & mask)
2254 p[0] = p[0] * o2 + v * o1;
2271 for (plane = 0; plane < 4 && out->
data[
plane]; plane++) {
2272 for (i = 0; txt[i]; i++) {
2276 uint16_t *p = (uint16_t *)(out->
data[plane] + y * out->
linesize[plane]) + (x + i * 8);
2277 for (char_y = 0; char_y < font_height; char_y++) {
2278 for (mask = 0x80;
mask; mask >>= 1) {
2279 if (font[txt[i] * font_height + char_y] & mask)
2280 p[0] = p[0] * o2 + v * o1;
2297 for (plane = 0; plane < 4 && out->
data[
plane]; plane++) {
2298 for (i = 0; txt[i]; i++) {
2300 int v = color[
plane];
2302 for (char_y = font_height - 1; char_y >= 0; char_y--) {
2304 for (mask = 0x80;
mask; mask >>= 1) {
2305 if (font[txt[i] * font_height + font_height - 1 - char_y] & mask)
2306 p[char_y] = p[char_y] * o2 + v * o1;
2322 for (plane = 0; plane < 4 && out->
data[
plane]; plane++) {
2323 for (i = 0; txt[i]; i++) {
2327 for (char_y = 0; char_y < font_height; char_y++) {
2328 uint16_t *p = (uint16_t *)(out->
data[plane] + (y + i * 10) * out->
linesize[
plane]) + x;
2329 for (mask = 0x80;
mask; mask >>= 1) {
2330 if (font[txt[i] * font_height + font_height - 1 - char_y] & mask)
2331 p[char_y] = p[char_y] * o2 + v * o1;
2345 const int step = (s->
flags & 2) + 1;
2347 const float o2 = 1. - o1;
2349 int k = 0,
c, p, l, offset_x = 0, offset_y = 0;
2356 for (p = 0; p < s->
ncomp; p++) {
2385 const int step = (s->
flags & 2) + 1;
2387 const float o2 = 1. - o1;
2388 const int mult = s->
max / 256;
2390 int k = 0,
c, p, l, offset_x = 0, offset_y = 0;
2397 for (p = 0; p < s->
ncomp; p++) {
2402 uint16_t *dst = (uint16_t *)(out->
data[p] + offset_y * out->
linesize[p]) + x;
2426 const int step = (s->
flags & 2) + 1;
2428 const float o2 = 1. - o1;
2430 int k = 0,
c, p, l, offset_y = 0, offset_x = 0;
2437 for (p = 0; p < s->
ncomp; p++) {
2466 const int step = (s->
flags & 2) + 1;
2468 const float o2 = 1. - o1;
2469 const int mult = s->
max / 256;
2471 int k = 0,
c, p, l, offset_x = 0, offset_y = 0;
2478 for (p = 0; p < s->
ncomp; p++) {
2483 uint16_t *dst = (uint16_t *)(out->
data[p] + y * out->
linesize[p]) + offset_x;
2526 case FLAT: s->
size = 256 * 3;
break;
2527 default: s->
size = 256;
break;
2532 case 0x1100: s->
waveform = lowpass_column_mirror;
break;
2533 case 0x1000: s->
waveform = lowpass_row_mirror;
break;
2534 case 0x0100: s->
waveform = lowpass_column;
break;
2535 case 0x0000: s->
waveform = lowpass_row;
break;
2536 case 0x1110: s->
waveform = lowpass16_column_mirror;
break;
2537 case 0x1010: s->
waveform = lowpass16_row_mirror;
break;
2538 case 0x0110: s->
waveform = lowpass16_column;
break;
2539 case 0x0010: s->
waveform = lowpass16_row;
break;
2548 case 0x1102: s->
waveform = aflat_column_mirror;
break;
2549 case 0x1002: s->
waveform = aflat_row_mirror;
break;
2550 case 0x0102: s->
waveform = aflat_column;
break;
2551 case 0x0002: s->
waveform = aflat_row;
break;
2552 case 0x1112: s->
waveform = aflat16_column_mirror;
break;
2553 case 0x1012: s->
waveform = aflat16_row_mirror;
break;
2554 case 0x0112: s->
waveform = aflat16_column;
break;
2555 case 0x0012: s->
waveform = aflat16_row;
break;
2580 case 0x1106: s->
waveform = xflat_column_mirror;
break;
2581 case 0x1006: s->
waveform = xflat_row_mirror;
break;
2582 case 0x0106: s->
waveform = xflat_column;
break;
2583 case 0x0006: s->
waveform = xflat_row;
break;
2584 case 0x1116: s->
waveform = xflat16_column_mirror;
break;
2585 case 0x1016: s->
waveform = xflat16_row_mirror;
break;
2586 case 0x0116: s->
waveform = xflat16_column;
break;
2587 case 0x0016: s->
waveform = xflat16_row;
break;
2729 switch (inlink->
format) {
2752 int comp = 0, i, j = 0, k, p,
size;
2754 for (i = 0; i < s->
ncomp; i++) {
2755 if ((1 << i) & s->
pcomp)
2778 for (p = 0; p < s->
ncomp; p++) {
2782 if (!((1 << p) & s->
pcomp))
2785 for (k = 0; k < 4; k++) {
2793 for (i = 0; i <
size; i++) {
2794 for (k = 0; k < 4; k++) {
2822 for (k = 0; k < s->
dcomp; k++) {
2824 for (i = 0; i < outlink->
h ; i++)
2829 const int mult = s->
max / 256;
2832 for (i = 0; i < outlink->
h ; i++) {
2833 for (j = 0; j < outlink->
w; j++)
2840 for (k = 0, i = 0; k < s->
ncomp; k++) {
2841 if ((1 << k) & s->
pcomp) {
2846 offset_x = s->
mode ? i++ * inlink->
w : 0;
2847 offset_y = s->
mode ? 0 : i++ * inlink->
h;
2891 .priv_class = &waveform_class,
int plane
Which of the 4 planes contains the component.
#define AV_PIX_FMT_YUVA422P9
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Main libavfilter public API header.
int h
agreed upon image height
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUV420P12
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
#define AV_PIX_FMT_GRAY10
const char * name
Pad name.
#define AV_PIX_FMT_GRAY12
AVFilterLink ** inputs
array of pointers to input links
uint8_t grat_yuva_color[4]
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
void(* graticulef)(struct WaveformContext *s, AVFrame *out)
static av_cold int end(AVCodecContext *avctx)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AV_PIX_FMT_YUVA420P9
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
#define AV_PIX_FMT_YUV422P12
A filter pad used for either input or output.
A link between two filters.
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
const uint8_t avpriv_cga_font[2048]
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
static const uint16_t mask[17]
struct GraticuleLine line[4]
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
enum AVColorRange color_range
MPEG vs JPEG YUV range.
#define AV_PIX_FMT_GBRAP12
simple assert() macros that are a bit more flexible than ISO C assert().
AVFilterFormats * in_formats
Lists of formats and channel layouts supported by the input and output filters respectively.
#define AV_PIX_FMT_YUV444P10
static enum AVPixelFormat in_pix_fmts[]
static const uint8_t offset[127][2]
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
#define AV_PIX_FMT_YUV422P9
uint8_t nb_components
The number of components each pixel has, (1-4)
static int16_t mult(Float11 *f1, Float11 *f2)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
AVFilterContext * src
source filter
#define AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUV444P9
int format
agreed upon media format
#define FF_ARRAY_ELEMS(a)
the normal 2^n-1 "JPEG" YUV ranges
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
typedef void(RENAME(mix_any_func_type))
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
#define AV_PIX_FMT_YUV420P10
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
const char * name
Filter name.
#define AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV420P9
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterLink ** outputs
array of pointers to output links
#define AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_YUVA444P9
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static enum AVPixelFormat out_pix_fmts[]
AVFilterContext * dst
dest filter
const AVPixFmtDescriptor * odesc
void(* waveform)(struct WaveformContext *s, AVFrame *in, AVFrame *out, int component, int intensity, int offset_y, int offset_x, int column, int mirror)
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define av_malloc_array(a, b)
int depth
Number of bits in the component.
const AVPixFmtDescriptor * desc
AVPixelFormat
Pixel format.
mode
Use these values in ebur128_init (or'ed).
CGA/EGA/VGA ROM font data.
AVFilterFormats * out_formats
#define AV_CEIL_RSHIFT(a, b)