40 stride /=
sizeof(
pixel);
56 stride /=
sizeof(
pixel);
57 for (y = 0; y < 8; y++) {
75 stride /=
sizeof(
pixel);
76 for (y = 0; y < 16; y++) {
100 stride /=
sizeof(
pixel);
101 for (y = 0; y < 32; y++) {
120 stride /=
sizeof(
pixel);
134 stride /=
sizeof(
pixel);
135 for (y = 0; y < 8; y++) {
151 stride /=
sizeof(
pixel);
152 for (y = 0; y < 16; y++) {
170 stride /=
sizeof(
pixel);
171 for (y = 0; y < 32; y++) {
196 stride /=
sizeof(
pixel);
197 for (y = 0; y < 4; y++) {
198 int l_m_tl = left[3 -
y] - tl;
216 stride /=
sizeof(
pixel);
217 for (y = 0; y < 8; y++) {
218 int l_m_tl = left[7 -
y] - tl;
240 stride /=
sizeof(
pixel);
241 for (y = 0; y < 16; y++) {
242 int l_m_tl = left[15 -
y] - tl;
272 stride /=
sizeof(
pixel);
273 for (y = 0; y < 32; y++) {
274 int l_m_tl = left[31 -
y] - tl;
321 top[0] + top[1] + top[2] + top[3] + 4) >> 3);
323 stride /=
sizeof(
pixel);
337 ((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] +
338 left[6] + left[7] + top[0] + top[1] + top[2] + top[3] +
339 top[4] + top[5] + top[6] + top[7] + 8) >> 4);
342 stride /=
sizeof(
pixel);
343 for (y = 0; y < 8; y++) {
357 ((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] +
358 left[7] + left[8] + left[9] + left[10] + left[11] + left[12] +
359 left[13] + left[14] + left[15] + top[0] + top[1] + top[2] + top[3] +
360 top[4] + top[5] + top[6] + top[7] + top[8] + top[9] + top[10] +
361 top[11] + top[12] + top[13] + top[14] + top[15] + 16) >> 5);
364 stride /=
sizeof(
pixel);
365 for (y = 0; y < 16; y++) {
381 ((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] +
382 left[7] + left[8] + left[9] + left[10] + left[11] + left[12] +
383 left[13] + left[14] + left[15] + left[16] + left[17] + left[18] +
384 left[19] + left[20] + left[21] + left[22] + left[23] + left[24] +
385 left[25] + left[26] + left[27] + left[28] + left[29] + left[30] +
386 left[31] + top[0] + top[1] + top[2] + top[3] + top[4] + top[5] +
387 top[6] + top[7] + top[8] + top[9] + top[10] + top[11] + top[12] +
388 top[13] + top[14] + top[15] + top[16] + top[17] + top[18] + top[19] +
389 top[20] + top[21] + top[22] + top[23] + top[24] + top[25] + top[26] +
390 top[27] + top[28] + top[29] + top[30] + top[31] + 32) >> 6);
393 stride /=
sizeof(
pixel);
394 for (y = 0; y < 32; y++) {
414 stride /=
sizeof(
pixel);
427 ((left[0] + left[1] + left[2] + left[3] +
428 left[4] + left[5] + left[6] + left[7] + 4) >> 3);
431 stride /=
sizeof(
pixel);
432 for (y = 0; y < 8; y++) {
445 ((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] +
446 left[6] + left[7] + left[8] + left[9] + left[10] + left[11] +
447 left[12] + left[13] + left[14] + left[15] + 8) >> 4);
450 stride /=
sizeof(
pixel);
451 for (y = 0; y < 16; y++) {
466 ((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] +
467 left[6] + left[7] + left[8] + left[9] + left[10] + left[11] +
468 left[12] + left[13] + left[14] + left[15] + left[16] + left[17] +
469 left[18] + left[19] + left[20] + left[21] + left[22] + left[23] +
470 left[24] + left[25] + left[26] + left[27] + left[28] + left[29] +
471 left[30] + left[31] + 16) >> 5);
474 stride /=
sizeof(
pixel);
475 for (y = 0; y < 32; y++) {
495 stride /=
sizeof(
pixel);
508 ((top[0] + top[1] + top[2] + top[3] +
509 top[4] + top[5] + top[6] + top[7] + 4) >> 3);
512 stride /=
sizeof(
pixel);
513 for (y = 0; y < 8; y++) {
526 ((top[0] + top[1] + top[2] + top[3] + top[4] + top[5] +
527 top[6] + top[7] + top[8] + top[9] + top[10] + top[11] +
528 top[12] + top[13] + top[14] + top[15] + 8) >> 4);
531 stride /=
sizeof(
pixel);
532 for (y = 0; y < 16; y++) {
547 ((top[0] + top[1] + top[2] + top[3] + top[4] + top[5] +
548 top[6] + top[7] + top[8] + top[9] + top[10] + top[11] +
549 top[12] + top[13] + top[14] + top[15] + top[16] + top[17] +
550 top[18] + top[19] + top[20] + top[21] + top[22] + top[23] +
551 top[24] + top[25] + top[26] + top[27] + top[28] + top[29] +
552 top[30] + top[31] + 16) >> 5);
555 stride /=
sizeof(
pixel);
556 for (y = 0; y < 32; y++) {
577 stride /=
sizeof(
pixel);
591 stride /=
sizeof(
pixel);
592 for (y = 0; y < 8; y++) {
606 stride /=
sizeof(
pixel);
607 for (y = 0; y < 16; y++) {
623 stride /=
sizeof(
pixel);
624 for (y = 0; y < 32; y++) {
643 stride /=
sizeof(
pixel);
656 stride /=
sizeof(
pixel);
657 for (y = 0; y < 8; y++) {
671 stride /=
sizeof(
pixel);
672 for (y = 0; y < 16; y++) {
688 stride /=
sizeof(
pixel);
689 for (y = 0; y < 32; y++) {
708 stride /=
sizeof(
pixel);
722 stride /=
sizeof(
pixel);
723 for (y = 0; y < 8; y++) {
737 stride /=
sizeof(
pixel);
738 for (y = 0; y < 16; y++) {
754 stride /=
sizeof(
pixel);
755 for (y = 0; y < 32; y++) {
771 #define memset_bpc memset
775 for (n = 0; n <
len; n++) {
781 #define DST(x, y) dst[(x) + (y) * stride]
788 int a0 = top[0],
a1 = top[1],
a2 = top[2],
a3 = top[3],
789 a4 = top[4],
a5 = top[5], a6 = top[6], a7 = top[7];
791 stride /=
sizeof(
pixel);
792 DST(0,0) = (a0 + a1 * 2 + a2 + 2) >> 2;
793 DST(1,0) =
DST(0,1) = (a1 + a2 * 2 + a3 + 2) >> 2;
794 DST(2,0) =
DST(1,1) =
DST(0,2) = (a2 + a3 * 2 + a4 + 2) >> 2;
795 DST(3,0) =
DST(2,1) =
DST(1,2) =
DST(0,3) = (a3 + a4 * 2 + a5 + 2) >> 2;
796 DST(3,1) =
DST(2,2) =
DST(1,3) = (a4 + a5 * 2 + a6 + 2) >> 2;
797 DST(3,2) =
DST(2,3) = (a5 + a6 * 2 + a7 + 2) >> 2;
801 #define def_diag_downleft(size) \
802 static void diag_downleft_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
803 const uint8_t *left, const uint8_t *_top) \
805 pixel *dst = (pixel *) _dst; \
806 const pixel *top = (const pixel *) _top; \
810 stride /= sizeof(pixel); \
811 for (i = 0; i < size - 2; i++) \
812 v[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
813 v[size - 2] = (top[size - 2] + top[size - 1] * 3 + 2) >> 2; \
815 for (j = 0; j < size; j++) { \
816 memcpy(dst + j*stride, v + j, (size - 1 - j) * sizeof(pixel)); \
817 memset_bpc(dst + j*stride + size - 1 - j, top[size - 1], j + 1); \
825 static
void diag_downright_4x4_c(
uint8_t *_dst, ptrdiff_t
stride,
831 int tl = top[-1],
a0 = top[0],
a1 = top[1],
a2 = top[2],
a3 = top[3],
832 l0 = left[3], l1 = left[2], l2 = left[1], l3 = left[0];
834 stride /=
sizeof(
pixel);
835 DST(0,3) = (l1 + l2 * 2 + l3 + 2) >> 2;
836 DST(0,2) =
DST(1,3) = (l0 + l1 * 2 + l2 + 2) >> 2;
837 DST(0,1) =
DST(1,2) =
DST(2,3) = (tl + l0 * 2 + l1 + 2) >> 2;
838 DST(0,0) =
DST(1,1) =
DST(2,2) =
DST(3,3) = (l0 + tl * 2 + a0 + 2) >> 2;
839 DST(1,0) =
DST(2,1) =
DST(3,2) = (tl + a0 * 2 + a1 + 2) >> 2;
840 DST(2,0) =
DST(3,1) = (a0 + a1 * 2 + a2 + 2) >> 2;
841 DST(3,0) = (a1 + a2 * 2 + a3 + 2) >> 2;
844 #define def_diag_downright(size) \
845 static void diag_downright_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
846 const uint8_t *_left, const uint8_t *_top) \
848 pixel *dst = (pixel *) _dst; \
849 const pixel *top = (const pixel *) _top; \
850 const pixel *left = (const pixel *) _left; \
852 pixel v[size + size - 1]; \
854 stride /= sizeof(pixel); \
855 for (i = 0; i < size - 2; i++) { \
856 v[i ] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; \
857 v[size + 1 + i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
859 v[size - 2] = (left[size - 2] + left[size - 1] * 2 + top[-1] + 2) >> 2; \
860 v[size - 1] = (left[size - 1] + top[-1] * 2 + top[ 0] + 2) >> 2; \
861 v[size ] = (top[-1] + top[0] * 2 + top[ 1] + 2) >> 2; \
863 for (j = 0; j < size; j++) \
864 memcpy(dst + j*stride, v + size - 1 - j, size * sizeof(pixel)); \
871 static
void vert_right_4x4_c(
uint8_t *_dst, ptrdiff_t
stride,
877 int tl = top[-1],
a0 = top[0],
a1 = top[1],
a2 = top[2],
a3 = top[3],
878 l0 = left[3], l1 = left[2], l2 = left[1];
880 stride /=
sizeof(
pixel);
881 DST(0,3) = (l0 + l1 * 2 + l2 + 2) >> 2;
882 DST(0,2) = (tl + l0 * 2 + l1 + 2) >> 2;
883 DST(0,0) =
DST(1,2) = (tl + a0 + 1) >> 1;
884 DST(0,1) =
DST(1,3) = (l0 + tl * 2 + a0 + 2) >> 2;
885 DST(1,0) =
DST(2,2) = (a0 + a1 + 1) >> 1;
886 DST(1,1) =
DST(2,3) = (tl + a0 * 2 + a1 + 2) >> 2;
887 DST(2,0) =
DST(3,2) = (a1 + a2 + 1) >> 1;
888 DST(2,1) =
DST(3,3) = (a0 + a1 * 2 + a2 + 2) >> 2;
889 DST(3,0) = (a2 + a3 + 1) >> 1;
890 DST(3,1) = (a1 + a2 * 2 + a3 + 2) >> 2;
893 #define def_vert_right(size) \
894 static void vert_right_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
895 const uint8_t *_left, const uint8_t *_top) \
897 pixel *dst = (pixel *) _dst; \
898 const pixel *top = (const pixel *) _top; \
899 const pixel *left = (const pixel *) _left; \
901 pixel ve[size + size/2 - 1], vo[size + size/2 - 1]; \
903 stride /= sizeof(pixel); \
904 for (i = 0; i < size/2 - 2; i++) { \
905 vo[i] = (left[i*2 + 3] + left[i*2 + 2] * 2 + left[i*2 + 1] + 2) >> 2; \
906 ve[i] = (left[i*2 + 4] + left[i*2 + 3] * 2 + left[i*2 + 2] + 2) >> 2; \
908 vo[size/2 - 2] = (left[size - 1] + left[size - 2] * 2 + left[size - 3] + 2) >> 2; \
909 ve[size/2 - 2] = (top[-1] + left[size - 1] * 2 + left[size - 2] + 2) >> 2; \
911 ve[size/2 - 1] = (top[-1] + top[0] + 1) >> 1; \
912 vo[size/2 - 1] = (left[size - 1] + top[-1] * 2 + top[0] + 2) >> 2; \
913 for (i = 0; i < size - 1; i++) { \
914 ve[size/2 + i] = (top[i] + top[i + 1] + 1) >> 1; \
915 vo[size/2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; \
918 for (j = 0; j < size / 2; j++) { \
919 memcpy(dst + j*2 *stride, ve + size/2 - 1 - j, size * sizeof(pixel)); \
920 memcpy(dst + (j*2 + 1)*stride, vo + size/2 - 1 - j, size * sizeof(pixel)); \
934 int l0 = left[3], l1 = left[2], l2 = left[1], l3 = left[0],
935 tl = top[-1],
a0 = top[0],
a1 = top[1],
a2 = top[2];
937 stride /=
sizeof(
pixel);
938 DST(2,0) = (tl + a0 * 2 + a1 + 2) >> 2;
939 DST(3,0) = (a0 + a1 * 2 + a2 + 2) >> 2;
940 DST(0,0) =
DST(2,1) = (tl + l0 + 1) >> 1;
941 DST(1,0) =
DST(3,1) = (a0 + tl * 2 + l0 + 2) >> 2;
942 DST(0,1) =
DST(2,2) = (l0 + l1 + 1) >> 1;
943 DST(1,1) =
DST(3,2) = (tl + l0 * 2 + l1 + 2) >> 2;
944 DST(0,2) =
DST(2,3) = (l1 + l2 + 1) >> 1;
945 DST(1,2) =
DST(3,3) = (l0 + l1 * 2 + l2 + 2) >> 2;
946 DST(0,3) = (l2 + l3 + 1) >> 1;
947 DST(1,3) = (l1 + l2 * 2 + l3 + 2) >> 2;
950 #define def_hor_down(size) \
951 static void hor_down_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
952 const uint8_t *_left, const uint8_t *_top) \
954 pixel *dst = (pixel *) _dst; \
955 const pixel *top = (const pixel *) _top; \
956 const pixel *left = (const pixel *) _left; \
958 pixel v[size * 3 - 2]; \
960 stride /= sizeof(pixel); \
961 for (i = 0; i < size - 2; i++) { \
962 v[i*2 ] = (left[i + 1] + left[i + 0] + 1) >> 1; \
963 v[i*2 + 1] = (left[i + 2] + left[i + 1] * 2 + left[i + 0] + 2) >> 2; \
964 v[size*2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; \
966 v[size*2 - 2] = (top[-1] + left[size - 1] + 1) >> 1; \
967 v[size*2 - 4] = (left[size - 1] + left[size - 2] + 1) >> 1; \
968 v[size*2 - 1] = (top[0] + top[-1] * 2 + left[size - 1] + 2) >> 2; \
969 v[size*2 - 3] = (top[-1] + left[size - 1] * 2 + left[size - 2] + 2) >> 2; \
971 for (j = 0; j < size; j++) \
972 memcpy(dst + j*stride, v + size*2 - 2 - j*2, size * sizeof(pixel)); \
984 int a0 = top[0],
a1 = top[1],
a2 = top[2],
a3 = top[3],
985 a4 = top[4],
a5 = top[5], a6 = top[6];
987 stride /=
sizeof(
pixel);
988 DST(0,0) = (a0 + a1 + 1) >> 1;
989 DST(0,1) = (a0 + a1 * 2 + a2 + 2) >> 2;
990 DST(1,0) =
DST(0,2) = (a1 + a2 + 1) >> 1;
991 DST(1,1) =
DST(0,3) = (a1 + a2 * 2 + a3 + 2) >> 2;
992 DST(2,0) =
DST(1,2) = (a2 + a3 + 1) >> 1;
993 DST(2,1) =
DST(1,3) = (a2 + a3 * 2 + a4 + 2) >> 2;
994 DST(3,0) =
DST(2,2) = (a3 + a4 + 1) >> 1;
995 DST(3,1) =
DST(2,3) = (a3 + a4 * 2 + a5 + 2) >> 2;
996 DST(3,2) = (a4 + a5 + 1) >> 1;
997 DST(3,3) = (a4 + a5 * 2 + a6 + 2) >> 2;
1000 #define def_vert_left(size) \
1001 static void vert_left_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
1002 const uint8_t *left, const uint8_t *_top) \
1004 pixel *dst = (pixel *) _dst; \
1005 const pixel *top = (const pixel *) _top; \
1007 pixel ve[size - 1], vo[size - 1]; \
1009 stride /= sizeof(pixel); \
1010 for (i = 0; i < size - 2; i++) { \
1011 ve[i] = (top[i] + top[i + 1] + 1) >> 1; \
1012 vo[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
1014 ve[size - 2] = (top[size - 2] + top[size - 1] + 1) >> 1; \
1015 vo[size - 2] = (top[size - 2] + top[size - 1] * 3 + 2) >> 2; \
1017 for (j = 0; j < size / 2; j++) { \
1018 memcpy(dst + j*2 * stride, ve + j, (size - j - 1) * sizeof(pixel)); \
1019 memset_bpc(dst + j*2 * stride + size - j - 1, top[size - 1], j + 1); \
1020 memcpy(dst + (j*2 + 1) * stride, vo + j, (size - j - 1) * sizeof(pixel)); \
1021 memset_bpc(dst + (j*2 + 1) * stride + size - j - 1, top[size - 1], j + 1); \
1034 int l0 = left[0], l1 = left[1], l2 = left[2], l3 = left[3];
1036 stride /=
sizeof(
pixel);
1037 DST(0,0) = (l0 + l1 + 1) >> 1;
1038 DST(1,0) = (l0 + l1 * 2 + l2 + 2) >> 2;
1039 DST(0,1) =
DST(2,0) = (l1 + l2 + 1) >> 1;
1040 DST(1,1) =
DST(3,0) = (l1 + l2 * 2 + l3 + 2) >> 2;
1041 DST(0,2) =
DST(2,1) = (l2 + l3 + 1) >> 1;
1042 DST(1,2) =
DST(3,1) = (l2 + l3 * 3 + 2) >> 2;
1046 #define def_hor_up(size) \
1047 static void hor_up_##size##x##size##_c(uint8_t *_dst, ptrdiff_t stride, \
1048 const uint8_t *_left, const uint8_t *top) \
1050 pixel *dst = (pixel *) _dst; \
1051 const pixel *left = (const pixel *) _left; \
1053 pixel v[size*2 - 2]; \
1055 stride /= sizeof(pixel); \
1056 for (i = 0; i < size - 2; i++) { \
1057 v[i*2 ] = (left[i] + left[i + 1] + 1) >> 1; \
1058 v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; \
1060 v[size*2 - 4] = (left[size - 2] + left[size - 1] + 1) >> 1; \
1061 v[size*2 - 3] = (left[size - 2] + left[size - 1] * 3 + 2) >> 2; \
1063 for (j = 0; j < size / 2; j++) \
1064 memcpy(dst + j*stride, v + j*2, size * sizeof(pixel)); \
1065 for (j = size / 2; j < size; j++) { \
1066 memcpy(dst + j*stride, v + j*2, (size*2 - 2 - j*2) * sizeof(pixel)); \
1067 memset_bpc(dst + j*stride + size*2 - 2 - j*2, left[size - 1], \
1088 #define init_intra_pred_bd_aware(tx, sz) \
1089 dsp->intra_pred[tx][TM_VP8_PRED] = tm_##sz##_c; \
1090 dsp->intra_pred[tx][DC_128_PRED] = dc_128_##sz##_c; \
1091 dsp->intra_pred[tx][DC_127_PRED] = dc_127_##sz##_c; \
1092 dsp->intra_pred[tx][DC_129_PRED] = dc_129_##sz##_c
1095 vp9dsp_intrapred_init_10(dsp);
1096 #define init_intra_pred(tx, sz) \
1097 init_intra_pred_bd_aware(tx, sz)
1099 #define init_intra_pred(tx, sz) \
1100 dsp->intra_pred[tx][VERT_PRED] = vert_##sz##_c; \
1101 dsp->intra_pred[tx][HOR_PRED] = hor_##sz##_c; \
1102 dsp->intra_pred[tx][DC_PRED] = dc_##sz##_c; \
1103 dsp->intra_pred[tx][DIAG_DOWN_LEFT_PRED] = diag_downleft_##sz##_c; \
1104 dsp->intra_pred[tx][DIAG_DOWN_RIGHT_PRED] = diag_downright_##sz##_c; \
1105 dsp->intra_pred[tx][VERT_RIGHT_PRED] = vert_right_##sz##_c; \
1106 dsp->intra_pred[tx][HOR_DOWN_PRED] = hor_down_##sz##_c; \
1107 dsp->intra_pred[tx][VERT_LEFT_PRED] = vert_left_##sz##_c; \
1108 dsp->intra_pred[tx][HOR_UP_PRED] = hor_up_##sz##_c; \
1109 dsp->intra_pred[tx][LEFT_DC_PRED] = dc_left_##sz##_c; \
1110 dsp->intra_pred[tx][TOP_DC_PRED] = dc_top_##sz##_c; \
1111 init_intra_pred_bd_aware(tx, sz)
1119 #undef init_intra_pred
1120 #undef init_intra_pred_bd_aware
1123 #define itxfm_wrapper(type_a, type_b, sz, bits, has_dconly) \
1124 static void type_a##_##type_b##_##sz##x##sz##_add_c(uint8_t *_dst, \
1126 int16_t *_block, int eob) \
1129 pixel *dst = (pixel *) _dst; \
1130 dctcoef *block = (dctcoef *) _block, tmp[sz * sz], out[sz]; \
1132 stride /= sizeof(pixel); \
1133 if (has_dconly && eob == 1) { \
1134 const int t = (((block[0] * 11585 + (1 << 13)) >> 14) \
1135 * 11585 + (1 << 13)) >> 14; \
1137 for (i = 0; i < sz; i++) { \
1138 for (j = 0; j < sz; j++) \
1139 dst[j * stride] = av_clip_pixel(dst[j * stride] + \
1141 (t + (1 << (bits - 1))) >> bits : \
1148 for (i = 0; i < sz; i++) \
1149 type_a##sz##_1d(block + i, sz, tmp + i * sz, 0); \
1150 memset(block, 0, sz * sz * sizeof(*block)); \
1151 for (i = 0; i < sz; i++) { \
1152 type_b##sz##_1d(tmp + i, sz, out, 1); \
1153 for (j = 0; j < sz; j++) \
1154 dst[j * stride] = av_clip_pixel(dst[j * stride] + \
1156 (out[j] + (1 << (bits - 1))) >> bits : \
1162 #define itxfm_wrap(sz, bits) \
1163 itxfm_wrapper(idct, idct, sz, bits, 1) \
1164 itxfm_wrapper(iadst, idct, sz, bits, 0) \
1165 itxfm_wrapper(idct, iadst, sz, bits, 0) \
1166 itxfm_wrapper(iadst, iadst, sz, bits, 0)
1168 #define IN(x) ((dctint) in[(x) * stride])
1175 t0 = ((
IN(0) +
IN(2)) * 11585 + (1 << 13)) >> 14;
1176 t1 = ((
IN(0) -
IN(2)) * 11585 + (1 << 13)) >> 14;
1177 t2 = (
IN(1) * 6270 -
IN(3) * 15137 + (1 << 13)) >> 14;
1178 t3 = (
IN(1) * 15137 +
IN(3) * 6270 + (1 << 13)) >> 14;
1191 t0 = 5283 *
IN(0) + 15212 *
IN(2) + 9929 *
IN(3);
1192 t1 = 9929 *
IN(0) - 5283 *
IN(2) - 15212 *
IN(3);
1193 t2 = 13377 * (
IN(0) -
IN(2) +
IN(3));
1196 out[0] = (t0 + t3 + (1 << 13)) >> 14;
1197 out[1] = (t1 + t3 + (1 << 13)) >> 14;
1198 out[2] = (t2 + (1 << 13)) >> 14;
1199 out[3] = (t0 + t1 - t3 + (1 << 13)) >> 14;
1207 dctint t0, t0a,
t1, t1a,
t2, t2a,
t3, t3a,
t4, t4a,
t5, t5a,
t6, t6a,
t7, t7a;
1209 t0a = ((
IN(0) +
IN(4)) * 11585 + (1 << 13)) >> 14;
1210 t1a = ((
IN(0) -
IN(4)) * 11585 + (1 << 13)) >> 14;
1211 t2a = (
IN(2) * 6270 -
IN(6) * 15137 + (1 << 13)) >> 14;
1212 t3a = (
IN(2) * 15137 +
IN(6) * 6270 + (1 << 13)) >> 14;
1213 t4a = (
IN(1) * 3196 -
IN(7) * 16069 + (1 << 13)) >> 14;
1214 t5a = (
IN(5) * 13623 -
IN(3) * 9102 + (1 << 13)) >> 14;
1215 t6a = (
IN(5) * 9102 +
IN(3) * 13623 + (1 << 13)) >> 14;
1216 t7a = (
IN(1) * 16069 +
IN(7) * 3196 + (1 << 13)) >> 14;
1227 t5 = ((t6a - t5a) * 11585 + (1 << 13)) >> 14;
1228 t6 = ((t6a + t5a) * 11585 + (1 << 13)) >> 14;
1243 dctint t0, t0a,
t1, t1a,
t2, t2a,
t3, t3a,
t4, t4a,
t5, t5a,
t6, t6a,
t7, t7a;
1245 t0a = 16305 *
IN(7) + 1606 *
IN(0);
1246 t1a = 1606 *
IN(7) - 16305 *
IN(0);
1247 t2a = 14449 *
IN(5) + 7723 *
IN(2);
1248 t3a = 7723 *
IN(5) - 14449 *
IN(2);
1249 t4a = 10394 *
IN(3) + 12665 *
IN(4);
1250 t5a = 12665 *
IN(3) - 10394 *
IN(4);
1251 t6a = 4756 *
IN(1) + 15679 *
IN(6);
1252 t7a = 15679 *
IN(1) - 4756 *
IN(6);
1254 t0 = (t0a + t4a + (1 << 13)) >> 14;
1255 t1 = (t1a + t5a + (1 << 13)) >> 14;
1256 t2 = (t2a + t6a + (1 << 13)) >> 14;
1257 t3 = (t3a + t7a + (1 << 13)) >> 14;
1258 t4 = (t0a - t4a + (1 << 13)) >> 14;
1259 t5 = (t1a - t5a + (1 << 13)) >> 14;
1260 t6 = (t2a - t6a + (1 << 13)) >> 14;
1261 t7 = (t3a - t7a + (1 << 13)) >> 14;
1263 t4a = 15137 * t4 + 6270 *
t5;
1264 t5a = 6270 * t4 - 15137 *
t5;
1265 t6a = 15137 * t7 - 6270 *
t6;
1266 t7a = 6270 * t7 + 15137 *
t6;
1269 out[7] = -(t1 +
t3);
1273 out[1] = -((t4a + t6a + (1 << 13)) >> 14);
1274 out[6] = (t5a + t7a + (1 << 13)) >> 14;
1275 t6 = (t4a - t6a + (1 << 13)) >> 14;
1276 t7 = (t5a - t7a + (1 << 13)) >> 14;
1278 out[3] = -(((t2 +
t3) * 11585 + (1 << 13)) >> 14);
1279 out[4] = ((t2 -
t3) * 11585 + (1 << 13)) >> 14;
1280 out[2] = ((t6 +
t7) * 11585 + (1 << 13)) >> 14;
1281 out[5] = -(((t6 -
t7) * 11585 + (1 << 13)) >> 14);
1289 dctint t0,
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
t11,
t12, t13, t14, t15;
1290 dctint t0a, t1a, t2a, t3a, t4a, t5a, t6a, t7a;
1291 dctint t8a, t9a, t10a, t11a, t12a, t13a, t14a, t15a;
1293 t0a = ((
IN(0) +
IN(8)) * 11585 + (1 << 13)) >> 14;
1294 t1a = ((
IN(0) -
IN(8)) * 11585 + (1 << 13)) >> 14;
1295 t2a = (
IN(4) * 6270 -
IN(12) * 15137 + (1 << 13)) >> 14;
1296 t3a = (
IN(4) * 15137 +
IN(12) * 6270 + (1 << 13)) >> 14;
1297 t4a = (
IN(2) * 3196 -
IN(14) * 16069 + (1 << 13)) >> 14;
1298 t7a = (
IN(2) * 16069 +
IN(14) * 3196 + (1 << 13)) >> 14;
1299 t5a = (
IN(10) * 13623 -
IN(6) * 9102 + (1 << 13)) >> 14;
1300 t6a = (
IN(10) * 9102 +
IN(6) * 13623 + (1 << 13)) >> 14;
1301 t8a = (
IN(1) * 1606 -
IN(15) * 16305 + (1 << 13)) >> 14;
1302 t15a = (
IN(1) * 16305 +
IN(15) * 1606 + (1 << 13)) >> 14;
1303 t9a = (
IN(9) * 12665 -
IN(7) * 10394 + (1 << 13)) >> 14;
1304 t14a = (
IN(9) * 10394 +
IN(7) * 12665 + (1 << 13)) >> 14;
1305 t10a = (
IN(5) * 7723 -
IN(11) * 14449 + (1 << 13)) >> 14;
1306 t13a = (
IN(5) * 14449 +
IN(11) * 7723 + (1 << 13)) >> 14;
1307 t11a = (
IN(13) * 15679 -
IN(3) * 4756 + (1 << 13)) >> 14;
1308 t12a = (
IN(13) * 4756 +
IN(3) * 15679 + (1 << 13)) >> 14;
1327 t5a = ((t6 -
t5) * 11585 + (1 << 13)) >> 14;
1328 t6a = ((t6 +
t5) * 11585 + (1 << 13)) >> 14;
1329 t9a = ( t14 * 6270 - t9 * 15137 + (1 << 13)) >> 14;
1330 t14a = ( t14 * 15137 + t9 * 6270 + (1 << 13)) >> 14;
1331 t10a = (-(t13 * 15137 + t10 * 6270) + (1 << 13)) >> 14;
1332 t13a = ( t13 * 6270 - t10 * 15137 + (1 << 13)) >> 14;
1351 t10a = ((t13 -
t10) * 11585 + (1 << 13)) >> 14;
1352 t13a = ((t13 +
t10) * 11585 + (1 << 13)) >> 14;
1353 t11 = ((t12a - t11a) * 11585 + (1 << 13)) >> 14;
1354 t12 = ((t12a + t11a) * 11585 + (1 << 13)) >> 14;
1356 out[ 0] = t0a + t15a;
1357 out[ 1] = t1a + t14;
1358 out[ 2] = t2a + t13a;
1359 out[ 3] = t3a +
t12;
1361 out[ 5] = t5 + t10a;
1366 out[10] = t5 - t10a;
1368 out[12] = t3a -
t12;
1369 out[13] = t2a - t13a;
1370 out[14] = t1a - t14;
1371 out[15] = t0a - t15a;
1377 dctint t0,
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
t11,
t12, t13, t14, t15;
1378 dctint t0a, t1a, t2a, t3a, t4a, t5a, t6a, t7a;
1379 dctint t8a, t9a, t10a, t11a, t12a, t13a, t14a, t15a;
1381 t0 =
IN(15) * 16364 +
IN(0) * 804;
1382 t1 =
IN(15) * 804 -
IN(0) * 16364;
1383 t2 =
IN(13) * 15893 +
IN(2) * 3981;
1384 t3 =
IN(13) * 3981 -
IN(2) * 15893;
1385 t4 =
IN(11) * 14811 +
IN(4) * 7005;
1386 t5 =
IN(11) * 7005 -
IN(4) * 14811;
1387 t6 =
IN(9) * 13160 +
IN(6) * 9760;
1388 t7 =
IN(9) * 9760 -
IN(6) * 13160;
1389 t8 =
IN(7) * 11003 +
IN(8) * 12140;
1390 t9 =
IN(7) * 12140 -
IN(8) * 11003;
1391 t10 =
IN(5) * 8423 +
IN(10) * 14053;
1392 t11 =
IN(5) * 14053 -
IN(10) * 8423;
1393 t12 =
IN(3) * 5520 +
IN(12) * 15426;
1394 t13 =
IN(3) * 15426 -
IN(12) * 5520;
1395 t14 =
IN(1) * 2404 +
IN(14) * 16207;
1396 t15 =
IN(1) * 16207 -
IN(14) * 2404;
1398 t0a = (t0 + t8 + (1 << 13)) >> 14;
1399 t1a = (t1 + t9 + (1 << 13)) >> 14;
1400 t2a = (t2 + t10 + (1 << 13)) >> 14;
1401 t3a = (t3 + t11 + (1 << 13)) >> 14;
1402 t4a = (t4 + t12 + (1 << 13)) >> 14;
1403 t5a = (t5 + t13 + (1 << 13)) >> 14;
1404 t6a = (t6 + t14 + (1 << 13)) >> 14;
1405 t7a = (t7 + t15 + (1 << 13)) >> 14;
1406 t8a = (t0 - t8 + (1 << 13)) >> 14;
1407 t9a = (t1 - t9 + (1 << 13)) >> 14;
1408 t10a = (t2 - t10 + (1 << 13)) >> 14;
1409 t11a = (t3 - t11 + (1 << 13)) >> 14;
1410 t12a = (t4 - t12 + (1 << 13)) >> 14;
1411 t13a = (t5 - t13 + (1 << 13)) >> 14;
1412 t14a = (t6 - t14 + (1 << 13)) >> 14;
1413 t15a = (t7 - t15 + (1 << 13)) >> 14;
1415 t8 = t8a * 16069 + t9a * 3196;
1416 t9 = t8a * 3196 - t9a * 16069;
1417 t10 = t10a * 9102 + t11a * 13623;
1418 t11 = t10a * 13623 - t11a * 9102;
1419 t12 = t13a * 16069 - t12a * 3196;
1420 t13 = t13a * 3196 + t12a * 16069;
1421 t14 = t15a * 9102 - t14a * 13623;
1422 t15 = t15a * 13623 + t14a * 9102;
1432 t8a = (t8 + t12 + (1 << 13)) >> 14;
1433 t9a = (t9 + t13 + (1 << 13)) >> 14;
1434 t10a = (t10 + t14 + (1 << 13)) >> 14;
1435 t11a = (t11 + t15 + (1 << 13)) >> 14;
1436 t12a = (t8 - t12 + (1 << 13)) >> 14;
1437 t13a = (t9 - t13 + (1 << 13)) >> 14;
1438 t14a = (t10 - t14 + (1 << 13)) >> 14;
1439 t15a = (t11 - t15 + (1 << 13)) >> 14;
1441 t4a = t4 * 15137 + t5 * 6270;
1442 t5a = t4 * 6270 - t5 * 15137;
1443 t6a = t7 * 15137 - t6 * 6270;
1444 t7a = t7 * 6270 + t6 * 15137;
1445 t12 = t12a * 15137 + t13a * 6270;
1446 t13 = t12a * 6270 - t13a * 15137;
1447 t14 = t15a * 15137 - t14a * 6270;
1448 t15 = t15a * 6270 + t14a * 15137;
1451 out[15] = -(t1 +
t3);
1454 out[ 3] = -((t4a + t6a + (1 << 13)) >> 14);
1455 out[12] = (t5a + t7a + (1 << 13)) >> 14;
1456 t6 = (t4a - t6a + (1 << 13)) >> 14;
1457 t7 = (t5a - t7a + (1 << 13)) >> 14;
1458 out[ 1] = -(t8a + t10a);
1459 out[14] = t9a + t11a;
1462 out[ 2] = (t12 + t14 + (1 << 13)) >> 14;
1463 out[13] = -((t13 + t15 + (1 << 13)) >> 14);
1464 t14a = (t12 - t14 + (1 << 13)) >> 14;
1465 t15a = (t13 - t15 + (1 << 13)) >> 14;
1467 out[ 7] = ((t2a + t3a) * -11585 + (1 << 13)) >> 14;
1468 out[ 8] = ((t2a - t3a) * 11585 + (1 << 13)) >> 14;
1469 out[ 4] = ((t7 +
t6) * 11585 + (1 << 13)) >> 14;
1470 out[11] = ((t7 -
t6) * 11585 + (1 << 13)) >> 14;
1471 out[ 6] = ((t11 +
t10) * 11585 + (1 << 13)) >> 14;
1472 out[ 9] = ((t11 -
t10) * 11585 + (1 << 13)) >> 14;
1473 out[ 5] = ((t14a + t15a) * -11585 + (1 << 13)) >> 14;
1474 out[10] = ((t14a - t15a) * 11585 + (1 << 13)) >> 14;
1482 dctint t0a = ((
IN(0) +
IN(16)) * 11585 + (1 << 13)) >> 14;
1483 dctint t1a = ((
IN(0) -
IN(16)) * 11585 + (1 << 13)) >> 14;
1484 dctint t2a = (
IN( 8) * 6270 -
IN(24) * 15137 + (1 << 13)) >> 14;
1485 dctint t3a = (
IN( 8) * 15137 +
IN(24) * 6270 + (1 << 13)) >> 14;
1486 dctint t4a = (
IN( 4) * 3196 -
IN(28) * 16069 + (1 << 13)) >> 14;
1487 dctint t7a = (
IN( 4) * 16069 +
IN(28) * 3196 + (1 << 13)) >> 14;
1488 dctint t5a = (
IN(20) * 13623 -
IN(12) * 9102 + (1 << 13)) >> 14;
1489 dctint t6a = (
IN(20) * 9102 +
IN(12) * 13623 + (1 << 13)) >> 14;
1490 dctint t8a = (
IN( 2) * 1606 -
IN(30) * 16305 + (1 << 13)) >> 14;
1491 dctint t15a = (
IN( 2) * 16305 +
IN(30) * 1606 + (1 << 13)) >> 14;
1492 dctint t9a = (
IN(18) * 12665 -
IN(14) * 10394 + (1 << 13)) >> 14;
1493 dctint t14a = (
IN(18) * 10394 +
IN(14) * 12665 + (1 << 13)) >> 14;
1494 dctint t10a = (
IN(10) * 7723 -
IN(22) * 14449 + (1 << 13)) >> 14;
1495 dctint t13a = (
IN(10) * 14449 +
IN(22) * 7723 + (1 << 13)) >> 14;
1496 dctint t11a = (
IN(26) * 15679 -
IN( 6) * 4756 + (1 << 13)) >> 14;
1497 dctint t12a = (
IN(26) * 4756 +
IN( 6) * 15679 + (1 << 13)) >> 14;
1498 dctint t16a = (
IN( 1) * 804 -
IN(31) * 16364 + (1 << 13)) >> 14;
1499 dctint t31a = (
IN( 1) * 16364 +
IN(31) * 804 + (1 << 13)) >> 14;
1500 dctint t17a = (
IN(17) * 12140 -
IN(15) * 11003 + (1 << 13)) >> 14;
1501 dctint t30a = (
IN(17) * 11003 +
IN(15) * 12140 + (1 << 13)) >> 14;
1502 dctint t18a = (
IN( 9) * 7005 -
IN(23) * 14811 + (1 << 13)) >> 14;
1503 dctint t29a = (
IN( 9) * 14811 +
IN(23) * 7005 + (1 << 13)) >> 14;
1504 dctint t19a = (
IN(25) * 15426 -
IN( 7) * 5520 + (1 << 13)) >> 14;
1505 dctint t28a = (
IN(25) * 5520 +
IN( 7) * 15426 + (1 << 13)) >> 14;
1506 dctint t20a = (
IN( 5) * 3981 -
IN(27) * 15893 + (1 << 13)) >> 14;
1507 dctint t27a = (
IN( 5) * 15893 +
IN(27) * 3981 + (1 << 13)) >> 14;
1508 dctint t21a = (
IN(21) * 14053 -
IN(11) * 8423 + (1 << 13)) >> 14;
1509 dctint t26a = (
IN(21) * 8423 +
IN(11) * 14053 + (1 << 13)) >> 14;
1510 dctint t22a = (
IN(13) * 9760 -
IN(19) * 13160 + (1 << 13)) >> 14;
1511 dctint t25a = (
IN(13) * 13160 +
IN(19) * 9760 + (1 << 13)) >> 14;
1512 dctint t23a = (
IN(29) * 16207 -
IN( 3) * 2404 + (1 << 13)) >> 14;
1513 dctint t24a = (
IN(29) * 2404 +
IN( 3) * 16207 + (1 << 13)) >> 14;
1528 dctint t13 = t12a - t13a;
1529 dctint t14 = t15a - t14a;
1530 dctint t15 = t15a + t14a;
1531 dctint t16 = t16a + t17a;
1532 dctint t17 = t16a - t17a;
1533 dctint t18 = t19a - t18a;
1534 dctint t19 = t19a + t18a;
1535 dctint t20 = t20a + t21a;
1536 dctint t21 = t20a - t21a;
1537 dctint t22 = t23a - t22a;
1538 dctint t23 = t23a + t22a;
1539 dctint t24 = t24a + t25a;
1540 dctint t25 = t24a - t25a;
1541 dctint t26 = t27a - t26a;
1542 dctint t27 = t27a + t26a;
1543 dctint t28 = t28a + t29a;
1544 dctint t29 = t28a - t29a;
1545 dctint t30 = t31a - t30a;
1546 dctint t31 = t31a + t30a;
1548 t5a = ((t6 -
t5) * 11585 + (1 << 13)) >> 14;
1549 t6a = ((t6 +
t5) * 11585 + (1 << 13)) >> 14;
1550 t9a = ( t14 * 6270 - t9 * 15137 + (1 << 13)) >> 14;
1551 t14a = ( t14 * 15137 + t9 * 6270 + (1 << 13)) >> 14;
1552 t10a = (-(t13 * 15137 + t10 * 6270) + (1 << 13)) >> 14;
1553 t13a = ( t13 * 6270 - t10 * 15137 + (1 << 13)) >> 14;
1554 t17a = ( t30 * 3196 - t17 * 16069 + (1 << 13)) >> 14;
1555 t30a = ( t30 * 16069 + t17 * 3196 + (1 << 13)) >> 14;
1556 t18a = (-(t29 * 16069 + t18 * 3196) + (1 << 13)) >> 14;
1557 t29a = ( t29 * 3196 - t18 * 16069 + (1 << 13)) >> 14;
1558 t21a = ( t26 * 13623 - t21 * 9102 + (1 << 13)) >> 14;
1559 t26a = ( t26 * 9102 + t21 * 13623 + (1 << 13)) >> 14;
1560 t22a = (-(t25 * 9102 + t22 * 13623) + (1 << 13)) >> 14;
1561 t25a = ( t25 * 13623 - t22 * 9102 + (1 << 13)) >> 14;
1596 t10a = ((t13 -
t10) * 11585 + (1 << 13)) >> 14;
1597 t13a = ((t13 +
t10) * 11585 + (1 << 13)) >> 14;
1598 t11 = ((t12a - t11a) * 11585 + (1 << 13)) >> 14;
1599 t12 = ((t12a + t11a) * 11585 + (1 << 13)) >> 14;
1600 t18a = ( t29 * 6270 - t18 * 15137 + (1 << 13)) >> 14;
1601 t29a = ( t29 * 15137 + t18 * 6270 + (1 << 13)) >> 14;
1602 t19 = ( t28a * 6270 - t19a * 15137 + (1 << 13)) >> 14;
1603 t28 = ( t28a * 15137 + t19a * 6270 + (1 << 13)) >> 14;
1604 t20 = (-(t27a * 15137 + t20a * 6270) + (1 << 13)) >> 14;
1605 t27 = ( t27a * 6270 - t20a * 15137 + (1 << 13)) >> 14;
1606 t21a = (-(t26 * 15137 + t21 * 6270) + (1 << 13)) >> 14;
1607 t26a = ( t26 * 6270 - t21 * 15137 + (1 << 13)) >> 14;
1642 t20 = ((t27a - t20a) * 11585 + (1 << 13)) >> 14;
1643 t27 = ((t27a + t20a) * 11585 + (1 << 13)) >> 14;
1644 t21a = ((t26 - t21 ) * 11585 + (1 << 13)) >> 14;
1645 t26a = ((t26 + t21 ) * 11585 + (1 << 13)) >> 14;
1646 t22 = ((t25a - t22a) * 11585 + (1 << 13)) >> 14;
1647 t25 = ((t25a + t22a) * 11585 + (1 << 13)) >> 14;
1648 t23a = ((t24 - t23 ) * 11585 + (1 << 13)) >> 14;
1649 t24a = ((t24 + t23 ) * 11585 + (1 << 13)) >> 14;
1652 out[ 1] = t1 + t30a;
1654 out[ 3] = t3 + t28a;
1656 out[ 5] = t5a + t26a;
1657 out[ 6] = t6a + t25;
1658 out[ 7] = t7 + t24a;
1659 out[ 8] = t8 + t23a;
1660 out[ 9] = t9a + t22;
1661 out[10] = t10 + t21a;
1662 out[11] = t11a + t20;
1663 out[12] = t12a + t19a;
1664 out[13] = t13 + t18;
1665 out[14] = t14a + t17a;
1666 out[15] = t15 + t16;
1667 out[16] = t15 - t16;
1668 out[17] = t14a - t17a;
1669 out[18] = t13 - t18;
1670 out[19] = t12a - t19a;
1671 out[20] = t11a - t20;
1672 out[21] = t10 - t21a;
1673 out[22] = t9a - t22;
1674 out[23] = t8 - t23a;
1675 out[24] = t7 - t24a;
1676 out[25] = t6a - t25;
1677 out[26] = t5a - t26a;
1679 out[28] = t3 - t28a;
1681 out[30] = t1 - t30a;
1706 t4 = (t0 -
t3) >> 1;
1721 #undef itxfm_wrapper
1726 #define init_itxfm(tx, sz) \
1727 dsp->itxfm_add[tx][DCT_DCT] = idct_idct_##sz##_add_c; \
1728 dsp->itxfm_add[tx][DCT_ADST] = iadst_idct_##sz##_add_c; \
1729 dsp->itxfm_add[tx][ADST_DCT] = idct_iadst_##sz##_add_c; \
1730 dsp->itxfm_add[tx][ADST_ADST] = iadst_iadst_##sz##_add_c
1732 #define init_idct(tx, nm) \
1733 dsp->itxfm_add[tx][DCT_DCT] = \
1734 dsp->itxfm_add[tx][ADST_DCT] = \
1735 dsp->itxfm_add[tx][DCT_ADST] = \
1736 dsp->itxfm_add[tx][ADST_ADST] = nm##_add_c
1749 ptrdiff_t stridea, ptrdiff_t strideb,
1757 for (i = 0; i < 8; i++, dst += stridea) {
1759 int p3 = dst[strideb * -4], p2 = dst[strideb * -3];
1760 int p1 = dst[strideb * -2], p0 = dst[strideb * -1];
1761 int q0 = dst[strideb * +0],
q1 = dst[strideb * +1];
1762 int q2 = dst[strideb * +2], q3 = dst[strideb * +3];
1764 int fm =
FFABS(p3 - p2) <= I &&
FFABS(p2 - p1) <= I &&
1765 FFABS(p1 - p0) <= I &&
FFABS(q1 - q0) <= I &&
1766 FFABS(q2 - q1) <= I &&
FFABS(q3 - q2) <= I &&
1767 FFABS(p0 - q0) * 2 + (
FFABS(p1 - q1) >> 1) <= E;
1768 int flat8out, flat8in;
1774 p7 = dst[strideb * -8];
1775 p6 = dst[strideb * -7];
1776 p5 = dst[strideb * -6];
1777 p4 = dst[strideb * -5];
1778 q4 = dst[strideb * +4];
1779 q5 = dst[strideb * +5];
1780 q6 = dst[strideb * +6];
1781 q7 = dst[strideb * +7];
1783 flat8out =
FFABS(p7 - p0) <= F &&
FFABS(p6 - p0) <= F &&
1784 FFABS(p5 - p0) <= F &&
FFABS(p4 - p0) <= F &&
1785 FFABS(q4 - q0) <= F &&
FFABS(q5 - q0) <= F &&
1790 flat8in =
FFABS(p3 - p0) <= F &&
FFABS(p2 - p0) <= F &&
1791 FFABS(p1 - p0) <= F &&
FFABS(q1 - q0) <= F &&
1794 if (wd >= 16 && flat8out && flat8in) {
1795 dst[strideb * -7] = (p7 + p7 + p7 + p7 + p7 + p7 + p7 + p6 * 2 +
1796 p5 + p4 + p3 + p2 + p1 + p0 + q0 + 8) >> 4;
1797 dst[strideb * -6] = (p7 + p7 + p7 + p7 + p7 + p7 + p6 + p5 * 2 +
1798 p4 + p3 + p2 + p1 + p0 + q0 + q1 + 8) >> 4;
1799 dst[strideb * -5] = (p7 + p7 + p7 + p7 + p7 + p6 + p5 + p4 * 2 +
1800 p3 + p2 + p1 + p0 + q0 + q1 + q2 + 8) >> 4;
1801 dst[strideb * -4] = (p7 + p7 + p7 + p7 + p6 + p5 + p4 + p3 * 2 +
1802 p2 + p1 + p0 + q0 + q1 + q2 + q3 + 8) >> 4;
1803 dst[strideb * -3] = (p7 + p7 + p7 + p6 + p5 + p4 + p3 + p2 * 2 +
1804 p1 + p0 + q0 + q1 + q2 + q3 + q4 + 8) >> 4;
1805 dst[strideb * -2] = (p7 + p7 + p6 + p5 + p4 + p3 + p2 + p1 * 2 +
1806 p0 + q0 + q1 + q2 + q3 + q4 + q5 + 8) >> 4;
1807 dst[strideb * -1] = (p7 + p6 + p5 + p4 + p3 + p2 + p1 + p0 * 2 +
1808 q0 + q1 + q2 + q3 + q4 + q5 + q6 + 8) >> 4;
1809 dst[strideb * +0] = (p6 + p5 + p4 + p3 + p2 + p1 + p0 + q0 * 2 +
1810 q1 + q2 + q3 + q4 + q5 + q6 + q7 + 8) >> 4;
1811 dst[strideb * +1] = (p5 + p4 + p3 + p2 + p1 + p0 + q0 + q1 * 2 +
1812 q2 + q3 + q4 + q5 + q6 + q7 + q7 + 8) >> 4;
1813 dst[strideb * +2] = (p4 + p3 + p2 + p1 + p0 + q0 + q1 + q2 * 2 +
1814 q3 + q4 + q5 + q6 + q7 + q7 + q7 + 8) >> 4;
1815 dst[strideb * +3] = (p3 + p2 + p1 + p0 + q0 + q1 + q2 + q3 * 2 +
1816 q4 + q5 + q6 + q7 + q7 + q7 + q7 + 8) >> 4;
1817 dst[strideb * +4] = (p2 + p1 + p0 + q0 + q1 + q2 + q3 + q4 * 2 +
1818 q5 + q6 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
1819 dst[strideb * +5] = (p1 + p0 + q0 + q1 + q2 + q3 + q4 + q5 * 2 +
1820 q6 + q7 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
1821 dst[strideb * +6] = (p0 + q0 + q1 + q2 + q3 + q4 + q5 + q6 * 2 +
1822 q7 + q7 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
1823 }
else if (wd >= 8 && flat8in) {
1824 dst[strideb * -3] = (p3 + p3 + p3 + 2 * p2 + p1 + p0 + q0 + 4) >> 3;
1825 dst[strideb * -2] = (p3 + p3 + p2 + 2 * p1 + p0 + q0 + q1 + 4) >> 3;
1826 dst[strideb * -1] = (p3 + p2 + p1 + 2 * p0 + q0 + q1 + q2 + 4) >> 3;
1827 dst[strideb * +0] = (p2 + p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4) >> 3;
1828 dst[strideb * +1] = (p1 + p0 + q0 + 2 * q1 + q2 + q3 + q3 + 4) >> 3;
1829 dst[strideb * +2] = (p0 + q0 + q1 + 2 * q2 + q3 + q3 + q3 + 4) >> 3;
1834 int f = av_clip_intp2(p1 - q1,
BIT_DEPTH - 1), f1, f2;
1835 f = av_clip_intp2(3 * (q0 - p0) + f,
BIT_DEPTH - 1);
1843 int f = av_clip_intp2(3 * (q0 - p0),
BIT_DEPTH - 1), f1, f2;
1859 #define lf_8_fn(dir, wd, stridea, strideb) \
1860 static void loop_filter_##dir##_##wd##_8_c(uint8_t *_dst, \
1862 int E, int I, int H) \
1864 pixel *dst = (pixel *) _dst; \
1865 stride /= sizeof(pixel); \
1866 loop_filter(dst, E, I, H, stridea, strideb, wd); \
1869 #define lf_8_fns(wd) \
1870 lf_8_fn(h, wd, stride, 1) \
1871 lf_8_fn(v, wd, 1, stride)
1880 #define lf_16_fn(dir, stridea) \
1881 static void loop_filter_##dir##_16_16_c(uint8_t *dst, \
1883 int E, int I, int H) \
1885 loop_filter_##dir##_16_8_c(dst, stride, E, I, H); \
1886 loop_filter_##dir##_16_8_c(dst + 8 * stridea, stride, E, I, H); \
1894 #define lf_mix_fn(dir, wd1, wd2, stridea) \
1895 static void loop_filter_##dir##_##wd1##wd2##_16_c(uint8_t *dst, \
1897 int E, int I, int H) \
1899 loop_filter_##dir##_##wd1##_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); \
1900 loop_filter_##dir##_##wd2##_8_c(dst + 8 * stridea, stride, E >> 8, I >> 8, H >> 8); \
1903 #define lf_mix_fns(wd1, wd2) \
1904 lf_mix_fn(h, wd1, wd2, stride) \
1905 lf_mix_fn(v, wd1, wd2, sizeof(pixel))
1944 memcpy(dst, src, w *
sizeof(
pixel));
1952 const uint8_t *_src, ptrdiff_t src_stride,
1958 dst_stride /=
sizeof(
pixel);
1959 src_stride /=
sizeof(
pixel);
1963 for (x = 0; x < w; x += 4)
1971 #define fpel_fn(type, sz) \
1972 static void type##sz##_c(uint8_t *dst, ptrdiff_t dst_stride, \
1973 const uint8_t *src, ptrdiff_t src_stride, \
1974 int h, int mx, int my) \
1976 type##_c(dst, dst_stride, src, src_stride, sz, h); \
1979 #define copy_avg_fn(sz) \
1994 static const int16_t vp9_subpel_filters[3][16][8] = {
1996 { 0, 0, 0, 128, 0, 0, 0, 0 },
1997 { 0, 1, -5, 126, 8, -3, 1, 0 },
1998 { -1, 3, -10, 122, 18, -6, 2, 0 },
1999 { -1, 4, -13, 118, 27, -9, 3, -1 },
2000 { -1, 4, -16, 112, 37, -11, 4, -1 },
2001 { -1, 5, -18, 105, 48, -14, 4, -1 },
2002 { -1, 5, -19, 97, 58, -16, 5, -1 },
2003 { -1, 6, -19, 88, 68, -18, 5, -1 },
2004 { -1, 6, -19, 78, 78, -19, 6, -1 },
2005 { -1, 5, -18, 68, 88, -19, 6, -1 },
2006 { -1, 5, -16, 58, 97, -19, 5, -1 },
2007 { -1, 4, -14, 48, 105, -18, 5, -1 },
2008 { -1, 4, -11, 37, 112, -16, 4, -1 },
2009 { -1, 3, -9, 27, 118, -13, 4, -1 },
2010 { 0, 2, -6, 18, 122, -10, 3, -1 },
2011 { 0, 1, -3, 8, 126, -5, 1, 0 },
2013 { 0, 0, 0, 128, 0, 0, 0, 0 },
2014 { -1, 3, -7, 127, 8, -3, 1, 0 },
2015 { -2, 5, -13, 125, 17, -6, 3, -1 },
2016 { -3, 7, -17, 121, 27, -10, 5, -2 },
2017 { -4, 9, -20, 115, 37, -13, 6, -2 },
2018 { -4, 10, -23, 108, 48, -16, 8, -3 },
2019 { -4, 10, -24, 100, 59, -19, 9, -3 },
2020 { -4, 11, -24, 90, 70, -21, 10, -4 },
2021 { -4, 11, -23, 80, 80, -23, 11, -4 },
2022 { -4, 10, -21, 70, 90, -24, 11, -4 },
2023 { -3, 9, -19, 59, 100, -24, 10, -4 },
2024 { -3, 8, -16, 48, 108, -23, 10, -4 },
2025 { -2, 6, -13, 37, 115, -20, 9, -4 },
2026 { -2, 5, -10, 27, 121, -17, 7, -3 },
2027 { -1, 3, -6, 17, 125, -13, 5, -2 },
2028 { 0, 1, -3, 8, 127, -7, 3, -1 },
2030 { 0, 0, 0, 128, 0, 0, 0, 0 },
2031 { -3, -1, 32, 64, 38, 1, -3, 0 },
2032 { -2, -2, 29, 63, 41, 2, -3, 0 },
2033 { -2, -2, 26, 63, 43, 4, -4, 0 },
2034 { -2, -3, 24, 62, 46, 5, -4, 0 },
2035 { -2, -3, 21, 60, 49, 7, -4, 0 },
2036 { -1, -4, 18, 59, 51, 9, -4, 0 },
2037 { -1, -4, 16, 57, 53, 12, -4, -1 },
2038 { -1, -4, 14, 55, 55, 14, -4, -1 },
2039 { -1, -4, 12, 53, 57, 16, -4, -1 },
2040 { 0, -4, 9, 51, 59, 18, -4, -1 },
2041 { 0, -4, 7, 49, 60, 21, -3, -2 },
2042 { 0, -4, 5, 46, 62, 24, -3, -2 },
2043 { 0, -4, 4, 43, 63, 26, -2, -2 },
2044 { 0, -3, 2, 41, 63, 29, -2, -2 },
2045 { 0, -3, 1, 38, 64, 32, -1, -3 },
2049 #define FILTER_8TAP(src, x, F, stride) \
2050 av_clip_pixel((F[0] * src[x + -3 * stride] + \
2051 F[1] * src[x + -2 * stride] + \
2052 F[2] * src[x + -1 * stride] + \
2053 F[3] * src[x + +0 * stride] + \
2054 F[4] * src[x + +1 * stride] + \
2055 F[5] * src[x + +2 * stride] + \
2056 F[6] * src[x + +3 * stride] + \
2057 F[7] * src[x + +4 * stride] + 64) >> 7)
2060 const uint8_t *_src, ptrdiff_t src_stride,
2061 int w,
int h, ptrdiff_t ds,
2062 const int16_t *
filter,
int avg)
2067 dst_stride /=
sizeof(
pixel);
2068 src_stride /=
sizeof(
pixel);
2072 for (x = 0; x < w; x++)
2074 dst[x] = (dst[x] +
FILTER_8TAP(src, x, filter, ds) + 1) >> 1;
2084 #define filter_8tap_1d_fn(opn, opa, dir, ds) \
2085 static av_noinline void opn##_8tap_1d_##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2086 const uint8_t *src, ptrdiff_t src_stride, \
2087 int w, int h, const int16_t *filter) \
2089 do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, ds, filter, opa); \
2097 #undef filter_8tap_1d_fn
2100 const uint8_t *_src, ptrdiff_t src_stride,
2101 int w,
int h,
const int16_t *filterx,
2102 const int16_t *filtery,
int avg)
2105 pixel tmp[64 * 71], *tmp_ptr = tmp;
2109 dst_stride /=
sizeof(
pixel);
2110 src_stride /=
sizeof(
pixel);
2111 src -= src_stride * 3;
2115 for (x = 0; x < w; x++)
2122 tmp_ptr = tmp + 64 * 3;
2126 for (x = 0; x < w; x++)
2128 dst[x] = (dst[x] +
FILTER_8TAP(tmp_ptr, x, filtery, 64) + 1) >> 1;
2138 #define filter_8tap_2d_fn(opn, opa) \
2139 static av_noinline void opn##_8tap_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
2140 const uint8_t *src, ptrdiff_t src_stride, \
2141 int w, int h, const int16_t *filterx, \
2142 const int16_t *filtery) \
2144 do_8tap_2d_c(dst, dst_stride, src, src_stride, w, h, filterx, filtery, opa); \
2150 #undef filter_8tap_2d_fn
2152 #define filter_fn_1d(sz, dir, dir_m, type, type_idx, avg) \
2153 static void avg##_8tap_##type##_##sz##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2154 const uint8_t *src, ptrdiff_t src_stride, \
2155 int h, int mx, int my) \
2157 avg##_8tap_1d_##dir##_c(dst, dst_stride, src, src_stride, sz, h, \
2158 vp9_subpel_filters[type_idx][dir_m]); \
2161 #define filter_fn_2d(sz, type, type_idx, avg) \
2162 static void avg##_8tap_##type##_##sz##hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
2163 const uint8_t *src, ptrdiff_t src_stride, \
2164 int h, int mx, int my) \
2166 avg##_8tap_2d_hv_c(dst, dst_stride, src, src_stride, sz, h, \
2167 vp9_subpel_filters[type_idx][mx], \
2168 vp9_subpel_filters[type_idx][my]); \
2173 #define FILTER_BILIN(src, x, mxy, stride) \
2174 (src[x] + ((mxy * (src[x + stride] - src[x]) + 8) >> 4))
2177 const uint8_t *_src, ptrdiff_t src_stride,
2178 int w,
int h, ptrdiff_t ds,
int mxy,
int avg)
2183 dst_stride /=
sizeof(
pixel);
2184 src_stride /=
sizeof(
pixel);
2188 for (x = 0; x < w; x++)
2190 dst[x] = (dst[x] +
FILTER_BILIN(src, x, mxy, ds) + 1) >> 1;
2200 #define bilin_1d_fn(opn, opa, dir, ds) \
2201 static av_noinline void opn##_bilin_1d_##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2202 const uint8_t *src, ptrdiff_t src_stride, \
2203 int w, int h, int mxy) \
2205 do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, ds, mxy, opa); \
2216 const uint8_t *_src, ptrdiff_t src_stride,
2217 int w,
int h,
int mx,
int my,
int avg)
2219 pixel tmp[64 * 65], *tmp_ptr = tmp;
2224 dst_stride /=
sizeof(
pixel);
2225 src_stride /=
sizeof(
pixel);
2229 for (x = 0; x < w; x++)
2240 for (x = 0; x < w; x++)
2242 dst[x] = (dst[x] +
FILTER_BILIN(tmp_ptr, x, my, 64) + 1) >> 1;
2252 #define bilin_2d_fn(opn, opa) \
2253 static av_noinline void opn##_bilin_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
2254 const uint8_t *src, ptrdiff_t src_stride, \
2255 int w, int h, int mx, int my) \
2257 do_bilin_2d_c(dst, dst_stride, src, src_stride, w, h, mx, my, opa); \
2265 #define bilinf_fn_1d(sz, dir, dir_m, avg) \
2266 static void avg##_bilin_##sz##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2267 const uint8_t *src, ptrdiff_t src_stride, \
2268 int h, int mx, int my) \
2270 avg##_bilin_1d_##dir##_c(dst, dst_stride, src, src_stride, sz, h, dir_m); \
2273 #define bilinf_fn_2d(sz, avg) \
2274 static void avg##_bilin_##sz##hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
2275 const uint8_t *src, ptrdiff_t src_stride, \
2276 int h, int mx, int my) \
2278 avg##_bilin_2d_hv_c(dst, dst_stride, src, src_stride, sz, h, mx, my); \
2283 #define bilinf_fn_1d(a, b, c, d)
2284 #define bilinf_fn_2d(a, b)
2288 #define filter_fn(sz, avg) \
2289 filter_fn_1d(sz, h, mx, regular, FILTER_8TAP_REGULAR, avg) \
2290 filter_fn_1d(sz, v, my, regular, FILTER_8TAP_REGULAR, avg) \
2291 filter_fn_2d(sz, regular, FILTER_8TAP_REGULAR, avg) \
2292 filter_fn_1d(sz, h, mx, smooth, FILTER_8TAP_SMOOTH, avg) \
2293 filter_fn_1d(sz, v, my, smooth, FILTER_8TAP_SMOOTH, avg) \
2294 filter_fn_2d(sz, smooth, FILTER_8TAP_SMOOTH, avg) \
2295 filter_fn_1d(sz, h, mx, sharp, FILTER_8TAP_SHARP, avg) \
2296 filter_fn_1d(sz, v, my, sharp, FILTER_8TAP_SHARP, avg) \
2297 filter_fn_2d(sz, sharp, FILTER_8TAP_SHARP, avg) \
2298 bilinf_fn_1d(sz, h, mx, avg) \
2299 bilinf_fn_1d(sz, v, my, avg) \
2300 bilinf_fn_2d(sz, avg)
2302 #define filter_fn_set(avg) \
2303 filter_fn(64, avg) \
2304 filter_fn(32, avg) \
2305 filter_fn(16, avg) \
2313 #undef filter_fn_set
2328 vp9dsp_mc_init_10(dsp);
2331 #define init_fpel(idx1, idx2, sz, type) \
2332 dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = type##sz##_c; \
2333 dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = type##sz##_c; \
2334 dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0][0] = type##sz##_c; \
2335 dsp->mc[idx1][FILTER_BILINEAR ][idx2][0][0] = type##sz##_c
2337 #define init_copy_avg(idx, sz) \
2338 init_fpel(idx, 0, sz, copy); \
2339 init_fpel(idx, 1, sz, avg)
2347 #undef init_copy_avg
2352 #define init_subpel1_bd_aware(idx1, idx2, idxh, idxv, sz, dir, type) \
2353 dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][idxh][idxv] = type##_8tap_smooth_##sz##dir##_c; \
2354 dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][idxh][idxv] = type##_8tap_regular_##sz##dir##_c; \
2355 dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][idxh][idxv] = type##_8tap_sharp_##sz##dir##_c
2358 #define init_subpel1 init_subpel1_bd_aware
2360 #define init_subpel1(idx1, idx2, idxh, idxv, sz, dir, type) \
2361 init_subpel1_bd_aware(idx1, idx2, idxh, idxv, sz, dir, type); \
2362 dsp->mc[idx1][FILTER_BILINEAR ][idx2][idxh][idxv] = type##_bilin_##sz##dir##_c
2365 #define init_subpel2(idx, idxh, idxv, dir, type) \
2366 init_subpel1(0, idx, idxh, idxv, 64, dir, type); \
2367 init_subpel1(1, idx, idxh, idxv, 32, dir, type); \
2368 init_subpel1(2, idx, idxh, idxv, 16, dir, type); \
2369 init_subpel1(3, idx, idxh, idxv, 8, dir, type); \
2370 init_subpel1(4, idx, idxh, idxv, 4, dir, type)
2372 #define init_subpel3(idx, type) \
2373 init_subpel2(idx, 1, 1, hv, type); \
2374 init_subpel2(idx, 0, 1, v, type); \
2375 init_subpel2(idx, 1, 0, h, type)
2383 #undef init_subpel1_bd_aware
2387 const uint8_t *_src, ptrdiff_t src_stride,
2388 int w,
int h,
int mx,
int my,
2389 int dx,
int dy,
int avg,
2392 int tmp_h = (((h - 1) * dy + my) >> 4) + 8;
2393 pixel tmp[64 * 135], *tmp_ptr = tmp;
2397 dst_stride /=
sizeof(
pixel);
2398 src_stride /=
sizeof(
pixel);
2399 src -= src_stride * 3;
2402 int imx = mx, ioff = 0;
2404 for (x = 0; x < w; x++) {
2415 tmp_ptr = tmp + 64 * 3;
2420 for (x = 0; x < w; x++)
2422 dst[x] = (dst[x] +
FILTER_8TAP(tmp_ptr, x, filter, 64) + 1) >> 1;
2428 tmp_ptr += (my >> 4) * 64;
2434 #define scaled_filter_8tap_fn(opn, opa) \
2435 static av_noinline void opn##_scaled_8tap_c(uint8_t *dst, ptrdiff_t dst_stride, \
2436 const uint8_t *src, ptrdiff_t src_stride, \
2437 int w, int h, int mx, int my, int dx, int dy, \
2438 const int16_t (*filters)[8]) \
2440 do_scaled_8tap_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, \
2447 #undef scaled_filter_8tap_fn
2451 #define scaled_filter_fn(sz, type, type_idx, avg) \
2452 static void avg##_scaled_##type##_##sz##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2453 const uint8_t *src, ptrdiff_t src_stride, \
2454 int h, int mx, int my, int dx, int dy) \
2456 avg##_scaled_8tap_c(dst, dst_stride, src, src_stride, sz, h, mx, my, dx, dy, \
2457 vp9_subpel_filters[type_idx]); \
2463 const uint8_t *_src, ptrdiff_t src_stride,
2464 int w,
int h,
int mx,
int my,
2465 int dx,
int dy,
int avg)
2467 pixel tmp[64 * 129], *tmp_ptr = tmp;
2468 int tmp_h = (((h - 1) * dy + my) >> 4) + 2;
2472 dst_stride /=
sizeof(
pixel);
2473 src_stride /=
sizeof(
pixel);
2476 int imx = mx, ioff = 0;
2478 for (x = 0; x < w; x++) {
2493 for (x = 0; x < w; x++)
2495 dst[x] = (dst[x] +
FILTER_BILIN(tmp_ptr, x, my, 64) + 1) >> 1;
2501 tmp_ptr += (my >> 4) * 64;
2507 #define scaled_bilin_fn(opn, opa) \
2508 static av_noinline void opn##_scaled_bilin_c(uint8_t *dst, ptrdiff_t dst_stride, \
2509 const uint8_t *src, ptrdiff_t src_stride, \
2510 int w, int h, int mx, int my, int dx, int dy) \
2512 do_scaled_bilin_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, opa); \
2518 #undef scaled_bilin_fn
2522 #define scaled_bilinf_fn(sz, avg) \
2523 static void avg##_scaled_bilin_##sz##_c(uint8_t *dst, ptrdiff_t dst_stride, \
2524 const uint8_t *src, ptrdiff_t src_stride, \
2525 int h, int mx, int my, int dx, int dy) \
2527 avg##_scaled_bilin_c(dst, dst_stride, src, src_stride, sz, h, mx, my, dx, dy); \
2532 #define scaled_bilinf_fn(a, b)
2536 #define scaled_filter_fns(sz, avg) \
2537 scaled_filter_fn(sz, regular, FILTER_8TAP_REGULAR, avg) \
2538 scaled_filter_fn(sz, smooth, FILTER_8TAP_SMOOTH, avg) \
2539 scaled_filter_fn(sz, sharp, FILTER_8TAP_SHARP, avg) \
2540 scaled_bilinf_fn(sz, avg)
2542 #define scaled_filter_fn_set(avg) \
2543 scaled_filter_fns(64, avg) \
2544 scaled_filter_fns(32, avg) \
2545 scaled_filter_fns(16, avg) \
2546 scaled_filter_fns(8, avg) \
2547 scaled_filter_fns(4, avg)
2552 #undef scaled_filter_fns
2553 #undef scaled_filter_fn_set
2554 #undef scaled_filter_fn
2555 #undef scaled_bilinf_fn
2565 #define init_scaled_bd_aware(idx1, idx2, sz, type) \
2566 dsp->smc[idx1][FILTER_8TAP_SMOOTH ][idx2] = type##_scaled_smooth_##sz##_c; \
2567 dsp->smc[idx1][FILTER_8TAP_REGULAR][idx2] = type##_scaled_regular_##sz##_c; \
2568 dsp->smc[idx1][FILTER_8TAP_SHARP ][idx2] = type##_scaled_sharp_##sz##_c
2571 vp9dsp_scaled_mc_init_10(dsp);
2572 #define init_scaled(a,b,c,d) init_scaled_bd_aware(a,b,c,d)
2574 #define init_scaled(idx1, idx2, sz, type) \
2575 init_scaled_bd_aware(idx1, idx2, sz, type); \
2576 dsp->smc[idx1][FILTER_BILINEAR ][idx2] = type##_scaled_bilin_##sz##_c
2579 #define init_scaled_put_avg(idx, sz) \
2580 init_scaled(idx, 0, sz, put); \
2581 init_scaled(idx, 1, sz, avg)
2589 #undef init_scaled_put_avg
2591 #undef init_scaled_bd_aware
2596 FUNC(vp9dsp_intrapred_init)(dsp);
2597 vp9dsp_itxfm_init(dsp);
2598 vp9dsp_loopfilter_init(dsp);
2599 FUNC(vp9dsp_mc_init)(dsp);
2600 FUNC(vp9dsp_scaled_mc_init)(dsp);
const char const char void * val
static void dc_left_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
#define itxfm_wrapper(type_a, type_b, sz, bits, has_dconly)
static void dc_128_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
#define filter_8tap_2d_fn(opn, opa)
static void dc_top_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static void idct(int16_t block[64])
#define init_subpel3(idx, type)
static av_always_inline void idct4_1d(const dctcoef *in, ptrdiff_t stride, dctcoef *out, int pass)
static void vert_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static av_always_inline void copy_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h)
#define def_hor_down(size)
#define lf_mix_fns(wd1, wd2)
static void hor_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
static void vert_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static void hor_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
#define scaled_filter_8tap_fn(opn, opa)
#define def_vert_left(size)
static void dc_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
#define init_idct(tx, nm)
#define scaled_bilin_fn(opn, opa)
static const uint8_t q1[256]
static void diag_downleft_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
#define scaled_filter_fn_set(avg)
static void dc_129_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static av_always_inline void do_8tap_1d_c(uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int w, int h, ptrdiff_t ds, const int16_t *filter, int avg)
static void dc_127_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
#define FILTER_8TAP(src, x, F, stride)
#define init_copy_avg(idx, sz)
#define def_diag_downright(size)
static void tm_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
#define bilin_1d_fn(opn, opa, dir, ds)
static av_always_inline void iadst4_1d(const dctcoef *in, ptrdiff_t stride, dctcoef *out, int pass)
static void vert_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
#define FILTER_BILIN(src, x, mxy, stride)
static void dc_129_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static av_always_inline void do_scaled_8tap_c(uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int w, int h, int mx, int my, int dx, int dy, int avg, const int16_t(*filters)[8])
static void memset_bpc(uint16_t *dst, int val, int len)
static void dc_129_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
#define itxfm_wrap(sz, bits)
static void tm_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
static av_always_inline void iadst16_1d(const dctcoef *in, ptrdiff_t stride, dctcoef *out, int pass)
#define init_scaled_put_avg(idx, sz)
static void dc_127_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static void dc_128_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static void dc_128_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static const uint8_t q0[256]
static av_always_inline void do_bilin_2d_c(uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int w, int h, int mx, int my, int avg)
av_cold void FUNC() ff_vp9dsp_init(VP9DSPContext *dsp)
static void dc_left_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
static av_always_inline void iadst8_1d(const dctcoef *in, ptrdiff_t stride, dctcoef *out, int pass)
void(* loop_filter_16[2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
static void dc_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
#define init_intra_pred(tx, sz)
#define def_diag_downleft(size)
static void dc_127_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static void dc_129_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
void(* loop_filter_mix2[2][2][2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
void(* loop_filter_8[3][2])(uint8_t *dst, ptrdiff_t stride, int mb_lim, int lim, int hev_thr)
#define filter_8tap_1d_fn(opn, opa, dir, ds)
static void dc_left_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;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);returnNULL;}returnac;}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;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->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);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
static void tm_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
static void av_always_inline idct16_1d(float *dst, const float *src, int dst_stridea, int dst_strideb, int src_stridea, int src_strideb, int add)
static av_always_inline void do_8tap_2d_c(uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int w, int h, const int16_t *filterx, const int16_t *filtery, int avg)
static void dc_128_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static void hor_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
#define filter_fn_set(avg)
#define bilin_2d_fn(opn, opa)
static void dc_top_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static void vert_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static void dc_top_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static av_always_inline void avg_c(uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, int w, int h)
static void dc_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
GLint GLenum GLboolean GLsizei stride
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
common internal and external API header
#define init_itxfm(tx, sz)
static void dc_top_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top)
static void dc_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
static const struct PPFilter filters[]
static av_always_inline void loop_filter(pixel *dst, int E, int I, int H, ptrdiff_t stridea, ptrdiff_t strideb, int wd)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;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);returnNULL;}returnac;}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;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->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);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;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);returnNULL;}returnac;}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;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->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);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> dc
static void dc_left_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
static void dc_127_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
static void hor_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top)
static void av_always_inline idct8_1d(float *dst, const float *src, int dst_stridea, int dst_strideb, int src_stridea, int src_strideb, int add)
static av_always_inline int hev(uint8_t *p, ptrdiff_t stride, int thresh)
#define def_vert_right(size)
#define PIXEL_SPLAT_X4(x)
static void tm_4x4_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top)
#define lf_16_fn(dir, stridea)