]> granicus.if.org Git - libass/commitdiff
Simplify storage size handling
authorOleg Oshmyan <chortos@inbox.lv>
Fri, 24 Jan 2014 19:30:58 +0000 (19:30 +0000)
committerOleg Oshmyan <chortos@inbox.lv>
Sun, 26 Jan 2014 03:17:56 +0000 (03:17 +0000)
No functional changes.

libass/ass_render.c
libass/ass_render.h
libass/ass_render_api.c

index c8e62558ec06a42baf0c5fc14c0aec8795a20543..409b8bc4f19889f6eacd2ff89648b72a396bed84 100644 (file)
@@ -2589,9 +2589,9 @@ ass_start_frame(ASS_Renderer *render_priv, ASS_Track *track,
 
     render_priv->font_scale = settings_priv->font_size_coeff *
         render_priv->orig_height / render_priv->track->PlayResY;
-    if (render_priv->storage_height)
+    if (settings_priv->storage_height)
         render_priv->blur_scale = ((double) render_priv->orig_height) /
-            render_priv->storage_height;
+            settings_priv->storage_height;
     else
         render_priv->blur_scale = 1.;
     if (render_priv->track->ScaledBorderAndShadow)
index ab0b7046f4f66f1544e83817e6d3f4dc2bcb86de..52c58559aac63e9169d5d2f2c609a81118cd25cc 100644 (file)
@@ -70,8 +70,8 @@ typedef struct free_list {
 typedef struct {
     int frame_width;
     int frame_height;
-    int storage_width;          // width of the source image
-    int storage_height;         // height of the source image
+    int storage_width;          // video width before any rescaling
+    int storage_height;         // video height before any rescaling
     double font_size_coeff;     // font size multiplier
     double line_spacing;        // additional line spacing (in frame pixels)
     double line_position;       // vertical position for subtitles, 0-100 (0 = no change)
@@ -339,8 +339,6 @@ struct ass_renderer {
     int orig_width;             // frame width ( = screen width - margins )
     int orig_height_nocrop;     // frame height ( = screen height - margins + cropheight)
     int orig_width_nocrop;      // frame width ( = screen width - margins + cropwidth)
-    int storage_height;         // video height before any rescaling
-    int storage_width;          // video width before any rescaling
     ASS_Track *track;
     long long time;             // frame's timestamp, ms
     double font_scale;
index 5777aad646191d3511f82c82f3890b3e50a88e53..b06fc80dc5cfa5d4cdb03bbc3f76f002bdb393b4 100644 (file)
@@ -43,13 +43,6 @@ static void ass_reconfigure(ASS_Renderer *priv)
     priv->orig_height_nocrop =
         settings->frame_height - FFMAX(settings->top_margin, 0) -
         FFMAX(settings->bottom_margin, 0);
-    if (settings->storage_height) {
-        priv->storage_width = settings->storage_width;
-        priv->storage_height = settings->storage_height;
-    } else {
-        priv->storage_width = priv->orig_width;
-        priv->storage_height = priv->orig_height;
-    }
 }
 
 void ass_set_frame_size(ASS_Renderer *priv, int w, int h)