Config no longer depends on Flux/Image/Encode/Decode, breaking a circular

dependency.
This commit is contained in:
David Given
2024-10-12 01:49:13 +02:00
parent c6cbae4bc4
commit 7e80e255a4
30 changed files with 241 additions and 161 deletions

View File

@@ -1,6 +1,7 @@
#include "lib/core/globals.h"
#include "lib/flags.h"
#include "lib/fluxmap.h"
#include "lib/config.h"
#include "lib/decoders/decoders.h"
#include "lib/encoders/encoders.h"
#include "arch/agat/agat.h"
@@ -32,6 +33,13 @@
#include "lib/layout.h"
#include <numeric>
std::unique_ptr<Decoder> Decoder::create(Config& config)
{
if (!config.hasDecoder())
error("no decoder configured");
return create(config->decoder());
}
std::unique_ptr<Decoder> Decoder::create(const DecoderProto& config)
{
static const std::map<int,