Posts
1645
Following
90
Followers
151
Riding horses, hacking computers, phones and smartwatch.
@dos As for copies... Yes, I'm currently doing more copies than needed. I measured Librem 5 at about 2GB/sec memory bandwidth, and stream is about 30MB/sec. At 1Mpix/24fps resolution, gstreamer should be able to encode it in real time.

Here's huge problem with v4l, which gives uncached memory buffers to userspace. That means one whole CPU core is dedicated to copying that to "normal" memory. If that is ever solved, yes, other optimalizations are possible. Currently, this means it is not even possible to copy anything bigger than 1Mpix out of the v4l.
0
0
0
@datenwolf Sorry. Example frame is here: https://gitlab.com/tui/debayer-gpu/-/blob/master/test.png?ref_type=heads (You probably want to run pngtopnm it, so that your code only works with uncompressed data).

Alternatively, I started file format for this. https://gitlab.com/tui/tui/-/tree/master/4cc?ref_type=heads dirgen.sh can generate example frames using gstreamer. You get raw data after 128 bytes header.
0
0
0
@datenwolf Example of frame is here: https://gitlab.com/tui/tui/-/blob/master/ucam/bayer2rgb.rs?ref_type=heads (I also have frame generator and real frames captured from libobscura).

Anything that works on Librem 5 is fine, bonus points if I can understand it. Robot generated code using -lEGL -lGLESv2 -lm ... and that builds and does something. Librem 5 reports:

Vendor: etnaviv
Renderer: Vivante GC7000 rev 6214
OpenGL Version: OpenGL ES 2.0 Mesa 21.2.6
GLSL Version: OpenGL ES GLSL ES 1.0.16
1
0
0
@dos @tizilogic I know. And I have "the rest" prototyped here: https://gitlab.com/tui/debayer-gpu/-/blob/master/isp.frg?ref_type=heads But I feel I need fast-enough naive debayering first, so that I can improve that.
0
0
0
@tizilogic @dos I tried simd, https://gitlab.com/tui/tui/-/blob/master/ucam/bayer2rgb.rs?ref_type=heads , it did not have good enough performance. (I could not do 512x384 at 23fps).

GL versions are:
Vendor: etnaviv
Renderer: Vivante GC7000 rev 6214
OpenGL Version: OpenGL ES 2.0 Mesa 21.2.6
GLSL Version: OpenGL ES GLSL ES 1.0.16

Doing input in u8, with output in u8 and internal computation in u16 fixed point should be "good enough". Doing everything in u16 would be even better. Floats are okay, too.
0
0
0
@dos That's problem for future Pavel :-). Right now, I'm storing frames on ramdisk, as "RGB3" basically.
0
0
0
@dos Lets keep the example simple :-). Yes, g = G1+G2/2 is superior, and there are advanced debayer algorithms. I know them. Examples are at https://gitlab.com/tui/debayer-gpu/ . There's just one small problem: It takes minute and I need it to take 10 seconds.
0
0
0
Can you program GPUs and do you want to become a HERO? #linuxphone
community needs your help.

We are trying record video, and have most pieces working, but one is
missing: fast enough debayering. That means about 23MB/sec on #librem5.

Debayering is not hard; camera images have subpixels split on two
lines, which need to be corrected. They also use different color
representation, but that's fixable by some table lookup and two matrix
multiplies.

Librem 5 has Vivante GPU, 4 in-order CPU cores and 3GB RAM. My feeling
is that it should be fast enough for that. If task is for some reason
impossible, that would be good to know, too.

Image data looks like this

RGRGRG...
xBxBxB...
.........
.........

Task is to turn that into usual rgbrgb.... format. rgb = RGB * color
matrix, with table lookups for better quality. I can fix that once I
get an example.

I'm looking for example code (#pinephone would work, too), reasons it
can not be done... and boosts if you have friends that can program
GPUs. #gpu #opensource
4
31
9
Ok, I thought that "Librem 5 GPU is faster than X220 GPU" was a bit too good to be true. Turns out code was broken and simply produced black frames on Wayland... but did that fast. #linuxphone #librem5
0
0
2
So... camera is flakey on Librem 5. It works on _most_ boots in both PureOS and Mobian, as usual. I was unlucky and have non-working app installed on PureOS, which confused me.
0
0
2
@lkundrak Not sure, it got more confusing. Latest youtube news say they are starting to investigate sabotage, too.

Lets see. I still believe aircraft was not fully functional before it hit the ground.
1
0
1
@BeardlyDavid Nah, there are few of those around. They are still best "development board" available for camera development.
1
0
1

Pavel Machek

Did camera support on Librem 5 break with recent PureOS updates? That's bad timing for me :-(. #linuxphone #librem5
1
0
2

Pavel Machek

Jasne ze srst izoluje. Ale vnitrni prostredi ma ~36C a je v nem tepelny zdroj; vnejsi s trochou stesti min. A zvirata na leto linaji, to se asi evoluce spletla... https://www.seznamzpravy.cz/clanek/domaci-zivot-v-cesku-ve-vedru-nebrat-zvire-do-rozpaleneho-auta-a-rozhodne-nezkracovat-srst-280494
0
0
1
@mkyral @piratzbrna Madarsko neni Belorusko (zatim). Za ucast je pouze pokuta... takze zatykani nebude urcite.
1
0
0
@mcepl @stepan "Jus in bello" je ten problem.

Jake nazory drzite uplne nevim, ale treba tohle bych nazval "bezpodminecnou podporou izraele": https://www.seznamzpravy.cz/clanek/domaci-politika-ambasadu-do-jeruzalema-presuneme-rekl-fiala-spor-se-vede-o-bezpecnost-277869 .

A minimalne namestkyne ministra zahranici Izraele dava dost jasne najevo, ze kritizovat Izrael je "bodnuti do zad", "lzive pomluvy": https://www.seznamzpravy.cz/clanek/domaci-politika-cilem-je-uplne-zniceni-izraele-a-vyvrazdeni-vsech-zidu-sveta-rika-politicka-277878
1
0
0
@mcepl @stepan Jasne ze situace na strednim vychode je slozita, a Izrael tam neni zdaleka nejhorsi akter.

Ale zacina byt jasne ze bezpodminecna podpora Izraele neni udrzitelna, a myslim ze za 10 let budeme vedet co se v Gaze deje ted, a nebude se nam to libit. Budou se nas ptat "jak jsme mohli prihlizet vrazdeni civilistu v Gaze" :-(. A tady se zatim debatuje jestli bychom nemeli presunout ambasadu do Jerusalema.
1
0
0
@agx No, you are right, X220 is old hardware. But I like the keyboard and it is powerful enough ... so I use it.

I assumed relative power of CPU, GPU and memory would be approximately similar... and clearly that's not the case. Which is a good thing, 512x384 might be doable on Librem 5's CPUs, but that's really quite low.
0
0
0
Quite scary: yt ChatGPT\ Is\ Becoming\ A\ Religion\ \[zKCynxiV_8I\]. Please do _not_ turn language models into priests, don't make it emulate Jesus or Gods. Its too easy to do, and ... it would be highway to hell if hell actually existed.
0
0
1
Show older