add optimized h264 encoder / OMXPlugin (x264 with gles pipeline)
currently, media codec performance is poor (high cpu usage for copying frames from GPU). plan to optimize this scenario (render on GPU, while encoding with CPU)
For encoding with GPU, some options are available (VAAPI etc.). And this is platform dependent, and users should optimize at their own needs.
当前的redroid-11.0.0 版本, h264编码已完成优化了吗,是否可以支持h264 硬件编码及GPU 渲染?
硬件编码方需要根据平台选择去优化。开源方案 AMD GPU是可以做硬件编码加速的
我们的服务器是AMD 架构的 “5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (buildd@lgw01-amd64-052) ”
但我们的视频通信服务运行的时间mediacodec 进行cpu 利用率较用高达 50%左右;

开源方案 ADM 架构似乎默认没有开启GPU 硬件编码加速, 需要如何开启 呢?
当我尝试使用 redroid.gpu.mode=host 打开 gpu 加速时,收到 如下错误:

是否同时还需要指定 redroid.gpu.node ,当指定 redroid.gpu.node=/dev/dri/card0 时,还是出现surfacelinger 无法启动:
另外, 为什么 我的系统 不存在 /dev/dri/renderDxxx 设备? 只有 card0 device;

mediacodec 开源方案没有做优化,系统没有GPU吧?技术上 Intel / AMD / Nvidia 3D渲染和编解码都可以实现硬件加速
Host 虚拟机应该是有GPU 的呢。 不知为何 容器里的Redroid 访问不到DRM device?
另外, 开源方案的Mediacodec 需要怎么使能硬件编码加速呢, 除了开启GPU 外还需要其它优化,包括哪些点呢?
llvmpipe used, seems no GPU detected.
是的, /dev/dri 目录下没有找到GPU VAAPI 设备文件。我检测一下VAAPI 驱动。

redroid 运行指定[ro.kernel.redroid.gpu.node]: [/dev/dri/renderD128], 但运行是却报EGL-MAIN: failed to open /dev/dri/renderD129: Permission denied, 何故呢?
chmod 666 /dev/dri/renderD129, mode should be changed by gpu_config.sh
Thanks for reply, let me try.
got root cause: my gpu driver is nouveau, it not case in “case $driver in i915|amdgpu|virtio_gpu|v3d|vc4|msm|panfrost)”。
have chmod 666 for /dev/dri/renderD129, now get "failed to open nouveau: dlopen failed: library "/vendor/lib64/dri/nouveau_dri.so" fault, if redroid support nouveau driver?

and how to confirm that gpu is enabled?
nouveau still encounter some issues, thus not enabled.
check via dumpsys SurfaceFlinger | grep GLES
swiftshader or Angle is software based. otherwise GPU is enabled
f000c2aa5ab7:/ # dumpsys SurfaceFlinger | grep GLES GLES: Intel, Mesa Intel(R) UHD Graphics 630 (CML GT2), OpenGL ES 3.2 Mesa 22.0.0-devel
It is seem has enable intel gpu renderer. another two question is: 1, how to use the intel gpu to accelerate h264 encode? 2, I have another nvidia in host, if redroid support nvidia gpu device now?