shiyinghan / UVCAndroid

Apache License 2.0
213 stars 58 forks source link

1080p的分辨率帧率在10左右,如何提高帧率 #71

Open xiaohua717 opened 4 months ago

xiaohua717 commented 4 months ago

我翻查代码,在这个文件libuvccamera/src/main/jni/UVCCamera/UVCPreview.cpp的函数void UVCPreview::do_preview(uvc_stream_ctrl_t *ctrl)的循环体内,如果传输格式是MJPEG,那调用的函数uvc_mjpeg2yuyvdraw_preview_one,在分辨率1080p以上,耗时是50ms以上,720p耗时是30ms以下,要达到30帧的帧率,必须每一帧的处理时间必须在32ms以内,这里有什么办法优化吗? 我试过把libjpeg-turbo版本升级到3.0.4,效果不明显。

xiaohua717 commented 4 months ago
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 12.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0

processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 12.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0

processor       : 2
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 12.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0

processor       : 3
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 12.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0

我硬件平台参数如上,是支持NEON技术,libjpeg-turbo怎么确定是否真的开启了SIMD技术?

Qdafengzi commented 1 month ago

有大佬解决的吗? @xiaohua717

tomjeans commented 4 weeks ago

不回调的话 直接转rgbx