summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authordynaflash <[email protected]>2010-02-11 23:38:00 +0000
committerdynaflash <[email protected]>2010-02-11 23:38:00 +0000
commit748a83548709b07001f3a715dcb11279609d9395 (patch)
tree806ef5653b28b982537410fd3bb2d3823a842aa4 /gtk
parent5212b9a80b24015b8c638d49e789d253ddc70eb5 (diff)
Adjustable picture modulus: Base patch by BradleyS, Thanks BradleyS!
- Enables setting modulus for all anamorphic modes (including non-anamorphic) except strict. The job variable "anamorphic.modulus" is repurposed for this and is renamed to simply "modulus" - Other changes: Increases minimum output dimensions to 32x32 pixels in libhb (prevents possible crashes, notably in macgui). Better crop value and maximum crop value calculations to prevent crashes. Some code optimization / refactoring. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3113 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/hb-backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index fb76aa7c2..feef2b7fe 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3487,7 +3487,7 @@ ghb_set_scale(signal_user_data_t *ud, gint mode)
job->anamorphic.mode = pic_par;
// 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 = mod;
+ job->modulus = mod;
job->anamorphic.par_width = title->pixel_aspect_width;
job->anamorphic.par_height = title->pixel_aspect_height;
job->anamorphic.dar_width = 0;
@@ -3630,7 +3630,7 @@ set_preview_job_settings(hb_job_t *job, GValue *settings)
job->crop[3] = ghb_settings_get_int(settings, "PictureRightCrop");
job->anamorphic.mode = ghb_settings_combo_int(settings, "PicturePAR");
- job->anamorphic.modulus =
+ job->modulus =
ghb_settings_combo_int(settings, "PictureModulus");
job->width = ghb_settings_get_int(settings, "scale_width");
job->height = ghb_settings_get_int(settings, "scale_height");
@@ -3647,7 +3647,7 @@ set_preview_job_settings(hb_job_t *job, GValue *settings)
job->crop[1] = 0;
job->crop[2] = 0;
job->crop[3] = 0;
- job->anamorphic.modulus = 2;
+ job->modulus = 2;
}
gboolean decomb_deint = ghb_settings_get_boolean(settings, "PictureDecombDeinterlace");
@@ -4356,7 +4356,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
gboolean keep_aspect;
keep_aspect = ghb_settings_get_boolean(js, "PictureKeepRatio");
job->anamorphic.mode = ghb_settings_combo_int(js, "PicturePAR");
- job->anamorphic.modulus = ghb_settings_combo_int(js, "PictureModulus");
+ job->modulus = ghb_settings_combo_int(js, "PictureModulus");
if (job->anamorphic.mode)
{
job->anamorphic.par_width = title->pixel_aspect_width;