Skip to content
Snippets Groups Projects
Commit 1b1ed8c5 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Fixed small bugs.

parent 14345375
No related branches found
No related tags found
No related merge requests found
......@@ -434,9 +434,18 @@ public class ParsedCliOptions {
case Decompress:
sb.append("Decompress\n");
break;
case Benchmark:
sb.append("Benchmark\n");
break;
case TrainCodebook:
sb.append("TrainCodebook\n");
break;
case PrintHelp:
sb.append("PrintHelp\n");
break;
case CustomFunction:
sb.append("CustomFunction\n");
break;
case InspectFile:
sb.append("InspectFile\n");
break;
......
......@@ -22,12 +22,30 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase {
@Override
public boolean run() {
boolean result = true;
result &= runPlaneDifferenceForAllBits(0, "vq3x3", "plane_codebook", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(0, "vq9x1", "plane_codebook", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(1, "vq3x3", "plane_codebook", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(1, "vq9x1", "plane_codebook", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(0, "sq", "middle_frame", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(0, "vq3x3", "middle_frame", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(0, "vq9x1", "middle_frame", "D:\\biology\\tiff_data\\quantized");
// result &= runPlaneDifferenceForAllBits(1, "sq", "middle_frame", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(1, "vq3x3", "middle_frame", "D:\\biology\\tiff_data\\quantized");
result &= runPlaneDifferenceForAllBits(1, "vq9x1", "middle_frame", "D:\\biology\\tiff_data\\quantized");
// result &= reportPlaneDifference(
// String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb4.raw",
// "D:\\biology\\tiff_data\\quantized",
// "middle_frame",
// 1,
// "sq"),
// String.format("%s\\%s\\plane_diff_ch%d\\%s_cb4_plane_log.data",
// "D:\\biology\\tiff_data\\quantized",
// "middle_frame",
// 1,
// "sq"),
// COMP_FILE_ch1);
return result;
}
......@@ -38,7 +56,7 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase {
final String folder) {
System.out.println(
String.format("runPlaneDifferenceForAllBits\n\tChannel: %d\n\tMethod: %s\n\tType: %s",
channel, method, folder));
channel, type, folder));
// final int channel = 0;
assert (channel == 0 || channel == 1);
final String comp_file = channel == 0 ? COMP_FILE_ch0 : COMP_FILE_ch1;
......@@ -46,49 +64,49 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase {
// final String type = "plane_codebook";
// final String folder = "D:\\biology\\tiff_data\\quantized";
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb256.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb256_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb128.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb128_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb64.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb64_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb32.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb32_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb16.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb16_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb8.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb8_plane_log.data", folder, type, channel, method),
comp_file)) {
return false;
}
if (reportPlaneDifference(
if (!reportPlaneDifference(
String.format("%s\\%s\\fused_tp_10_ch_%d_16bit_%s_cb4.raw", folder, type, channel, method),
String.format("%s\\%s\\plane_diff_ch%d\\%s_cb4_plane_log.data", folder, type, channel, method),
comp_file)) {
......@@ -166,6 +184,6 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase {
e.printStackTrace();
}
System.out.println("Finished reportPlaneDifference");
return false;
return true;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment