mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
[cclm] Add commandline argument
This commit is contained in:
parent
70f6afff4f
commit
1c431d8f88
|
@ -23,7 +23,7 @@ AC_CONFIG_SRCDIR([src/encmain.c])
|
||||||
#
|
#
|
||||||
# Here is a somewhat sane guide to lib versioning: http://apr.apache.org/versioning.html
|
# Here is a somewhat sane guide to lib versioning: http://apr.apache.org/versioning.html
|
||||||
ver_major=6
|
ver_major=6
|
||||||
ver_minor=6
|
ver_minor=7
|
||||||
ver_release=0
|
ver_release=0
|
||||||
|
|
||||||
# Prevents configure from adding a lot of defines to the CFLAGS
|
# Prevents configure from adding a lot of defines to the CFLAGS
|
||||||
|
|
|
@ -209,6 +209,8 @@ int kvz_config_init(kvz_config *cfg)
|
||||||
|
|
||||||
cfg->amvr = 0;
|
cfg->amvr = 0;
|
||||||
|
|
||||||
|
cfg->cclm = 0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1486,6 +1488,9 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
|
||||||
else if OPT("amvr") {
|
else if OPT("amvr") {
|
||||||
cfg->amvr = (bool)atobool(value);
|
cfg->amvr = (bool)atobool(value);
|
||||||
}
|
}
|
||||||
|
else if OPT("cclm") {
|
||||||
|
cfg->cclm = (bool)atobool(value);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
10
src/cli.c
10
src/cli.c
|
@ -178,6 +178,8 @@ static const struct option long_options[] = {
|
||||||
{ "no-jccr", no_argument, NULL, 0 },
|
{ "no-jccr", no_argument, NULL, 0 },
|
||||||
{ "amvr", no_argument, NULL, 0 },
|
{ "amvr", no_argument, NULL, 0 },
|
||||||
{ "no-amvr", no_argument, NULL, 0 },
|
{ "no-amvr", no_argument, NULL, 0 },
|
||||||
|
{ "cclm", no_argument, NULL, 0 },
|
||||||
|
{ "no-cclm", no_argument, NULL, 0 },
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -629,8 +631,12 @@ void print_help(void)
|
||||||
" - both: MTS applied for both intra and inter blocks.\n"
|
" - both: MTS applied for both intra and inter blocks.\n"
|
||||||
" - implicit: uses implicit MTS. Applies DST7 instead \n"
|
" - implicit: uses implicit MTS. Applies DST7 instead \n"
|
||||||
" of DCT2 to certain intra blocks.\n"
|
" of DCT2 to certain intra blocks.\n"
|
||||||
" --(no-)jccr : Joint coding of chroma residual.\n"
|
" --(no-)jccr : Joint coding of chroma residual. "
|
||||||
" Requires rdo> = 2. [disabled]\n"
|
" Requires rdo> = 2. [disabled]\n"
|
||||||
|
" --(no-)cclm : Cross component linear model. \n"
|
||||||
|
" Extra chroma prediction modes that are formed\n"
|
||||||
|
" via linear transformation from the luma\n"
|
||||||
|
" prediction. Requires rdo >=3. [disabled\n"
|
||||||
" --(no-)amvr : Adaptive Motion Vector Resolution.\n"
|
" --(no-)amvr : Adaptive Motion Vector Resolution.\n"
|
||||||
" Code some mv's with reduced resolution [disabled]\n"
|
" Code some mv's with reduced resolution [disabled]\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -722,7 +722,7 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream,
|
||||||
WRITE_U(stream, 0, 1, "sps_mip_enabled_flag");
|
WRITE_U(stream, 0, 1, "sps_mip_enabled_flag");
|
||||||
// if(!no_cclm_constraint_flag)
|
// if(!no_cclm_constraint_flag)
|
||||||
if(encoder->chroma_format != KVZ_CSP_400) {
|
if(encoder->chroma_format != KVZ_CSP_400) {
|
||||||
WRITE_U(stream, 0, 1, "sps_cclm_enabled_flag");
|
WRITE_U(stream, encoder->cfg.cclm, 1, "sps_cclm_enabled_flag");
|
||||||
}
|
}
|
||||||
if (encoder->chroma_format == KVZ_CSP_420) {
|
if (encoder->chroma_format == KVZ_CSP_420) {
|
||||||
WRITE_U(stream, 0, 1, "sps_chroma_horizontal_collocated_flag");
|
WRITE_U(stream, 0, 1, "sps_chroma_horizontal_collocated_flag");
|
||||||
|
|
|
@ -516,6 +516,8 @@ typedef struct kvz_config
|
||||||
|
|
||||||
int8_t jccr;
|
int8_t jccr;
|
||||||
|
|
||||||
|
int8_t cclm;
|
||||||
|
|
||||||
int8_t amvr; /* \brief Adaptive motion vector resolution parameter */
|
int8_t amvr; /* \brief Adaptive motion vector resolution parameter */
|
||||||
} kvz_config;
|
} kvz_config;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue