Hello.
$ dmesg | grep cedar
[ 6.149956] sunxi cedar version 0.1
[ 6.150347] [cedar]: install start!!!
[ 6.150579] cedar_ve: cedar-ve the get irq is 55
[ 6.150638] sunxi-cedar 1c0e000.video-engine: assigned reserved memory node cma@4a000000
[ 6.265098] [cedar]: memory allocated at address PA: 4B200000, VA: CB200000
[ 6.265112] [cedar]: install end!!!
$ ls -l /dev/cedar_dev
crw------- 1 root root 150, 0 Jun 8 03:18 /dev/cedar_dev
$ ./ffmpeg.old -codecs | grep 264
ffmpeg version git-2015-01-22-f86a076 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 7 2022 13:36:59 with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2
libavutil 54. 6.100 / 54. 6.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 2.100 / 56. 2.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.102 / 5. 0.102
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb cedrus264 )
And everything seems to run, for example, on some rtsp server (whether I take mjpeg or h264 from the camera does not matter)
# ./ffmpeg.old -f v4l2 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -c:v cedrus264 -x264-params keyint=30 -pix_fmt nv12 -preset ultrafast -b:v 1M -f rtsp -rtsp_transport tcp rtsp://…
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 3390538.306844, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[swscaler @ 0xf41700] deprecated pixel format used, make sure you did set range correctly
[VDPAU SUNXI] VE version 0x1680 opened.
[rtp @ 0xf618c0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Output #0, rtsp, to 'rtsp://...':
Metadata:
encoder : Lavf56.2.100
Stream #0:0: Video: h264 (cedrus264), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc56.0.101 cedrus264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (cedrus264))
Of course, I see a significant reduction in CPU load compared to using libx264, BUT I just get a decadent fps of about 5 frames per second and at the same time there is still a green stripe at the bottom along the entire video all the time.
Perhaps my SoC just can't do it anymore, but I did parallel decoding and encoding on the libav api from ffmpeg and get about 10 fps for mjpeg and about 19 fps for h264, while the picture does not hang statically with artifacts (not taking into account transmission losses).
PLEASE tell me at least the direction is it possible to somehow hardware speed up and improve video quality?
I am currently using ffmpeg version 5, so I have an idea to transfer the codec, does this make sense in the context of the previous question?