diff options
-rw-r--r-- | gtk/src/hb-backend.c | 3 | ||||
-rw-r--r-- | gtk/src/preview.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index d3f85a9c8..4b765da29 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -3933,7 +3933,10 @@ ghb_set_scale_settings(GValue *settings, gint mode) job->anamorphic.dar_height = 0; if (keep_height && pic_par == 2) + { width = ((double)height * crop_width / crop_height); + width = MOD_ROUND(width, mod); + } job->width = width; job->height = height; job->maxWidth = max_width; diff --git a/gtk/src/preview.h b/gtk/src/preview.h index f89e4f335..089d60d1c 100644 --- a/gtk/src/preview.h +++ b/gtk/src/preview.h @@ -16,7 +16,7 @@ #if !defined(_GHB_PREVIEW_H_) #define _GHB_PREVIEW_H_ -#define MOD_ROUND(v,m) ((m==1)?v:(m * ((v + (m>>1) - 1) / m))) +#define MOD_ROUND(v,m) ((m==1)?v:(m * ((v + (m>>1)) / m))) #define MOD_DOWN(v,m) (m * (v / m)) #define MOD_UP(v,m) (m * ((v + m - 1) / m)) |