Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[c2][encoder] AVC encoder low power mode configurable #169

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions c2_components/include/mfx_c2_component.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class MfxC2Component : public C2ComponentInterface,
int flags{0};
bool dump_output{false};
uint32_t concurrent_instances{0};
bool low_power_mode{false};
};
protected:
/* State diagram:
Expand Down
4 changes: 4 additions & 0 deletions c2_components/src/mfx_c2_encoder_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,10 @@ mfxStatus MfxC2EncoderComponent::ResetSettings()
m_mfxVideoParamsConfig.NumExtParam = 0;
m_mfxVideoParamsConfig.ExtParam = nullptr;

// set low power mode for AVC encoder
if(m_mfxVideoParamsConfig.mfx.CodecId == MFX_CODEC_AVC && m_createConfig.low_power_mode)
m_mfxVideoParamsConfig.mfx.LowPower = MFX_CODINGOPTION_ON;

MFX_DEBUG_TRACE__mfxStatus(mfx_res);
return mfx_res;
}
Expand Down
18 changes: 0 additions & 18 deletions c2_store/data/media_codecs_c2.xml

This file was deleted.

124 changes: 0 additions & 124 deletions c2_store/data/media_codecs_intel_c2_video.xml

This file was deleted.

164 changes: 0 additions & 164 deletions c2_store/data/media_codecs_performance_tgl.xml

This file was deleted.

9 changes: 0 additions & 9 deletions c2_store/data/mfx_c2_store.conf

This file was deleted.

1 change: 1 addition & 0 deletions c2_store/src/mfx_c2_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ c2_status_t MfxC2ComponentStore::readConfigFile()
config.flags = flags;
config.dump_output = m_xmlParser.dumpOutputEnabled(name.c_str());
config.concurrent_instances = m_xmlParser.getConcurrentInstances(name.c_str());
config.low_power_mode = m_xmlParser.getLowPowerMode(name.c_str());

m_componentsRegistry_.emplace(name, ComponentDesc(module.c_str(), media_type.c_str(), kind, config));
}
Expand Down
2 changes: 2 additions & 0 deletions c2_utils/include/mfx_c2_xml_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class MfxXmlParser
C2String getMediaType(const char *name);
uint32_t getConcurrentInstances(const char *name);
bool dumpOutputEnabled(const char *name);
bool getLowPowerMode(const char *name);

private:

Expand All @@ -62,6 +63,7 @@ class MfxXmlParser
std::map<C2String, AttributeMap> typeMap; // map of types supported by this codec
bool dump_output{false};
uint32_t concurrentInstance{0};
bool lowPowerMode{false};
};

enum Section {
Expand Down
Loading