Skip to content

Commit 6e6eea7

Browse files
authored
enable hw jpg encoder for yuzuki-chameleon (#103)
1 parent 3bab41b commit 6e6eea7

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,11 +1176,11 @@ jobs:
11761176
single-core: false
11771177
cmake-toolchain: arm-openwrt-linux-gnueabi.toolchain.cmake
11781178
setup-toolchain-cmd: |
1179-
wget -q https://github.com/YuzukiHD/sunxi-bsp-toolchains/releases/download/1.0.0/toolchain-sunxi-glibc-arm-gcc-830.tar.gz
1180-
tar -xf toolchain-sunxi-glibc-arm-gcc-830.tar.gz
1179+
wget -q https://github.com/YuzukiHD/YuzukiChameleon/releases/download/0.0.1/toolchain-sunxi-glibc-arm.tar.gz
1180+
tar -xf toolchain-sunxi-glibc-arm.tar.gz
11811181
setup-env-cmd: |
1182-
export TOOLCHAIN_ROOT_PATH=$GITHUB_WORKSPACE/toolchain-sunxi-glibc-gcc-830/toolchain
1183-
export STAGING_DIR=$GITHUB_WORKSPACE/toolchain-sunxi-glibc-gcc-830/toolchain
1182+
export TOOLCHAIN_ROOT_PATH=$GITHUB_WORKSPACE/toolchain
1183+
export STAGING_DIR=$GITHUB_WORKSPACE/toolchain
11841184
11851185
- name: purple-pi
11861186
single-core: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ https://github.com/nihui/opencv-mobile/releases/latest
345345
</a>
346346
<br />arm-openwrt-linux-gnueabi<br />
347347
&#9989; HW JPG decoder<br />
348+
&#9989; HW JPG encoder<br />
348349
<a href="https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.9.0-yuzuki-chameleon.zip">
349350
<img alt="opencv4-yuzuki-chameleon" src="https://img.shields.io/badge/download-4.9.0-blue?style=for-the-badge">
350351
</a>

highgui/src/jpeg_encoder_aw.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace cv {
4040
// 0 = unknown
4141
// 1 = t113-i
4242
// 2 = tinyvision
43+
// 3 = yuzuki-chameleon
4344
static int get_device_model()
4445
{
4546
static int device_model = -1;
@@ -66,6 +67,11 @@ static int get_device_model()
6667
// tinyvision
6768
device_model = 2;
6869
}
70+
if (strncmp(buf, "sun50iw9", 8) == 0)
71+
{
72+
// yuzuki-chameleon
73+
device_model = 3;
74+
}
6975
}
7076

7177
return device_model;
@@ -85,6 +91,11 @@ static bool is_device_whitelisted()
8591
// tinyvision
8692
return true;
8793
}
94+
if (device_model == 3)
95+
{
96+
// yuzuki-chameleon
97+
return true;
98+
}
8899

89100
return false;
90101
}

0 commit comments

Comments
 (0)