Skip to content

Commit ed9472d

Browse files
authored
merge dev
2 parents 2c2c661 + 0cc008e commit ed9472d

File tree

174 files changed

+511920
-9851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+511920
-9851
lines changed

.github/workflows/build.yml

+26-18
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ jobs:
133133
export HW_MODEL=`echo ${{ matrix.cfg }}|awk -F '_' '{print $1}'`
134134
export HW_VER=`echo ${{ matrix.cfg }}|awk -F '_' '{print $3"."$4}'`
135135
test -d bin || mkdir ./bin
136-
test -f ./bin/ai_dut && rm -rf ./bin/ai_dut
137-
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_dut -O ./bin/ai_dut
138-
chmod +x ./bin/ai_dut
139-
available=$(./bin/ai_dut show --dest available --hw_type k510 --hw_model $HW_MODEL --hw_ver $HW_VER --format args)
136+
test -f ./bin/ailab && rm -rf ./bin/ailab
137+
wget -qc https://ai.b-bug.org/k510_buildroot/github/ailab -O ./bin/ailab
138+
chmod +x ./bin/ailab
139+
available=$(./bin/ailab show --dest available --hw_type k510 --hw_model $HW_MODEL --hw_ver $HW_VER --format args)
140140
echo $available
141141
echo "available=$available" >> $GITHUB_ENV
142142
if [[ $available =~ "k510" ]]; then
@@ -152,7 +152,7 @@ jobs:
152152
echo "Reserve DUT start"
153153
echo "PR ID: $PULL_REQUEST_ID"
154154
echo "Job ID: $GITHUB_RUN_ID"
155-
reserved=$(./bin/ai_dut add ${{ env.available }} --site github-actions --source $PULL_REQUEST_ID --job $GITHUB_RUN_ID --format args)
155+
reserved=$(./bin/ailab add ${{ env.available }} --time 15m --site github-actions --source $PULL_REQUEST_ID --job $GITHUB_RUN_ID --format args)
156156
echo $reserved
157157
echo "reserved=$reserved" >> $GITHUB_ENV
158158
if [[ $reserved =~ "github-actions" ]]; then
@@ -161,12 +161,12 @@ jobs:
161161
echo "ERROR: Reserve DUT failed"
162162
exit 1
163163
fi
164-
power=$(./bin/ai_dut power --type=cycle ${{ env.available }})
164+
power=$(./bin/ailab power --type=on ${{ env.available }})
165165
echo $power
166166
if [[ $power =~ "True" ]]; then
167-
echo "Power Cycle DUT pass"
167+
echo "Power on DUT pass"
168168
else
169-
echo "ERROR: Power Cycle DUT failed"
169+
echo "ERROR: Power on DUT failed"
170170
exit 1
171171
fi
172172
@@ -178,28 +178,28 @@ jobs:
178178
echo "bbl md5: ${{needs.build_image.outputs.md5_bbl}}"
179179
echo "dtb md5: ${{needs.build_image.outputs.md5_dtb}}"
180180
test -d bin || mkdir ./bin
181-
test -f ./bin/ai_load && rm -rf ./bin/ai_load
182-
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_load -O ./bin/ai_load
183-
chmod +x ./bin/ai_load
181+
test -f ./bin/aiload && rm -rf ./bin/aiload
182+
wget -qc https://ai.b-bug.org/k510_buildroot/github/aiload -O ./bin/aiload
183+
chmod +x ./bin/aiload
184184
echo $PULL_REQUEST_ID
185185
echo $GITHUB_RUN_ID
186-
./bin/ai_load --pr_id $PULL_REQUEST_ID --job_id $GITHUB_RUN_ID --md5_dtb ${{needs.build_image.outputs.md5_dtb}} --md5_bbl ${{needs.build_image.outputs.md5_bbl}} ${{ env.available }}
186+
./bin/aiload --pr_id $PULL_REQUEST_ID --job_id $GITHUB_RUN_ID --md5_dtb ${{needs.build_image.outputs.md5_dtb}} --md5_bbl ${{needs.build_image.outputs.md5_bbl}} ${{ env.available }}
187187
188188
- name: Run Test
189189
id: run_test
190190
timeout-minutes: 10
191191
run: |
192192
echo "Run Test start"
193193
test -d bin || mkdir ./bin
194-
test -f ./bin/ai_robot && rm -rf ./bin/ai_robot
195-
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_robot -O ./bin/ai_robot
196-
chmod +x ./bin/ai_robot
194+
test -f ./bin/airobot && rm -rf ./bin/airobot
195+
wget -qc https://ai.b-bug.org/k510_buildroot/github/airobot -O ./bin/airobot
196+
chmod +x ./bin/airobot
197197
test -f ./k510.robot && rm -rf ./k510.robot
198198
wget -qc https://ai.b-bug.org/k510_buildroot/github/k510.robot -O ./k510.robot
199-
./bin/ai_dut convert --dest=script --format yaml --file_name=var.yml ${{ env.available }}
199+
./bin/ailab convert --dest=script --format yaml --file_name=var.yml ${{ env.available }}
200200
test -f var.yml || exit 1
201201
echo "Run test case start"
202-
./bin/ai_robot -m github -V var.yml -i github k510.robot
202+
./bin/airobot -m github -V var.yml -i github k510.robot
203203
echo "Run test case pass"
204204
205205
- name: Release DUT
@@ -208,11 +208,19 @@ jobs:
208208
run: |
209209
echo "Release DUT start"
210210
test -d bin || mkdir ./bin
211-
result=$(./bin/ai_dut delete ${{ env.reserved }})
211+
result=$(./bin/ailab update ${{ env.reserved }})
212212
echo $result
213213
if [[ $result =~ "True" ]]; then
214214
echo "Release DUT pass"
215215
else
216216
echo "ERROR: Release DUT failed"
217217
exit 1
218218
fi
219+
power=$(./bin/ailab power --type=off ${{ env.available }})
220+
echo $power
221+
if [[ $power =~ "True" ]]; then
222+
echo "Power off DUT pass"
223+
else
224+
echo "ERROR: Power off DUT failed"
225+
exit 1
226+
fi

Config.in

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ source "$BR2_EXTERNAL_K510_PATH/package/dsp_app_new/Config.in"
1313
source "$BR2_EXTERNAL_K510_PATH/package/k510_evb_test/Config.in"
1414
source "$BR2_EXTERNAL_K510_PATH/package/dsp_log/Config.in"
1515
source "$BR2_EXTERNAL_K510_PATH/package/venc_lib/Config.in"
16-
source "$BR2_EXTERNAL_K510_PATH/package/alsa_demo/Config.in"
1716
source "$BR2_EXTERNAL_K510_PATH/package/ffmpeg_canaan/Config.in"
1817
source "$BR2_EXTERNAL_K510_PATH/package/audio3a_lib/Config.in"
1918
source "$BR2_EXTERNAL_K510_PATH/package/mediactl_lib/Config.in"

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BR2_VERSION = 2020.02.11
22

3+
34
RED=\e[1;31m
45
NC=\e[0m
56

@@ -106,11 +107,11 @@ clean:
106107

107108
dl:
108109
rm -rf pkg-download/dl.tar.gz;
109-
wget -c https://github.com/kendryte/k510_buildroot/releases/download/v1.6/dl.tar.gz -O pkg-download/dl.tar.gz;
110+
wget -c https://kendryte-download.canaan-creative.com/k510/package/dl/v1.0.0/dl.tar.gz -O pkg-download/dl.tar.gz;
110111
tar -zxf pkg-download/dl.tar.gz;
111-
mkdir -p dl/ai/; wget -c https://github.com/kendryte/k510_buildroot/releases/download/v1.7/ai_kmodel_data.tar.xz -O dl/ai/ai_kmodel_data.tar.xz;
112+
mkdir -p dl/ai/; wget -c https://kendryte-download.canaan-creative.com/k510/package/ai/v1.0.0/ai_kmodel_data.tar.xz -O dl/ai/ai_kmodel_data.tar.xz;
112113
(set -xe; NNCASE_VER=v1.7.1 ;\
113-
NNCASE_SITE=https://github.com/kendryte/nncase/releases/download;\
114+
NNCASE_SITE=https://kendryte-download.canaan-creative.com/k510/nncase/release;\
114115
NNCASE_PIP_VD=1.7.1.20220701 ; \
115116
NNCASE_PIP_K510_VD=1.7.1.20220701 ;\
116117
mkdir -p dl/nncase_linux_runtime; cd dl/nncase_linux_runtime; \

board/canaan/k510/k510_rootfs_skeleton/etc/init.d/rc.sysinit

+11
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ else
7474
#udhcpc -b -i eth0 &
7575
fi
7676

77+
ifconfig wlan0 up
78+
if [ $? -eq 0 ];then
79+
if [ -f /first_run_flag_file ];then
80+
echo "ctrl_interface=/var/run/wpa_supplicant" > /etc/wpa_supplicant.conf
81+
echo "update_config=1" >> /etc/wpa_supplicant.conf
82+
echo "ap_scan=1" >> /etc/wpa_supplicant.conf
83+
fi
84+
85+
wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B
86+
fi
87+
7788
/sbin/ifup -a -f
7889

7990
#telnetd

board/canaan/k510/k510_rootfs_skeleton/etc/init.d/run.sh

-4
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ if [ -d /lib/modules/$linux_ver/ ]; then
8686
done</lib/modules/$linux_ver/modules.order
8787
fi
8888

89-
sleep 0.5
90-
ifconfig wlan0 up
91-
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf -B
92-
9389
#change SHELL default version
9490
#if [ -f /bin/bash ]; then
9591
# ln -sf /bin/bash /bin/sh
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#AP6212A_NVRAM_V1.0.2_20191121
2+
# 2.4 GHz, 20 MHz BW mode
3+
4+
# The following parameter values are just placeholders, need to be updated.
5+
manfid=0x2d0
6+
prodid=0x0726
7+
vendid=0x14e4
8+
devid=0x43e2
9+
boardtype=0x0726
10+
boardrev=0x1101
11+
boardnum=22
12+
macaddr=00:90:4c:c5:12:38
13+
sromrev=11
14+
boardflags=0x00404201
15+
xtalfreq=26000
16+
nocrc=1
17+
ag0=255
18+
aa2g=1
19+
ccode=ALL
20+
21+
pa0itssit=0x20
22+
extpagain2g=0
23+
24+
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
25+
pa2ga0=-215,5267,-656
26+
AvVmid_c0=0x0,0xc8
27+
cckpwroffset0=5
28+
29+
# PPR params
30+
maxp2ga0=80
31+
txpwrbckof=6
32+
cckbw202gpo=0x6666
33+
legofdmbw202gpo=0xaaaaaaaa
34+
mcsbw202gpo=0xbbbbbbbb
35+
36+
# OFDM IIR :
37+
ofdmdigfilttype=18
38+
ofdmdigfilttypebe=18
39+
# PAPD mode:
40+
papdmode=2
41+
42+
il0macaddr=00:90:4c:c5:12:38
43+
wl0id=0x431b
44+
45+
#OOB parameters
46+
hostwake=0x40
47+
hostrdy=0x41
48+
usbrdy=0x03
49+
usbrdydelay=100
50+
deadman_to=0xffffffff
51+
# muxenab: 0x1 for UART enable, 0x10 for Host awake
52+
muxenab=0x10
53+
# CLDO PWM voltage settings - 0x4 - 1.1 volt
54+
#cldo_pwm=0x4
55+
glitch_based_crsmin=1
56+
noccpwrlmt=1

board/canaan/k510/uboot-emmc.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ipaddr=10.100.226.221
1212
netmask=255.255.255.0
1313
gatewayip=10.100.226.254
1414
serverip=10.100.226.63
15-
bootargs=root=/dev/mmcblk0p3 ro console=ttyS0,115200n8 debug loglevel=7 rootfstype=ext2
15+
bootargs=root=/dev/mmcblk0p3 ro console=ttyS0,115200n8 debug loglevel=7 rootfstype=ext2 isolcpus=1
1616

17-
bootcmd=fatload mmc 0:2 0x600000 bootm-bbl.img;fatload mmc 0:2 0x2000000 k510.dtb;bootm 0x600000 - 0x2000000
17+
bootcmd=while true ; do fatload mmc 0:2 0x600000 bootm-bbl.img && fatload mmc 0:2 0x2000000 k510.dtb && bootm 0x600000 - 0x2000000 ;done
1818
bootcmd_nfs=tftp 0x600000 bootm-bbl.img;tftp 0x2000000 k510_nfsroot.dtb;bootm 0x600000 - 0x2000000

board/canaan/k510/uboot-nand.env

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ipaddr=10.100.226.221
1212
netmask=255.255.255.0
1313
gatewayip=10.100.226.254
1414
serverip=10.100.226.63
15-
bootargs=root=ubi0:ubi_rootfs_part rootfstype=ubifs ubi.mtd=6,2048 console=ttyS0,115200n8 debug loglevel=7
15+
bootargs=root=ubi0:ubi_rootfs_part rootfstype=ubifs ubi.mtd=6,2048 console=ttyS0,115200n8 debug loglevel=7 isolcpus=1
1616

17-
bootcmd=mtd read spi-nand0 0x600000 0x380000 0xf00000;mtd read spi-nand0 0x2000000 0x340000 0x40000;bootm 0x600000 - 0x2000000
17+
bootcmd=while true ; do mtd read spi-nand0 0x600000 0x380000 0xf00000 && mtd read spi-nand0 0x2000000 0x340000 0x40000 && bootm 0x600000 - 0x2000000 ;done
1818

1919
bootcmd_nfs=tftp 0x600000 bootm-bbl.img;tftp 0x2000000 k510_nfsroot.dtb;bootm 0x600000 - 0x2000000

board/canaan/k510/uboot-sdcard.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ipaddr=10.100.226.221
1212
netmask=255.255.255.0
1313
gatewayip=10.100.226.254
1414
serverip=10.100.226.63
15-
bootargs=root=/dev/mmcblk2p2 ro console=ttyS0,115200n8 debug loglevel=7 rootfstype=ext2
15+
bootargs=root=/dev/mmcblk2p2 ro console=ttyS0,115200n8 debug loglevel=7 rootfstype=ext2 isolcpus=1
1616

1717
bootcmd=while true ; do fatload mmc 1:1 0x600000 bootm-bbl.img && fatload mmc 1:1 0x2000000 k510.dtb && bootm 0x600000 - 0x2000000 ;done
1818
bootcmd_nfs=tftp 0x600000 bootm-bbl.img;tftp 0x2000000 k510_nfsroot.dtb;bootm 0x600000 - 0x2000000

configs/k510_crb_lp3_v0_1_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ BR2_TARGET_K510_EVB_TEST_MAILBOX_FIRMWARE=y
107107
BR2_TARGET_K510_EVB_TEST_SIMD_UMUL8_FIRMWARE=y
108108
BR2_PACKAGE_DSP_LOG=y
109109
BR2_PACKAGE_VENC_LIB=y
110-
BR2_PACKAGE_ALSA_DEMO=y
111110
BR2_PACKAGE_LIBRTMP=y
112111
BR2_PACKAGE_OPENSSL=y
113112
BR2_PACKAGE_LIBOPENSSL=y

configs/k510_crb_lp3_v1_2_defconfig

+1-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ BR2_TARGET_K510_EVB_TEST_MAILBOX_FIRMWARE=y
107107
BR2_TARGET_K510_EVB_TEST_SIMD_UMUL8_FIRMWARE=y
108108
BR2_PACKAGE_DSP_LOG=y
109109
BR2_PACKAGE_VENC_LIB=y
110-
BR2_PACKAGE_ALSA_DEMO=y
111110
BR2_PACKAGE_FFMPEG_CANAAN=y
112111
BR2_PACKAGE_AUDIO3A_LIB=y
113112
BR2_PACKAGE_MEDIACTL_LIB=y
@@ -131,4 +130,4 @@ BR2_PACKAGE_WRITE_READ_FILE=y
131130
BR2_PACKAGE_WIFI=y
132131
BR2_PACKAGE_AWS_IOT_TEST=y
133132
BR2_PACKAGE_GPIO_KEYS=y
134-
BR2_PACKAGE_RAPIDJSON=y
133+
BR2_PACKAGE_RAPIDJSON=y

configs/k510_evb_lp3_v1_1_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ BR2_PACKAGE_K510_EVB_TEST=y
105105
BR2_TARGET_K510_EVB_TEST_FFT_FIRMWARE=y
106106
BR2_PACKAGE_DSP_LOG=y
107107
BR2_PACKAGE_VENC_LIB=y
108-
BR2_PACKAGE_ALSA_DEMO=y
109108
BR2_PACKAGE_FFMPEG_CANAAN=y
110109
BR2_PACKAGE_AUDIO3A_LIB=y
111110
BR2_PACKAGE_MEDIACTL_LIB=y

package/ai/ai.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ AI_SITE = $(AI_LOCAL_PATH)
88
AI_SOURCE = code.tar
99

1010
AI_SITE_METHOD = file
11-
AI_KMODEL_DATA_SITE = https://github.com/kendryte/k510_buildroot/releases/download/v1.7/ai_kmodel_data.tar.xz
11+
AI_KMODEL_DATA_VERSION = v1.0.0
12+
AI_KMODEL_DATA_SITE = https://kendryte-download.canaan-creative.com/k510/package/ai/$(AI_KMODEL_DATA_VERSION)/ai_kmodel_data.tar.xz
1213
AI_EXTRA_DOWNLOADS = $(call qstrip,$(AI_KMODEL_DATA_SITE))
1314
MODEL=$(AI_DIR)/ai_kmodel_data/kmodel_release
1415

package/ai/code/common/k510_drm.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2323
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424
*/
25+
#include <media_ctl.h>
2526
#include "k510_drm.h"
2627

2728
# define DRM_CARD "/dev/dri/card0"
@@ -55,7 +56,9 @@ struct drm_dev drm_dev;
5556

5657
int draw_frame(struct vo_draw_frame *frame)
5758
{
58-
return drmIoctl(drm_dev.fd, DRM_IOCTL_KENDRYTE_DRAW_FRAME, frame);
59+
unsigned color = frame->draw_en ? 0xff0000 : 0xff000000;
60+
mediactl_rect(ISP_F2K_PIPELINE, 1, frame->frame_num, frame->line_x_start, frame->line_y_start, frame->line_x_end - frame->line_x_start, frame->line_y_end - frame->line_y_start, 4, color, 0);
61+
return 0;
5962
}
6063

6164
static uint32_t get_plane_property_id(const char *name)
@@ -644,7 +647,7 @@ static int drm_allocate_dumb_argb(struct drm_buffer *buf)
644647

645648
/* create dumb buffer */
646649
memset(&creq, 0, sizeof(creq));
647-
creq.width = (drm_dev.width+15)/16*16;
650+
creq.width = (drm_dev.width+7)/8*8;
648651
creq.height = drm_dev.height; //* 4;
649652
creq.bpp = 32; //8
650653

package/ai/code/common/media_ctl.h

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct video_info
7878

7979
int mediactl_init(char *video_cfg_file,struct video_info *dev_info);
8080
void mediactl_exit(void);
81+
int mediactl_rect(enum isp_pipeline_e pipeline, unsigned layer, unsigned area, unsigned x, unsigned y, unsigned width, unsigned height, unsigned line_width, unsigned color, unsigned border_mask);
8182
int mediactl_set_ae(enum isp_pipeline_e pipeline);
8283
int mediactl_set_ae_single(enum isp_pipeline_e pipeline);
8384
int mediactl_set_ae_sync(enum isp_pipeline_e pipeline);

package/ai/code/face_alignment/main.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,9 @@ int main(int argc, char *argv[])
784784

785785
thread_ds0.join();
786786
thread_ds2.join();
787-
787+
memset(drm_dev.drm_bufs_argb[0].map, 0xff, screen_width * screen_height * 4);
788+
usleep(100000);
789+
drm_dmabuf_set_plane(&drm_dev.drm_bufs[0], &drm_dev.drm_bufs_argb[0]);
788790
/****fixed operation for drm deinit****/
789791
for(uint32_t i = 0; i < DRM_BUFFERS_COUNT; i++)
790792
{

package/ai/code/face_detect/main.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void ai_worker(ai_worker_args ai_args)
207207

208208
for (auto p : points_to_clear[index])
209209
{
210-
cv::circle(img_argb, p, 8, cv::Scalar(0, 0, 0, 0), -1);
210+
cv::circle(img_argb, p, 4, cv::Scalar(0, 0, 0, 0), -1);
211211
}
212212
}
213213

@@ -242,7 +242,7 @@ void ai_worker(ai_worker_args ai_args)
242242
{
243243
int32_t x0 = l.points[2 * ll + 0] * screen_width * net_len / valid_width;
244244
int32_t y0 = l.points[2 * ll + 1] * net_len / valid_height * screen_height;
245-
cv::circle(img_argb, cv::Point(x0, y0), 8, cv::Scalar(0, 0, 255, 255), -1);
245+
cv::circle(img_argb, cv::Point(x0, y0), 4, cv::Scalar(0, 0, 255, 255), -1);
246246
points_to_clear[index].push_back(cv::Point(x0, y0));
247247
}
248248
}
@@ -629,7 +629,9 @@ int main(int argc, char *argv[])
629629

630630
thread_ds0.join();
631631
thread_ds2.join();
632-
632+
memset(drm_dev.drm_bufs_argb[0].map, 0xff, screen_width * screen_height * 4);
633+
usleep(100000);
634+
drm_dmabuf_set_plane(&drm_dev.drm_bufs[0], &drm_dev.drm_bufs_argb[0]);
633635
/****fixed operation for drm deinit****/
634636
for(uint32_t i = 0; i < DRM_BUFFERS_COUNT; i++)
635637
{

package/ai/code/face_expression/main.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void ai_worker(ai_worker_args ai_args)
224224

225225
for (uint32_t cc = 0; cc < points_to_clear[index].size(); cc++)
226226
{
227-
cv::putText(img_argb, strs_to_clear[index][cc], points_to_clear[index][cc], cv::FONT_HERSHEY_COMPLEX, 2, cv::Scalar(0, 0, 0, 0), 2, 8, 0);
227+
cv::putText(img_argb, strs_to_clear[index][cc], points_to_clear[index][cc], cv::FONT_HERSHEY_COMPLEX, 1, cv::Scalar(0, 0, 0, 0), 1, 8, 0);
228228
}
229229
}
230230

@@ -283,7 +283,7 @@ void ai_worker(ai_worker_args ai_args)
283283
std::string text = fexpre.labels[score_index] + ":" + std::to_string(round(score_max * 100) / 100.0).substr(0,4);
284284
int x0 = std::max(0, std::min(int((b.x - b.w / 2) * fd_net_len / valid_width * screen_width), (int)screen_width));
285285
int y0 = std::max(0, std::min(int((b.y - b.h / 2) * fd_net_len / valid_height * screen_height) + 60, (int)screen_height));
286-
cv::putText(img_argb, text, cv::Point(x0, y0), cv::FONT_HERSHEY_COMPLEX, 2, cv::Scalar(255, 0, 0, 255), 2, 8, 0);
286+
cv::putText(img_argb, text, cv::Point(x0, y0), cv::FONT_HERSHEY_COMPLEX, 1, cv::Scalar(255, 0, 0, 255), 1, 8, 0);
287287
points_to_clear[index].push_back(cv::Point(x0, y0));
288288
strs_to_clear[index].push_back(text);
289289
}
@@ -687,7 +687,9 @@ int main(int argc, char *argv[])
687687

688688
thread_ds0.join();
689689
thread_ds2.join();
690-
690+
memset(drm_dev.drm_bufs_argb[0].map, 0xff, screen_width * screen_height * 4);
691+
usleep(100000);
692+
drm_dmabuf_set_plane(&drm_dev.drm_bufs[0], &drm_dev.drm_bufs_argb[0]);
691693
/****fixed operation for drm deinit****/
692694
for(uint32_t i = 0; i < DRM_BUFFERS_COUNT; i++)
693695
{

0 commit comments

Comments
 (0)