Показывать фактическую глубину GPU-конвейера без дополнительной TX-очереди
This commit is contained in:
1 parent
09f48403c5
commit
0343825746
3 files changed
+29
-26
No files matched your search
@@ -209,7 +209,8 @@ bool LiveVideoEncoder::open(const LiveVideoConfig& config, Backend backend) {
|
||||
} else if (name.endsWith("_amf")) {
|
||||
av_dict_set(&options, "usage", "ultralowlatency", 0);
|
||||
av_dict_set(&options, "quality", "speed", 0);
|
||||
av_dict_set(&options, "async_depth", "1", 0);
|
||||
bool asyncDepth = av_opt_find(c->priv_data, "async_depth", nullptr, 0, 0);
|
||||
if (asyncDepth) av_dict_set(&options, "async_depth", "1", 0);
|
||||
bool forceIdr = config.codec == STREAM_MEDIA_H264 || config.codec == STREAM_MEDIA_H265;
|
||||
m->forcedKeys = forceIdr && av_opt_find(c->priv_data, "forced_idr", nullptr, 0, 0);
|
||||
if (m->forcedKeys) av_dict_set(&options, "forced_idr", "1", 0);
|
||||
@@ -220,8 +221,8 @@ bool LiveVideoEncoder::open(const LiveVideoConfig& config, Backend backend) {
|
||||
if (config.codec == STREAM_MEDIA_H265) av_dict_set(&options, "profile_tier", "main", 0);
|
||||
}
|
||||
DEBUG_INFO(DEBUG_CATEGORY_VIDEO,
|
||||
"desktop AMF low latency settings name=%s usage=ultralowlatency quality=speed async_depth=1 forced_idr=%d",
|
||||
name.constData(), m->forcedKeys);
|
||||
"desktop AMF low latency settings name=%s usage=ultralowlatency quality=speed async_depth=%s forced_idr=%d",
|
||||
name.constData(), asyncDepth ? "1" : "driver", m->forcedKeys);
|
||||
} else if (name == "libvpx-vp9" || name == "libaom-av1") {
|
||||
av_dict_set(&options, "deadline", "realtime", 0); av_dict_set(&options, "cpu-used", "8", 0);
|
||||
av_dict_set(&options, "lag-in-frames", "0", 0); av_dict_set(&options, "row-mt", "1", 0);
|
||||
@@ -443,11 +444,11 @@ bool LiveVideoEncoder::encode(const QImage& image, uint64_t pts, bool key, QList
|
||||
if (m->reportTimer.elapsed() >= 1000) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG,
|
||||
"video encoder flow name=%s size=%dx%d bitrate=%d interval_us=%lld inputs=%u outputs=%u keys=%u "
|
||||
"prepare_max_us=%lld submit_max_us=%lld drain_max_us=%lld key_max_us=%lld delta_max_us=%lld pts=%llu",
|
||||
"prepare_max_us=%lld submit_max_us=%lld drain_max_us=%lld key_max_us=%lld delta_max_us=%lld pending=%zu pts=%llu",
|
||||
qPrintable(m->name), m->config.width, m->config.height, m->config.bitrate,
|
||||
(long long)(m->reportTimer.nsecsElapsed() / 1000), m->inputs, m->outputs, m->keys,
|
||||
(long long)m->prepareMax, (long long)m->submitMax, (long long)m->drainMax,
|
||||
(long long)m->keyMax, (long long)m->deltaMax, (unsigned long long)pts);
|
||||
(long long)m->keyMax, (long long)m->deltaMax, m->timestamps.size(), (unsigned long long)pts);
|
||||
m->reportTimer.restart(); m->inputs = m->outputs = m->keys = 0;
|
||||
m->slowReported = false;
|
||||
m->prepareMax = m->submitMax = m->drainMax = m->keyMax = m->deltaMax = 0;
|
||||
|
||||
Reference in new issue
Block a user