当前位置: 首页 > news >正文

RK356X 解除UVC摄像头预览分辨率1080P限制

平台

  RK3566 + Android 11

概述

在这里插入图片描述

    UVC:
USB video class(又称为USB video device class or UVC)就是USB device class视频产品在不需要安装任何的驱动程序下即插即用,包括摄像头、数字摄影机、模拟视频转换器、电视卡及静态视频相机。

测试代码:

	Camera cam = Camera.open(CAMERA_ID);Camera.Parameters param = cam.getParameters();List<Camera.Size> sizes = param.getSupportedPreviewSizes();

打印出来后显示支持的预览分辨率如下:

D  startPreview support preview 640x360
D  startPreview support preview 640x480
D  startPreview support preview 960x540
D  startPreview support preview 800x600
D  startPreview support preview 1280x720
D  startPreview support preview 1280x960
D  startPreview support preview 1920x1080
D  startPreview support preview 1600x1200

然而,把摄像头接入到PC上,不管是LINUX还是WINDOWS,会发现实际支持的最大预览分辨率是:3840x2160
缺少的分辨率哪去了?

分析

摄像头部分的架构比较复杂,整理几个相关的源码目录:

# SDK 接口
> frameworks/base/core/java/android/hardware/Camera.java
> frameworks/base/core/jni/android_hardware_Camera.cpp# 上层 Camera 服务
> frameworks/av/camera/# HAL层
> hardware/rockchip/camera
> hardware/interfaces/camera/# 配置文件,对应USB和CSI之类的摄像头配置
# 包含了支持分辨率,闪光灯等等的一些特性。
> device/rockchip/common/external_camera_config.xml
> hardware/rockchip/camera/etc/camera/

烧录到主板后相关的一些文件目录

> rk3568_r:/ # ll /vendor/etc/camera/                                                                                  
total 948
-rw-r--r-- 1 root root    3044 2023-04-18 09:55 README.txt
-rw-r--r-- 1 root root  152818 2023-04-18 09:55 camera3_profiles.xml
-rw-r--r-- 1 root root  166244 2023-04-18 09:55 camera3_profiles_default.xml
-rw-r--r-- 1 root root   14744 2023-04-18 09:55 camera3_profiles_rk1126.xml
-rw-r--r-- 1 root root   48811 2023-04-18 09:55 camera3_profiles_rk3126c.xml
-rw-r--r-- 1 root root   64987 2023-04-18 09:55 camera3_profiles_rk3288.xml
-rw-r--r-- 1 root root   61800 2023-04-18 09:55 camera3_profiles_rk3326.xml
-rw-r--r-- 1 root root   98549 2023-04-18 09:55 camera3_profiles_rk3368.xml
-rw-r--r-- 1 root root   64766 2023-04-18 09:55 camera3_profiles_rk3399.xml
-rw-r--r-- 1 root root   26451 2023-04-18 09:55 camera3_profiles_rk3399_1608.xml
-rw-r--r-- 1 root root   77820 2023-04-18 09:55 camera3_profiles_rk3399pro.xml
-rw-r--r-- 1 root root  152818 2023-04-18 09:55 camera3_profiles_rk356x.xml
-rw-r--r-- 1 root root    2875 2023-04-18 09:55 graph_descriptor.xml
-rw-r--r-- 1 root root     145 2023-04-18 09:55 reset_camera.sh
drwxr-xr-x 2 root shell   4096 2023-04-18 09:55 rkisp1
drwxr-xr-x 2 root shell   4096 2023-04-18 09:55 rkisp2# UVC 的配置
> /vendor/etc/external_camera_config.xml

先用v4l2 工具看下基本信息

## 当前的设备列表
rk3566:/ # ll /dev/video*                                                                                            
crw-rw---- 1 media camera 81,   0 2023-04-14 09:44 /dev/video0
crw-rw---- 1 media camera 81,   1 2023-04-14 09:44 /dev/video1
crw-rw---- 1 media camera 81,  10 2023-04-14 09:44 /dev/video10
crw-rw---- 1 media camera 81,  11 2023-04-14 09:44 /dev/video11
crw-rw---- 1 media camera 81,  12 2023-04-14 09:44 /dev/video12
crw-rw---- 1 media camera 81,  13 2023-04-14 09:44 /dev/video13
crw-rw---- 1 media camera 81,  14 2023-04-14 09:44 /dev/video14
crw-rw---- 1 media camera 81,  15 2023-04-14 09:44 /dev/video15
crw-rw---- 1 media camera 81,   2 2023-04-14 09:44 /dev/video2
crw-rw---- 1 media camera 81,   3 2023-04-14 09:44 /dev/video3
crw-rw---- 1 media camera 81,   4 2023-04-14 09:44 /dev/video4
crw-rw---- 1 media camera 81,   5 2023-04-14 09:44 /dev/video5
crw-rw---- 1 media camera 81,   6 2023-04-14 09:44 /dev/video6
crw-rw---- 1 media camera 81,   7 2023-04-14 09:44 /dev/video7
crw-rw---- 1 media camera 81,   8 2023-04-14 09:44 /dev/video8
crw-rw---- 1 media camera 81,   9 2023-04-14 09:44 /dev/video9# 设备信息
rk3566_r:/ # v4l2-ctl --list-devices                                                                                 
rkisp-statistics (platform: rkisp):/dev/video12/dev/video13rkcif (platform:rkcif_mipi_lvds):/dev/video0/dev/video1/dev/video2/dev/video3/dev/video4rkisp_mainpath (platform:rkisp-vir0):/dev/video5/dev/video6/dev/video7/dev/video8/dev/video9/dev/video10/dev/video11UC40A Audio: UC40A Video (usb-xhci-hcd.1.auto-1.3):/dev/video14/dev/video15# 查看指定设备信息
rk3566_r:/ # v4l2-ctl -D -d /dev/video15                                                                             
Driver Info:Driver name      : uvcvideoCard type        : UC40A Audio: UC40A VideoBus info         : usb-xhci-hcd.1.auto-1.3Driver version   : 4.19.193Capabilities     : 0x84a00001Video CaptureMetadata CaptureStreamingExtended Pix FormatDevice CapabilitiesDevice Caps      : 0x04a00000Metadata CaptureStreamingExtended Pix Format
Media Driver Info:Driver name      : uvcvideoModel            : UC40A Audio: UC40A VideoSerial           : 01.00.00Bus info         : usb-xhci-hcd.1.auto-1.3Media version    : 4.19.193Hardware revision: 0x00000902 (2306)Driver version   : 4.19.193
Interface Info:ID               : 0x03000005Type             : V4L Video
Entity Info:ID               : 0x00000004 (4)Name             : UC40A Audio: UC40A VideoFunction         : V4L2 I/O# 设备支持格式
rk3566_r:/ # v4l2-ctl -d /dev/video14  --list-formats                                                                
ioctl: VIDIOC_ENUM_FMTIndex       : 0Type        : Video CapturePixel Format: 'MJPG' (compressed)Name        : Motion-JPEGIndex       : 1Type        : Video CapturePixel Format: 'YUYV'Name        : YUYV 4:2:2# 设备支持分辨率
rk3566_r:/ # v4l2-ctl -d /dev/video14  --list-framesizes=YUYV                                                        
ioctl: VIDIOC_ENUM_FRAMESIZESSize: Discrete 2048x1536Size: Discrete 640x480Size: Discrete 3840x2160Size: Discrete 2592x1944Size: Discrete 2688x1512Size: Discrete 1920x1080Size: Discrete 1600x1200Size: Discrete 1280x960Size: Discrete 1280x720Size: Discrete 960x540Size: Discrete 800x600Size: Discrete 640x360

结论:硬件及驱动到HAL都是正常


忽略中间漫长的排查过程, 直奔主题:
预览的限制主要存在于HAL和framework层, 至少RK的SDK是这样的,其他平台请勿对号入座。

  1. HAL

/vendor/etc/external_camera_config.xml 中的 FpsList
注释:List of maximum fps for various output sizes
解决的方法是增加对应缺少的分辨率,如:<Limit width=“3840” height=“2160” fpsBound=“30.0” />

<ExternalCamera><Provider><ignore> <!-- Internal video devices to be ignored by external camera HAL --><!-- <id>0</id> -->  <!-- No leading/trailing spaces --></ignore></Provider><!-- See ExternalCameraUtils.cpp for default values of Device configurations below--><Device><!-- Max JPEG buffer size in bytes--><MaxJpegBufferSize  bytes="24883200"/>  <!-- 3MB (~= 1080p YUV420) --><!-- Size of v4l2 buffer queue when streaming >= 30fps --><!-- Larger value: more request can be cached pipeline (less janky) --><!-- Smaller value: use less memory --><NumVideoBuffers  count="4"/><!-- Size of v4l2 buffer queue when streaming < 30fps --><NumStillBuffers  count="2"/><!-- List of maximum fps for various output sizes --><!-- Any image size smaller than the size listed in Limit row will reportfps (as minimum frame duration) up to the fpsBound value. --><FpsList><!-- width/height must be increasing, fpsBound must be decreasing--><Limit  width="176" height="144" fpsBound="60.0" /><Limit  width="176" height="144" fpsBound="30.0" /><Limit  width="176" height="144" fpsBound="20.0" /><Limit  width="176" height="144" fpsBound="15.0" /><Limit  width="320" height="240" fpsBound="60.0" /><Limit  width="320" height="240" fpsBound="30.0" /><Limit  width="320" height="240" fpsBound="20.0" /><Limit  width="320" height="240" fpsBound="15.0" /><Limit  width="352" height="288" fpsBound="30.0" /><Limit  width="352" height="288" fpsBound="20.0" /><Limit  width="352" height="288" fpsBound="15.0" /><Limit  width="640" height="480" fpsBound="60.0" /><Limit  width="640" height="480" fpsBound="30.0" /><Limit  width="640" height="480" fpsBound="20.0" /><Limit  width="640" height="480" fpsBound="15.0" /><Limit  width="640" height="480" fpsBound="10.0" /><Limit  width="800" height="600" fpsBound="30.0" /><Limit  width="800" height="600" fpsBound="20.0" /><Limit  width="800" height="600" fpsBound="15.0" /><Limit  width="1024" height="768" fpsBound="30.0" /><Limit  width="1024" height="768" fpsBound="20.0" /><Limit  width="1024" height="768" fpsBound="15.0" /><Limit  width="1024" height="768" fpsBound="10.0" /><Limit  width="1280" height="720" fpsBound="60.0" /><Limit  width="1280" height="720" fpsBound="30.0" /><Limit  width="1280" height="720" fpsBound="20.0" /><Limit  width="1280" height="720" fpsBound="15.0" /><Limit  width="1280" height="720" fpsBound="10.0" /><Limit  width="1280" height="800" fpsBound="30.0" /><Limit  width="1280" height="800" fpsBound="20.0" /><Limit  width="1280" height="800" fpsBound="15.0" /><Limit  width="1280" height="960" fpsBound="30.0" /><Limit  width="1280" height="960" fpsBound="20.0" /><Limit  width="1280" height="960" fpsBound="15.0" /><Limit  width="1280" height="1024" fpsBound="30.0" /><Limit  width="1280" height="1024" fpsBound="20.0" /><Limit  width="1280" height="1024" fpsBound="15.0" /><Limit  width="1600" height="1200" fpsBound="30.0" /><Limit  width="1600" height="1200" fpsBound="15.0" /><Limit  width="1920" height="1080" fpsBound="30.0" /><Limit  width="1920" height="1080" fpsBound="15.0" /><Limit  width="2048" height="1536" fpsBound="30.0" /><Limit  width="2592" height="1944" fpsBound="30.0" /><Limit  width="2592" height="1944" fpsBound="15.0" /><Limit  width="2592" height="1944" fpsBound="10.0" /><Limit  width="2592" height="1944" fpsBound="5.0" /><Limit  width="2688" height="1512" fpsBound="30.0" /><Limit  width="3840" height="2160" fpsBound="30.0" /><!-- image size larger than the last entry will not be supported--></FpsList><!-- orientation --><Orientation  degree="90"/></Device>
</ExternalCamera>

hardware/interfaces/camera/device/3.4/default/RgaCropScale.cpp

diff --git a/hardware/interfaces/camera/device/3.4/default/RgaCropScale.cpp b/hardware/interfaces/camera/device/3.4/default/RgaCropScale.cpp
index 23d018fb6d..4829d1d664 100644
--- a/hardware/interfaces/camera/device/3.4/default/RgaCropScale.cpp
+++ b/hardware/interfaces/camera/device/3.4/default/RgaCropScale.cpp
@@ -21,21 +21,21 @@namespace android {namespace camera2 {-#if (defined(TARGET_RK32) || defined(TARGET_RK3368))
+//#if (defined(TARGET_RK32) || defined(TARGET_RK3368))#define RGA_VER (2.0)#define RGA_ACTIVE_W (4096)#define RGA_VIRTUAL_W (4096)#define RGA_ACTIVE_H (4096)#define RGA_VIRTUAL_H (4096)-#else
-#define RGA_VER (1.0)
-#define RGA_ACTIVE_W (2048)
-#define RGA_VIRTUAL_W (4096)
-#define RGA_ACTIVE_H (2048)
-#define RGA_VIRTUAL_H (2048)
+//#else
+//#define RGA_VER (1.0)
+//#define RGA_ACTIVE_W (2048)
+//#define RGA_VIRTUAL_W (4096)
+//#define RGA_ACTIVE_H (2048)
+//#define RGA_VIRTUAL_H (2048)-#endif
+//#endif

这部分不修改会导致以下问题:

and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  I  uid=1047(cameraserver) ExtCamOut identical 2 lines
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
com...d.quickpreview  I  Background concurrent copying GC freed 306(35KB) AllocSpace objects, 3(35MB) LOS objects, 48% free, 25MB/49MB, paused 862us total 143.804ms
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...er@2.1-service  I  [File] : hardware/rockchip/libgralloc/bifrost/src/core/mali_gralloc_formats.cpp; [Line] : 1858; [Func] : rk_gralloc_select_format;AFBC IS disabled for fb_target_layer.
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  I  uid=1047(cameraserver) ExtCamOut identical 2 lines
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  D  @debugShowFPS(1171): Camera 2176 Frames, 30.105 FPS
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  I  uid=1047(cameraserver) ExtCamOut identical 2 lines
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...er@2.1-service  I  [File] : hardware/rockchip/libgralloc/bifrost/src/core/mali_gralloc_formats.cpp; [Line] : 1858; [Func] : rk_gralloc_select_format;AFBC IS disabled for fb_target_layer.
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...ternal-service  I  uid=1047(cameraserver) ExtCamOut identical 4 lines
and...ternal-service  E  (dst_width > RGA_VIRTUAL_W) || (dst_height > RGA_VIRTUAL_H), switch to arm 
and...er@2.1-service  I  [File] : hardware/rockchip/libgralloc/bifrost/src/core/mali_gralloc_formats.cpp; [Line] : 1858; [Func] : rk_gralloc_select_format;AFBC IS disabled for fb_target_layer.
  1. Framework

frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.h
上层接口解除1080P的限制.

diff --git a/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.h b/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.h
index 3a709c9791..2ee332a8c8 100644
--- a/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.h
+++ b/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.h
@@ -199,11 +199,11 @@ struct Parameters {// Max preview size allowed// This is set to a 1:1 value to allow for any aspect ratio that has// a max long side of 1920 pixels
-    static const unsigned int MAX_PREVIEW_WIDTH = 1920;
-    static const unsigned int MAX_PREVIEW_HEIGHT = 1920;
+    static const unsigned int MAX_PREVIEW_WIDTH = 3840;
+    static const unsigned int MAX_PREVIEW_HEIGHT = 2160;// Initial max preview/recording size bound
-    static const int MAX_INITIAL_PREVIEW_WIDTH = 1920;
-    static const int MAX_INITIAL_PREVIEW_HEIGHT = 1080;
+    static const int MAX_INITIAL_PREVIEW_WIDTH = 3840;
+    static const int MAX_INITIAL_PREVIEW_HEIGHT = 2160;// Aspect ratio tolerancestatic const CONSTEXPR float ASPECT_RATIO_TOLERANCE = 0.001;// Threshold for slow jpeg mode

编译验证

# 编译
mmm hardware/interfaces/camera/device/3.4/default/
# push 到主板
#adb push out/target/product/rk3566_r/vendor/lib64/hw/camera.rk30board.so /vendor/lib64/hw/
#adb push out/target/product/rk3566_r/vendor/lib/hw/camera.rk30board.so /vendor/lib/hw/
adb push out/target/product/rk3566_r/vendor/lib/camera.device@3.4-external-impl.so /vendor/lib/
adb push out/target/product/rk3566_r/vendor/lib64/camera.device@3.4-external-impl.so /vendor/lib64/# 编译
mmm /disk4/anson/rk3568_a11/frameworks/av/services/camera/libcameraservice/:libcameraservice
adb push out/target/product/rk3566_r/system/lib/libcameraservice.so  /system/lib/
adb push out/target/product/rk3566_r/system/lib64/libcameraservice.so /system/lib64/

小插曲

RK的Linux 烧录工具

# 低版本可以烧录 system.img
# -s system.img
# 新版本的SDK中,烧录super.img
Linux_Upgrade_Tool_v1.65/upgrade_tool DI -super super.img# 烧录完整固件
Linux_Upgrade_Tool_v1.65/upgrade_tool UF update.img

参考

Ubuntu下查看usb摄像头不同压缩格式支持的分辨率

相关文章:

RK356X 解除UVC摄像头预览分辨率1080P限制

平台 RK3566 Android 11 概述 UVC&#xff1a; USB video class&#xff08;又称为USB video device class or UVC&#xff09;就是USB device class视频产品在不需要安装任何的驱动程序下即插即用&#xff0c;包括摄像头、数字摄影机、模拟视频转换器、电视卡及静态视频相机…...

English Learning - L2-14 英音地道语音语调 重音技巧 2023.04.10 周一

English Learning - L2-14 英音地道语音语调 重音技巧 2023.04.10 周一 课前热身重音日常表达节奏单词全部重读的句子间隔时间非重读单词代词和缩约词助动词声临其境语调预习 课前热身 学习目标 重音 重弱突出&#xff0c;重音突出核心表达的意思 重音是落在重读单词上&…...

3.6 n维随机变量

学习目标&#xff1a; 学习n维随机变量需要掌握一定的数学知识&#xff0c;包括多元微积分、线性代数和概率论等。要学习n维随机变量&#xff0c;我会采取以下步骤&#xff1a; 复习相关的数学知识&#xff1a;首先&#xff0c;我会复习多元微积分、线性代数和概率论的基本知…...

JavaSE学习进阶day06_02 Set集合和Set接口

第二章 Set系列集合和Set接口 Set集合概述&#xff1a;前面学习了Collection集合下的List集合&#xff0c;现在继续学习它的另一个分支&#xff0c;Set集合。 set系列集合的特点&#xff1a; Set接口&#xff1a; java.util.Set接口和java.util.List接口一样&#xff0c;同样…...

基于matlab分析卫星星座对通信链路的干扰

一、前言 此示例说明如何分析从中地球轨道 &#xff08;MEO&#xff09; 中的卫星星座到位于太平洋的地面站的下行链路上的干扰。干扰星座由低地球轨道&#xff08;LEO&#xff09;的40颗卫星组成。此示例确定下行链路闭合的时间、载波噪声加干扰比以及链路裕量。 此示例需要卫…...

Python中的异常——概述和基本语法

Python中的异常——概述和基本语法 摘要&#xff1a;Python中的异常是指在程序运行时发生的错误情况&#xff0c;包括但不限于除数为0、访问未定义变量、数据类型错误等。异常处理机制是Python提供的一种解决这些错误的方法&#xff0c;我们可以使用try/except语句来捕获异常并…...

Tomcat 部署与优化

1. Tomcat概述 Tomcat是Java语言开发的&#xff0c;Tomcat服务器是一个免费的开放源代码的Web应用服务器&#xff0c;是Apache软件基金会的Jakarta项目中的一个核心项目&#xff0c;由Apache、Sun和其他一些公司及个人 共同开发而成。Tomcat属于轻量级应用服务器&#xff0c;在…...

多模态之论文笔记ViLT

文章目录 ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision一. 简介1.1 摘要1.2 文本编码器&#xff0c;图像编码器&#xff0c;特征交互复杂度分析1.2 特征交互方式分析1.3 图像特征提取分析 二. 方法 Vision-and-Language Transformer2.1.方…...

微服务架构下认证和鉴权理解

认证和鉴权 从单体应用到微服务架构&#xff0c;优势很多&#xff0c;但是并不是代表着就没有一点缺点了。 微服务架构&#xff0c;意味着每个服务都是松散耦合的。因此&#xff0c;作为软件工程师和架构师&#xff0c;我们在分布式架构中面临着安全挑战。微服务对外开放的端…...

Qt 网络编程之美:探索 URL、HTTP、服务发现与请求响应

Qt 网络编程之美&#xff1a;探索 URL、HTTP、服务发现与请求响应&#xff08;The Beauty of Qt Network Programming: Exploring URL, HTTP, Service Discovery, and Request-Response 引言&#xff08;Introduction&#xff09;QUrl 类&#xff1a;构建和解析 URL&#xff08…...

毕业2年,跳槽到下一个公司就25K了,厉害了···

本人本科就读于某普通院校&#xff0c;毕业后通过同学的原因加入软件测试这个行业&#xff0c;角色也从测试小白到了目前的资深工程师&#xff0c;从功能测试转变为测试开发&#xff0c;并顺利拿下了某二线城市互联网企业的Offer&#xff0c;年薪 30W 。 选择和努力哪个重要&a…...

设计模式 -- 适配器模式

前言 月是一轮明镜,晶莹剔透,代表着一张白纸(啥也不懂) 央是一片海洋,海乃百川,代表着一块海绵(吸纳万物) 泽是一柄利剑,千锤百炼,代表着千百锤炼(输入输出) 月央泽,学习的一种过程,从白纸->吸收各种知识->不断输入输出变成自己的内容 希望大家一起坚持这个过程,也同…...

STM32之增量式编码器电机测速

STM32之增量式编码器电机测速 编码器编码器种类按监测原理分类光电编码器霍尔编码器 按输出信号分类增量式编码器绝对式编码器 编码器参数分辨率精度最大响应频率信号输出形式 编码器倍频 STM32的编码器模式编码器模式编码器的计数方向仅在TI1计数电机正转&#xff0c;向上计数…...

一图看懂 xlsxwriter 模块:用于创建 Excel .xlsx 文件, 资料整理+笔记(大全)

本文由 大侠(AhcaoZhu)原创&#xff0c;转载请声明。 链接: https://blog.csdn.net/Ahcao2008 一图看懂 xlsxwriter 模块&#xff1a;用于创建 Excel .xlsx 文件, 资料整理笔记&#xff08;大全&#xff09; 摘要模块图类关系图模块全展开【xlsxwriter】统计常量模块1 xlsxwrit…...

【社区图书馆】NVMe协议的命令

声明 主页:元存储的博客_CSDN博客 依公开知识及经验整理,如有误请留言。 个人辛苦整理,付费内容,禁止转载。 内容摘要 前言 命令由host提交到内存中的SQ队列中,更新TDBxSQ后,NVMe控制器通过DMA的方式将SQ中的命令(怎么取,如何取,取多少,因设计而异)取到控制器缓冲区…...

Nginx网站服务

Nginx概述 Nginx 是开源、高性能、高可靠、低资源消耗的 Web 和反向代理服务器&#xff0c;而且支持热部署&#xff0c;几乎可以做到 7 * 24 小时不间断运行&#xff0c;即使运行几个月也不需要重新启动&#xff0c;还能在不间断服务的情况下对软件版本进行热更新。对HTTP并发…...

第八篇 Spring 集成JdbcTemplate

《Spring》篇章整体栏目 ————————————————————————————— 【第一章】spring 概念与体系结构 【第二章】spring IoC 的工作原理 【第三章】spring IOC与Bean环境搭建与应用 【第四章】spring bean定义 【第五章】Spring 集合注入、作用域 【第六章】…...

双塔模型:微软DSSM模型浅析

1.背景 DSSM是Deep Structured Semantic Model (深层结构语义模型) 的缩写&#xff0c;即我们通常说的基于深度网络的语义模型&#xff0c;其核心思想是将query和doc映射到到共同维度的语义空间中&#xff0c;通过最大化query和doc语义向量之间的余弦相似度&#xff0c;从而训…...

DAY 44 Apache网页优化

Apache网页优化 概述 在企业中&#xff0c;部署Apache后只采用默认的配置参数&#xff0c;会引发网站很多问题&#xff0c;换言之默认配置是针对以前较低的服务器配置的&#xff0c;以前的配置已经不适用当今互联网时代 为了适应企业需求&#xff0c;就需要考虑如何提升Apach…...

移动端手机网页适配iPad与折叠屏设备

采用的网页适配方案&#xff1a;移动端页面px布局适配方案&#xff08;viewport&#xff09; 产生此问题的原因 由于手机与平板等设备宽高比差异导致页面展示不全或者功能按钮展示在视口之外点击不到。 简单来说就是我们的页面都是瘦长(即高大于宽)的&#xff0c;而折叠屏等设…...

XML Group端口详解

在XML数据映射过程中&#xff0c;经常需要对数据进行分组聚合操作。例如&#xff0c;当处理包含多个物料明细的XML文件时&#xff0c;可能需要将相同物料号的明细归为一组&#xff0c;或对相同物料号的数量进行求和计算。传统实现方式通常需要编写脚本代码&#xff0c;增加了开…...

以下是对华为 HarmonyOS NETX 5属性动画(ArkTS)文档的结构化整理,通过层级标题、表格和代码块提升可读性:

一、属性动画概述NETX 作用&#xff1a;实现组件通用属性的渐变过渡效果&#xff0c;提升用户体验。支持属性&#xff1a;width、height、backgroundColor、opacity、scale、rotate、translate等。注意事项&#xff1a; 布局类属性&#xff08;如宽高&#xff09;变化时&#…...

QMC5883L的驱动

简介 本篇文章的代码已经上传到了github上面&#xff0c;开源代码 作为一个电子罗盘模块&#xff0c;我们可以通过I2C从中获取偏航角yaw&#xff0c;相对于六轴陀螺仪的yaw&#xff0c;qmc5883l几乎不会零飘并且成本较低。 参考资料 QMC5883L磁场传感器驱动 QMC5883L磁力计…...

DAY 47

三、通道注意力 3.1 通道注意力的定义 # 新增&#xff1a;通道注意力模块&#xff08;SE模块&#xff09; class ChannelAttention(nn.Module):"""通道注意力模块(Squeeze-and-Excitation)"""def __init__(self, in_channels, reduction_rat…...

大模型多显卡多服务器并行计算方法与实践指南

一、分布式训练概述 大规模语言模型的训练通常需要分布式计算技术,以解决单机资源不足的问题。分布式训练主要分为两种模式: 数据并行:将数据分片到不同设备,每个设备拥有完整的模型副本 模型并行:将模型分割到不同设备,每个设备处理部分模型计算 现代大模型训练通常结合…...

IoT/HCIP实验-3/LiteOS操作系统内核实验(任务、内存、信号量、CMSIS..)

文章目录 概述HelloWorld 工程C/C配置编译器主配置Makefile脚本烧录器主配置运行结果程序调用栈 任务管理实验实验结果osal 系统适配层osal_task_create 其他实验实验源码内存管理实验互斥锁实验信号量实验 CMISIS接口实验还是得JlINKCMSIS 简介LiteOS->CMSIS任务间消息交互…...

GC1808高性能24位立体声音频ADC芯片解析

1. 芯片概述 GC1808是一款24位立体声音频模数转换器&#xff08;ADC&#xff09;&#xff0c;支持8kHz~96kHz采样率&#xff0c;集成Δ-Σ调制器、数字抗混叠滤波器和高通滤波器&#xff0c;适用于高保真音频采集场景。 2. 核心特性 高精度&#xff1a;24位分辨率&#xff0c…...

OPENCV形态学基础之二腐蚀

一.腐蚀的原理 (图1) 数学表达式&#xff1a;dst(x,y) erode(src(x,y)) min(x,y)src(xx,yy) 腐蚀也是图像形态学的基本功能之一&#xff0c;腐蚀跟膨胀属于反向操作&#xff0c;膨胀是把图像图像变大&#xff0c;而腐蚀就是把图像变小。腐蚀后的图像变小变暗淡。 腐蚀…...

基于IDIG-GAN的小样本电机轴承故障诊断

目录 🔍 核心问题 一、IDIG-GAN模型原理 1. 整体架构 2. 核心创新点 (1) ​梯度归一化(Gradient Normalization)​​ (2) ​判别器梯度间隙正则化(Discriminator Gradient Gap Regularization)​​ (3) ​自注意力机制(Self-Attention)​​ 3. 完整损失函数 二…...

【JavaSE】多线程基础学习笔记

多线程基础 -线程相关概念 程序&#xff08;Program&#xff09; 是为完成特定任务、用某种语言编写的一组指令的集合简单的说:就是我们写的代码 进程 进程是指运行中的程序&#xff0c;比如我们使用QQ&#xff0c;就启动了一个进程&#xff0c;操作系统就会为该进程分配内存…...