Commit b6b98bf3 authored by David Flynn's avatar David Flynn
Browse files

enc: add placeholder EncoderAttributeParams

This placeholder is for any encoder-specific per-attribute parameters
that do not belong in the SPS, APS, etc.,
parent fe39e49d
......@@ -64,6 +64,10 @@ enum class PartitionMethod
//============================================================================
struct EncoderAttributeParams {};
//----------------------------------------------------------------------------
struct EncoderParams {
SequenceParameterSet sps;
GeometryParameterSet gps;
......@@ -72,6 +76,9 @@ struct EncoderParams {
// => The SPS enumerates the attributes, the APS controls coding params.
std::vector<AttributeParameterSet> aps;
// Encoder specific parameters for attributes
std::vector<EncoderAttributeParams> attr;
// todo(df): this should go away
std::map<std::string, int> attributeIdxMap;
......
......@@ -204,6 +204,7 @@ ParseParameters(int argc, char* argv[], Parameters& params)
struct {
AttributeDescription desc;
AttributeParameterSet aps;
EncoderAttributeParams encoder;
} params_attr;
bool print_help = false;
......@@ -227,12 +228,14 @@ ParseParameters(int argc, char* argv[], Parameters& params)
if (it.second) {
params.encoder.sps.attributeSets.push_back(params_attr.desc);
params.encoder.aps.push_back(params_attr.aps);
params.encoder.attr.push_back(params_attr.encoder);
return;
}
// update existing entry
params.encoder.sps.attributeSets[it.first->second] = params_attr.desc;
params.encoder.aps[it.first->second] = params_attr.aps;
params.encoder.attr[it.first->second] = params_attr.encoder;
};
/* clang-format off */
......@@ -704,6 +707,7 @@ ParseParameters(int argc, char* argv[], Parameters& params)
// NB: when dumping the config, opts references params_attr
params_attr.desc = params.encoder.sps.attributeSets[it.second];
params_attr.aps = params.encoder.aps[it.second];
params_attr.encoder = params.encoder.attr[it.second];
cout << " " << it.first << "\n";
po::dumpCfg(cout, opts, "Attributes", 8);
}
......
Supports Markdown
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