Frame UV offset compensation

Adam Langley linux at irisdesign.co.nz
Sun Dec 30 02:23:41 UTC 2018


Hi,

I have an MJPG web camera which I need to capture, decode, and scale the
output.
I have noticed in at least 2 hardware mjpeg decoders - a buffer alignment,
meaning that there is a space of unused bytes between the Y and UV planes
in the output.
I have noticed this in both the omxmjpegdec of the Raspberry Pi, and the
mppjmpegdec of the Rockchip 3288 (tinkerboard).
When pulling 1920*1080 frames, the UV plane offset is at a stride of 1088
rather than 1080.

Unfortunately, passing the YUV output to videoscale results in a scaled
video output where the UV plane is shifted 16 pixels (8 bytes represents 16
UV pixels) downwards.
You can see my post here
https://u2567673.ct.sendgrid.net/wf/click?upn=hC2JwqNsdBh9BS8WbREWdiWclL-2B2zmflKmLpohiGoQ8-2FIyPBMI5clQaG6qa5PC-2BeXfid60daIIgC6LA5tkludLawe8y9Y49-2FN9HrIP7bEec-3D_SqM5JSCW4zvvQIaoW1CDvMIem8taQSUrkrbhR3x77XRu7BshtfhBNpLhgP2ozglLAUJbeCuN9-2FsiT6CVPGBOfzOI2QL2KKhFUuzduGZSajLlA8oCn1Tw3BVwRviMghAuBooyAZ7xDR2QXira6I3C-2B9G35eYXZ7q4mGdl7ocPKgBXFEf1PoivGC0xayiVLaqcx5Gtoiy9gbuObv81-2FOVPJS1GNOYpEFBL9t3HW-2BtYl1olvYCxjscltlWxsRQqbpBy where I am
pointing it out to the Rockchip team (replete with images), however I don't
know where in the pipeline this soft of thing is supposed to be handled.
I can see in the Rockchip code, they are correctly storing the plane[1]
offset in the VideoInfo - but it doesn't look like gstvideoscale pays any
attention to it.

Is there an element that can 'repack' the frame to remove the offset? Or
another simple, yet processor efficient way to handle this?

Thanks and regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181230/7f6928be/attachment.html>


More information about the gstreamer-devel mailing list