From 214247b7cd78942b0d4670949a4639daa4ff0972 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sat, 28 Mar 2009 23:36:41 +0000 Subject: [PATCH] LinGui: make KeepAspect flag differentiate mode 2 and mode 3 anamorphic git-svn-id: svn://localhost/HandBrake/trunk@2283 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/hb-backend.c | 18 +++++++++++------- gtk/src/makedeps.c | 1 - 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index f0b653ba..8a4f0464 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2695,7 +2695,7 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) 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; @@ -2772,14 +2772,15 @@ set_preview_job_settings(hb_job_t *job, GValue *settings) 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 { @@ -3307,12 +3308,15 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) 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; } diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c index 386d24af..98b8aeed 100644 --- a/gtk/src/makedeps.c +++ b/gtk/src/makedeps.c @@ -50,7 +50,6 @@ static dependency_t dep_map[] = {"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}, -- 2.11.0