| 4276 | } |
| 4277 | |
| 4278 | void |
| 4279 | ghb_set_scale(signal_user_data_t *ud, gint mode) |
| 4280 | { |
| 4281 | if (scale_busy) return; |
| 4282 | ghb_set_scale_busy(TRUE); |
| 4283 | |
| 4284 | ghb_set_scale_settings(ud, ud->settings, mode); |
| 4285 | ghb_update_summary_info(ud); |
| 4286 | ghb_picture_settings_deps(ud); |
| 4287 | |
| 4288 | // Step needs to be at least 2 because odd widths cause scaler crash |
| 4289 | // subsampled chroma requires even crop values. |
| 4290 | GtkWidget *widget; |
| 4291 | int mod = ghb_dict_get_int(ud->settings, "PictureModulus"); |
| 4292 | widget = ghb_builder_widget("scale_width"); |
| 4293 | gtk_spin_button_set_increments (GTK_SPIN_BUTTON(widget), mod, 16); |
| 4294 | widget = ghb_builder_widget("scale_height"); |
| 4295 | gtk_spin_button_set_increments (GTK_SPIN_BUTTON(widget), mod, 16); |
| 4296 | |
| 4297 | ghb_ui_update_from_settings("PictureUseMaximumSize", ud->settings); |
| 4298 | ghb_ui_update_from_settings("PictureKeepRatio", ud->settings); |
| 4299 | |
| 4300 | ghb_ui_update_from_settings("PictureTopCrop", ud->settings); |
| 4301 | ghb_ui_update_from_settings("PictureBottomCrop", ud->settings); |
| 4302 | ghb_ui_update_from_settings("PictureLeftCrop", ud->settings); |
| 4303 | ghb_ui_update_from_settings("PictureRightCrop", ud->settings); |
| 4304 | |
| 4305 | ghb_ui_update_from_settings("scale_width", ud->settings); |
| 4306 | ghb_ui_update_from_settings("scale_height", ud->settings); |
| 4307 | ghb_ui_update_from_settings("PictureWidth", ud->settings); |
| 4308 | ghb_ui_update_from_settings("PictureHeight", ud->settings); |
| 4309 | |
| 4310 | ghb_ui_update_from_settings("PicturePARWidth", ud->settings); |
| 4311 | ghb_ui_update_from_settings("PicturePARHeight", ud->settings); |
| 4312 | |
| 4313 | ghb_ui_update_from_settings("PicturePadTop", ud->settings); |
| 4314 | ghb_ui_update_from_settings("PicturePadBottom", ud->settings); |
| 4315 | ghb_ui_update_from_settings("PicturePadLeft", ud->settings); |
| 4316 | ghb_ui_update_from_settings("PicturePadRight", ud->settings); |
| 4317 | |
| 4318 | ghb_ui_update_from_settings("PictureDARWidth", ud->settings); |
| 4319 | ghb_ui_update_from_settings("DisplayHeight", ud->settings); |
| 4320 | ghb_set_scale_busy(FALSE); |
| 4321 | } |
| 4322 | |
| 4323 | const char* |
| 4324 | ghb_lookup_filter_name(int filter_id, const char *short_name, int preset) |
no test coverage detected