/**
* \brief Set aspect ratio parameters.
* \param priv renderer handle
- * \param ar physical aspect ratio
- * \param par pixel ratio, e.g. width / height of the video
+ * \param dar display aspect ratio (DAR), prescaled for output PAR
+ * \param sar storage aspect ratio (SAR)
*/
-void ass_set_aspect_ratio(ass_renderer_t *priv, double ar, double par);
+void ass_set_aspect_ratio(ass_renderer_t *priv, double dar, double sar);
/**
* \brief Set a fixed font scaling factor.
int use_margins; // 0 - place all subtitles inside original frame
// 1 - use margins for placing toptitles and subtitles
double aspect; // frame aspect ratio, d_width / d_height.
- double pixel_ratio; // pixel ratio of the source image
+ double storage_aspect; // pixel ratio of the source image
ass_hinting_t hinting;
char *default_font;
priv->settings.frame_height = h;
if (priv->settings.aspect == 0.) {
priv->settings.aspect = ((double) w) / h;
- priv->settings.pixel_ratio = ((double) w) / h;
+ priv->settings.storage_aspect = ((double) w) / h;
}
ass_reconfigure(priv);
}
priv->settings.use_margins = use;
}
-void ass_set_aspect_ratio(ass_renderer_t *priv, double ar, double par)
+void ass_set_aspect_ratio(ass_renderer_t *priv, double dar, double sar)
{
- if (priv->settings.aspect != ar || priv->settings.pixel_ratio != par) {
- priv->settings.aspect = ar;
- priv->settings.pixel_ratio = par;
+ if (priv->settings.aspect != dar || priv->settings.storage_aspect != sar) {
+ priv->settings.aspect = dar;
+ priv->settings.storage_aspect = sar;
ass_reconfigure(priv);
}
}
// PAR correction
render_priv->font_scale_x = render_priv->settings.aspect /
- render_priv->settings.pixel_ratio;
+ render_priv->settings.storage_aspect;
render_priv->prev_images_root = render_priv->images_root;
render_priv->images_root = 0;