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
1515bfb3
Commit
1515bfb3
authored
Dec 24, 2014
by
Kieran Kunhya
Committed by
Michael Niedermayer
Dec 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_scale: Use correct chroma positions for YUV420P
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b51cc701
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
vf_scale.c
libavfilter/vf_scale.c
+11
-0
No files found.
libavfilter/vf_scale.c
View file @
1515bfb3
...
...
@@ -373,6 +373,17 @@ static int config_props(AVFilterLink *outlink)
av_opt_set_int
(
*
s
,
"dst_format"
,
outfmt
,
0
);
av_opt_set_int
(
*
s
,
"sws_flags"
,
scale
->
flags
,
0
);
/* Override YUV420P settings to have the correct (MPEG-2) chroma positions
* MPEG-2 chroma positions are used by convention
* XXX: support other 4:2:0 pixel formats */
if
(
inlink
->
format
==
AV_PIX_FMT_YUV420P
)
{
scale
->
in_v_chr_pos
=
(
i
==
0
)
?
128
:
(
i
==
1
)
?
64
:
192
;
}
if
(
outlink
->
format
==
AV_PIX_FMT_YUV420P
)
{
scale
->
out_v_chr_pos
=
(
i
==
0
)
?
128
:
(
i
==
1
)
?
64
:
192
;
}
av_opt_set_int
(
*
s
,
"src_h_chr_pos"
,
scale
->
in_h_chr_pos
,
0
);
av_opt_set_int
(
*
s
,
"src_v_chr_pos"
,
scale
->
in_v_chr_pos
,
0
);
av_opt_set_int
(
*
s
,
"dst_h_chr_pos"
,
scale
->
out_h_chr_pos
,
0
);
...
...
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