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
18982f08
Commit
18982f08
authored
Dec 26, 2014
by
Kieran Kunhya
Committed by
Michael Niedermayer
Dec 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: Pass through chroma positions in sws_getCachedContext
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
4bc0dbfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
utils.c
libswscale/utils.c
+13
-0
No files found.
libswscale/utils.c
View file @
18982f08
...
...
@@ -1960,6 +1960,8 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW,
{
static
const
double
default_param
[
2
]
=
{
SWS_PARAM_DEFAULT
,
SWS_PARAM_DEFAULT
};
int64_t
src_h_chr_pos
=
-
513
,
dst_h_chr_pos
=
-
513
,
src_v_chr_pos
=
-
513
,
dst_v_chr_pos
=
-
513
;
if
(
!
param
)
param
=
default_param
;
...
...
@@ -1974,6 +1976,11 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW,
context
->
flags
!=
flags
||
context
->
param
[
0
]
!=
param
[
0
]
||
context
->
param
[
1
]
!=
param
[
1
]))
{
av_opt_get_int
(
context
,
"src_h_chr_pos"
,
0
,
&
src_h_chr_pos
);
av_opt_get_int
(
context
,
"src_v_chr_pos"
,
0
,
&
src_v_chr_pos
);
av_opt_get_int
(
context
,
"dst_h_chr_pos"
,
0
,
&
dst_h_chr_pos
);
av_opt_get_int
(
context
,
"dst_v_chr_pos"
,
0
,
&
dst_v_chr_pos
);
sws_freeContext
(
context
);
context
=
NULL
;
}
...
...
@@ -1990,6 +1997,12 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW,
context
->
flags
=
flags
;
context
->
param
[
0
]
=
param
[
0
];
context
->
param
[
1
]
=
param
[
1
];
av_opt_set_int
(
context
,
"src_h_chr_pos"
,
src_h_chr_pos
,
0
);
av_opt_set_int
(
context
,
"src_v_chr_pos"
,
src_v_chr_pos
,
0
);
av_opt_set_int
(
context
,
"dst_h_chr_pos"
,
dst_h_chr_pos
,
0
);
av_opt_set_int
(
context
,
"dst_v_chr_pos"
,
dst_v_chr_pos
,
0
);
if
(
sws_init_context
(
context
,
srcFilter
,
dstFilter
)
<
0
)
{
sws_freeContext
(
context
);
return
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