29 static const uint32_t
pixel_mask[] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff };
30 static const uint32_t
pixel_mask16[] = { 0x00ff00ff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff };
31 static const int sizes[] = { -1, 4, 6, 8, 12, 16, 24, 32, 48, 64 };
32 static const int weights[] = { 0, 128, 255, -1 };
33 static const int denoms[] = {0, 7, 12, -1 };
34 static const int offsets[] = {0, 255, -1 };
36 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
37 #define BUF_SIZE (2 * MAX_PB_SIZE * (2 * 4 + MAX_PB_SIZE))
39 #define randomize_buffers() \
41 uint32_t mask = pixel_mask[bit_depth - 8]; \
43 for (k = 0; k < BUF_SIZE + SRC_EXTRA; k += 4) { \
44 uint32_t r = rnd() & mask; \
45 AV_WN32A(buf0 + k, r); \
46 AV_WN32A(buf1 + k, r); \
50 AV_WN32A(dst0 + k, r); \
51 AV_WN32A(dst1 + k, r); \
55 #define randomize_buffers_ref() \
56 randomize_buffers(); \
58 uint32_t mask = pixel_mask16[bit_depth - 8]; \
60 for (k = 0; k < BUF_SIZE; k += 2) { \
61 uint32_t r = rnd() & mask; \
62 AV_WN32A(ref0 + k, r); \
63 AV_WN32A(ref1 + k, r); \
67 #define src0 (buf0 + 2 * 4 * MAX_PB_SIZE)
68 #define src1 (buf1 + 2 * 4 * MAX_PB_SIZE)
88 for (
i = 0;
i < 2;
i++) {
89 for (j = 0; j < 2; j++) {
92 switch ((j << 1) |
i) {
93 case 0:
type =
"pel_pixels";
break;
94 case 1:
type =
"qpel_h";
break;
95 case 2:
type =
"qpel_v";
break;
96 case 3:
type =
"qpel_hv";
break;
101 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;
132 for (
i = 0;
i < 2;
i++) {
133 for (j = 0; j < 2; j++) {
136 switch ((j << 1) |
i) {
137 case 0:
type =
"pel_uni_pixels";
break;
138 case 1:
type =
"qpel_uni_h";
break;
139 case 2:
type =
"qpel_uni_v";
break;
140 case 3:
type =
"qpel_uni_hv";
break;
175 const int *denom, *wx, *ox;
177 int height,
int denom,
int wx,
int ox, intptr_t
mx, intptr_t
my,
int width);
182 for (
i = 0;
i < 2;
i++) {
183 for (j = 0; j < 2; j++) {
186 switch ((j << 1) |
i) {
187 case 0:
type =
"pel_uni_w_pixels";
break;
188 case 1:
type =
"qpel_uni_w_h";
break;
189 case 2:
type =
"qpel_uni_w_v";
break;
190 case 3:
type =
"qpel_uni_w_hv";
break;
195 for (denom =
denoms; *denom >= 0; denom++) {
196 for (wx =
weights; *wx >= 0; wx++) {
197 for (ox =
offsets; *ox >= 0; ox++) {
240 for (
i = 0;
i < 2;
i++) {
241 for (j = 0; j < 2; j++) {
244 switch ((j << 1) |
i) {
245 case 0:
type =
"pel_bi_pixels";
break;
246 case 1:
type =
"qpel_bi_h";
break;
247 case 2:
type =
"qpel_bi_v";
break;
248 case 3:
type =
"qpel_bi_hv";
break;
285 const int *denom, *wx, *ox;
288 int height,
int denom,
int wx0,
int wx1,
289 int ox0,
int ox1, intptr_t
mx, intptr_t
my,
int width);
294 for (
i = 0;
i < 2;
i++) {
295 for (j = 0; j < 2; j++) {
298 switch ((j << 1) |
i) {
299 case 0:
type =
"pel_bi_w_pixels";
break;
300 case 1:
type =
"qpel_bi_w_h";
break;
301 case 2:
type =
"qpel_bi_w_v";
break;
302 case 3:
type =
"qpel_bi_w_hv";
break;
307 for (denom =
denoms; *denom >= 0; denom++) {
308 for (wx =
weights; *wx >= 0; wx++) {
309 for (ox =
offsets; *ox >= 0; ox++) {
352 for (
i = 0;
i < 2;
i++) {
353 for (j = 0; j < 2; j++) {
356 switch ((j << 1) |
i) {
357 case 0:
type =
"pel_pixels";
break;
358 case 1:
type =
"epel_h";
break;
359 case 2:
type =
"epel_v";
break;
360 case 3:
type =
"epel_hv";
break;
365 int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1;
396 for (
i = 0;
i < 2;
i++) {
397 for (j = 0; j < 2; j++) {
400 switch ((j << 1) |
i) {
401 case 0:
type =
"pel_uni_pixels";
break;
402 case 1:
type =
"epel_uni_h";
break;
403 case 2:
type =
"epel_uni_v";
break;
404 case 3:
type =
"epel_uni_hv";
break;
439 const int *denom, *wx, *ox;
441 int height,
int denom,
int wx,
int ox, intptr_t
mx, intptr_t
my,
int width);
446 for (
i = 0;
i < 2;
i++) {
447 for (j = 0; j < 2; j++) {
450 switch ((j << 1) |
i) {
451 case 0:
type =
"pel_uni_w_pixels";
break;
452 case 1:
type =
"epel_uni_w_h";
break;
453 case 2:
type =
"epel_uni_w_v";
break;
454 case 3:
type =
"epel_uni_w_hv";
break;
459 for (denom =
denoms; *denom >= 0; denom++) {
460 for (wx =
weights; *wx >= 0; wx++) {
461 for (ox =
offsets; *ox >= 0; ox++) {
504 for (
i = 0;
i < 2;
i++) {
505 for (j = 0; j < 2; j++) {
508 switch ((j << 1) |
i) {
509 case 0:
type =
"pel_bi_pixels";
break;
510 case 1:
type =
"epel_bi_h";
break;
511 case 2:
type =
"epel_bi_v";
break;
512 case 3:
type =
"epel_bi_hv";
break;
549 const int *denom, *wx, *ox;
552 int height,
int denom,
int wx0,
int wx1,
553 int ox0,
int ox1, intptr_t
mx, intptr_t
my,
int width);
558 for (
i = 0;
i < 2;
i++) {
559 for (j = 0; j < 2; j++) {
562 switch ((j << 1) |
i) {
563 case 0:
type =
"pel_bi_w_pixels";
break;
564 case 1:
type =
"epel_bi_w_h";
break;
565 case 2:
type =
"epel_bi_w_v";
break;
566 case 3:
type =
"epel_bi_w_hv";
break;
571 for (denom =
denoms; *denom >= 0; denom++) {
572 for (wx =
weights; *wx >= 0; wx++) {
573 for (ox =
offsets; *ox >= 0; ox++) {