Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f88d5df3
Commit
f88d5df3
authored
Dec 04, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_drawtext: cosmetics to reduce diff to qatar
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
297422b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
vf_drawtext.c
libavfilter/vf_drawtext.c
+10
-10
No files found.
libavfilter/vf_drawtext.c
View file @
f88d5df3
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
#include <time.h>
#include <time.h>
#include "libavutil/colorspace.h"
#include "libavutil/colorspace.h"
#include "libavutil/eval.h"
#include "libavutil/file.h"
#include "libavutil/file.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixdesc.h"
...
@@ -101,9 +101,6 @@ typedef struct {
...
@@ -101,9 +101,6 @@ typedef struct {
char
*
textfile
;
///< file with text to be drawn
char
*
textfile
;
///< file with text to be drawn
int
x
;
///< x position to start drawing text
int
x
;
///< x position to start drawing text
int
y
;
///< y position to start drawing text
int
y
;
///< y position to start drawing text
char
*
x_expr
;
///< expression for x position
char
*
y_expr
;
///< expression for y position
AVExpr
*
x_pexpr
,
*
y_pexpr
;
///< parsed expressions for x and y
int
max_glyph_w
;
///< max glyph width
int
max_glyph_w
;
///< max glyph width
int
max_glyph_h
;
///< max glyph heigth
int
max_glyph_h
;
///< max glyph heigth
int
shadowx
,
shadowy
;
int
shadowx
,
shadowy
;
...
@@ -130,6 +127,9 @@ typedef struct {
...
@@ -130,6 +127,9 @@ typedef struct {
int
pixel_step
[
4
];
///< distance in bytes between the component of each pixel
int
pixel_step
[
4
];
///< distance in bytes between the component of each pixel
uint8_t
rgba_map
[
4
];
///< map RGBA offsets to the positions in the packed RGBA format
uint8_t
rgba_map
[
4
];
///< map RGBA offsets to the positions in the packed RGBA format
uint8_t
*
box_line
[
4
];
///< line used for filling the box background
uint8_t
*
box_line
[
4
];
///< line used for filling the box background
char
*
x_expr
;
///< expression for x position
char
*
y_expr
;
///< expression for y position
AVExpr
*
x_pexpr
,
*
y_pexpr
;
///< parsed expressions for x and y
int64_t
basetime
;
///< base pts time in the real world for display
int64_t
basetime
;
///< base pts time in the real world for display
double
var_values
[
VAR_VARS_NB
];
double
var_values
[
VAR_VARS_NB
];
}
DrawTextContext
;
}
DrawTextContext
;
...
@@ -423,10 +423,15 @@ static av_cold void uninit(AVFilterContext *ctx)
...
@@ -423,10 +423,15 @@ static av_cold void uninit(AVFilterContext *ctx)
}
}
}
}
static
inline
int
is_newline
(
uint32_t
c
)
{
return
(
c
==
'\n'
||
c
==
'\r'
||
c
==
'\f'
||
c
==
'\v'
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
static
int
config_input
(
AVFilterLink
*
inlink
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
DrawTextContext
*
dtext
=
inlink
->
dst
->
priv
;
DrawTextContext
*
dtext
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
];
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
];
int
ret
;
int
ret
;
...
@@ -592,11 +597,6 @@ static inline void drawbox(AVFilterBufferRef *picref, int x, int y,
...
@@ -592,11 +597,6 @@ static inline void drawbox(AVFilterBufferRef *picref, int x, int y,
}
}
}
}
static
inline
int
is_newline
(
uint32_t
c
)
{
return
(
c
==
'\n'
||
c
==
'\r'
||
c
==
'\f'
||
c
==
'\v'
);
}
static
int
draw_glyphs
(
DrawTextContext
*
dtext
,
AVFilterBufferRef
*
picref
,
static
int
draw_glyphs
(
DrawTextContext
*
dtext
,
AVFilterBufferRef
*
picref
,
int
width
,
int
height
,
const
uint8_t
rgbcolor
[
4
],
const
uint8_t
yuvcolor
[
4
],
int
x
,
int
y
)
int
width
,
int
height
,
const
uint8_t
rgbcolor
[
4
],
const
uint8_t
yuvcolor
[
4
],
int
x
,
int
y
)
{
{
...
...
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