To be clear, the buffer suggested for vid_get_viewport_fb_d in that thread is implemented in the current svn
G7X code.
I want to modify the image shown: for instance show a stereo pair using side by side or anaglyph or do some image processing on the image, like sharpen it. This used to be possible in CHDK.
You mean in custom code you wrote? It has certainly never been a feature of mainline CHDK, and I don't recall ever seeing source for such a feature.
I can write to the buffer vid_get_viewport_fb_d(). This works fine (at least the buffer can be modified, I am not sure of the colors) for every second displayed image.
What do you mean by "full color". For the bitmap?
In cameras before digic 6, the canon UI used a paletted display, with 256 (or less) possible colors, so displaying something like a camera jpeg was not practical. In digic6, it's a full UYVY in the same format as the viewport, plus an alpha buffer.
Is the viewport encoding not UYVY 4 bytes for 2 pixels? Is the color a different format from the old UYVYYY format? I think I am seeing this.
Yes, it's UYVY (two Y values per UV pair rather than 4). For most buffers (the viewport and bitmap used by the G7X) port, it is also in a different format: you have to subtract 0x80 from the U and V values when converting to RGB.
Reading up through some of the general digic 6 related threads might save you some time.
Thread about digic 6 display
https://chdk.setepontos.com/d/12788
sx280 porting thread (first digic 6 port, by srsa_4c)
https://chdk.setepontos.com/d/11550
General CHDK/D6
https://chdk.setepontos.com/d/11316 (old, might want to start at the end)
Discussion of PTP live view in chdkptp (starting around
https://chdk.setepontos.com/d/6231/849, recently added to trunk
https://chdk.setepontos.com/d/6231/895)