Re: [PATCH v7 2/4] media: rockchip: Add JPEG decoder driver

From: Nicolas Dufresne

Date: Thu Nov 19 2026 - 11:01:18 EST


Le mercredi 18 novembre 2026 à 14:27 +0000, Sascha Hauer a écrit :
> > Would 3 bytes per pixel be acceptable as the default, and as a floor
> > for smaller requests, like the 2 bytes per pixel floor in 6/7 of your
> > hantro-based v1? 4:4:4 at quality 100 would still not fit, but the
> > subsampling is not known before the header is parsed.
>
> I haven't been affected by this issue lately, but saw it when the series
> was still based on the hantro driver. Yes, I'll change to 3 bytes per
> pixel next round and make that the floor of sizeimage. Would be nice to
> have a proper solution for this rather than either wasting tons of
> memory or risk having too small buffers.

The hantro HW can run in ring buffer mode, that forces us to copy, but I think
you can then perform decode without actually having the entire image in RAM.
Would need some experimentation. We probably don't want copy to mmap + copy to
ring buffer (double copy), and V4L2 read/write are deprecated. Note sure what to
propose really.

Nicolas

Attachment: signature.asc
Description: This is a digitally signed message part