if (anamorphic)
{
- job->anamorphic.mode = autoscale ? 2 : 3;
+ job->anamorphic.mode = autoscale || keep_aspect ? 2 : 3;
// The scaler crashes if the dimensions are not divisible by 2
// Align mod 2. And so does something in x264_encoder_headers()
job->anamorphic.modulus = round_dims ? 16 : 2;
job->crop[2] = ghb_settings_get_int(settings, "PictureLeftCrop");
job->crop[3] = ghb_settings_get_int(settings, "PictureRightCrop");
- gboolean anamorphic, round_dimensions, autoscale;
+ gboolean anamorphic, round_dimensions, autoscale, keep_aspect;
autoscale = ghb_settings_get_boolean(settings, "autoscale");
anamorphic = ghb_settings_get_boolean(settings, "anamorphic");
round_dimensions = ghb_settings_get_boolean(settings, "ModDimensions");
+ keep_aspect = ghb_settings_get_boolean(settings, "PictureKeepRatio");
if (anamorphic)
{
job->anamorphic.modulus = round_dimensions ? 16 : 2;
- job->anamorphic.mode = autoscale ? 2 : 3;
+ job->anamorphic.mode = autoscale || keep_aspect ? 2 : 3;
}
else
{
job->deinterlace = 0;
job->grayscale = ghb_settings_get_boolean(js, "VideoGrayScale");
- gboolean autoscale = ghb_settings_get_boolean(js, "autoscale");
- gboolean anamorphic = ghb_settings_get_boolean(js, "anamorphic");
- gboolean round_dimensions = ghb_settings_get_boolean(js, "ModDimensions");
+ gboolean autoscale, anamorphic, round_dimensions, keep_aspect;
+
+ autoscale = ghb_settings_get_boolean(js, "autoscale");
+ anamorphic = ghb_settings_get_boolean(js, "anamorphic");
+ round_dimensions = ghb_settings_get_boolean(js, "ModDimensions");
+ keep_aspect = ghb_settings_get_boolean(js, "PictureKeepRatio");
if (anamorphic)
{
- job->anamorphic.mode = autoscale ? 2 : 3;
+ job->anamorphic.mode = autoscale || keep_aspect ? 2 : 3;
// Also, x264 requires things to be divisible by 2.
job->anamorphic.modulus = round_dimensions ? 16 : 2;
}
{"PictureAutoCrop", "PictureRightCrop", "FALSE", FALSE, FALSE},
{"autoscale", "scale_width", "FALSE", FALSE, FALSE},
{"autoscale", "scale_height", "FALSE", FALSE, FALSE},
- {"anamorphic", "PictureKeepRatio", "FALSE", FALSE, FALSE},
// "CHECK" is a dummy value that forces scale_height deps to
// be re-evaluated whenever anamorphic changes
{"anamorphic", "scale_height", "CHECK", TRUE, FALSE},