[vlc-commits] codec: substext: rename defines for disambiguation
Francois Cartegnie
git at videolan.org
Fri Oct 20 23:27:06 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct 20 18:05:31 2017 +0200| [8ce651ce9189f443490a53fd6b7b2f8fc0cdeb6d] | committer: Francois Cartegnie
codec: substext: rename defines for disambiguation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ce651ce9189f443490a53fd6b7b2f8fc0cdeb6d
---
modules/codec/cc.c | 2 +-
modules/codec/cea708.c | 2 +-
modules/codec/substext.h | 24 ++++++++++++------------
modules/codec/ttml/substtml.c | 4 ++--
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 14da339e8f..4bc45957a9 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -1241,7 +1241,7 @@ static void Eia608FillUpdaterRegions( subpicture_updater_sys_t *p_updater, eia60
{
p_region->origin.y = (float) i /* start line number */
/ (EIA608_SCREEN_ROWS * FONT_TO_LINE_HEIGHT_RATIO);
- p_region->flags |= UPDT_REGION_ORIGIN_Y_IS_PERCENTILE;
+ p_region->flags |= UPDT_REGION_ORIGIN_Y_IS_RATIO;
}
else /* Insert line break between region lines */
{
diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index 237790d01d..9e246207ca 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -1011,7 +1011,7 @@ static void CEA708SpuConvert( const cea708_window_t *p_w,
p_region->origin.y = (float)p_w->i_anchor_offset_v /
(CEA708_SCREEN_ROWS * CEA708_FONT_TO_LINE_HEIGHT_RATIO);
}
- p_region->flags |= UPDT_REGION_ORIGIN_X_IS_PERCENTILE|UPDT_REGION_ORIGIN_Y_IS_PERCENTILE;
+ p_region->flags |= UPDT_REGION_ORIGIN_X_IS_RATIO|UPDT_REGION_ORIGIN_Y_IS_RATIO;
if( p_w->i_firstrow <= p_w->i_lastrow )
{
diff --git a/modules/codec/substext.h b/modules/codec/substext.h
index 3d4a8b40fc..bf650a4a2f 100644
--- a/modules/codec/substext.h
+++ b/modules/codec/substext.h
@@ -29,13 +29,13 @@ typedef struct subpicture_updater_sys_region_t subpicture_updater_sys_region_t;
enum subpicture_updater_sys_region_flags_e
{
- UPDT_REGION_ORIGIN_X_IS_PERCENTILE = 1 << 0,
- UPDT_REGION_ORIGIN_Y_IS_PERCENTILE = 1 << 1,
- UPDT_REGION_EXTENT_X_IS_PERCENTILE = 1 << 2,
- UPDT_REGION_EXTENT_Y_IS_PERCENTILE = 1 << 3,
+ UPDT_REGION_ORIGIN_X_IS_RATIO = 1 << 0,
+ UPDT_REGION_ORIGIN_Y_IS_RATIO = 1 << 1,
+ UPDT_REGION_EXTENT_X_IS_RATIO = 1 << 2,
+ UPDT_REGION_EXTENT_Y_IS_RATIO = 1 << 3,
UPDT_REGION_IGNORE_BACKGROUND = 1 << 4,
UPDT_REGION_USES_GRID_COORDINATES = 1 << 5,
- UPDT_REGION_FIX_DONE = 1 << 31,
+ UPDT_REGION_FIXED_DONE = 1 << 31,
};
struct subpicture_updater_sys_region_t
@@ -107,18 +107,18 @@ static int SubpictureTextValidate(subpicture_t *subpic,
subpicture_updater_sys_region_t *p_updtregion = &sys->region;
- if (!(p_updtregion->flags & UPDT_REGION_FIX_DONE) &&
+ if (!(p_updtregion->flags & UPDT_REGION_FIXED_DONE) &&
subpic->b_absolute && subpic->p_region &&
subpic->i_original_picture_width > 0 &&
subpic->i_original_picture_height > 0)
{
- p_updtregion->flags |= UPDT_REGION_FIX_DONE;
+ p_updtregion->flags |= UPDT_REGION_FIXED_DONE;
p_updtregion->origin.x = subpic->p_region->i_x;
p_updtregion->origin.y = subpic->p_region->i_y;
p_updtregion->extent.x = subpic->i_original_picture_width;
p_updtregion->extent.y = subpic->i_original_picture_height;
- p_updtregion->flags &= ~(UPDT_REGION_ORIGIN_X_IS_PERCENTILE|UPDT_REGION_ORIGIN_Y_IS_PERCENTILE|
- UPDT_REGION_EXTENT_X_IS_PERCENTILE|UPDT_REGION_EXTENT_Y_IS_PERCENTILE);
+ p_updtregion->flags &= ~(UPDT_REGION_ORIGIN_X_IS_RATIO|UPDT_REGION_ORIGIN_Y_IS_RATIO|
+ UPDT_REGION_EXTENT_X_IS_RATIO|UPDT_REGION_EXTENT_Y_IS_RATIO);
}
return VLC_EGENERIC;
@@ -169,7 +169,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
r->b_noregionbg = p_updtregion->flags & UPDT_REGION_IGNORE_BACKGROUND;
r->b_gridmode = p_updtregion->flags & UPDT_REGION_USES_GRID_COORDINATES;
- if (!(p_updtregion->flags & UPDT_REGION_FIX_DONE))
+ if (!(p_updtregion->flags & UPDT_REGION_FIXED_DONE))
{
const float margin_ratio = sys->margin_ratio;
const int margin_h = margin_ratio * (( r->b_gridmode ) ? (unsigned) subpic->i_original_picture_width
@@ -193,12 +193,12 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
else if (r->i_align & SUBPICTURE_ALIGN_BOTTOM )
r->i_y = margin_v + outerbottom_v;
- if( p_updtregion->flags & UPDT_REGION_ORIGIN_X_IS_PERCENTILE )
+ if( p_updtregion->flags & UPDT_REGION_ORIGIN_X_IS_RATIO )
r->i_x += p_updtregion->origin.x * inner_w;
else
r->i_x += p_updtregion->origin.x;
- if( p_updtregion->flags & UPDT_REGION_ORIGIN_Y_IS_PERCENTILE )
+ if( p_updtregion->flags & UPDT_REGION_ORIGIN_Y_IS_RATIO )
r->i_y += p_updtregion->origin.y * inner_h;
else
r->i_y += p_updtregion->origin.y;
diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 66f9ea063d..6f25f0169a 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -376,7 +376,7 @@ static void FillRegionStyle( const char *psz_attr, const char *psz_val,
if( psz_percent_sign != NULL && psz_percent_sign < psz_separator )
{
p_region->updt.origin.x /= 100.0;
- p_region->updt.flags |= UPDT_REGION_ORIGIN_X_IS_PERCENTILE;
+ p_region->updt.flags |= UPDT_REGION_ORIGIN_X_IS_RATIO;
}
while( isspace( *psz_separator ) )
@@ -388,7 +388,7 @@ static void FillRegionStyle( const char *psz_attr, const char *psz_val,
if( psz_percent_sign != NULL )
{
p_region->updt.origin.y /= 100.0;
- p_region->updt.flags |= UPDT_REGION_ORIGIN_Y_IS_PERCENTILE;
+ p_region->updt.flags |= UPDT_REGION_ORIGIN_Y_IS_RATIO;
}
p_region->updt.align = SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_LEFT;
}
More information about the vlc-commits
mailing list