40 for (i = 0; i <
h; i++) {
41 s += sq[pix1[0] - pix2[0]];
42 s += sq[pix1[1] - pix2[1]];
43 s += sq[pix1[2] - pix2[2]];
44 s += sq[pix1[3] - pix2[3]];
57 for (i = 0; i <
h; i++) {
58 s += sq[pix1[0] - pix2[0]];
59 s += sq[pix1[1] - pix2[1]];
60 s += sq[pix1[2] - pix2[2]];
61 s += sq[pix1[3] - pix2[3]];
62 s += sq[pix1[4] - pix2[4]];
63 s += sq[pix1[5] - pix2[5]];
64 s += sq[pix1[6] - pix2[6]];
65 s += sq[pix1[7] - pix2[7]];
78 for (i = 0; i <
h; i++) {
79 s += sq[pix1[0] - pix2[0]];
80 s += sq[pix1[1] - pix2[1]];
81 s += sq[pix1[2] - pix2[2]];
82 s += sq[pix1[3] - pix2[3]];
83 s += sq[pix1[4] - pix2[4]];
84 s += sq[pix1[5] - pix2[5]];
85 s += sq[pix1[6] - pix2[6]];
86 s += sq[pix1[7] - pix2[7]];
87 s += sq[pix1[8] - pix2[8]];
88 s += sq[pix1[9] - pix2[9]];
89 s += sq[pix1[10] - pix2[10]];
90 s += sq[pix1[11] - pix2[11]];
91 s += sq[pix1[12] - pix2[12]];
92 s += sq[pix1[13] - pix2[13]];
93 s += sq[pix1[14] - pix2[14]];
94 s += sq[pix1[15] - pix2[15]];
106 for (i = 0; i < 64; i++)
107 sum +=
FFABS(block[i]);
111 #define avg2(a, b) (((a) + (b) + 1) >> 1)
112 #define avg4(a, b, c, d) (((a) + (b) + (c) + (d) + 2) >> 2)
119 for (i = 0; i <
h; i++) {
120 s += abs(pix1[0] - pix2[0]);
121 s += abs(pix1[1] - pix2[1]);
122 s += abs(pix1[2] - pix2[2]);
123 s += abs(pix1[3] - pix2[3]);
124 s += abs(pix1[4] - pix2[4]);
125 s += abs(pix1[5] - pix2[5]);
126 s += abs(pix1[6] - pix2[6]);
127 s += abs(pix1[7] - pix2[7]);
128 s += abs(pix1[8] - pix2[8]);
129 s += abs(pix1[9] - pix2[9]);
130 s += abs(pix1[10] - pix2[10]);
131 s += abs(pix1[11] - pix2[11]);
132 s += abs(pix1[12] - pix2[12]);
133 s += abs(pix1[13] - pix2[13]);
134 s += abs(pix1[14] - pix2[14]);
135 s += abs(pix1[15] - pix2[15]);
147 #define V(x) (pix1[x] - pix2[x])
150 s += abs(
V(1) -
V(0));
151 s += abs(
V(2) -
V(1));
152 s += abs(
V(3) -
V(2));
153 s += abs(
V(4) -
V(3));
154 s += abs(
V(5) -
V(4));
155 s += abs(
V(6) -
V(5));
156 s += abs(
V(7) -
V(6));
157 s += abs(
V(8) -
V(7));
158 s += abs(
V(9) -
V(8));
159 s += abs(
V(10) -
V(9));
160 s += abs(
V(11) -
V(10));
161 s += abs(
V(12) -
V(11));
162 s += abs(
V(13) -
V(12));
163 s += abs(
V(14) -
V(13));
164 s += abs(
V(15) -
V(14));
169 for (i = 1; i <
h; i++) {
170 s += abs(
V(0) -
V(-stride));
171 for (j = 1; j < 16; j++)
172 s += abs(
V(j) -
mid_pred(
V(j-stride),
V(j-1),
V(j-stride) +
V(j-1) -
V(j-stride-1)));
186 for (i = 0; i <
h; i++) {
187 s += abs(pix1[0] -
avg2(pix2[0], pix2[1]));
188 s += abs(pix1[1] -
avg2(pix2[1], pix2[2]));
189 s += abs(pix1[2] -
avg2(pix2[2], pix2[3]));
190 s += abs(pix1[3] -
avg2(pix2[3], pix2[4]));
191 s += abs(pix1[4] -
avg2(pix2[4], pix2[5]));
192 s += abs(pix1[5] -
avg2(pix2[5], pix2[6]));
193 s += abs(pix1[6] -
avg2(pix2[6], pix2[7]));
194 s += abs(pix1[7] -
avg2(pix2[7], pix2[8]));
195 s += abs(pix1[8] -
avg2(pix2[8], pix2[9]));
196 s += abs(pix1[9] -
avg2(pix2[9], pix2[10]));
197 s += abs(pix1[10] -
avg2(pix2[10], pix2[11]));
198 s += abs(pix1[11] -
avg2(pix2[11], pix2[12]));
199 s += abs(pix1[12] -
avg2(pix2[12], pix2[13]));
200 s += abs(pix1[13] -
avg2(pix2[13], pix2[14]));
201 s += abs(pix1[14] -
avg2(pix2[14], pix2[15]));
202 s += abs(pix1[15] -
avg2(pix2[15], pix2[16]));
215 for (i = 0; i <
h; i++) {
216 s += abs(pix1[0] -
avg2(pix2[0], pix3[0]));
217 s += abs(pix1[1] -
avg2(pix2[1], pix3[1]));
218 s += abs(pix1[2] -
avg2(pix2[2], pix3[2]));
219 s += abs(pix1[3] -
avg2(pix2[3], pix3[3]));
220 s += abs(pix1[4] -
avg2(pix2[4], pix3[4]));
221 s += abs(pix1[5] -
avg2(pix2[5], pix3[5]));
222 s += abs(pix1[6] -
avg2(pix2[6], pix3[6]));
223 s += abs(pix1[7] -
avg2(pix2[7], pix3[7]));
224 s += abs(pix1[8] -
avg2(pix2[8], pix3[8]));
225 s += abs(pix1[9] -
avg2(pix2[9], pix3[9]));
226 s += abs(pix1[10] -
avg2(pix2[10], pix3[10]));
227 s += abs(pix1[11] -
avg2(pix2[11], pix3[11]));
228 s += abs(pix1[12] -
avg2(pix2[12], pix3[12]));
229 s += abs(pix1[13] -
avg2(pix2[13], pix3[13]));
230 s += abs(pix1[14] -
avg2(pix2[14], pix3[14]));
231 s += abs(pix1[15] -
avg2(pix2[15], pix3[15]));
245 for (i = 0; i <
h; i++) {
246 s += abs(pix1[0] -
avg4(pix2[0], pix2[1], pix3[0], pix3[1]));
247 s += abs(pix1[1] -
avg4(pix2[1], pix2[2], pix3[1], pix3[2]));
248 s += abs(pix1[2] -
avg4(pix2[2], pix2[3], pix3[2], pix3[3]));
249 s += abs(pix1[3] -
avg4(pix2[3], pix2[4], pix3[3], pix3[4]));
250 s += abs(pix1[4] -
avg4(pix2[4], pix2[5], pix3[4], pix3[5]));
251 s += abs(pix1[5] -
avg4(pix2[5], pix2[6], pix3[5], pix3[6]));
252 s += abs(pix1[6] -
avg4(pix2[6], pix2[7], pix3[6], pix3[7]));
253 s += abs(pix1[7] -
avg4(pix2[7], pix2[8], pix3[7], pix3[8]));
254 s += abs(pix1[8] -
avg4(pix2[8], pix2[9], pix3[8], pix3[9]));
255 s += abs(pix1[9] -
avg4(pix2[9], pix2[10], pix3[9], pix3[10]));
256 s += abs(pix1[10] -
avg4(pix2[10], pix2[11], pix3[10], pix3[11]));
257 s += abs(pix1[11] -
avg4(pix2[11], pix2[12], pix3[11], pix3[12]));
258 s += abs(pix1[12] -
avg4(pix2[12], pix2[13], pix3[12], pix3[13]));
259 s += abs(pix1[13] -
avg4(pix2[13], pix2[14], pix3[13], pix3[14]));
260 s += abs(pix1[14] -
avg4(pix2[14], pix2[15], pix3[14], pix3[15]));
261 s += abs(pix1[15] -
avg4(pix2[15], pix2[16], pix3[15], pix3[16]));
274 for (i = 0; i <
h; i++) {
275 s += abs(pix1[0] - pix2[0]);
276 s += abs(pix1[1] - pix2[1]);
277 s += abs(pix1[2] - pix2[2]);
278 s += abs(pix1[3] - pix2[3]);
279 s += abs(pix1[4] - pix2[4]);
280 s += abs(pix1[5] - pix2[5]);
281 s += abs(pix1[6] - pix2[6]);
282 s += abs(pix1[7] - pix2[7]);
294 #define V(x) (pix1[x] - pix2[x])
297 s += abs(
V(1) -
V(0));
298 s += abs(
V(2) -
V(1));
299 s += abs(
V(3) -
V(2));
300 s += abs(
V(4) -
V(3));
301 s += abs(
V(5) -
V(4));
302 s += abs(
V(6) -
V(5));
303 s += abs(
V(7) -
V(6));
308 for (i = 1; i <
h; i++) {
309 s += abs(
V(0) -
V(-stride));
310 for (j = 1; j < 8; j++)
311 s += abs(
V(j) -
mid_pred(
V(j-stride),
V(j-1),
V(j-stride) +
V(j-1) -
V(j-stride-1)));
325 for (i = 0; i <
h; i++) {
326 s += abs(pix1[0] -
avg2(pix2[0], pix2[1]));
327 s += abs(pix1[1] -
avg2(pix2[1], pix2[2]));
328 s += abs(pix1[2] -
avg2(pix2[2], pix2[3]));
329 s += abs(pix1[3] -
avg2(pix2[3], pix2[4]));
330 s += abs(pix1[4] -
avg2(pix2[4], pix2[5]));
331 s += abs(pix1[5] -
avg2(pix2[5], pix2[6]));
332 s += abs(pix1[6] -
avg2(pix2[6], pix2[7]));
333 s += abs(pix1[7] -
avg2(pix2[7], pix2[8]));
346 for (i = 0; i <
h; i++) {
347 s += abs(pix1[0] -
avg2(pix2[0], pix3[0]));
348 s += abs(pix1[1] -
avg2(pix2[1], pix3[1]));
349 s += abs(pix1[2] -
avg2(pix2[2], pix3[2]));
350 s += abs(pix1[3] -
avg2(pix2[3], pix3[3]));
351 s += abs(pix1[4] -
avg2(pix2[4], pix3[4]));
352 s += abs(pix1[5] -
avg2(pix2[5], pix3[5]));
353 s += abs(pix1[6] -
avg2(pix2[6], pix3[6]));
354 s += abs(pix1[7] -
avg2(pix2[7], pix3[7]));
368 for (i = 0; i <
h; i++) {
369 s += abs(pix1[0] -
avg4(pix2[0], pix2[1], pix3[0], pix3[1]));
370 s += abs(pix1[1] -
avg4(pix2[1], pix2[2], pix3[1], pix3[2]));
371 s += abs(pix1[2] -
avg4(pix2[2], pix2[3], pix3[2], pix3[3]));
372 s += abs(pix1[3] -
avg4(pix2[3], pix2[4], pix3[3], pix3[4]));
373 s += abs(pix1[4] -
avg4(pix2[4], pix2[5], pix3[4], pix3[5]));
374 s += abs(pix1[5] -
avg4(pix2[5], pix2[6], pix3[5], pix3[6]));
375 s += abs(pix1[6] -
avg4(pix2[6], pix2[7], pix3[6], pix3[7]));
376 s += abs(pix1[7] -
avg4(pix2[7], pix2[8], pix3[7], pix3[8]));
387 int score1 = 0, score2 = 0, x, y;
389 for (y = 0; y <
h; y++) {
390 for (x = 0; x < 16; x++)
391 score1 += (s1[x] - s2[x]) * (s1[x] - s2[x]);
393 for (x = 0; x < 15; x++)
394 score2 +=
FFABS(s1[x] - s1[x + stride] -
395 s1[x + 1] + s1[x + stride + 1]) -
396 FFABS(s2[x] - s2[x + stride] -
397 s2[x + 1] + s2[x + stride + 1]);
406 return score1 +
FFABS(score2) * 8;
412 int score1 = 0, score2 = 0, x, y;
414 for (y = 0; y <
h; y++) {
415 for (x = 0; x < 8; x++)
416 score1 += (s1[x] - s2[x]) * (s1[x] - s2[x]);
418 for (x = 0; x < 7; x++)
419 score2 +=
FFABS(s1[x] - s1[x + stride] -
420 s1[x + 1] + s1[x + stride + 1]) -
421 FFABS(s2[x] - s2[x + stride] -
422 s2[x + 1] + s2[x + stride + 1]);
431 return score1 +
FFABS(score2) * 8;
444 memset(cmp, 0,
sizeof(
void *) * 6);
446 for (i = 0; i < 6; i++) {
447 switch (type & 0xFF) {
500 "internal error in cmp function selection\n");
505 #define BUTTERFLY2(o1, o2, i1, i2) \
509 #define BUTTERFLY1(x, y) \
518 #define BUTTERFLYA(x, y) (FFABS((x) + (y)) + FFABS((x) - (y)))
523 int i,
temp[64], sum = 0;
527 for (i = 0; i < 8; i++) {
530 src[stride * i + 0] - dst[stride * i + 0],
531 src[stride * i + 1] - dst[stride * i + 1]);
533 src[stride * i + 2] - dst[stride * i + 2],
534 src[stride * i + 3] - dst[stride * i + 3]);
536 src[stride * i + 4] - dst[stride * i + 4],
537 src[stride * i + 5] - dst[stride * i + 5]);
539 src[stride * i + 6] - dst[stride * i + 6],
540 src[stride * i + 7] - dst[stride * i + 7]);
553 for (i = 0; i < 8; i++) {
564 sum +=
BUTTERFLYA(temp[8 * 0 + i], temp[8 * 4 + i]) +
565 BUTTERFLYA(temp[8 * 1 + i], temp[8 * 5 + i]) +
566 BUTTERFLYA(temp[8 * 2 + i], temp[8 * 6 + i]) +
575 int i,
temp[64], sum = 0;
579 for (i = 0; i < 8; i++) {
582 src[stride * i + 0], src[stride * i + 1]);
584 src[stride * i + 2], src[stride * i + 3]);
586 src[stride * i + 4], src[stride * i + 5]);
588 src[stride * i + 6], src[stride * i + 7]);
601 for (i = 0; i < 8; i++) {
614 +
BUTTERFLYA(temp[8 * 1 + i], temp[8 * 5 + i])
615 +
BUTTERFLYA(temp[8 * 2 + i], temp[8 * 6 + i])
616 +
BUTTERFLYA(temp[8 * 3 + i], temp[8 * 7 + i]);
619 sum -=
FFABS(temp[8 * 0] + temp[8 * 4]);
639 const int s07 = SRC(0) + SRC(7); \
640 const int s16 = SRC(1) + SRC(6); \
641 const int s25 = SRC(2) + SRC(5); \
642 const int s34 = SRC(3) + SRC(4); \
643 const int a0 = s07 + s34; \
644 const int a1 = s16 + s25; \
645 const int a2 = s07 - s34; \
646 const int a3 = s16 - s25; \
647 const int d07 = SRC(0) - SRC(7); \
648 const int d16 = SRC(1) - SRC(6); \
649 const int d25 = SRC(2) - SRC(5); \
650 const int d34 = SRC(3) - SRC(4); \
651 const int a4 = d16 + d25 + (d07 + (d07 >> 1)); \
652 const int a5 = d07 - d34 - (d25 + (d25 >> 1)); \
653 const int a6 = d07 + d34 - (d16 + (d16 >> 1)); \
654 const int a7 = d16 - d25 + (d34 + (d34 >> 1)); \
656 DST(1, a4 + (a7 >> 2)); \
657 DST(2, a2 + (a3 >> 1)); \
658 DST(3, a5 + (a6 >> 2)); \
660 DST(5, a6 - (a5 >> 2)); \
661 DST(6, (a2 >> 1) - a3); \
662 DST(7, (a4 >> 2) - a7); \
673 #define SRC(x) dct[i][x]
674 #define DST(x, v) dct[i][x] = v
675 for (i = 0; i < 8; i++)
680 #define
SRC(x) dct[x][i]
681 #define DST(x, v) sum += FFABS(v)
682 for (i = 0; i < 8; i++)
691 uint8_t *src2, ptrdiff_t stride,
int h)
701 for (i = 0; i < 64; i++)
708 uint8_t *src2, ptrdiff_t stride,
int h)
711 int16_t *
const bak =
temp + 64;
719 memcpy(bak,
temp, 64 *
sizeof(int16_t));
726 for (i = 0; i < 64; i++)
727 sum += (
temp[i] - bak[i]) * (
temp[i] - bak[i]);
733 ptrdiff_t stride,
int h)
767 if (last >= start_i) {
769 for (i = start_i; i < last; i++) {
770 int j = scantable[i];
775 if ((level & (~127)) == 0)
785 level =
temp[i] + 64;
789 if ((level & (~127)) == 0) {
804 distortion = s->
mecc.
sse[1](
NULL, lsrc2, lsrc1, 8, 8);
806 return distortion + ((bits * s->
qscale * s->
qscale * 109 + 64) >> 7);
810 ptrdiff_t stride,
int h)
839 if (last >= start_i) {
841 for (i = start_i; i < last; i++) {
842 int j = scantable[i];
847 if ((level & (~127)) == 0)
857 level =
temp[i] + 64;
861 if ((level & (~127)) == 0)
870 #define VSAD_INTRA(size) \
871 static int vsad_intra ## size ## _c(MpegEncContext *c, \
872 uint8_t *s, uint8_t *dummy, \
873 ptrdiff_t stride, int h) \
875 int score = 0, x, y; \
877 for (y = 1; y < h; y++) { \
878 for (x = 0; x < size; x += 4) { \
879 score += FFABS(s[x] - s[x + stride]) + \
880 FFABS(s[x + 1] - s[x + stride + 1]) + \
881 FFABS(s[x + 2] - s[x + 2 + stride]) + \
882 FFABS(s[x + 3] - s[x + 3 + stride]); \
893 static int vsad ## size ## _c(MpegEncContext *c, \
894 uint8_t *s1, uint8_t *s2, \
895 ptrdiff_t stride, int h) \
897 int score = 0, x, y; \
899 for (y = 1; y < h; y++) { \
900 for (x = 0; x < size; x++) \
901 score += FFABS(s1[x] - s2[x] - s1[x + stride] + s2[x + stride]); \
911 #define SQ(a) ((a) * (a))
912 #define VSSE_INTRA(size) \
913 static int vsse_intra ## size ## _c(MpegEncContext *c, \
914 uint8_t *s, uint8_t *dummy, \
915 ptrdiff_t stride, int h) \
917 int score = 0, x, y; \
919 for (y = 1; y < h; y++) { \
920 for (x = 0; x < size; x += 4) { \
921 score += SQ(s[x] - s[x + stride]) + \
922 SQ(s[x + 1] - s[x + stride + 1]) + \
923 SQ(s[x + 2] - s[x + stride + 2]) + \
924 SQ(s[x + 3] - s[x + stride + 3]); \
935 static int vsse ## size ## _c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, \
936 ptrdiff_t stride, int h) \
938 int score = 0, x, y; \
940 for (y = 1; y < h; y++) { \
941 for (x = 0; x < size; x++) \
942 score += SQ(s1[x] - s2[x] - s1[x + stride] + s2[x + stride]); \
952 #define WRAPPER8_16_SQ(name8, name16) \
953 static int name16(MpegEncContext *s, uint8_t *dst, uint8_t *src, \
954 ptrdiff_t stride, int h) \
958 score += name8(s, dst, src, stride, 8); \
959 score += name8(s, dst + 8, src + 8, stride, 8); \
963 score += name8(s, dst, src, stride, 8); \
964 score += name8(s, dst + 8, src + 8, stride, 8); \
984 for (i = 0; i < 512; i++)
990 static int did_fail = 0;
993 if ((intptr_t)aligned & 15) {
995 #if HAVE_MMX || HAVE_ALTIVEC
997 "Compiler did not align stack variables. Libavcodec has been miscompiled\n"
998 "and may be very slow or crash. This is not a bug in libavcodec,\n"
999 "but in the compiler. You may try recompiling using gcc >= 4.2.\n"
1000 "Do not report crashes to FFmpeg developers.\n");
1025 #define SET_CMP_FUNC(name) \
1026 c->name[0] = name ## 16_c; \
1027 c->name[1] = name ## 8x8_c;
1045 c->
vsad[0] = vsad16_c;
1046 c->
vsad[1] = vsad8_c;
1047 c->
vsad[4] = vsad_intra16_c;
1048 c->
vsad[5] = vsad_intra8_c;
1049 c->
vsse[0] = vsse16_c;
1050 c->
vsse[1] = vsse8_c;
1051 c->
vsse[4] = vsse_intra16_c;
1052 c->
vsse[5] = vsse_intra8_c;
1055 #if CONFIG_SNOW_DECODER || CONFIG_SNOW_ENCODER
av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx)
av_cold void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx)
static int dct_max8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h)
void(* dct_unquantize_inter)(struct MpegEncContext *s, int16_t *block, int n, int qscale)
static int hadamard8_intra8x8_c(MpegEncContext *s, uint8_t *src, uint8_t *dummy, ptrdiff_t stride, int h)
static int zero_cmp(MpegEncContext *s, uint8_t *a, uint8_t *b, ptrdiff_t stride, int h)
static int pix_median_abs16_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int nsse8_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, ptrdiff_t stride, int h)
uint8_t * intra_ac_vlc_length
#define UNI_AC_ENC_INDEX(run, level)
static void copy_block8(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h)
void(* dct_unquantize_intra)(struct MpegEncContext *s, int16_t *block, int n, int qscale)
uint32_t ff_square_tab[512]
Macro definitions for various function/variable attributes.
me_cmp_func hadamard8_diff[6]
static int dct_sad8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h)
static int pix_abs16_xy2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define SET_CMP_FUNC(name)
static int rd8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h)
me_cmp_func dct264_sad[6]
void(* diff_pixels)(int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride)
#define BUTTERFLY2(o1, o2, i1, i2)
static int pix_abs16_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx)
#define FF_CMP_MEDIAN_SAD
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t * inter_ac_vlc_last_length
static int sse4_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
me_cmp_func pix_abs[2][4]
av_cold void ff_me_cmp_init_static(void)
common internal API header
uint8_t * intra_ac_vlc_last_length
av_cold void ff_me_cmp_init_alpha(MECmpContext *c, AVCodecContext *avctx)
static int pix_abs8_xy2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
#define WRAPPER8_16_SQ(name8, name16)
static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags)
compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensa...
int block_last_index[12]
last non zero coefficient in block
int(* me_cmp_func)(struct MpegEncContext *c, uint8_t *blk1, uint8_t *blk2, ptrdiff_t stride, int h)
static int sse16_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int pix_abs8_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
int ac_esc_length
num of bits needed to encode the longest esc
static int sse8_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
uint8_t * luma_dc_vlc_length
Libavcodec external API header.
void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
void(* fdct)(int16_t *block)
main external API structure.
ScanTable intra_scantable
uint8_t * inter_ac_vlc_length
void(* idct_add)(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, ptrdiff_t stride, int h)
av_cold void ff_me_cmp_init_arm(MECmpContext *c, AVCodecContext *avctx)
#define DCT8_1D(src, srcstride, dst, dststride)
me_cmp_func median_sad[6]
static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h)
struct AVCodecContext * avctx
GLint GLenum GLboolean GLsizei stride
static int pix_abs8_y2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int pix_abs16_x2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int pix_abs8_x2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int pix_abs16_y2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
static int sum_abs_dctelem_c(int16_t *block)
int(* sum_abs_dctelem)(int16_t *block)
me_cmp_func quant_psnr[6]
void(* diff_pixels_unaligned)(int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride)
int(* fast_dct_quantize)(struct MpegEncContext *s, int16_t *block, int n, int qscale, int *overflow)
#define LOCAL_ALIGNED_16(t, v,...)
void ff_dsputil_init_dwt(MECmpContext *c)
static int bit8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, ptrdiff_t stride, int h)
static int hadamard8_diff8x8_c(MpegEncContext *s, uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h)
void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
int ff_check_alignment(void)
static int pix_median_abs8_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t stride, int h)
void ff_simple_idct_8(int16_t *block)