Conversation

A big thanks to Megapixels contributors :)
https://blog.brixit.nl/megapixels-contributions/

2
5
2

@martijnbraam Do I understand correctly that you are using Gstreamer for encoding? In that case it might be worth checking out https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5676 which implements HW encoding. Getting that over the line could be a big deal here - and for other apps like Snapshot or Dino as well.

1
0
0

@rmader that is the idea yes, gstreamer will make integrating the HW encoders a lot easier.

For the pinephone I need cedrus though, not hantro. Looks like there's a bit more work happening on the hantro side so thats good for the PPP at least.

1
0
0

@martijnbraam Also the librem5 if I'm not mistaken. I also hope it will just be compatible with cedrus though - the h264 decoder seem to work somewhat well here, even though we'll need to support more tiling modes / drm modifiers in Gst to make it really fast.
Don't know about the kernel side of the encoder though - do you know if it generally works?

1
0
0

@rmader as far as I know for cedrus there's only some support for decoding H264. And not all H264 profiles even. It has been a while since I looked it up though.

0
0
0
@martijnbraam Thanks for the writeup :-). There's still more work to do, frames are being dropped in the C code on my pinephone way too often. That needs to be solved before we know what kind of performance is possible.
1
0
2

@pavel I wonder if it's possible to skip disk I/O between the megapixels and the movie postprocessor altogether by just feeding the frames over stdin. A lot of small things still to optimize :)

1
0
1
@martijnbraam If we really wanted to optimize it, we should make dmabufs cacheable and then pass those around. But I'm afraid that would mean less nice code :-(. Cacheability would help a _lot_, passing memory around would be theoretically nice but not that much of a win I believe.
1
0
2

@pavel If I wanted to have nice code it would be way slower already. In theory it would even be possible to hook up the CSI block of the A64 to the cedrus block directly to have the video encoder work without using cpu at all. but that would be very platform dependent and that's also very undocumented.

0
0
0