Skip to content

Commit

Permalink
Fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Apr 13, 2024
1 parent a92f921 commit 9345152
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/test_executables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,17 +825,17 @@ TEST(TestExecutables, SimpleDecRev5364x6416bitGray) {
///////////////////////////////////////////////////////////////////////////////
// Test ojph_expand with codeblocks when the rev53 wavelet is used.
// Command-line options used to obtain this file is:
// -o simple_dec_irv53_bhvhb_low_latency.jph -quiet Corder=PCRL Clevels=5
// "Cmodes=HT|CAUSAL" -rate 2 -o simple_dec_irv53_bhvhb_low_latency.jph Catk=2
// Kkernels:I2=I5X3 Cprecincts="{16,8192},{8,8192},{4,8192}" Cblk="{8,256}"
// Cdecomp="B(-:-:-),H(-),V(-),H(-),B(-:-:-)" Qstep=0.0001 -precise -no_weights
// -o simple_dec_irv53_bhvhb_low_latency.jph -quiet Corder=PCRL Clevels=5
// Cmodes=HT|CAUSAL -rate 2 Catk=2 Kkernels:I2=I5X3
// Cprecincts={16,8192},{8,8192},{4,8192} Cblk={8,256}
// Cdecomp=B(-:-:-),H(-),V(-),H(-),B(-:-:-) Qstep=0.0001 -precise -no_weights
// -tolerance 0
TEST(TestExecutables, SimpleDecIrv53BhvhbLowLatency) {
double mse[3] = { 5.52392, 4.01405, 6.8166};
int pae[3] = { 16, 17, 23};
run_ojph_expand("simple_dec_irv53_bhvhb_low_latency", "jph", "ppm");
run_mse_pae("simple_dec_irv53_bhvhb_low_latency", "ppm", "Malamute.ppm",
":I2=I5X3 Cprecincts=", 3, mse, pae);
"", 3, mse, pae);
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
7 changes: 5 additions & 2 deletions tests/test_helpers/convert_mse_pae_to_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ void process_cmdlines(std::ifstream& file,

start_pos = line.find(":");
if (start_pos != std::string::npos) {
size_t end_pos = line.find("\"", start_pos);
yuv_specs = line.substr(start_pos, end_pos - start_pos);
if (std::isdigit(line.at(start_pos + 1)))
{
size_t end_pos = line.find("\"", start_pos);
yuv_specs = line.substr(start_pos, end_pos - start_pos);
}
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helpers/ht_cmdlines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ add_test(NAME simple_dec_irv97_64x64_16bit_gray COMMAND ${CMAKE_CURRENT_SOURCE_D
add_test(NAME simple_dec_rev53_64x64_16bit COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/com_decom.sh -rdec "-i ${images_folder}/mm.ppm -o simple_dec_rev53_64x64_16bit.jph -precise -quiet Creversible=yes -full" "-i simple_dec_rev53_64x64_16bit.jph -o test1.ppm -precise -quiet" "-i simple_dec_rev53_64x64_16bit.jph -o test2.ppm" "${images_folder}/mm.ppm" "test1.ppm" "test2.ppm")
add_test(NAME simple_dec_rev53_64x64_16bit_gray COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/com_decom.sh -rdec "-i ${images_folder}/mm.pgm -o simple_dec_rev53_64x64_16bit_gray.jph -precise -quiet Creversible=yes -full" "-i simple_dec_rev53_64x64_16bit_gray.jph -o test1.pgm -precise -quiet" "-i simple_dec_rev53_64x64_16bit_gray.jph -o test2.pgm" "${images_folder}/mm.pgm" "test1.pgm" "test2.pgm")

add_test(NAME simple_dec_irv53_bhvhb_low_latency COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/com_decom.sh -dec "-i ${images_folder}/mm.ppm -o simple_dec_irv53_bhvhb_low_latency.jph -quiet Corder=PCRL Clevels=5 "Cmodes=HT|CAUSAL" -rate 2 -o simple_dec_irv53_bhvhb_low_latency.jph Catk=2 Kkernels:I2=I5X3 Cprecincts="{16,8192},{8,8192},{4,8192}" Cblk="{8,256}" Cdecomp="B(-:-:-),H(-),V(-),H(-),B(-:-:-)" Qstep=0.0001 -precise -no_weights -tolerance 0" "-i simple_dec_irv53_bhvhb_low_latency.jph -o test1.ppm -precise -quiet" "-i simple_dec_irv53_bhvhb_low_latency.jph -o test2.ppm" "${images_folder}/mm.pgm" "test1.pgm" "test2.pgm")
add_test(NAME simple_dec_irv53_bhvhb_low_latency COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/com_decom.sh -dec "-i ${images_folder}/mm.ppm -o simple_dec_irv53_bhvhb_low_latency.jph -quiet Corder=PCRL Clevels=5 Cmodes=HT|CAUSAL -rate 2 Catk=2 Kkernels:I2=I5X3 Cprecincts=\{16,8192\},\{8,8192\},\{4,8192\} Cblk=\{8,256\} Cdecomp=B(-:-:-),H(-),V(-),H(-),B(-:-:-) Qstep=0.0001 -precise -no_weights -tolerance 0" "-i simple_dec_irv53_bhvhb_low_latency.jph -o test1.ppm -precise -quiet" "-i simple_dec_irv53_bhvhb_low_latency.jph -o test2.ppm" "${images_folder}/mm.pgm" "test1.pgm" "test2.pgm")

#############################################################
# Encoding
Expand Down

0 comments on commit 9345152

Please sign in to comment.