From ddc982577476967da6fb6bba6e79efba86b19067 Mon Sep 17 00:00:00 2001 From: rigaya Date: Tue, 3 Dec 2024 19:06:03 +0900 Subject: [PATCH] =?UTF-8?q?--temporal-layers=E3=82=92HEVC=E3=81=A7?= =?UTF-8?q?=E3=82=82=E4=BD=BF=E7=94=A8=E5=8F=AF=E8=83=BD=E3=81=AB=E3=80=82?= =?UTF-8?q?=20(=20#112=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VCECore/vce_cmd.cpp | 2 +- VCECore/vce_core.cpp | 10 +++++----- VCECore/vce_param.h | 2 ++ VCEEncC_Options.en.md | 4 ++-- VCEEncC_Options.ja.md | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/VCECore/vce_cmd.cpp b/VCECore/vce_cmd.cpp index 174668c..0808d17 100644 --- a/VCECore/vce_cmd.cpp +++ b/VCECore/vce_cmd.cpp @@ -222,7 +222,7 @@ tstring encoder_help() { _T(" - q-pel (best) = default\n") _T(" --vbaq [H.264/HEVC] enable VBAQ (default: auto)\n") _T(" --tiles [AV1] set num of tiles per frame\n") - _T(" --temporal-layers [AV1] set num of temporal layers\n") + _T(" --temporal-layers [HEVC/AV1] set num of temporal layers\n") _T(" --aq-mode [AV1] set AQ mode\n") _T(" - none\n") _T(" - caq\n") diff --git a/VCECore/vce_core.cpp b/VCECore/vce_core.cpp index 56d7067..be9d1ce 100644 --- a/VCECore/vce_core.cpp +++ b/VCECore/vce_core.cpp @@ -2299,7 +2299,7 @@ RGY_ERR VCECore::initEncoder(VCEParam *prm) { vbv_bufsize_kbps = max_bitrate_kbps; } else { max_bitrate_kbps = VCE_DEFAULT_MAX_BITRATE; - vbv_bufsize_kbps = VCE_DEFAULT_VBV_BUFSIZE; + vbv_bufsize_kbps = VCE_DEFAULT_MAX_BITRATE; } if (prm->codecParam[prm->codec].nLevel == 0) { prm->codecParam[prm->codec].nLevel = (int16_t)level; @@ -2425,6 +2425,10 @@ RGY_ERR VCECore::initEncoder(VCEParam *prm) { if (prm->codec == RGY_CODEC_HEVC || prm->codec == RGY_CODEC_AV1) { m_params.SetParam(AMF_PARAM_COLOR_BIT_DEPTH(prm->codec), (amf_int64)prm->outputDepth); + if (prm->temporalLayers.has_value()) { + m_params.SetParam(AMF_PARAM_MAX_NUM_TEMPORAL_LAYERS(prm->codec), (amf_int64)prm->temporalLayers.value()); + m_params.SetParam(AMF_PARAM_NUM_TEMPORAL_LAYERS(prm->codec), (amf_int64)prm->temporalLayers.value()); + } } if (prm->codec == RGY_CODEC_H264) { @@ -2504,10 +2508,6 @@ RGY_ERR VCECore::initEncoder(VCEParam *prm) { if (prm->tiles > 0) { m_params.SetParam(AMF_VIDEO_ENCODER_AV1_TILES_PER_FRAME, (amf_int64)prm->tiles); } - if (prm->temporalLayers.has_value()) { - m_params.SetParam(AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS, (amf_int64)prm->temporalLayers.value()); - m_params.SetParam(AMF_VIDEO_ENCODER_AV1_NUM_TEMPORAL_LAYERS, (amf_int64)prm->temporalLayers.value()); - } if (prm->cdefMode.has_value()) { m_params.SetParam(AMF_VIDEO_ENCODER_AV1_CDEF_MODE, (amf_int64)prm->cdefMode.value()); } diff --git a/VCECore/vce_param.h b/VCECore/vce_param.h index aeaf911..4843fdf 100644 --- a/VCECore/vce_param.h +++ b/VCECore/vce_param.h @@ -760,6 +760,8 @@ AMF_PARAM_H264_HEVC(END_OF_SEQUENCE); AMF_PARAM_H264_HEVC(FORCE_PICTURE_TYPE); AMF_PARAM_H264_HEVC(INSERT_AUD); AMF_PARAM_HEVC_AV1(COLOR_BIT_DEPTH); +AMF_PARAM_HEVC_AV1(NUM_TEMPORAL_LAYERS); +AMF_PARAM_HEVC_AV1(MAX_NUM_TEMPORAL_LAYERS); AMF_PARAM(QVBR_QUALITY_LEVEL); AMF_PARAM(INPUT_COLOR_PROFILE); AMF_PARAM(INPUT_TRANSFER_CHARACTERISTIC); diff --git a/VCEEncC_Options.en.md b/VCEEncC_Options.en.md index f20146c..c9e34e3 100644 --- a/VCEEncC_Options.en.md +++ b/VCEEncC_Options.en.md @@ -81,7 +81,7 @@ - [--screen-content-tools \[\=\\[,\=\\]...\]](#--screen-content-tools--param1value1param2value2) - [--cdf-update \[AV1\]](#--cdf-update-av1) - [--cdf-frame-end-update \[AV1\]](#--cdf-frame-end-update-av1) - - [--temporal-layers \ \[AV1\]](#--temporal-layers-int-av1) + - [--temporal-layers \ \[HEVC/AV1\]](#--temporal-layers-int-hevcav1) - [--aq-mode \ \[AV1\]](#--aq-mode-string-av1) - [--pe](#--pe) - [--pa \[\=\\[,\=\\]...\]](#--pa--param1value1param2value2) @@ -603,7 +603,7 @@ Enable CDF update. ### --cdf-frame-end-update [AV1] Enable CDF frame end update. -### --temporal-layers <int> [AV1] +### --temporal-layers <int> [HEVC/AV1] Number of temporal layers. ### --aq-mode <string> [AV1] diff --git a/VCEEncC_Options.ja.md b/VCEEncC_Options.ja.md index d485a0a..b2b3c52 100644 --- a/VCEEncC_Options.ja.md +++ b/VCEEncC_Options.ja.md @@ -79,7 +79,7 @@ - [--screen-content-tools \[\=\\[,\=\\]...\]](#--screen-content-tools--param1value1param2value2) - [--cdf-update \[AV1\]](#--cdf-update-av1) - [--cdf-frame-end-update \[AV1\]](#--cdf-frame-end-update-av1) - - [--temporal-layers \ \[AV1\]](#--temporal-layers-int-av1) + - [--temporal-layers \ \[HEVC/AV1\]](#--temporal-layers-int-hevcav1) - [--aq-mode \ \[AV1\]](#--aq-mode-string-av1) - [--pe](#--pe) - [--pa \[\=\\[,\=\\]...\]](#--pa--param1value1param2value2) @@ -543,7 +543,7 @@ Enable CDF update. ### --cdf-frame-end-update [AV1] Enable CDF frame end update. -### --temporal-layers <int> [AV1] +### --temporal-layers <int> [HEVC/AV1] Temporal layersの数。 ### --aq-mode <string> [AV1]