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
4b58349b
Commit
4b58349b
authored
Sep 11, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/ass: add shaping option
The documentation is mostly based on ass.h public header.
parent
8a9c5db2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
filters.texi
doc/filters.texi
+20
-0
version.h
libavfilter/version.h
+1
-1
vf_subtitles.c
libavfilter/vf_subtitles.c
+7
-0
No files found.
doc/filters.texi
View file @
4b58349b
...
...
@@ -2552,6 +2552,26 @@ Same as the @ref{subtitles} filter, except that it doesn't require libavcodec
and libavformat to work. On the other hand, it is limited to ASS (Advanced
Substation Alpha) subtitles files.
This filter accepts the following option in addition to the common options from
the @ref{subtitles} filter:
@table @option
@item shaping
Set the shaping engine
Available values are:
@table @samp
@item auto
The default libass shaping engine, which is the best available.
@item simple
Fast, font-agnostic shaper that can do only substitutions
@item complex
Slower shaper using OpenType for substitutions and positioning
@end table
The default is @code{auto}.
@end table
@section bbox
Compute the bounding box for the non-black pixels in the input frame
...
...
libavfilter/version.h
View file @
4b58349b
...
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 1
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_subtitles.c
View file @
4b58349b
...
...
@@ -55,6 +55,7 @@ typedef struct {
uint8_t
rgba_map
[
4
];
int
pix_step
[
4
];
///< steps per pixel for each plane of the main output
int
original_w
,
original_h
;
int
shaping
;
FFDrawContext
draw
;
}
AssContext
;
...
...
@@ -141,6 +142,8 @@ static int config_input(AVFilterLink *inlink)
if
(
ass
->
original_w
&&
ass
->
original_h
)
ass_set_aspect_ratio
(
ass
->
renderer
,
(
double
)
inlink
->
w
/
inlink
->
h
,
(
double
)
ass
->
original_w
/
ass
->
original_h
);
if
(
ass
->
shaping
!=
-
1
)
ass_set_shaper
(
ass
->
renderer
,
ass
->
shaping
);
return
0
;
}
...
...
@@ -207,6 +210,10 @@ static const AVFilterPad ass_outputs[] = {
static
const
AVOption
ass_options
[]
=
{
COMMON_OPTIONS
{
"shaping"
,
"set shaping engine"
,
OFFSET
(
shaping
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
1
,
FLAGS
,
"shaping_mode"
},
{
"auto"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
-
1
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"shaping_mode"
},
{
"simple"
,
"simple shaping"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
ASS_SHAPING_SIMPLE
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"shaping_mode"
},
{
"complex"
,
"complex shaping"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
ASS_SHAPING_COMPLEX
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"shaping_mode"
},
{
NULL
},
};
...
...
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