IMX Scaler / CSC m2m driver.

Philipp Zabel p.zabel at pengutronix.de
Mon Mar 23 03:22:42 PDT 2015


Am Freitag, den 20.03.2015, 15:08 +0000 schrieb Ian Molton:
> On 19/03/15 15:45, Philipp Zabel wrote:
> > Hi Ian,
> 
> Hi!
> 
> > Since the CODA outputs a height of 1088 pixels (macroblock aligned), the
> > scaler tries to downsize 1:8 in your example, which crashes the IPU. (It
> > would then upscale the 136 pixel downscale result to 270 pixels using
> > bilinear scaling.)
> 
> So would I be right in thinking that this test (and comment) are wrong:
> 
>     /* Cannot downsize more than 8:1 */
>          if ((out_size << 3) < in_size) {
>                  dev_err(ipu->dev, "Unsupported downsize\n");
>                  return -EINVAL;
>          }
> 
> (drivers/gpu/ipu-v3/ipu-ic.c)

Exactly. And the error you are hitting is here:

--- a/drivers/gpu/ipu-v3/ipu-ic.c
+++ b/drivers/gpu/ipu-v3/ipu-ic.c
@@ -1092,7 +1092,7 @@ struct image_convert_ctx *ipu_image_convert_prepare(struct ipu_soc *ipu,
 
        /* validate input */
        if (in->rect.width < 16 || out->rect.width < 16 ||
-           (in->rect.width / 8) > out->rect.width)
+           (in->rect.width / 4) > out->rect.width)
                return ERR_PTR(-EINVAL);
 
        /* tile setup */

And obviously the v4l2 mem2mem scaler driver should catch this earlier.

regards
Philipp



More information about the gstreamer-devel mailing list