Added mv-rdo commandline parameter and use it in presets

This commit is contained in:
Marko Viitanen 2015-11-05 13:59:30 +02:00
parent 4e7e9eefbf
commit bb4f50aded
5 changed files with 21 additions and 3 deletions

View file

@ -42,6 +42,7 @@ http://ultravideo.cs.tut.fi/#encoder for more information.
0: no RDO 0: no RDO
1: estimated RDO 1: estimated RDO
2: full RDO 2: full RDO
--mv-rdo : Enable Rate-Distortion Optimized motion vector costs
--full-intra-search : Try all intra modes. --full-intra-search : Try all intra modes.
--no-transform-skip : Disable transform skip --no-transform-skip : Disable transform skip
--aud : Use access unit delimiters --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 sao | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1
rdoq | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 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 full-intra-search | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1

View file

@ -13,7 +13,7 @@ DLLDIR = $(BINDIR)
# Library version number # Library version number
VER_MAJOR = 2 VER_MAJOR = 2
VER_MINOR = 1 VER_MINOR = 2
VER_RELEASE = 0 VER_RELEASE = 0
PROG = kvazaar PROG = kvazaar

View file

@ -91,6 +91,8 @@ static const struct option long_options[] = {
{ "no-bipred", no_argument, NULL, 0 }, { "no-bipred", no_argument, NULL, 0 },
{ "bitrate", required_argument, NULL, 0 }, { "bitrate", required_argument, NULL, 0 },
{ "preset", 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} {0, 0, 0, 0}
}; };
@ -291,6 +293,7 @@ void print_help(void)
" 0: no RDO\n" " 0: no RDO\n"
" 1: estimated RDO\n" " 1: estimated RDO\n"
" 2: full RDO\n" " 2: full RDO\n"
" --mv-rdo : Enable Rate-Distortion Optimized motion vector costs\n"
" --full-intra-search : Try all intra modes.\n" " --full-intra-search : Try all intra modes.\n"
" --me <string> : Set integer motion estimation algorithm [\"hexbs\"]\n" " --me <string> : Set integer motion estimation algorithm [\"hexbs\"]\n"
" \"hexbs\": Hexagon Based Search (faster)\n" " \"hexbs\": Hexagon Based Search (faster)\n"

View file

@ -56,6 +56,7 @@ int kvz_config_init(kvz_config *cfg)
cfg->rdoq_enable = 1; cfg->rdoq_enable = 1;
cfg->signhide_enable = true; cfg->signhide_enable = true;
cfg->rdo = 1; cfg->rdo = 1;
cfg->mv_rdo = 0;
cfg->full_intra_search = 0; cfg->full_intra_search = 0;
cfg->trskip_enable = 1; cfg->trskip_enable = 1;
cfg->tr_depth_intra = 0; 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", static const char * const colormatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL }; "smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL };
static const char * const preset_values[11][26] = { static const char * const preset_values[11][28] = {
{ {
"ultrafast", "ultrafast",
"pu-depth-intra", "2-3", "pu-depth-intra", "2-3",
@ -293,6 +294,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -309,6 +311,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -325,6 +328,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -341,6 +345,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -357,6 +362,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -373,6 +379,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -389,6 +396,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "0", "rdoq", "0",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -405,6 +413,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "1", "rdoq", "1",
"transform-skip", "0", "transform-skip", "0",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "0",
NULL NULL
}, },
{ {
@ -421,6 +430,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "1", "rdoq", "1",
"transform-skip", "1", "transform-skip", "1",
"full-intra-search", "0", "full-intra-search", "0",
"mv-rdo", "1",
NULL NULL
}, },
{ {
@ -437,6 +447,7 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
"rdoq", "1", "rdoq", "1",
"transform-skip", "1", "transform-skip", "1",
"full-intra-search", "1", "full-intra-search", "1",
"mv-rdo", "1",
NULL NULL
}, },
{ NULL } { NULL }
@ -631,6 +642,8 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
return 0; return 0;
} }
} }
else if OPT("mv-rdo")
cfg->mv_rdo = atobool(value);
else else
return 0; return 0;
#undef OPT #undef OPT

View file

@ -21,6 +21,6 @@
****************************************************************************/ ****************************************************************************/
// KVZ_API_VERSION is incremented every time the public api changes. // 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_ #endif // KVAZAAR_VERSION_H_