Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
183241cb
Commit
183241cb
authored
Jul 20, 2003
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed some c++ style comments, fixed some untrue comments, moved a
function prototype
parent
8d171ed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
modules/misc/freetype.c
modules/misc/freetype.c
+10
-15
No files found.
modules/misc/freetype.c
View file @
183241cb
...
...
@@ -2,7 +2,7 @@
* freetype.c : Put text on the video, using freetype2
*****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN
* $Id: freetype.c,v 1.
6 2003/07/20 21:41:13 hartman
Exp $
* $Id: freetype.c,v 1.
7 2003/07/20 23:05:24 sigmunau
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -54,7 +54,8 @@ static void RenderI420( vout_thread_t *, picture_t *,
const
subpicture_t
*
);
static
int
AddText
(
vout_thread_t
*
,
byte_t
*
,
text_style_t
*
,
int
,
int
,
int
,
mtime_t
,
mtime_t
);
static
int
GetUnicodeCharFromUTF8
(
byte_t
**
);
static
int
GetUnicodeCharFromUTF8
(
byte_t
**
);
static
void
FreeString
(
subpicture_t
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -75,9 +76,8 @@ vlc_module_begin();
vlc_module_end
();
/**
Describes a string to be displayed on the video, or a linked list of
such
*/
* Private data in a aubpicture. Describes a string.
*/
struct
subpicture_sys_t
{
int
i_x_margin
;
...
...
@@ -94,10 +94,10 @@ struct subpicture_sys_t
};
/*****************************************************************************
*
vout_sys_t: osd_text
local data
*
text_remderer_sys_t: freetype
local data
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the
osd-text
specific properties of an output thread.
* It describes the
freetype
specific properties of an output thread.
*****************************************************************************/
struct
text_renderer_sys_t
{
...
...
@@ -107,9 +107,6 @@ struct text_renderer_sys_t
vlc_bool_t
i_use_kerning
;
uint8_t
pi_gamma
[
256
];
};
/* more prototypes */
//static void ComputeBoundingBox( subpicture_sys_t * );
static
void
FreeString
(
subpicture_t
*
);
/*****************************************************************************
* Create: allocates osd-text video thread output method
...
...
@@ -135,7 +132,6 @@ static int Create( vlc_object_t *p_this )
for
(
i
=
0
;
i
<
256
;
i
++
)
{
p_vout
->
p_text_renderer_data
->
pi_gamma
[
i
]
=
(
uint8_t
)(
pow
(
(
double
)
i
/
255
.
0
f
,
gamma_inv
)
*
255
.
0
f
);
//msg_Dbg( p_vout, "%d", p_vout->p_text_renderer_data->pi_gamma[i]);
}
/* Look what method was requested */
...
...
@@ -243,6 +239,9 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic,
}
}
/**
* Draw a string on a i420 (or similar) picture
*/
static
void
RenderI420
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
const
subpicture_t
*
p_subpic
)
{
...
...
@@ -289,8 +288,6 @@ static void RenderI420( vout_thread_t *p_vout, picture_t *p_pic,
{
for
(
x
=
0
;
x
<
p_glyph
->
bitmap
.
width
;
x
++
)
{
// pixel = alpha;
// pixel = (pixel^alpha)^pixel;
pixel
=
(
(
pixel
*
(
255
-
alpha
)
)
>>
8
)
+
(
255
*
alpha
>>
8
);
#undef alpha
...
...
@@ -332,8 +329,6 @@ static void RenderI420( vout_thread_t *p_vout, picture_t *p_pic,
{
for
(
x
=
0
;
x
<
p_glyph
->
bitmap
.
width
;
x
+=
2
)
{
// pixel = alpha;
// pixel = (pixel^alpha)^pixel;
pixel
=
(
(
pixel
*
(
0xFF
-
alpha
)
)
>>
8
)
+
(
0x80
*
alpha
>>
8
);
#undef alpha
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment