<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I have an MJPG web camera which I need to capture, decode, and scale the output.</div><div>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.</div><div>I have noticed this in both the omxmjpegdec of the Raspberry Pi, and the mppjmpegdec of the Rockchip 3288 (tinkerboard).</div><div>When pulling 1920*1080 frames, the UV plane offset is at a stride of 1088 rather than 1080.</div><div><br></div><div>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.</div><div>You can see my post here <a href="https://u2567673.ct.sendgrid.net/wf/click?upn=hC2JwqNsdBh9BS8WbREWdiWclL-2B2zmflKmLpohiGoQ8-2FIyPBMI5clQaG6qa5PC-2BeXfid60daIIgC6LA5tkludNDd4WXFJwPzCFaxZklqTPE-3D_SqM5JSCW4zvvQIaoW1CDvMIem8taQSUrkrbhR3x77XRu7BshtfhBNpLhgP2ozglLAUJbeCuN9-2FsiT6CVPGBOf49SaSH-2FaGA2qt7JXCU4VHhu3l9hWNt-2FGkKuDJS56N8N0oBeddY-2BvDViCopQ-2B1on-2Ffw6v8QwGGh47muO-2FDkBVaUAXS1p-2Bj26OC46wHwmofos0k23O5NqBjD0OWw1i9D5yQfIcCo0Y0D6dvtrWSeoGE3CnL0QQnjOXmMTQOajq1f3">https://github.com/rockchip-linux/gstreamer-rockchip/issues/41</a>, 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.</div><div>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.</div><div><br></div><div>Is there an element that can 'repack' the frame to remove the offset? Or another simple, yet processor efficient way to handle this?</div><div><br></div><div>Thanks and regards</div></div></div>
<img src="https://u2567673.ct.sendgrid.net/wf/open?upn=SqM5JSCW4zvvQIaoW1CDvMIem8taQSUrkrbhR3x77XRu7BshtfhBNpLhgP2ozglLAUJbeCuN9-2FsiT6CVPGBOf-2F3lL61QF6RjnFzzvjyNdmvfClqNPwMHhen80C3hmMGMDbimOE6JlJllVaiMOF06lB6TtD9EHRtjLFlWFKACj08KVmyYt4um2e3pvhQSIlxMivBI1GQisJmtHCCSOLUSkkfCItzffX43uR6OZYxqodqmwnnYt5id3p6f0pPx97ns" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>