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
3b4e694e
Commit
3b4e694e
authored
Jun 04, 2015
by
Carl Eugen Hoyos
Committed by
Michael Niedermayer
Jun 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/tinterlace: Double aspect ratio for modes merge and pad.
parent
b1436148
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
vf_tinterlace.c
libavfilter/vf_tinterlace.c
+5
-0
No files found.
libavfilter/vf_tinterlace.c
View file @
3b4e694e
...
@@ -121,6 +121,9 @@ static int config_out_props(AVFilterLink *outlink)
...
@@ -121,6 +121,9 @@ static int config_out_props(AVFilterLink *outlink)
outlink
->
w
=
inlink
->
w
;
outlink
->
w
=
inlink
->
w
;
outlink
->
h
=
tinterlace
->
mode
==
MODE_MERGE
||
tinterlace
->
mode
==
MODE_PAD
?
outlink
->
h
=
tinterlace
->
mode
==
MODE_MERGE
||
tinterlace
->
mode
==
MODE_PAD
?
inlink
->
h
*
2
:
inlink
->
h
;
inlink
->
h
*
2
:
inlink
->
h
;
if
(
tinterlace
->
mode
==
MODE_MERGE
||
tinterlace
->
mode
==
MODE_PAD
)
outlink
->
sample_aspect_ratio
=
av_mul_q
(
inlink
->
sample_aspect_ratio
,
av_make_q
(
2
,
1
));
if
(
tinterlace
->
mode
==
MODE_PAD
)
{
if
(
tinterlace
->
mode
==
MODE_PAD
)
{
uint8_t
black
[
4
]
=
{
16
,
128
,
128
,
16
};
uint8_t
black
[
4
]
=
{
16
,
128
,
128
,
16
};
...
@@ -266,6 +269,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
...
@@ -266,6 +269,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
out
->
height
=
outlink
->
h
;
out
->
height
=
outlink
->
h
;
out
->
interlaced_frame
=
1
;
out
->
interlaced_frame
=
1
;
out
->
top_field_first
=
1
;
out
->
top_field_first
=
1
;
out
->
sample_aspect_ratio
=
av_mul_q
(
cur
->
sample_aspect_ratio
,
av_make_q
(
2
,
1
));
/* write odd frame lines into the upper field of the new frame */
/* write odd frame lines into the upper field of the new frame */
copy_picture_field
(
tinterlace
,
out
->
data
,
out
->
linesize
,
copy_picture_field
(
tinterlace
,
out
->
data
,
out
->
linesize
,
...
@@ -295,6 +299,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
...
@@ -295,6 +299,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
av_frame_copy_props
(
out
,
cur
);
av_frame_copy_props
(
out
,
cur
);
out
->
height
=
outlink
->
h
;
out
->
height
=
outlink
->
h
;
out
->
sample_aspect_ratio
=
av_mul_q
(
cur
->
sample_aspect_ratio
,
av_make_q
(
2
,
1
));
field
=
(
1
+
tinterlace
->
frame
)
&
1
?
FIELD_UPPER
:
FIELD_LOWER
;
field
=
(
1
+
tinterlace
->
frame
)
&
1
?
FIELD_UPPER
:
FIELD_LOWER
;
/* copy upper and lower fields */
/* copy upper and lower fields */
...
...
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