Frame UV offset compensation

Nicolas Dufresne nicolas at ndufresne.ca
Sun Dec 30 20:02:22 UTC 2018


Le sam. 29 déc. 2018 21 h 42, Adam Langley <linux at irisdesign.co.nz> a
écrit :

> 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://github.com/rockchip-linux/gstreamer-rockchip/issues/41
> <https://u2567673.ct.sendgrid.net/wf/click?upn=hC2JwqNsdBh9BS8WbREWdiWclL-2B2zmflKmLpohiGoQ8-2FIyPBMI5clQaG6qa5PC-2BeXfid60daIIgC6LA5tkludNDd4WXFJwPzCFaxZklqTPE-3D_SqM5JSCW4zvvQIaoW1CDvMIem8taQSUrkrbhR3x77XRu7BshtfhBNpLhgP2ozglLAUJbeCuN9-2FsiT6CVPGBOf49SaSH-2FaGA2qt7JXCU4VHhu3l9hWNt-2FGkKuDJS56N8N0oBeddY-2BvDViCopQ-2B1on-2Ffw6v8QwGGh47muO-2FDkBVaUAXS1p-2Bj26OC46wHwmofos0k23O5NqBjD0OWw1i9D5yQfIcCo0Y0D6dvtrWSeoGE3CnL0QQnjOXmMTQOajq1f3>,
> 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?
>

videoscale uses gst_video_frame_map() to access the memory pointer,  so it
does account for this. It is likely a bug in the respective decoder or
firmware.


> Thanks and regards
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181230/3080de16/attachment.html>


More information about the gstreamer-devel mailing list