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 /libswscale/alphablend.c | |
parent | 10d1be262126f1699a89b54cf5f23a5370c57cb5 (diff) | |
download | ffmpeg-2d077f9acda4946b3455ded5778fb3fc7e85bba2.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 'libswscale/alphablend.c')
-rw-r--r-- | libswscale/alphablend.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libswscale/alphablend.c b/libswscale/alphablend.c index 4ee23d3aee..f9484bcc91 100644 --- a/libswscale/alphablend.c +++ b/libswscale/alphablend.c @@ -24,10 +24,10 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat); + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format); int nb_components = desc->nb_components; int plane, x, ysrc; - int plane_count = isGray(c->srcFormat) ? 1 : 3; + int plane_count = isGray(c->opts.src_format) ? 1 : 3; int sixteen_bits = desc->comp[0].depth >= 9; unsigned off = 1<<(desc->comp[0].depth - 1); unsigned shift = desc->comp[0].depth; @@ -36,7 +36,7 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], for (plane = 0; plane < plane_count; plane++) { int a = 0, b = 0; - if (c->alphablend == SWS_ALPHA_BLEND_CHECKERBOARD) { + if (c->opts.alpha_blend == SWS_ALPHA_BLEND_CHECKERBOARD) { a = (1<<(desc->comp[0].depth - 1))/2; b = 3*(1<<(desc->comp[0].depth-1))/2; } @@ -47,7 +47,7 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], av_assert0(plane_count == nb_components - 1); if (desc->flags & AV_PIX_FMT_FLAG_PLANAR) { for (plane = 0; plane < plane_count; plane++) { - int w = plane ? c->chrSrcW : c->srcW; + int w = plane ? c->chrSrcW : c->opts.src_w; int x_subsample = plane ? desc->log2_chroma_w: 0; int y_subsample = plane ? desc->log2_chroma_h: 0; for (ysrc = 0; ysrc < AV_CEIL_RSHIFT(srcSliceH, y_subsample); ysrc++) { @@ -60,7 +60,7 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], const uint16_t *s = (const uint16_t *)(src[plane ] + srcStride[plane ] * ysrc); const uint16_t *a = (const uint16_t *)(src[plane_count] + (srcStride[plane_count] * ysrc << y_subsample)); uint16_t *d = ( uint16_t *)(dst[plane ] + dstStride[plane ] * y); - if ((!isBE(c->srcFormat)) == !HAVE_BIGENDIAN) { + if ((!isBE(c->opts.src_format)) == !HAVE_BIGENDIAN) { for (x = 0; x < w; x++) { if (y_subsample) { alpha = (a[2*x] + a[2*x + 1] + 2 + @@ -101,7 +101,7 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], const uint16_t *s = (const uint16_t *)(src[plane ] + srcStride[plane ] * ysrc); const uint16_t *a = (const uint16_t *)(src[plane_count] + srcStride[plane_count] * ysrc); uint16_t *d = ( uint16_t *)(dst[plane ] + dstStride[plane ] * y); - if ((!isBE(c->srcFormat)) == !HAVE_BIGENDIAN) { + if ((!isBE(c->opts.src_format)) == !HAVE_BIGENDIAN) { for (x = 0; x < w; x++) { unsigned u = s[x]*a[x] + target_table[((x^y)>>5)&1][plane]*(max-a[x]) + off; d[x] = av_clip((u + (u >> shift)) >> shift, 0, max); @@ -127,14 +127,14 @@ int ff_sws_alphablendaway(SwsInternal *c, const uint8_t *const src[], } } else { int alpha_pos = desc->comp[plane_count].offset; - int w = c->srcW; + int w = c->opts.src_w; for (ysrc = 0; ysrc < srcSliceH; ysrc++) { int y = ysrc + srcSliceY; if (sixteen_bits) { const uint16_t *s = (const uint16_t *)(src[0] + srcStride[0] * ysrc + 2*!alpha_pos); const uint16_t *a = (const uint16_t *)(src[0] + srcStride[0] * ysrc + alpha_pos); uint16_t *d = ( uint16_t *)(dst[0] + dstStride[0] * y); - if ((!isBE(c->srcFormat)) == !HAVE_BIGENDIAN) { + if ((!isBE(c->opts.src_format)) == !HAVE_BIGENDIAN) { for (x = 0; x < w; x++) { for (plane = 0; plane < plane_count; plane++) { int x_index = (plane_count + 1) * x; |