mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
MTS headers and commands.
This commit is contained in:
parent
0baf96d99a
commit
fd2f73b460
|
@ -58,6 +58,7 @@ int kvz_config_init(kvz_config *cfg)
|
|||
cfg->mv_rdo = 0;
|
||||
cfg->full_intra_search = 0;
|
||||
cfg->trskip_enable = 0;
|
||||
cfg->mts = 0;
|
||||
cfg->tr_depth_intra = 0;
|
||||
cfg->ime_algorithm = 0; /* hexbs */
|
||||
cfg->fme_level = 4;
|
||||
|
@ -449,6 +450,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
|
|||
|
||||
static const char * const sao_names[] = { "off", "edge", "band", "full", NULL };
|
||||
|
||||
static const char * const mts_names[] = { "off", "intra", "inter", "both", NULL };
|
||||
|
||||
static const char * const scaling_list_names[] = { "off", "custom", "default", NULL };
|
||||
|
||||
static const char * const rc_algorithm_names[] = { "no-rc", "lambda", "oba", NULL };
|
||||
|
@ -810,6 +813,11 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
|
|||
cfg->full_intra_search = atobool(value);
|
||||
else if OPT("transform-skip")
|
||||
cfg->trskip_enable = atobool(value);
|
||||
else if OPT("mts") {
|
||||
int8_t mts_type = 0;
|
||||
if (!parse_enum(value, mts_names, &mts_type)) mts_type = atobool(value) ? 3 : 0;
|
||||
cfg->mts = mts_type;
|
||||
}
|
||||
else if OPT("tr-depth-intra")
|
||||
cfg->tr_depth_intra = atoi(value);
|
||||
else if OPT("me") {
|
||||
|
|
|
@ -62,6 +62,8 @@ static const struct option long_options[] = {
|
|||
{ "no-full-intra-search", no_argument, NULL, 0 },
|
||||
{ "transform-skip", no_argument, NULL, 0 },
|
||||
{ "no-transform-skip", no_argument, NULL, 0 },
|
||||
{ "mts", required_argument, NULL, 0 },
|
||||
{ "no-mts", no_argument, NULL, 0 },
|
||||
{ "tr-depth-intra", required_argument, NULL, 0 },
|
||||
{ "me", required_argument, NULL, 0 },
|
||||
{ "subme", required_argument, NULL, 0 },
|
||||
|
|
|
@ -594,9 +594,15 @@ static void encoder_state_write_bitstream_seq_parameter_set(bitstream_t* stream,
|
|||
|
||||
|
||||
WRITE_U(stream, 0, 1, "sps_transform_skip_enabled_flag");
|
||||
WRITE_U(stream, 0, 1, "sps_mts_enabled_flag");
|
||||
WRITE_U(stream, 0, 1, "sps_lfnst_enabled_flag");
|
||||
|
||||
const uint8_t mts_selection = encoder->cfg.mts;
|
||||
WRITE_U(stream, mts_selection ? 1 : 0, 1, "sps_mts_enabled_flag");
|
||||
if (mts_selection){
|
||||
WRITE_U(stream, mts_selection == KVZ_MTS_INTRA || mts_selection == KVZ_MTS_BOTH ? 1 : 0, 1, "sps_explicit_mts_intra_enabled_flag");
|
||||
WRITE_U(stream, mts_selection == KVZ_MTS_INTER || mts_selection == KVZ_MTS_BOTH ? 1 : 0, 1, "sps_explicit_mts_inter_enabled_flag");
|
||||
}
|
||||
|
||||
WRITE_U(stream, 0, 1, "sps_lfnst_enabled_flag");
|
||||
|
||||
WRITE_U(stream, 0, 1, "sps_joint_cbcr_enabled_flag");
|
||||
|
||||
|
|
|
@ -215,6 +215,13 @@ enum kvz_sao {
|
|||
KVZ_SAO_FULL = 3
|
||||
};
|
||||
|
||||
enum kvz_mts {
|
||||
KVZ_MTS_OFF = 0,
|
||||
KVZ_MTS_INTRA = 1,
|
||||
KVZ_MTS_INTER = 2,
|
||||
KVZ_MTS_BOTH = 3
|
||||
};
|
||||
|
||||
enum kvz_scalinglist {
|
||||
KVZ_SCALING_LIST_OFF = 0,
|
||||
KVZ_SCALING_LIST_CUSTOM = 1,
|
||||
|
@ -293,6 +300,7 @@ typedef struct kvz_config
|
|||
int32_t rdo; /*!< \brief RD-calculation level (0..2) */
|
||||
int32_t full_intra_search; /*!< \brief If true, don't skip modes in intra search. */
|
||||
int32_t trskip_enable; /*!< \brief Flag to enable transform skip (for 4x4 blocks). */
|
||||
enum kvz_mts mts; /*< \brief flag to enable multiple transform selection*/
|
||||
int32_t tr_depth_intra; /*!< \brief Maximum transform depth for intra. */
|
||||
enum kvz_ime_algorithm ime_algorithm; /*!< \brief Integer motion estimation algorithm. */
|
||||
int32_t fme_level; /*!< \brief Fractional pixel motion estimation level (0: disabled, 1: enabled). */
|
||||
|
|
Loading…
Reference in a new issue