]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_extractplanes.c
Merge commit '22cc57da64bfd73f2206969486b0aa183ee76479'
[ffmpeg] / libavfilter / vf_extractplanes.c
index 1018e92f25f0f4ecd5c3253ba80da9895a309d8d..47a174856e4b43713b9354004289e17a3dbe38e5 100644 (file)
@@ -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);