summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-03-28 23:36:41 +0000
committerjstebbins <[email protected]>2009-03-28 23:36:41 +0000
commitc9d3e3fe9cc868eab8b786fef1c5166b32fa31a7 (patch)
tree122a7d53a90522bbe25a48530e0f19143af8eed4
parent9da98dda5e445c2559d1cccf0943e067ac149155 (diff)
LinGui: make KeepAspect flag differentiate mode 2 and mode 3 anamorphic
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2283 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/hb-backend.c18
-rw-r--r--gtk/src/makedeps.c1
2 files changed, 11 insertions, 8 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index f0b653ba6..8a4f04640 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 386d24af3..98b8aeede 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},