diff options
author | Rodeo <[email protected]> | 2012-11-05 14:17:38 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-11-05 14:17:38 +0000 |
commit | 20c5dd3faa9a524efa9772faf1300523f3ae675a (patch) | |
tree | 469ecf8304b017c021e2fa8d29deb2c867a93726 /libhb/encx264.h | |
parent | 48e2482dc710dc2b53f1bce12c5cbda761915fb2 (diff) |
Add a utility function to check whether an H.264 level can be used given the current encoding parameters.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5044 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encx264.h')
-rw-r--r-- | libhb/encx264.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libhb/encx264.h b/libhb/encx264.h index 56b0163e9..a9c9dac97 100644 --- a/libhb/encx264.h +++ b/libhb/encx264.h @@ -41,6 +41,21 @@ static const char * const hb_x264_encopt_synonyms[][2] = }; /* + * Check whether a valid h264_level is compatible with the given framerate, + * resolution and interlaced compression/flags combination. + * + * width, height, fps_num and fps_den should be greater than zero. + * + * interlacing parameters can be set to zero when the information is + * unavailable, as hb_apply_h264_level() will disable interlacing if necessary. + * + * Returns 0 if the level is valid and compatible, 1 otherwise. + */ +int hb_check_h264_level(const char *h264_level, int width, int height, + int fps_num, int fps_den, int interlaced, + int fake_interlaced); + +/* * Applies the restrictions of the requested H.264 level to an x264_param_t. * * Returns -1 if an invalid level (or no level) is specified. GUIs should be |