The datastride parameter refers to the stride in the source data, if you get that wrong the whole image will be off, not just some channels on the right hand side, and the OP says the image is fine with the the different ordering of pixel data. The stride of the screen is of no concern as OpenVG knows what stride the screen is and doesn't give you any option to pass your own value.LdB wrote: ↑Thu Jan 25, 2018 4:49 amIt looks like line to line pitch is out .. which you will be using for datastride in vgWritePixels.
The worst is 1366x768 the Pi screen line to line pitch is 1376 so there is 10 whole pixel offset it you expect it to be 1366 * 4 bytes wide it isn't its 1376*4 bytes wide. Yours looks like 1 pixel or 1.5 pixels and so it's rolling in and out of synch.
It all revolves around wanting to keep neat alignment on the VC4 stride from line to line.
From memory ask it "bytesForImageScanline" in the vg utils for the surface you have.
Users browsing this forum: PalfiZsolt and 1 guest