int planes;
int depth;
+ int bpc;
int peak;
int nb_planes;
int planeheight[4];
int p, i, nsteps_width, nsteps_height, nsteps_max;
s->depth = desc->comp[0].depth;
+ s->bpc = (s->depth + 7) / 8;
s->nb_planes = desc->nb_components;
s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
if (!((1 << p) & s->planes)) {
av_image_copy_plane(out->data[p], out->linesize[p], in->data[p], in->linesize[p],
- s->planewidth[p], s->planeheight[p]);
+ s->planewidth[p] * s->bpc, s->planeheight[p]);
continue;
}