summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-09-09 01:17:10 +0000
committerRodeo <[email protected]>2012-09-09 01:17:10 +0000
commit9a4cc6f98065d5887faa3e202dc42b71a41a4c4e (patch)
treea2035c8d5082207161e417f1e57aab8c07d97bb7 /libhb
parentac59f6afae162450e7d3a4af8106dba75bc5b88f (diff)
encx264: make hb_x264_encopt_synonyms two-dimensional instead of faking it.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4946 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/encx264.c6
-rw-r--r--libhb/encx264.h44
2 files changed, 25 insertions, 25 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c
index 889669381..2d29168ab 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -877,8 +877,8 @@ const char * const * hb_h264_levels()
const char * hb_x264_encopt_name(const char *name)
{
int i;
- for (i = 0; hb_x264_encopt_synonyms[i] && hb_x264_encopt_synonyms[i+1]; i += 2)
- if (!strcmp(name, hb_x264_encopt_synonyms[i+1]))
- return hb_x264_encopt_synonyms[i];
+ for (i = 0; hb_x264_encopt_synonyms[i][0] != NULL; i++)
+ if (!strcmp(name, hb_x264_encopt_synonyms[i][1]))
+ return hb_x264_encopt_synonyms[i][0];
return name;
}
diff --git a/libhb/encx264.h b/libhb/encx264.h
index e7c4b08f6..427ea2861 100644
--- a/libhb/encx264.h
+++ b/libhb/encx264.h
@@ -15,29 +15,29 @@ static const int const hb_h264_level_values[] = { 10, 9, 11, 12,
/* x264 preferred option names (left) and synonyms (right).
* The "preferred" names match names used in x264's param2string function more
* closely than their corresponding synonyms, or are just shorter. */
-static const char * const hb_x264_encopt_synonyms[] =
+static const char * const hb_x264_encopt_synonyms[][2] =
{
- "deterministic", "n-deterministic",
- "level", "level-idc",
- "ref", "frameref",
- "keyint-min", "min-keyint",
- "deblock", "filter",
- "analyse", "partitions",
- "weightb", "weight-b",
- "direct", "direct-pred",
- "merange", "me-range",
- "mvrange", "mv-range",
- "mvrange-thread", "mv-range-thread",
- "subme", "subq",
- "qp", "qp_constant",
- "qpmin", "qp-min",
- "qpmax", "qp-max",
- "qpstep", "qp-step",
- "ipratio", "ip-factor",
- "pbratio", "pb-factor",
- "cplxblur", "cplx-blur",
- "cqm", "cqmfile",
- 0
+ { "deterministic", "n-deterministic", },
+ { "level", "level-idc", },
+ { "ref", "frameref", },
+ { "keyint-min", "min-keyint", },
+ { "deblock", "filter", },
+ { "analyse", "partitions", },
+ { "weightb", "weight-b", },
+ { "direct", "direct-pred", },
+ { "merange", "me-range", },
+ { "mvrange", "mv-range", },
+ { "mvrange-thread", "mv-range-thread", },
+ { "subme", "subq", },
+ { "qp", "qp_constant", },
+ { "qpmin", "qp-min", },
+ { "qpmax", "qp-max", },
+ { "qpstep", "qp-step", },
+ { "ipratio", "ip-factor", },
+ { "pbratio", "pb-factor", },
+ { "cplxblur", "cplx-blur", },
+ { "cqm", "cqmfile", },
+ { NULL, NULL, },
};
int hb_apply_h264_level(x264_param_t *param,