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++) {
144 uint8_t *vdst,
int width,
int height,
int lumStride,
151 int negstride = input_size < 0;
152 const char *negstride_str = negstride ?
"_negstride" :
"";
154 int linesize =
width + 32;
159 uint8_t *dst_y_0 = buf_y_0;
160 uint8_t *dst_y_1 = buf_y_1;
161 uint8_t *dst_u_0 = buf_u_0;
162 uint8_t *dst_u_1 = buf_u_1;
163 uint8_t *dst_v_0 = buf_v_0;
164 uint8_t *dst_v_1 = buf_v_1;
169 dst_y_0 += (
height - 1) * linesize;
170 dst_y_1 += (
height - 1) * linesize;
171 dst_u_0 += ((
height / 2) - 1) * (linesize / 2);
172 dst_u_1 += ((
height / 2) - 1) * (linesize / 2);
173 dst_v_0 += ((
height / 2) - 1) * (linesize / 2);
174 dst_v_1 += ((
height / 2) - 1) * (linesize / 2);
179 memset(buf_y_0, 0xFF,
BUFSIZE);
180 memset(buf_y_1, 0xFF,
BUFSIZE);
181 memset(buf_u_0, 0xFF,
BUFSIZE / 4);
182 memset(buf_u_1, 0xFF,
BUFSIZE / 4);
183 memset(buf_v_0, 0xFF,
BUFSIZE / 4);
184 memset(buf_v_1, 0xFF,
BUFSIZE / 4);
187 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
189 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
195 linesize, linesize / 2, linesize * 3,
ctx->input_rgb2yuv_table);
212 uint8_t *
src0 = src0_buf + 1;
213 uint8_t *
src1 = src1_buf + 1;
214 uint8_t *dst0 = dst0_buf + 2;
215 uint8_t *dst1 = dst1_buf + 2;
218 uint8_t *,
int,
int,
int,
int,
int);
224 for (
int i = 0;
i <= 16;
i++) {
230 int src0_offset = 0, src0_stride =
MAX_STRIDE;
231 int src1_offset = 0, src1_stride =
MAX_STRIDE;
232 int dst_offset = 0, dst_stride = 2 *
MAX_STRIDE;
239 src0_offset = (
h-1)*src0_stride;
240 src0_stride = -src0_stride;
243 src1_offset = (
h-1)*src1_stride;
244 src1_stride = -src1_stride;
247 dst_offset = (
h-1)*dst_stride;
248 dst_stride = -dst_stride;
252 w,
h, src0_stride, src1_stride, dst_stride);
254 w,
h, src0_stride, src1_stride, dst_stride);
258 2 *
w + 2,
h + 1,
"dst");
281 uint8_t *
src = src_buf + 2;
282 uint8_t *dst0_u = dst0_u_buf + 1;
283 uint8_t *dst0_v = dst0_v_buf + 1;
284 uint8_t *dst1_u = dst1_u_buf + 1;
285 uint8_t *dst1_v = dst1_v_buf + 1;
289 int dst1Stride,
int dst2Stride);
294 for (
int i = 0;
i <= 16;
i++) {
300 int src_offset = 0, src_stride = 2 *
MAX_STRIDE;
301 int dst_u_offset = 0, dst_u_stride =
MAX_STRIDE;
302 int dst_v_offset = 0, dst_v_stride =
MAX_STRIDE;
311 src_offset = (
h-1)*src_stride;
312 src_stride = -src_stride;
315 dst_u_offset = (
h-1)*dst_u_stride;
316 dst_u_stride = -dst_u_stride;
319 dst_v_offset = (
h-1)*dst_v_stride;
320 dst_v_stride = -dst_v_stride;
323 call_ref(
src + src_offset, dst0_u + dst_u_offset, dst0_v + dst_v_offset,
324 w,
h, src_stride, dst_u_stride, dst_v_stride);
325 call_new(
src + src_offset, dst1_u + dst_u_offset, dst1_v + dst_v_offset,
326 w,
h, src_stride, dst_u_stride, dst_v_stride);
330 w + 1,
h + 1,
"dst_u");
332 w + 1,
h + 1,
"dst_v");
346 #define MAX_LINE_SIZE 1920
367 const uint8_t *unused1,
const uint8_t *unused2,
int width,
383 const uint8_t *
src =
desc->nb_components == 3 ? src24 : src32;
390 if (memcmp(dst0_y, dst1_y,
w * 2))
393 if (
desc->nb_components == 3 ||
414 const uint8_t *
src1,
const uint8_t *
src2,
const uint8_t *src3,
415 int width, uint32_t *pal,
void *opq);
424 ctx->chrSrcHSubSample = (
i % 2) ? 0 : 1;
433 ctx->chrSrcHSubSample ?
"_half" :
"",
435 const uint8_t *
src =
desc->nb_components == 3 ? src24 : src32;
444 if (memcmp(dst0_u, dst1_u,
w * 2) || memcmp(dst0_v, dst1_v,
w * 2))
447 if (
desc->nb_components == 3 ||
463 report(
"shuffle_bytes_2103");
466 report(
"shuffle_bytes_0321");
469 report(
"shuffle_bytes_1230");
472 report(
"shuffle_bytes_3012");
475 report(
"shuffle_bytes_3210");
481 report(
"interleave_bytes");
484 report(
"deinterleave_bytes");