[LMCS] Add commandline option to enable LMCS

This commit is contained in:
Marko Viitanen 2021-04-30 09:51:41 +03:00
parent 74eabc8089
commit 3d9d1930d8
3 changed files with 6 additions and 0 deletions

View file

@ -48,6 +48,7 @@ int kvz_config_init(kvz_config *cfg)
cfg->intra_qp_offset_auto = true;
cfg->intra_period = 64;
cfg->vps_period = 0;
cfg->lmcs_enable = 0;
cfg->deblock_enable = 0;
cfg->deblock_beta = 0;
cfg->deblock_tc = 0;
@ -882,6 +883,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
cfg->vps_period = atoi(value);
else if OPT("ref")
cfg->ref_frames = atoi(value);
else if OPT("lmcs") {
cfg->lmcs_enable = atobool(value);
}
else if OPT("deblock") {
int beta, tc;
if (2 == sscanf(value, "%d:%d", &beta, &tc)) {

View file

@ -45,6 +45,7 @@ static const struct option long_options[] = {
{ "vps-period", required_argument, NULL, 0 },
{ "input-res", required_argument, NULL, 0 },
{ "input-fps", required_argument, NULL, 0 },
{ "lmcs", no_argument, NULL, 0 },
{ "deblock", required_argument, NULL, 0 },
{ "no-deblock", no_argument, NULL, 0 },
{ "sao", required_argument, NULL, 0 },

View file

@ -299,6 +299,7 @@ typedef struct kvz_config
double framerate; /*!< \brief Deprecated, will be removed. */
int32_t framerate_num; /*!< \brief Framerate numerator */
int32_t framerate_denom; /*!< \brief Framerate denominator */
int32_t lmcs_enable; /*!< \brief Flag to enable luma mapping with chroma scaling - filter */
int32_t deblock_enable; /*!< \brief Flag to enable deblocking filter */
enum kvz_sao sao_type; /*!< \brief Flag to enable sample adaptive offset filter */
enum kvz_alf alf_type; /*!< \brief Flag to enable adaptive loop filter */