From bb4f50adedef2b175fd4a0f1b21b3d411432d679 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Thu, 5 Nov 2015 13:59:30 +0200 Subject: [PATCH] Added mv-rdo commandline parameter and use it in presets --- README.md | 2 ++ src/Makefile | 2 +- src/cli.c | 3 +++ src/config.c | 15 ++++++++++++++- src/kvazaar_version.h | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ab9ea1b..a57335b5 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ http://ultravideo.cs.tut.fi/#encoder for more information. 0: no RDO 1: estimated RDO 2: full RDO + --mv-rdo : Enable Rate-Distortion Optimized motion vector costs --full-intra-search : Try all intra modes. --no-transform-skip : Disable transform skip --aud : Use access unit delimiters @@ -148,6 +149,7 @@ subme | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 sao | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 rdoq | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 transform-skip | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 +mv-rdo | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 full-intra-search | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 diff --git a/src/Makefile b/src/Makefile index c906f69e..289198c5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,7 @@ DLLDIR = $(BINDIR) # Library version number VER_MAJOR = 2 -VER_MINOR = 1 +VER_MINOR = 2 VER_RELEASE = 0 PROG = kvazaar diff --git a/src/cli.c b/src/cli.c index 31b7f35e..64b78df3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -91,6 +91,8 @@ static const struct option long_options[] = { { "no-bipred", no_argument, NULL, 0 }, { "bitrate", required_argument, NULL, 0 }, { "preset", required_argument, NULL, 0 }, + { "mv-rdo", no_argument, NULL, 0 }, + { "no-mv-rdo", no_argument, NULL, 0 }, {0, 0, 0, 0} }; @@ -291,6 +293,7 @@ void print_help(void) " 0: no RDO\n" " 1: estimated RDO\n" " 2: full RDO\n" + " --mv-rdo : Enable Rate-Distortion Optimized motion vector costs\n" " --full-intra-search : Try all intra modes.\n" " --me : Set integer motion estimation algorithm [\"hexbs\"]\n" " \"hexbs\": Hexagon Based Search (faster)\n" diff --git a/src/config.c b/src/config.c index 9dfe3002..3a044837 100644 --- a/src/config.c +++ b/src/config.c @@ -56,6 +56,7 @@ int kvz_config_init(kvz_config *cfg) cfg->rdoq_enable = 1; cfg->signhide_enable = true; cfg->rdo = 1; + cfg->mv_rdo = 0; cfg->full_intra_search = 0; cfg->trskip_enable = 1; cfg->tr_depth_intra = 0; @@ -278,7 +279,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) static const char * const colormatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m", "smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL }; - static const char * const preset_values[11][26] = { + static const char * const preset_values[11][28] = { { "ultrafast", "pu-depth-intra", "2-3", @@ -293,6 +294,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -309,6 +311,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -325,6 +328,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -341,6 +345,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -357,6 +362,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -373,6 +379,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -389,6 +396,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "0", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -405,6 +413,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "1", "transform-skip", "0", "full-intra-search", "0", + "mv-rdo", "0", NULL }, { @@ -421,6 +430,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "1", "transform-skip", "1", "full-intra-search", "0", + "mv-rdo", "1", NULL }, { @@ -437,6 +447,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) "rdoq", "1", "transform-skip", "1", "full-intra-search", "1", + "mv-rdo", "1", NULL }, { NULL } @@ -631,6 +642,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value) return 0; } } + else if OPT("mv-rdo") + cfg->mv_rdo = atobool(value); else return 0; #undef OPT diff --git a/src/kvazaar_version.h b/src/kvazaar_version.h index aba9a2d8..de58fb6a 100644 --- a/src/kvazaar_version.h +++ b/src/kvazaar_version.h @@ -21,6 +21,6 @@ ****************************************************************************/ // KVZ_API_VERSION is incremented every time the public api changes. -#define KVZ_API_VERSION 8 +#define KVZ_API_VERSION 9 #endif // KVAZAAR_VERSION_H_