[vlc-commits] freetype: use bitmap pitch instead width
Francois Cartegnie
git at videolan.org
Wed Mar 6 16:46:56 CET 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 28 16:32:15 2019 +0100| [e4bb69ea759fac18f1fb354175141da4fa5e6aec] | committer: Francois Cartegnie
freetype: use bitmap pitch instead width
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4bb69ea759fac18f1fb354175141da4fa5e6aec
---
modules/text_renderer/freetype/freetype.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index 3438c1af41..827d12308b 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -491,9 +491,9 @@ static int RenderYUVP( filter_t *p_filter, subpicture_region_t *p_region,
{
for( x = 0; x < p_glyph->bitmap.width; x++ )
{
- if( p_glyph->bitmap.buffer[y * p_glyph->bitmap.width + x] )
+ if( p_glyph->bitmap.buffer[y * p_glyph->bitmap.pitch + x] )
p_dst[(i_glyph_y + y) * i_pitch + (i_glyph_x + x)] =
- (p_glyph->bitmap.buffer[y * p_glyph->bitmap.width + x] + 8)/16;
+ (p_glyph->bitmap.buffer[y * p_glyph->bitmap.pitch + x] + 8)/16;
}
}
}
@@ -681,7 +681,7 @@ static inline void BlendAXYZGlyph( picture_t *p_picture,
for( unsigned int dx = 0; dx < p_glyph->bitmap.width; dx++ )
BlendPixel( p_picture, i_picture_x + dx, i_picture_y + dy,
i_a, i_x, i_y, i_z,
- p_glyph->bitmap.buffer[dy * p_glyph->bitmap.width + dx] );
+ p_glyph->bitmap.buffer[dy * p_glyph->bitmap.pitch + dx] );
}
}
More information about the vlc-commits
mailing list