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