Commit adf73738 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Rename option used for tests: --detect-speed-hint => --test-speed

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 6a386317
speed detection:
- maybe truncate cleanup
- remove pad start scaling
- test code
- document in README
......
......@@ -592,9 +592,9 @@ parse_get_options (ArgParser& ap)
{
Params::detect_speed = true;
}
if (ap.parse_opt ("--detect-speed-hint", f))
if (ap.parse_opt ("--test-speed", f))
{
Params::detect_speed_hint = f;
Params::test_speed = f;
}
}
......
......@@ -79,7 +79,7 @@ do
sox -D -V1 ${AWM_FILE}.wav ${AWM_FILE}.speed.wav speed $SPEED
mv ${AWM_FILE}.speed.wav ${AWM_FILE}.wav
TEST_SPEED_ARGS="--detect-speed --detect-speed-hint $SPEED"
TEST_SPEED_ARGS="--detect-speed --test-speed $SPEED"
else
TEST_SPEED_ARGS=""
fi
......
......@@ -26,7 +26,7 @@ bool Params::mix = true;
bool Params::hard = false; // hard decode bits? (soft decoding is better)
bool Params::snr = false; // compute/show snr while adding watermark
bool Params::detect_speed = false;
double Params::detect_speed_hint = -1;
double Params::test_speed = -1;
int Params::have_key = 0;
size_t Params::payload_size = 128;
bool Params::payload_short = false;
......
......@@ -46,7 +46,7 @@ public:
static int have_key;
static bool detect_speed;
static double detect_speed_hint; // for debugging --detect-speed
static double test_speed; // for debugging --detect-speed
static size_t payload_size; // number of payload bits for the watermark
static bool payload_short;
......
......@@ -356,7 +356,7 @@ speed_scan (ThreadPool& thread_pool, double clip_location, const WavData& in_dat
scan_params.seconds,
best_speed,
best_quality,
100 * fabs (best_speed - Params::detect_speed_hint) / Params::detect_speed_hint,
100 * fabs (best_speed - Params::test_speed) / Params::test_speed,
t1 - t0, t2 - t1);
}
return best_speed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment