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
d469aa8c
Commit
d469aa8c
authored
Sep 16, 2014
by
Clément Bœsch
Committed by
Clément Bœsch
Sep 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: use av_clip() instead of av_clip_c()
parent
de0e49c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
swscale.c
libswscale/swscale.c
+6
-6
No files found.
libswscale/swscale.c
View file @
d469aa8c
...
...
@@ -804,9 +804,9 @@ static void xyz12Torgb48(struct SwsContext *c, uint16_t *dst,
c
->
xyz2rgb_matrix
[
2
][
2
]
*
z
>>
12
;
// limit values to 12-bit depth
r
=
av_clip
_c
(
r
,
0
,
4095
);
g
=
av_clip
_c
(
g
,
0
,
4095
);
b
=
av_clip
_c
(
b
,
0
,
4095
);
r
=
av_clip
(
r
,
0
,
4095
);
g
=
av_clip
(
g
,
0
,
4095
);
b
=
av_clip
(
b
,
0
,
4095
);
// convert from sRGBlinear to RGB and scale from 12bit to 16bit
if
(
desc
->
flags
&
AV_PIX_FMT_FLAG_BE
)
{
...
...
@@ -860,9 +860,9 @@ static void rgb48Toxyz12(struct SwsContext *c, uint16_t *dst,
c
->
rgb2xyz_matrix
[
2
][
2
]
*
b
>>
12
;
// limit values to 12-bit depth
x
=
av_clip
_c
(
x
,
0
,
4095
);
y
=
av_clip
_c
(
y
,
0
,
4095
);
z
=
av_clip
_c
(
z
,
0
,
4095
);
x
=
av_clip
(
x
,
0
,
4095
);
y
=
av_clip
(
y
,
0
,
4095
);
z
=
av_clip
(
z
,
0
,
4095
);
// convert from XYZlinear to X'Y'Z' and scale from 12bit to 16bit
if
(
desc
->
flags
&
AV_PIX_FMT_FLAG_BE
)
{
...
...
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