WinGui: Fix another instance of the Caliburn vs Json.net sillyness where objects...
[HandBrake.git] / libhb / encx264.h
blobeadad6859cbe66448993e86cc2366834ce73b9cc
1 /* encx264.h
3 Copyright (c) 2003-2015 HandBrake Team
4 This file is part of the HandBrake source code
5 Homepage: <http://handbrake.fr/>.
6 It may be used under the terms of the GNU General Public License v2.
7 For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
8 */
10 #include "x264.h"
11 #include "h264_common.h"
13 /* x264 preferred option names (left) and synonyms (right).
14 * The "preferred" names match names used in x264's param2string function more
15 * closely than their corresponding synonyms, or are just shorter. */
16 static const char * const hb_x264_encopt_synonyms[][2] =
18 { "deterministic", "n-deterministic", },
19 { "level", "level-idc", },
20 { "ref", "frameref", },
21 { "keyint-min", "min-keyint", },
22 { "no-deblock", "nf", },
23 { "deblock", "filter", },
24 { "cqm", "cqmfile", },
25 { "analyse", "partitions", },
26 { "weightb", "weight-b", },
27 { "direct", "direct-pred", },
28 { "merange", "me-range", },
29 { "mvrange", "mv-range", },
30 { "mvrange-thread", "mv-range-thread", },
31 { "subme", "subq", },
32 { "qp", "qp_constant", },
33 { "qpmin", "qp-min", },
34 { "qpmax", "qp-max", },
35 { "qpstep", "qp-step", },
36 { "ipratio", "ip-factor", },
37 { "pbratio", "pb-factor", },
38 { "cplxblur", "cplx-blur", },
39 { NULL, NULL, },
43 * Check whether a valid h264_level is compatible with the given framerate,
44 * resolution and interlaced compression/flags combination.
46 * width, height, fps_num and fps_den should be greater than zero.
48 * interlacing parameters can be set to zero when the information is
49 * unavailable, as hb_apply_h264_level() will disable interlacing if necessary.
51 * Returns 0 if the level is valid and compatible, 1 otherwise.
53 int hb_check_h264_level(const char *h264_level, int width, int height,
54 int fps_num, int fps_den, int interlaced,
55 int fake_interlaced);
58 * Applies the restrictions of the requested H.264 level to an x264_param_t.
60 * Returns -1 if an invalid level (or no level) is specified. GUIs should be
61 * capable of always providing a valid level.
63 * Does not modify resolution/framerate but warns when they exceed level limits.
65 * Based on a x264_param_apply_level() draft and other x264 code.
67 int hb_apply_h264_level(x264_param_t *param, const char *h264_level,
68 const char *x264_profile, int verbose);
71 * Applies the restrictions of the requested H.264 profile to an x264_param_t.
73 * x264_param_apply_profile wrapper designed to always succeed when a valid
74 * H.264 profile is specified (unlike x264's function).
76 int hb_apply_h264_profile(x264_param_t *param, const char *h264_profile,
77 int verbose);