Re: Cedrus -- video encoding on PinePhone?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pavel,

On Fri 02 Sep 22, 15:40, Pavel Machek wrote:
> AFAICT... PinePhone should support hw-accelerated encoding of JPEGs
> and h.264...? But driver is in staging, support for encoding is not
> there, and userland support is partly available for decoding but not
> encoding?

That sums up the situation yes. Also we don't have accelerated JPEG decoding
either although the hardware is there too IIRC.

> I guess that adding the encoding support and the userland stuff is not
> a stuff for weekend? Main camera sensor does have JPEG support, so
> MJPEG video is possible without cedrus, but h.264 should provide
> better compression and there's no JPEG support on selfie camera.

Indeed supporting the encoder is really not an easy task.
There's significant difficulty due to lack of knowledge about the hardware,
but also due to the lack of proper userspace API for stateless encoders.

I gave a talk on this topic some time ago and there should also be a video
(probably on YouTube):
https://bootlin.com/pub/conferences/2020/elce/kocialkowski-supporting-hw-accelerated-video-encoding-with-mainline/kocialkowski-supporting-hw-accelerated-video-encoding-with-mainline.pdf

Encoding in MJPEG doesn't seem very viable, or maybe only for very short clips.
Also note that a big factor for encoding videos from cameras is the reduction
of noise: the usual level of noise coming out of the sensor makes it very
difficult to get reasonable compression rates.

On Allwinner there's an ISP that can be used for denoising in real-time.
I've been writing a driver for it, which is currently under review and will make
it to the mainline tree eventually. I've only tested it with Bayer input, but
the hardware should also support YUV input. Denoising is also supported in the
driver. There are lots of other blocks that are currently not supported though.

See this talk on the general topic of the ISP:
https://bootlin.com/pub/conferences/2021/elc/kocialkowski-advanced-camera-support-allwinner-socs-mainline-linux/kocialkowski-advanced-camera-support-allwinner-socs-mainline-linux.pdf

I hope that gives you enough pointers to have a clear idea of the situation!

Feel free to let me know if you have follow-up questions!

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux