summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 17:10:48 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 17:10:48 +0200
commit5d8e836d0ec3bcaabf5bc2020210a1bc61975922 (patch)
tree8ff87745055d571431ded709218556357b18341c /libavfilter
parent151aa2ebff514a9d150a2d3a7b92be1dcc46df36 (diff)
downloadffmpeg-streaming-5d8e836d0ec3bcaabf5bc2020210a1bc61975922.zip
ffmpeg-streaming-5d8e836d0ec3bcaabf5bc2020210a1bc61975922.tar.gz
Replace all remaining occurances of step/depth_minus1 and offset_plus1
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/drawutils.c8
-rwxr-xr-xlibavfilter/vf_atadenoise.c2
-rw-r--r--libavfilter/vf_blend.c2
-rw-r--r--libavfilter/vf_boxblur.c4
-rw-r--r--libavfilter/vf_colorkey.c2
-rw-r--r--libavfilter/vf_colorlevels.c2
-rw-r--r--libavfilter/vf_cropdetect.c2
-rw-r--r--libavfilter/vf_deband.c10
-rw-r--r--libavfilter/vf_decimate.c2
-rw-r--r--libavfilter/vf_extractplanes.c8
-rw-r--r--libavfilter/vf_histogram.c18
-rw-r--r--libavfilter/vf_idet.c2
-rw-r--r--libavfilter/vf_lut.c18
-rw-r--r--libavfilter/vf_mergeplanes.c8
-rw-r--r--libavfilter/vf_noise.c2
-rw-r--r--libavfilter/vf_psnr.c12
-rw-r--r--libavfilter/vf_spp.c4
-rw-r--r--libavfilter/vf_swapuv.c4
-rw-r--r--libavfilter/vf_vectorscope.c2
-rw-r--r--libavfilter/vf_waveform.c2
-rw-r--r--libavfilter/x86/vf_yadif_init.c2
21 files changed, 58 insertions, 58 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 5a82b10..b65d57c 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -172,15 +172,15 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
for (i = 0; i < desc->nb_components; i++) {
c = &desc->comp[i];
/* for now, only 8-bits formats */
- if (c->depth_minus1 != 8 - 1)
+ if (c->depth != 8)
return AVERROR(ENOSYS);
if (c->plane >= MAX_PLANES)
return AVERROR(ENOSYS);
/* strange interleaving */
if (pixelstep[c->plane] != 0 &&
- pixelstep[c->plane] != c->step_minus1 + 1)
+ pixelstep[c->plane] != c->step)
return AVERROR(ENOSYS);
- pixelstep[c->plane] = c->step_minus1 + 1;
+ pixelstep[c->plane] = c->step;
if (pixelstep[c->plane] >= 8)
return AVERROR(ENOSYS);
nb_planes = FFMAX(nb_planes, c->plane + 1);
@@ -196,7 +196,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
for (i = 0; i < ((desc->nb_components - 1) | 1); i++)
draw->comp_mask[desc->comp[i].plane] |=
- 1 << (desc->comp[i].offset_plus1 - 1);
+ 1 << desc->comp[i].offset;
return 0;
}
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index a3c623f..9ce0250 100755
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -269,7 +269,7 @@ static int config_input(AVFilterLink *inlink)
s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
- depth = desc->comp[0].depth_minus1 + 1;
+ depth = desc->comp[0].depth;
if (depth == 8)
s->filter_slice = filter_slice8;
else
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index 2a33ce1..5901ffa 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -464,7 +464,7 @@ static int config_output(AVFilterLink *outlink)
s->hsub = pix_desc->log2_chroma_w;
s->vsub = pix_desc->log2_chroma_h;
- is_16bit = pix_desc->comp[0].depth_minus1 == 15;
+ is_16bit = pix_desc->comp[0].depth == 16;
s->nb_planes = av_pix_fmt_count_planes(toplink->format);
if (s->tblend)
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index 17db949..0e9bafd 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -124,7 +124,7 @@ static int query_formats(AVFilterContext *ctx)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
if (!(desc->flags & (AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_PAL)) &&
(desc->flags & AV_PIX_FMT_FLAG_PLANAR || desc->nb_components == 1) &&
- (!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN || desc->comp[0].depth_minus1 == 7))
+ (!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN || desc->comp[0].depth == 8))
ff_add_format(&formats, fmt);
}
@@ -351,7 +351,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int w[4] = { inlink->w, cw, cw, inlink->w };
int h[4] = { in->height, ch, ch, in->height };
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
- const int depth = desc->comp[0].depth_minus1 + 1;
+ const int depth = desc->comp[0].depth;
const int pixsize = (depth+7)/8;
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c
index 19e39ec..993da8b 100644
--- a/libavfilter/vf_colorkey.c
+++ b/libavfilter/vf_colorkey.c
@@ -103,7 +103,7 @@ static av_cold int config_output(AVFilterLink *outlink)
outlink->time_base = avctx->inputs[0]->time_base;
for (i = 0; i < 4; ++i)
- ctx->co[i] = desc->comp[i].offset_plus1 - 1;
+ ctx->co[i] = desc->comp[i].offset;
return 0;
}
diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c
index 7157c91..cb3314b 100644
--- a/libavfilter/vf_colorlevels.c
+++ b/libavfilter/vf_colorlevels.c
@@ -97,7 +97,7 @@ static int config_input(AVFilterLink *inlink)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
s->nb_comp = desc->nb_components;
- s->bpp = (desc->comp[0].depth_minus1 + 1) >> 3;
+ s->bpp = desc->comp[0].depth >> 3;
s->step = (av_get_padded_bits_per_pixel(desc) >> 3) / s->bpp;
s->linesize = inlink->w * s->step;
ff_fill_rgba_map(s->rgba_map, inlink->format);
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 7fa9651..d456377 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -144,7 +144,7 @@ static int config_input(AVFilterLink *inlink)
av_image_fill_max_pixsteps(s->max_pixsteps, NULL, desc);
if (s->limit < 1.0)
- s->limit *= (1 << (desc->comp[0].depth_minus1 + 1)) - 1;
+ s->limit *= (1 << desc->comp[0].depth) - 1;
s->x1 = inlink->w - 1;
s->y1 = inlink->h - 1;
diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c
index 5de3db1..3689721 100644
--- a/libavfilter/vf_deband.c
+++ b/libavfilter/vf_deband.c
@@ -223,12 +223,12 @@ static int config_input(AVFilterLink *inlink)
s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
- s->deband = desc->comp[0].depth_minus1 > 7 ? deband_16_c : deband_8_c;
+ s->deband = desc->comp[0].depth > 8 ? deband_16_c : deband_8_c;
- s->thr[0] = ((1 << (desc->comp[0].depth_minus1 + 1)) - 1) * s->threshold[0];
- s->thr[1] = ((1 << (desc->comp[1].depth_minus1 + 1)) - 1) * s->threshold[1];
- s->thr[2] = ((1 << (desc->comp[2].depth_minus1 + 1)) - 1) * s->threshold[2];
- s->thr[3] = ((1 << (desc->comp[3].depth_minus1 + 1)) - 1) * s->threshold[3];
+ s->thr[0] = ((1 << desc->comp[0].depth) - 1) * s->threshold[0];
+ s->thr[1] = ((1 << desc->comp[1].depth) - 1) * s->threshold[1];
+ s->thr[2] = ((1 << desc->comp[2].depth) - 1) * s->threshold[2];
+ s->thr[3] = ((1 << desc->comp[3].depth) - 1) * s->threshold[3];
s->x_pos = av_malloc(s->planewidth[0] * s->planeheight[0] * sizeof(*s->x_pos));
s->y_pos = av_malloc(s->planewidth[0] * s->planeheight[0] * sizeof(*s->y_pos));
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 70357ea..d352665 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -239,7 +239,7 @@ static int config_input(AVFilterLink *inlink)
dm->hsub = pix_desc->log2_chroma_w;
dm->vsub = pix_desc->log2_chroma_h;
- dm->depth = pix_desc->comp[0].depth_minus1 + 1;
+ dm->depth = pix_desc->comp[0].depth;
max_value = (1 << dm->depth) - 1;
dm->scthresh = (int64_t)(((int64_t)max_value * w * h * dm->scthresh_flt) / 100);
dm->dupthresh = (int64_t)(((int64_t)max_value * dm->blockx * dm->blocky * dm->dupthresh_flt) / 100);
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 1018e92..47a1748 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -111,17 +111,17 @@ static int query_formats(AVFilterContext *ctx)
avff = ctx->inputs[0]->in_formats;
desc = av_pix_fmt_desc_get(avff->formats[0]);
- depth = desc->comp[0].depth_minus1;
+ depth = desc->comp[0].depth;
be = desc->flags & AV_PIX_FMT_FLAG_BE;
for (i = 1; i < avff->nb_formats; i++) {
desc = av_pix_fmt_desc_get(avff->formats[i]);
- if (depth != desc->comp[0].depth_minus1 ||
+ if (depth != desc->comp[0].depth ||
be != (desc->flags & AV_PIX_FMT_FLAG_BE)) {
return AVERROR(EAGAIN);
}
}
- if (depth == 7)
+ if (depth == 8)
out_pixfmts = out8_pixfmts;
else if (be)
out_pixfmts = out16be_pixfmts;
@@ -152,7 +152,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->depth = (desc->comp[0].depth_minus1 + 1) >> 3;
+ s->depth = desc->comp[0].depth >> 3;
s->step = av_get_padded_bits_per_pixel(desc) >> 3;
s->is_packed = !(desc->flags & AV_PIX_FMT_FLAG_PLANAR) &&
(desc->nb_components > 1);
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 443cbda..d8e935a 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -177,25 +177,25 @@ static int query_formats(AVFilterContext *ctx)
avff = ctx->inputs[0]->in_formats;
desc = av_pix_fmt_desc_get(avff->formats[0]);
rgb = desc->flags & AV_PIX_FMT_FLAG_RGB;
- bits = desc->comp[0].depth_minus1;
+ bits = desc->comp[0].depth;
for (i = 1; i < avff->nb_formats; i++) {
desc = av_pix_fmt_desc_get(avff->formats[i]);
if ((rgb != (desc->flags & AV_PIX_FMT_FLAG_RGB)) ||
- (bits != desc->comp[0].depth_minus1))
+ (bits != desc->comp[0].depth))
return AVERROR(EAGAIN);
}
- if (rgb && bits == 7)
+ if (rgb && bits == 8)
out_pix_fmts = levels_out_rgb8_pix_fmts;
- else if (rgb && bits == 8)
- out_pix_fmts = levels_out_rgb9_pix_fmts;
else if (rgb && bits == 9)
+ out_pix_fmts = levels_out_rgb9_pix_fmts;
+ else if (rgb && bits == 10)
out_pix_fmts = levels_out_rgb10_pix_fmts;
- else if (bits == 7)
- out_pix_fmts = levels_out_yuv8_pix_fmts;
else if (bits == 8)
+ out_pix_fmts = levels_out_yuv8_pix_fmts;
+ else if (bits == 9)
out_pix_fmts = levels_out_yuv9_pix_fmts;
- else // if (bits == 9)
+ else // if (bits == 10)
out_pix_fmts = levels_out_yuv10_pix_fmts;
ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats);
@@ -227,7 +227,7 @@ static int config_input(AVFilterLink *inlink)
h->desc = av_pix_fmt_desc_get(inlink->format);
h->ncomp = h->desc->nb_components;
- h->histogram_size = 1 << (h->desc->comp[0].depth_minus1 + 1);
+ h->histogram_size = 1 << h->desc->comp[0].depth;
h->mult = h->histogram_size / 256;
switch (inlink->format) {
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index eb1303a..711ba6e 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -275,7 +275,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
if (!idet->csp)
idet->csp = av_pix_fmt_desc_get(link->format);
- if (idet->csp->comp[0].depth_minus1 / 8 == 1){
+ if (idet->csp->comp[0].depth > 8){
idet->filter_line = (ff_idet_filter_func)ff_idet_filter_line_c_16bit;
if (ARCH_X86)
ff_idet_init_x86(idet, 1);
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 3f0524d..c81575a 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -213,7 +213,7 @@ static int config_props(AVFilterLink *inlink)
s->var_values[VAR_W] = inlink->w;
s->var_values[VAR_H] = inlink->h;
- s->is_16bit = desc->comp[0].depth_minus1 > 7;
+ s->is_16bit = desc->comp[0].depth > 8;
switch (inlink->format) {
case AV_PIX_FMT_YUV410P:
@@ -251,14 +251,14 @@ static int config_props(AVFilterLink *inlink)
case AV_PIX_FMT_YUVA420P16LE:
case AV_PIX_FMT_YUVA422P16LE:
case AV_PIX_FMT_YUVA444P16LE:
- min[Y] = 16 * (1 << (desc->comp[0].depth_minus1 - 7));
- min[U] = 16 * (1 << (desc->comp[1].depth_minus1 - 7));
- min[V] = 16 * (1 << (desc->comp[2].depth_minus1 - 7));
+ min[Y] = 16 * (1 << (desc->comp[0].depth - 8));
+ min[U] = 16 * (1 << (desc->comp[1].depth - 8));
+ min[V] = 16 * (1 << (desc->comp[2].depth - 8));
min[A] = 0;
- max[Y] = 235 * (1 << (desc->comp[0].depth_minus1 - 7));
- max[U] = 240 * (1 << (desc->comp[1].depth_minus1 - 7));
- max[V] = 240 * (1 << (desc->comp[2].depth_minus1 - 7));
- max[A] = (1 << (desc->comp[3].depth_minus1 + 1)) - 1;
+ max[Y] = 235 * (1 << (desc->comp[0].depth - 8));
+ max[U] = 240 * (1 << (desc->comp[1].depth - 8));
+ max[V] = 240 * (1 << (desc->comp[2].depth - 8));
+ max[A] = (1 << desc->comp[3].depth) - 1;
break;
default:
min[0] = min[1] = min[2] = min[3] = 0;
@@ -294,7 +294,7 @@ static int config_props(AVFilterLink *inlink)
s->var_values[VAR_MAXVAL] = max[color];
s->var_values[VAR_MINVAL] = min[color];
- for (val = 0; val < (1 << (desc->comp[0].depth_minus1 + 1)); val++) {
+ for (val = 0; val < (1 << desc->comp[0].depth); val++) {
s->var_values[VAR_VAL] = val;
s->var_values[VAR_CLIPVAL] = av_clip(val, min[color], max[color]);
s->var_values[VAR_NEGVAL] =
diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c
index 734327e..ea796be 100644
--- a/libavfilter/vf_mergeplanes.c
+++ b/libavfilter/vf_mergeplanes.c
@@ -121,7 +121,7 @@ static int query_formats(AVFilterContext *ctx)
s->outdesc = av_pix_fmt_desc_get(s->out_fmt);
for (i = 0; av_pix_fmt_desc_get(i); i++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
- if (desc->comp[0].depth_minus1 == s->outdesc->comp[0].depth_minus1 &&
+ if (desc->comp[0].depth == s->outdesc->comp[0].depth &&
av_pix_fmt_count_planes(i) == desc->nb_components)
ff_add_format(&formats, i);
}
@@ -227,7 +227,7 @@ static int config_output(AVFilterLink *outlink)
inputp->nb_planes = av_pix_fmt_count_planes(inlink->format);
for (j = 0; j < inputp->nb_planes; j++)
- inputp->depth[j] = indesc->comp[j].depth_minus1 + 1;
+ inputp->depth[j] = indesc->comp[j].depth;
in[i].time_base = inlink->time_base;
in[i].sync = 1;
@@ -245,10 +245,10 @@ static int config_output(AVFilterLink *outlink)
input, plane);
goto fail;
}
- if (s->outdesc->comp[i].depth_minus1 + 1 != inputp->depth[plane]) {
+ if (s->outdesc->comp[i].depth != inputp->depth[plane]) {
av_log(ctx, AV_LOG_ERROR, "output plane %d depth %d does not "
"match input %d plane %d depth %d\n",
- i, s->outdesc->comp[i].depth_minus1 + 1,
+ i, s->outdesc->comp[i].depth,
input, plane, inputp->depth[plane]);
goto fail;
}
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 861ac09..c658bba 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -137,7 +137,7 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (desc->flags & AV_PIX_FMT_FLAG_PLANAR && !((desc->comp[0].depth_minus1 + 1) & 7))
+ if (desc->flags & AV_PIX_FMT_FLAG_PLANAR && !(desc->comp[0].depth & 7))
ff_add_format(&formats, fmt);
}
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index 3c1dc81..a01b2c1 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -251,10 +251,10 @@ static int config_input_ref(AVFilterLink *inlink)
return AVERROR(EINVAL);
}
- s->max[0] = (1 << (desc->comp[0].depth_minus1 + 1)) - 1;
- s->max[1] = (1 << (desc->comp[1].depth_minus1 + 1)) - 1;
- s->max[2] = (1 << (desc->comp[2].depth_minus1 + 1)) - 1;
- s->max[3] = (1 << (desc->comp[3].depth_minus1 + 1)) - 1;
+ s->max[0] = (1 << desc->comp[0].depth) - 1;
+ s->max[1] = (1 << desc->comp[1].depth) - 1;
+ s->max[2] = (1 << desc->comp[2].depth) - 1;
+ s->max[3] = (1 << desc->comp[3].depth) - 1;
s->is_rgb = ff_fill_rgba_map(s->rgba_map, inlink->format) >= 0;
s->comps[0] = s->is_rgb ? 'r' : 'y' ;
@@ -274,9 +274,9 @@ static int config_input_ref(AVFilterLink *inlink)
s->average_max += s->max[j] * s->planeweight[j];
}
- s->dsp.sse_line = desc->comp[0].depth_minus1 > 7 ? sse_line_16bit : sse_line_8bit;
+ s->dsp.sse_line = desc->comp[0].depth > 8 ? sse_line_16bit : sse_line_8bit;
if (ARCH_X86)
- ff_psnr_init_x86(&s->dsp, desc->comp[0].depth_minus1 + 1);
+ ff_psnr_init_x86(&s->dsp, desc->comp[0].depth);
return 0;
}
diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index 990fea3..9d99130 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -331,7 +331,7 @@ static int config_input(AVFilterLink *inlink)
SPPContext *s = inlink->dst->priv;
const int h = FFALIGN(inlink->h + 16, 16);
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
- const int bps = desc->comp[0].depth_minus1 + 1;
+ const int bps = desc->comp[0].depth;
av_opt_set_int(s->dct, "bits_per_sample", bps, 0);
avcodec_dct_init(s->dct);
@@ -359,7 +359,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int qp_stride = 0;
const int8_t *qp_table = NULL;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
- const int depth = desc->comp[0].depth_minus1 + 1;
+ const int depth = desc->comp[0].depth;
/* if we are not in a constant user quantizer mode and we don't want to use
* the quantizers from the B-frames (B-frames often have a higher QP), we
diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 632e31c..b450e6f 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -56,10 +56,10 @@ static int is_planar_yuv(const AVPixFmtDescriptor *desc)
if (desc->flags & ~(AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA) ||
desc->nb_components < 3 ||
- (desc->comp[1].depth_minus1 != desc->comp[2].depth_minus1))
+ (desc->comp[1].depth != desc->comp[2].depth))
return 0;
for (i = 0; i < desc->nb_components; i++) {
- if (desc->comp[i].offset_plus1 != 1 ||
+ if (desc->comp[i].offset != 0 ||
desc->comp[i].shift != 0 ||
desc->comp[i].plane != i)
return 0;
diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index 42052e6..e99b304 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -187,7 +187,7 @@ static int config_input(AVFilterLink *inlink)
static int config_output(AVFilterLink *outlink)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format);
- const int depth = desc->comp[0].depth_minus1 + 1;
+ const int depth = desc->comp[0].depth;
VectorscopeContext *s = outlink->src->priv;
s->intensity = s->fintensity * ((1 << depth) - 1);
diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index c6be694..b2468c1 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -1172,7 +1172,7 @@ static int config_input(AVFilterLink *inlink)
s->desc = av_pix_fmt_desc_get(inlink->format);
s->ncomp = s->desc->nb_components;
- s->bits = s->desc->comp[0].depth_minus1 + 1;
+ s->bits = s->desc->comp[0].depth;
s->max = 1 << s->bits;
s->intensity = s->fintensity * (s->max - 1);
diff --git a/libavfilter/x86/vf_yadif_init.c b/libavfilter/x86/vf_yadif_init.c
index 1460a64..c36a2d0 100644
--- a/libavfilter/x86/vf_yadif_init.c
+++ b/libavfilter/x86/vf_yadif_init.c
@@ -62,7 +62,7 @@ av_cold void ff_yadif_init_x86(YADIFContext *yadif)
{
int cpu_flags = av_get_cpu_flags();
int bit_depth = (!yadif->csp) ? 8
- : yadif->csp->comp[0].depth_minus1 + 1;
+ : yadif->csp->comp[0].depth;
if (bit_depth >= 15) {
#if ARCH_X86_32
OpenPOWER on IntegriCloud