diff options
author | Niklas Haas <git@haasn.dev> | 2024-10-10 12:16:44 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-11-21 12:49:56 +0100 |
commit | 2d077f9acda4946b3455ded5778fb3fc7e85bba2 (patch) | |
tree | 44ab5d5889e65b4067fbe54f4e7966a31f4c9f13 /tests | |
parent | 10d1be262126f1699a89b54cf5f23a5370c57cb5 (diff) | |
download | ffmpeg-master.tar.gz |
This is a preliminary step to separating these into a new struct. This
commit contains no functional changes, it is a pure search-and-replace.
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checkasm/sw_gbrp.c | 16 | ||||
-rw-r--r-- | tests/checkasm/sw_range_convert.c | 16 | ||||
-rw-r--r-- | tests/checkasm/sw_rgb.c | 10 | ||||
-rw-r--r-- | tests/checkasm/sw_scale.c | 18 |
4 files changed, 30 insertions, 30 deletions
diff --git a/tests/checkasm/sw_gbrp.c b/tests/checkasm/sw_gbrp.c index 23ac1dfb56..b8ac7fdd1c 100644 --- a/tests/checkasm/sw_gbrp.c +++ b/tests/checkasm/sw_gbrp.c @@ -135,13 +135,13 @@ static void check_output_yuv2gbrp(void) fail(); c = sws_internal(sws); - c->flags |= SWS_FULL_CHR_H_INT; + c->opts.flags |= SWS_FULL_CHR_H_INT; for (fmi = 0; fmi < FF_ARRAY_ELEMS(planar_fmts); fmi++) { for (fsi = 0; fsi < FILTER_SIZES; fsi++) { for (isi = 0; isi < FF_ARRAY_ELEMS(input_sizes); isi++ ) { desc = av_pix_fmt_desc_get(planar_fmts[fmi]); - c->dstFormat = planar_fmts[fmi]; + c->opts.dst_format = planar_fmts[fmi]; dstW = input_sizes[isi]; luma_filter_size = filter_sizes[fsi]; @@ -229,8 +229,8 @@ static void check_input_planar_rgb_to_y(void) for (fmi = 0; fmi < FF_ARRAY_ELEMS(planar_fmts); fmi++) { for (isi = 0; isi < FF_ARRAY_ELEMS(input_sizes); isi++ ) { desc = av_pix_fmt_desc_get(planar_fmts[fmi]); - c->srcFormat = planar_fmts[fmi]; - c->dstFormat = AV_PIX_FMT_YUVA444P16; + c->opts.src_format = planar_fmts[fmi]; + c->opts.dst_format = AV_PIX_FMT_YUVA444P16; byte_size = 2; dstW = input_sizes[isi]; @@ -300,8 +300,8 @@ static void check_input_planar_rgb_to_uv(void) for (fmi = 0; fmi < FF_ARRAY_ELEMS(planar_fmts); fmi++) { for (isi = 0; isi < FF_ARRAY_ELEMS(input_sizes); isi++ ) { desc = av_pix_fmt_desc_get(planar_fmts[fmi]); - c->srcFormat = planar_fmts[fmi]; - c->dstFormat = AV_PIX_FMT_YUVA444P16; + c->opts.src_format = planar_fmts[fmi]; + c->opts.dst_format = AV_PIX_FMT_YUVA444P16; byte_size = 2; dstW = input_sizes[isi]; @@ -373,8 +373,8 @@ static void check_input_planar_rgb_to_a(void) if (!(desc->flags & AV_PIX_FMT_FLAG_ALPHA)) continue; - c->srcFormat = planar_fmts[fmi]; - c->dstFormat = AV_PIX_FMT_YUVA444P16; + c->opts.src_format = planar_fmts[fmi]; + c->opts.dst_format = AV_PIX_FMT_YUVA444P16; byte_size = 2; dstW = input_sizes[isi]; diff --git a/tests/checkasm/sw_range_convert.c b/tests/checkasm/sw_range_convert.c index f8167a411e..f17050f524 100644 --- a/tests/checkasm/sw_range_convert.c +++ b/tests/checkasm/sw_range_convert.c @@ -73,16 +73,16 @@ static void check_lumConvertRange(int from) fail(); c = sws_internal(sws); - c->srcRange = from; - c->dstRange = !from; + c->opts.src_range = from; + c->opts.dst_range = !from; for (int pfi = 0; pfi < FF_ARRAY_ELEMS(pixel_formats); pfi++) { enum AVPixelFormat pix_fmt = pixel_formats[pfi]; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); int bit_depth = desc->comp[0].depth; int sample_size = bit_depth == 16 ? sizeof(int32_t) : sizeof(int16_t); - c->srcFormat = pix_fmt; - c->dstFormat = pix_fmt; + c->opts.src_format = pix_fmt; + c->opts.dst_format = pix_fmt; c->dstBpc = bit_depth; ff_sws_init_scale(c); for (int dstWi = 0; dstWi < FF_ARRAY_ELEMS(input_sizes); dstWi++) { @@ -123,16 +123,16 @@ static void check_chrConvertRange(int from) fail(); c = sws_internal(sws); - c->srcRange = from; - c->dstRange = !from; + c->opts.src_range = from; + c->opts.dst_range = !from; for (int pfi = 0; pfi < FF_ARRAY_ELEMS(pixel_formats); pfi++) { enum AVPixelFormat pix_fmt = pixel_formats[pfi]; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); int bit_depth = desc->comp[0].depth; int sample_size = bit_depth == 16 ? sizeof(int32_t) : sizeof(int16_t); - c->srcFormat = pix_fmt; - c->dstFormat = pix_fmt; + c->opts.src_format = pix_fmt; + c->opts.dst_format = pix_fmt; c->dstBpc = bit_depth; ff_sws_init_scale(c); for (int dstWi = 0; dstWi < FF_ARRAY_ELEMS(input_sizes); dstWi++) { diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index 7af82f0fc7..65f8404d3f 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -370,7 +370,7 @@ static void check_rgb_to_y(SwsInternal *ctx) for (int i = 0; i < FF_ARRAY_ELEMS(rgb_formats); i++) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(rgb_formats[i]); - ctx->srcFormat = rgb_formats[i]; + ctx->opts.src_format = rgb_formats[i]; ff_sws_init_scale(ctx); for (int j = 0; j < FF_ARRAY_ELEMS(input_sizes); j++) { @@ -389,7 +389,7 @@ static void check_rgb_to_y(SwsInternal *ctx) if (desc->nb_components == 3 || // only bench native endian formats - (ctx->srcFormat == AV_PIX_FMT_RGB32 || ctx->srcFormat == AV_PIX_FMT_RGB32_1)) + (ctx->opts.src_format == AV_PIX_FMT_RGB32 || ctx->opts.src_format == AV_PIX_FMT_RGB32_1)) bench_new(dst1_y, src, NULL, NULL, w, ctx->input_rgb2yuv_table, NULL); } } @@ -417,8 +417,8 @@ static void check_rgb_to_uv(SwsInternal *ctx) const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(src_fmt); ctx->chrSrcHSubSample = (i % 2) ? 0 : 1; - ctx->srcFormat = src_fmt; - ctx->dstFormat = ctx->chrSrcHSubSample ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUV444P; + ctx->opts.src_format = src_fmt; + ctx->opts.dst_format = ctx->chrSrcHSubSample ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUV444P; ff_sws_init_scale(ctx); for (int j = 0; j < FF_ARRAY_ELEMS(input_sizes); j++) { @@ -441,7 +441,7 @@ static void check_rgb_to_uv(SwsInternal *ctx) if (desc->nb_components == 3 || // only bench native endian formats - (ctx->srcFormat == AV_PIX_FMT_RGB32 || ctx->srcFormat == AV_PIX_FMT_RGB32_1)) + (ctx->opts.src_format == AV_PIX_FMT_RGB32 || ctx->opts.src_format == AV_PIX_FMT_RGB32_1)) bench_new(dst1_u, dst1_v, NULL, src, src, w, ctx->input_rgb2yuv_table, NULL); } } diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index 7580c8b56c..82e2b1d5ce 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -125,7 +125,7 @@ static void check_yuv2yuv1(int accurate) sws = sws_alloc_context(); c = sws_internal(sws); if (accurate) - c->flags |= SWS_ACCURATE_RND; + c->opts.flags |= SWS_ACCURATE_RND; if (sws_init_context(sws, NULL, NULL) < 0) fail(); @@ -192,7 +192,7 @@ static void check_yuv2yuvX(int accurate) sws = sws_alloc_context(); c = sws_internal(sws); if (accurate) - c->flags |= SWS_ACCURATE_RND; + c->opts.flags |= SWS_ACCURATE_RND; if (sws_init_context(sws, NULL, NULL) < 0) fail(); @@ -341,20 +341,20 @@ static void check_hscale(void) filter[SRC_PIXELS * width + i] = rnd(); } - c->dstW = c->chrDstW = input_sizes[dstWi]; + c->opts.dst_w = c->chrDstW = input_sizes[dstWi]; ff_sws_init_scale(c); memcpy(filterAvx2, filter, sizeof(uint16_t) * (SRC_PIXELS * MAX_FILTER_WIDTH + MAX_FILTER_WIDTH)); - ff_shuffle_filter_coefficients(c, filterPosAvx, width, filterAvx2, c->dstW); + ff_shuffle_filter_coefficients(c, filterPosAvx, width, filterAvx2, c->opts.dst_w); - if (check_func(c->hcScale, "hscale_%d_to_%d__fs_%d_dstW_%d", c->srcBpc, c->dstBpc + 1, width, c->dstW)) { + if (check_func(c->hcScale, "hscale_%d_to_%d__fs_%d_dstW_%d", c->srcBpc, c->dstBpc + 1, width, c->opts.dst_w)) { memset(dst0, 0, SRC_PIXELS * sizeof(dst0[0])); memset(dst1, 0, SRC_PIXELS * sizeof(dst1[0])); - call_ref(NULL, dst0, c->dstW, src, filter, filterPos, width); - call_new(NULL, dst1, c->dstW, src, filterAvx2, filterPosAvx, width); - if (memcmp(dst0, dst1, c->dstW * sizeof(dst0[0]))) + call_ref(NULL, dst0, c->opts.dst_w, src, filter, filterPos, width); + call_new(NULL, dst1, c->opts.dst_w, src, filterAvx2, filterPosAvx, width); + if (memcmp(dst0, dst1, c->opts.dst_w * sizeof(dst0[0]))) fail(); - bench_new(NULL, dst0, c->dstW, src, filter, filterPosAvx, width); + bench_new(NULL, dst0, c->opts.dst_w, src, filter, filterPosAvx, width); } } } |