Skip to content

Commit

Permalink
feat(bench): add pre-processing to decompression benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrechette committed Nov 21, 2023
1 parent 09fced4 commit 41da874
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tools/acl_decompressor/sources/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <acl/core/impl/bit_cast.impl.h>
#include <acl/compression/compress.h>
#include <acl/compression/convert.h>
#include "acl/compression/pre_process.h"

#include <benchmark/benchmark.h>

Expand Down Expand Up @@ -402,9 +403,19 @@ bool prepare_clip(const std::string& clip_name, const acl::compressed_tracks& ra
return false;
}

acl::compression_settings settings = acl::get_default_compression_settings();

acl::qvvf_transform_error_metric error_metric;

// Pre-process
{
acl::pre_process_settings_t pre_process_settings;
pre_process_settings.actions = acl::pre_process_actions::recommended;
pre_process_settings.precision_policy = acl::pre_process_precision_policy::lossy;
pre_process_settings.error_metric = &error_metric;

acl::pre_process_track_list(s_allocator, pre_process_settings, track_list);
}

acl::compression_settings settings = acl::get_default_compression_settings();
settings.error_metric = &error_metric;

acl::output_stats stats;
Expand Down

0 comments on commit 41da874

Please sign in to comment.