33 #define randomize_buffers(buf, size) \
36 for (j = 0; j < size; j+=4) \
37 AV_WN32(buf + j, rnd()); \
40 static const uint8_t
width[] = {12, 16, 20, 32, 36, 128};
42 {12,16,12}, {16,16,16}, {20,23,25}, {32,18,48}, {8,128,16}, {128,128,128}
45 #define MAX_STRIDE 128
46 #define MAX_HEIGHT 128
64 for (
i = 0;
i < 6;
i ++) {
87 declare_func(
void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
89 int lumStride,
int chromStride,
int srcStride);
95 for (
i = 0;
i < 6;
i ++) {
118 #define MAX_LINE_SIZE 1920
119 #define BUFSIZE (NUM_LINES * MAX_LINE_SIZE)
123 for (
size_t i = 0;
i < n;
i++) {
143 uint8_t *vdst,
int width,
int height,
int lumStride,
150 int negstride = input_size < 0;
151 const char *negstride_str = negstride ?
"_negstride" :
"";
153 int linesize =
width + 32;
158 uint8_t *dst_y_0 = buf_y_0;
159 uint8_t *dst_y_1 = buf_y_1;
160 uint8_t *dst_u_0 = buf_u_0;
161 uint8_t *dst_u_1 = buf_u_1;
162 uint8_t *dst_v_0 = buf_v_0;
163 uint8_t *dst_v_1 = buf_v_1;
168 dst_y_0 += (
height - 1) * linesize;
169 dst_y_1 += (
height - 1) * linesize;
170 dst_u_0 += ((
height / 2) - 1) * (linesize / 2);
171 dst_u_1 += ((
height / 2) - 1) * (linesize / 2);
172 dst_v_0 += ((
height / 2) - 1) * (linesize / 2);
173 dst_v_1 += ((
height / 2) - 1) * (linesize / 2);
178 memset(buf_y_0, 0xFF,
BUFSIZE);
179 memset(buf_y_1, 0xFF,
BUFSIZE);
180 memset(buf_u_0, 0xFF,
BUFSIZE / 4);
181 memset(buf_u_1, 0xFF,
BUFSIZE / 4);
182 memset(buf_v_0, 0xFF,
BUFSIZE / 4);
183 memset(buf_v_1, 0xFF,
BUFSIZE / 4);
186 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
188 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
194 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
211 uint8_t *
src0 = src0_buf + 1;
212 uint8_t *
src1 = src1_buf + 1;
213 uint8_t *dst0 = dst0_buf + 2;
214 uint8_t *dst1 = dst1_buf + 2;
217 uint8_t *,
int,
int,
int,
int,
int);
223 for (
int i = 0;
i <= 16;
i++) {
229 int src0_offset = 0, src0_stride =
MAX_STRIDE;
230 int src1_offset = 0, src1_stride =
MAX_STRIDE;
231 int dst_offset = 0, dst_stride = 2 *
MAX_STRIDE;
238 src0_offset = (
h-1)*src0_stride;
239 src0_stride = -src0_stride;
242 src1_offset = (
h-1)*src1_stride;
243 src1_stride = -src1_stride;
246 dst_offset = (
h-1)*dst_stride;
247 dst_stride = -dst_stride;
251 w,
h, src0_stride, src1_stride, dst_stride);
253 w,
h, src0_stride, src1_stride, dst_stride);
257 2 *
w + 2,
h + 1,
"dst");
280 uint8_t *
src = src_buf + 2;
281 uint8_t *dst0_u = dst0_u_buf + 1;
282 uint8_t *dst0_v = dst0_v_buf + 1;
283 uint8_t *dst1_u = dst1_u_buf + 1;
284 uint8_t *dst1_v = dst1_v_buf + 1;
288 int dst1Stride,
int dst2Stride);
293 for (
int i = 0;
i <= 16;
i++) {
299 int src_offset = 0, src_stride = 2 *
MAX_STRIDE;
300 int dst_u_offset = 0, dst_u_stride =
MAX_STRIDE;
301 int dst_v_offset = 0, dst_v_stride =
MAX_STRIDE;
310 src_offset = (
h-1)*src_stride;
311 src_stride = -src_stride;
314 dst_u_offset = (
h-1)*dst_u_stride;
315 dst_u_stride = -dst_u_stride;
318 dst_v_offset = (
h-1)*dst_v_stride;
319 dst_v_stride = -dst_v_stride;
322 call_ref(
src + src_offset, dst0_u + dst_u_offset, dst0_v + dst_v_offset,
323 w,
h, src_stride, dst_u_stride, dst_v_stride);
324 call_new(
src + src_offset, dst1_u + dst_u_offset, dst1_v + dst_v_offset,
325 w,
h, src_stride, dst_u_stride, dst_v_stride);
329 w + 1,
h + 1,
"dst_u");
331 w + 1,
h + 1,
"dst_v");
345 #define MAX_LINE_SIZE 1920
364 const uint8_t *unused1,
const uint8_t *unused2,
int width,
380 const uint8_t *
src =
desc->nb_components == 3 ? src24 : src32;
387 if (memcmp(dst0_y, dst1_y,
w * 2))
390 if (
desc->nb_components == 3 ||
409 const uint8_t *
src1,
const uint8_t *
src2,
const uint8_t *src3,
410 int width, uint32_t *pal,
void *opq);
419 ctx->chrSrcHSubSample = (
i % 2) ? 0 : 1;
420 ctx->srcFormat = src_fmt;
428 ctx->chrSrcHSubSample ?
"_half" :
"",
430 const uint8_t *
src =
desc->nb_components == 3 ? src24 : src32;
439 if (memcmp(dst0_u, dst1_u,
w * 2) || memcmp(dst0_v, dst1_v,
w * 2))
442 if (
desc->nb_components == 3 ||
459 report(
"shuffle_bytes_2103");
462 report(
"shuffle_bytes_0321");
465 report(
"shuffle_bytes_1230");
468 report(
"shuffle_bytes_3012");
471 report(
"shuffle_bytes_3210");
477 report(
"interleave_bytes");
480 report(
"deinterleave_bytes");