@@ -445,7 +445,7 @@ int gsc_try_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->num_planes = fmt->num_planes;
- if (pix_mp->width >= 1280) /* HD */
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
pix_mp->colorspace = V4L2_COLORSPACE_REC709;
else /* SD */
pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -492,7 +492,10 @@ int gsc_g_fmt_mplane(struct gsc_ctx *ctx, struct v4l2_format *f)
pix_mp->height = frame->f_height;
pix_mp->field = V4L2_FIELD_NONE;
pix_mp->pixelformat = frame->fmt->pixelformat;
- pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ if (pix_mp->width > 720 && pix_mp->height > 576) /* HD */
+ pix_mp->colorspace = V4L2_COLORSPACE_REC709;
+ else /* SD */
+ pix_mp->colorspace = V4L2_COLORSPACE_SMPTE170M;
pix_mp->num_planes = frame->fmt->num_planes;
for (i = 0; i < pix_mp->num_planes; ++i) {