fix an issue that block-h param is not applied properly

This commit is contained in:
falsycat 2022-09-07 15:31:05 +09:00
parent 85c45e32c0
commit 0f8134edf5
3 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/build/
/exp/

View File

@ -56,7 +56,7 @@ std::vector<std::vector<int32_t>> indices;
static void Embed(int32_t t, Frame& dst, const Frame& base) {
const auto bw = args::get(param::bw);
const auto bh = args::get(param::bw);
const auto bh = args::get(param::bh);
const auto hbw = bw/2;
const auto hbh = bh/2;
@ -92,7 +92,7 @@ static void Embed(int32_t t, Frame& dst, const Frame& base) {
static void Exec() {
const auto bw = args::get(param::bw);
const auto bh = args::get(param::bw);
const auto bh = args::get(param::bh);
const auto ut = args::get(param::utime);
Enforce(bw > 0 && bh > 0, "block size must be greater than 0");
Enforce(ut > 0, "utime must be greater than 0");

View File

@ -131,7 +131,7 @@ static Vec EachBlock(const Frame& cf, const Frame& pf, int32_t bx, int32_t by) {
static void EachFrame(int32_t t, const Frame& cf, const Frame& pf) {
const auto bw = args::get(param::bw);
const auto bh = args::get(param::bw);
const auto bh = args::get(param::bh);
const auto ut = args::get(param::utime);
Enforce(cf.w == pf.w && cf.h == pf.h, "variable frame size is not allowed");
@ -185,7 +185,7 @@ static void EachFrame(int32_t t, const Frame& cf, const Frame& pf) {
static void Exec() {
const auto bw = args::get(param::bw);
const auto bh = args::get(param::bw);
const auto bh = args::get(param::bh);
const auto ut = args::get(param::utime);
Enforce(bw > 0 && bh > 0, "block size must be greater than 0");
Enforce(ut > 0, "utime must be greater than 0");