linkmauve: hey! do you remember is the sunxi video engine is able to untile YUV422 for JPEG decode?
currently in the driver's registers definitions we can either have MB32-tiled (which produces either 420 or 422 depending on the input) or NV12/YUV420 but not NV16/YUV422
(that is probably also relevant for any codec that can store 422)
jernej: maybe you have a clue?
paulk, hi, welcome back!  I remember old SoCs like A10 and A20 were outputting NV16 when fed 422 or 444 JPEGs, and there was a new register in A64 (or perhaps earlier SoCs) which enabled downscaling of them all to NV12.
I only have these three sunxi SoCs for testing.
Speaking of which, I should probably get back to it now that I’m back home and upstream the JPEG decoder at last.
linkmauve: thanks for the feedback! I'll probably do some testing on my side then :)
and of course you're quite welcome to submit your jpeg dec work!
paulk, here is the register: https://github.com/jernejsk/linux-1/commit/a29b4f6a36d15a1057d74f982af3418124733238#diff-c2591cf11fdcf3d2851da25796d43cfe23e2ef75457bb7e66051fc02f6f2b50aR297
It works only on A64+ (or perhaps some prior one which I don’t have), but not on A10 or A20.
One thing I was blocked on before submitting that tree was how to expose the mandatory NV16 format support for 422, 422T or 444 on A10 and A20.
Because those cannot downsample to 420.
ah I see so the code forces downsampling for now
so for A10/A20 there is no downsampling and no untiling
so I think we'd need a new v4l2 pix fmt for 422 and 444 mb32 tiled
Is 444 supported anywhere?
On both A10, A20 and A64 it can be decoded, but it will always be downsampled, either to 422, or to 420 if the register is set.
ah good to know
so I guess we just need V4L2_PIX_FMT_NV16_32L32
But maybe we just haven’t found the register to keep it to 444.
With the fourcc ST16 perhaps?
I just checked it doesn’t seem to be used yet.
ST16 sounds good yep
indeed the allwinner code mentions 444 MB32
On the DRM side it’s already supported, NV16 with DRM_FORMAT_MOD_ALLWINNER_TILED modifier.
There is no DRM_FORMAT_MOD_ALLWINNER_TILED format which could do 444 on this A10 though.
ok
Same on the A20.
And on the A64, sun4i-drm doesn’t support any tiled format, they can be decoded but not displayed.
The A10 and A20 do support all of NV12, NV16, NV21, NV61, YUV411, YUV420, YUV422, YVU411, YVU420 and YVU422 though, so perhaps there is support for 411 decoding somewhere as well.
my guess would be that what the display engine supports is not necessarily tied to the decoder
and I guess after allwinner moved the untiled to the decoder side starting with the A33 there wasn't much need to keep supporting it in the display engine
Not necessarily, but would there be any other relevant producer for MB32-tiled YUV411?
oh you mean tiled 411
Yeah.
ah indeed there seems to be some 411 jpeg support
in the cedarx code drops