diff options
author | Rodeo <[email protected]> | 2012-12-20 18:29:37 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-12-20 18:29:37 +0000 |
commit | a245d2a3945c53ebfc461776f8219d41f4f6ac12 (patch) | |
tree | daae8752301b0dd10cc185230ecae2facd79d4d5 /libhb | |
parent | 4d39a8e8624b61124941636b6b05c15aeed31af6 (diff) |
hb_x264_param_unparse: unset a few options that have no effect in the advanced options string.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5102 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/encx264.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c index 04c0be9a3..9e29ec334 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -946,10 +946,30 @@ char * hb_x264_param_unparse(const char *x264_preset, const char *x264_tune, } /* - * apply the additional advanced x264 options + * place additional x264 options in a dictionary */ entry = NULL; x264_opts = hb_encopts_to_dict(x264_encopts, HB_VCODEC_X264); + + /* + * some libx264 options are set via dedicated widgets in the video tab or + * hardcoded in libhb, and have no effect when present in the advanced x264 + * options string. + * + * clear them from x264_opts so as to not apply then during unparse. + */ + hb_dict_unset(&x264_opts, "qp"); + hb_dict_unset(&x264_opts, "qp_constant"); + hb_dict_unset(&x264_opts, "crf"); + hb_dict_unset(&x264_opts, "bitrate"); + hb_dict_unset(&x264_opts, "fps"); + hb_dict_unset(&x264_opts, "force-cfr"); + hb_dict_unset(&x264_opts, "sar"); + hb_dict_unset(&x264_opts, "annexb"); + + /* + * apply the additional x264 options + */ while ((entry = hb_dict_next(x264_opts, entry))) { // let's not pollute GUI logs with x264_param_parse return codes |