Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMDを無効化 #102

Merged
merged 3 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ Rustup をインストールするだけで、Rust とビルドに必要なツ
```bash
git clone https://github.com/kazuki0824/recisdb-rs.git
cd recisdb-rs
sudo apt install -y build-essential clang cmake libdvbv5-dev libpcsclite-dev libudev-dev pkg-config
sudo apt install -y build-essential libclang-dev cmake libdvbv5-dev libpcsclite-dev libudev-dev pkg-config
cargo build -F dvb --release
sudo cp -a target/release/recisdb /usr/local/bin
# cargo install -F dvb --release
```

Rust をインストールしたら、上記のコマンドで recisdb をビルドできます。
Expand Down
6 changes: 3 additions & 3 deletions b25-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ fn prep_cmake(cx: TargetVar) -> cmake::Config {
let mut cm = cmake::Config::new("./externals/libaribb25");
cm.very_verbose(true);

// Enable AVX2 for x64
// NEON SIMD is also supported, but not all ARM SoCs support it, so build without it.
// Disble AVX2 for x64
if matches!(cx.arch, Some(ref arch) if arch == "x86_64") {
cm.define("USE_AVX2", "ON");
cm.define("USE_AVX2", "OFF");
}

if cx.win {
Expand Down Expand Up @@ -74,6 +73,7 @@ fn prep_cmake(cx: TargetVar) -> cmake::Config {
}
println!("cargo:rustc-link-lib=static=aribb25");

#[cfg(not(debug_assertions))]
cm.profile("Release");
cm
}
Expand Down
2 changes: 1 addition & 1 deletion b25-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl StreamDecoder {
inner
.dec
.as_ref()
.set_simd_mode(if opt.simd { 1 } else { 0 });
.set_simd_mode(if opt.simd { 3 } else { 0 });
inner
};

Expand Down
Loading