Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 18:10:48 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 18:10:48 +0300
commit5d8e836d0ec3bcaabf5bc2020210a1bc61975922 (patch)
tree8ff87745055d571431ded709218556357b18341c /libswscale/alphablend.c
parent151aa2ebff514a9d150a2d3a7b92be1dcc46df36 (diff)
Replace all remaining occurances of step/depth_minus1 and offset_plus1
Diffstat (limited to 'libswscale/alphablend.c')
-rw-r--r--libswscale/alphablend.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libswscale/alphablend.c b/libswscale/alphablend.c
index b9b809b702..1f63493bdc 100644
--- a/libswscale/alphablend.c
+++ b/libswscale/alphablend.c
@@ -28,20 +28,20 @@ int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[],
int nb_components = desc->nb_components;
int plane, x, y;
int plane_count = isGray(c->srcFormat) ? 1 : 3;
- int sixteen_bits = desc->comp[0].depth_minus1 >= 8;
- unsigned off = 1<<desc->comp[0].depth_minus1;
- unsigned shift = desc->comp[0].depth_minus1 + 1;
+ int sixteen_bits = desc->comp[0].depth >= 9;
+ unsigned off = 1<<(desc->comp[0].depth - 1);
+ unsigned shift = desc->comp[0].depth;
unsigned max = (1<<shift) - 1;
int target_table[2][3];
for (plane = 0; plane < plane_count; plane++) {
int a = 0, b = 0;
if (c->alphablend == SWS_ALPHA_BLEND_CHECKERBOARD) {
- a = (1<<desc->comp[0].depth_minus1)/2;
- b = 3*(1<<desc->comp[0].depth_minus1)/2;
+ a = (1<<(desc->comp[0].depth - 1))/2;
+ b = 3*(1<<(desc->comp[0].depth-1))/2;
}
- target_table[0][plane] = plane && !(desc->flags & AV_PIX_FMT_FLAG_RGB) ? 1<<desc->comp[0].depth_minus1 : a;
- target_table[1][plane] = plane && !(desc->flags & AV_PIX_FMT_FLAG_RGB) ? 1<<desc->comp[0].depth_minus1 : b;
+ target_table[0][plane] = plane && !(desc->flags & AV_PIX_FMT_FLAG_RGB) ? 1<<(desc->comp[0].depth - 1) : a;
+ target_table[1][plane] = plane && !(desc->flags & AV_PIX_FMT_FLAG_RGB) ? 1<<(desc->comp[0].depth - 1) : b;
}
av_assert0(plane_count == nb_components - 1);
@@ -125,7 +125,7 @@ int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[],
}
}
} else {
- int alpha_pos = desc->comp[plane_count].offset_plus1 - 1;
+ int alpha_pos = desc->comp[plane_count].offset;
int w = c->srcW;
for (y = srcSliceY; y < srcSliceH; y++) {
if (sixteen_bits) {