Hi, maybe someone will find this patch useful. It adds JPEG and H264 encoding to the main Cedrus driver. Both encoders use a stable stateful API, so they can be used with any multimedia software, such as gstreamer, ffmpeg, etc.
gst-launch-1.0 videotestsrc pattern=smpte ! video/x-raw,width=1920,height=1080 ! v4l2h264enc ! h264parse ! matroskamux ! filesink location=test_h264.mkv
gst-launch-1.0 videotestsrc ! v4l2jpegenc ! matroskamux ! filesink location=test_mjpeg.mkv
I tested it on T113 (jpeg) and A40 (jpeg, h264) processors and I think it should work with H3 as well. It doesn't work with 64-bit processors like H616/T507 because their encoders have been updated, and as far as I know, they haven't been reverse-engineered yet.
linux-6.12.28-cedrus-enc.patch