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
dda3d716
Commit
dda3d716
authored
Dec 04, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_drawtext: support W/H parameters to reduce UI differences to qatar
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
594090c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
vf_drawtext.c
libavfilter/vf_drawtext.c
+6
-6
No files found.
libavfilter/vf_drawtext.c
View file @
dda3d716
...
...
@@ -47,8 +47,8 @@
#include FT_GLYPH_H
static
const
char
*
const
var_names
[]
=
{
"main_w"
,
"w"
,
///< width of the input video
"main_h"
,
"h"
,
///< height of the input video
"main_w"
,
"w"
,
"W"
,
///< width of the input video
"main_h"
,
"h"
,
"H"
,
///< height of the input video
"tw"
,
"text_w"
,
///< width of the rendered text
"th"
,
"text_h"
,
///< height of the rendered text
"max_glyph_w"
,
///< max glyph width
...
...
@@ -68,8 +68,8 @@ static const char * const var_names[] = {
};
enum
var_name
{
VAR_MAIN_W
,
VAR_W
,
VAR_MAIN_H
,
VAR_H
,
VAR_MAIN_W
,
VAR_
w
,
VAR_
W
,
VAR_MAIN_H
,
VAR_
h
,
VAR_
H
,
VAR_TW
,
VAR_TEXT_W
,
VAR_TH
,
VAR_TEXT_H
,
VAR_MAX_GLYPH_W
,
...
...
@@ -458,8 +458,8 @@ static int config_input(AVFilterLink *inlink)
dtext
->
shadowcolor
[
3
]
=
rgba
[
3
];
}
dtext
->
var_values
[
VAR_W
]
=
dtext
->
var_values
[
VAR_MAIN_W
]
=
inlink
->
w
;
dtext
->
var_values
[
VAR_H
]
=
dtext
->
var_values
[
VAR_MAIN_H
]
=
inlink
->
h
;
dtext
->
var_values
[
VAR_
w
]
=
dtext
->
var_values
[
VAR_
W
]
=
dtext
->
var_values
[
VAR_MAIN_W
]
=
inlink
->
w
;
dtext
->
var_values
[
VAR_
h
]
=
dtext
->
var_values
[
VAR_
H
]
=
dtext
->
var_values
[
VAR_MAIN_H
]
=
inlink
->
h
;
dtext
->
var_values
[
VAR_SAR
]
=
inlink
->
sample_aspect_ratio
.
num
?
av_q2d
(
inlink
->
sample_aspect_ratio
)
:
1
;
dtext
->
var_values
[
VAR_DAR
]
=
(
double
)
inlink
->
w
/
inlink
->
h
*
dtext
->
var_values
[
VAR_SAR
];
dtext
->
var_values
[
VAR_HSUB
]
=
1
<<
pix_desc
->
log2_chroma_w
;
...
...
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