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
7f77e904
Commit
7f77e904
authored
Apr 13, 2012
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: clip before assigning tables in RGB output functions.
parent
48606252
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
output.c
libswscale/output.c
+15
-9
No files found.
libswscale/output.c
View file @
7f77e904
...
...
@@ -1005,15 +1005,17 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2],
int
U
=
(
ubuf0
[
i
]
*
uvalpha1
+
ubuf1
[
i
]
*
uvalpha
)
>>
19
;
int
V
=
(
vbuf0
[
i
]
*
uvalpha1
+
vbuf1
[
i
]
*
uvalpha
)
>>
19
;
int
A1
,
A2
;
const
void
*
r
=
c
->
table_rV
[
V
],
*
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]),
*
b
=
c
->
table_bU
[
U
];
const
void
*
r
,
*
g
,
*
b
;
Y1
=
av_clip_uint8
(
Y1
);
Y2
=
av_clip_uint8
(
Y2
);
U
=
av_clip_uint8
(
U
);
V
=
av_clip_uint8
(
V
);
r
=
c
->
table_rV
[
V
];
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]);
b
=
c
->
table_bU
[
U
];
if
(
hasAlpha
)
{
A1
=
(
abuf0
[
i
*
2
]
*
yalpha1
+
abuf1
[
i
*
2
]
*
yalpha
)
>>
19
;
A2
=
(
abuf0
[
i
*
2
+
1
]
*
yalpha1
+
abuf1
[
i
*
2
+
1
]
*
yalpha
)
>>
19
;
...
...
@@ -1043,15 +1045,17 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
int
U
=
ubuf0
[
i
]
>>
7
;
int
V
=
vbuf0
[
i
]
>>
7
;
int
A1
,
A2
;
const
void
*
r
=
c
->
table_rV
[
V
],
*
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]),
*
b
=
c
->
table_bU
[
U
];
const
void
*
r
,
*
g
,
*
b
;
Y1
=
av_clip_uint8
(
Y1
);
Y2
=
av_clip_uint8
(
Y2
);
U
=
av_clip_uint8
(
U
);
V
=
av_clip_uint8
(
V
);
r
=
c
->
table_rV
[
V
];
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]);
b
=
c
->
table_bU
[
U
];
if
(
hasAlpha
)
{
A1
=
abuf0
[
i
*
2
]
>>
7
;
A2
=
abuf0
[
i
*
2
+
1
]
>>
7
;
...
...
@@ -1070,15 +1074,17 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
])
>>
8
;
int
V
=
(
vbuf0
[
i
]
+
vbuf1
[
i
])
>>
8
;
int
A1
,
A2
;
const
void
*
r
=
c
->
table_rV
[
V
],
*
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]),
*
b
=
c
->
table_bU
[
U
];
const
void
*
r
,
*
g
,
*
b
;
Y1
=
av_clip_uint8
(
Y1
);
Y2
=
av_clip_uint8
(
Y2
);
U
=
av_clip_uint8
(
U
);
V
=
av_clip_uint8
(
V
);
r
=
c
->
table_rV
[
V
];
g
=
(
c
->
table_gU
[
U
]
+
c
->
table_gV
[
V
]);
b
=
c
->
table_bU
[
U
];
if
(
hasAlpha
)
{
A1
=
abuf0
[
i
*
2
]
>>
7
;
A2
=
abuf0
[
i
*
2
+
1
]
>>
7
;
...
...
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