frame->addr.size[SC_PLANE_Y] = bytesize;
break;
case 2:
- if (frame->sc_fmt->num_planes == 1) {
+ if (sc_fmt_is_s10bit_yuv(frame->sc_fmt->pixelformat)) {
+ sc_calc_s10b_planesize(frame->sc_fmt->pixelformat,
+ frame->width, frame->height,
+ &frame->addr.size[SC_PLANE_Y],
+ &frame->addr.size[SC_PLANE_CB],
+ false);
+ } else if (frame->sc_fmt->num_planes == 1) {
frame->addr.size[SC_PLANE_Y] = pixsize;
frame->addr.size[SC_PLANE_CB] = bytesize - pixsize;
} else if (frame->sc_fmt->num_planes == 2) {
- if (frame->sc_fmt->pixelformat == V4L2_PIX_FMT_NV12M_S10B) {
- frame->addr.size[SC_PLANE_Y] = NV12M_Y_SIZE(frame->width, frame->height);
- frame->addr.size[SC_PLANE_CB] = NV12M_CBCR_SIZE(frame->width, frame->height);
- } else {
- sc_calc_planesize(frame, pixsize);
- }
+ sc_calc_planesize(frame, pixsize);
}
break;
case 3: