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
43918059
Commit
43918059
authored
Dec 16, 2011
by
Ronald S. Bultje
Committed by
Mans Rullgard
Dec 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: fix overflows in RGB rounding constants.
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
8cfbbd92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
swscale.c
libswscale/swscale.c
+6
-5
No files found.
libswscale/swscale.c
View file @
43918059
...
@@ -1456,8 +1456,8 @@ rgb16_32ToY_c_template(uint8_t *dst, const uint8_t *src,
...
@@ -1456,8 +1456,8 @@ rgb16_32ToY_c_template(uint8_t *dst, const uint8_t *src,
int
maskr
,
int
maskg
,
int
maskb
,
int
maskr
,
int
maskg
,
int
maskb
,
int
rsh
,
int
gsh
,
int
bsh
,
int
S
)
int
rsh
,
int
gsh
,
int
bsh
,
int
S
)
{
{
const
int
ry
=
RY
<<
rsh
,
gy
=
GY
<<
gsh
,
by
=
BY
<<
bsh
,
const
int
ry
=
RY
<<
rsh
,
gy
=
GY
<<
gsh
,
by
=
BY
<<
bsh
;
rnd
=
33
<<
(
S
-
1
);
const
unsigned
rnd
=
33u
<<
(
S
-
1
);
int
i
;
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
@@ -1479,8 +1479,8 @@ rgb16_32ToUV_c_template(uint8_t *dstU, uint8_t *dstV,
...
@@ -1479,8 +1479,8 @@ rgb16_32ToUV_c_template(uint8_t *dstU, uint8_t *dstV,
int
rsh
,
int
gsh
,
int
bsh
,
int
S
)
int
rsh
,
int
gsh
,
int
bsh
,
int
S
)
{
{
const
int
ru
=
RU
<<
rsh
,
gu
=
GU
<<
gsh
,
bu
=
BU
<<
bsh
,
const
int
ru
=
RU
<<
rsh
,
gu
=
GU
<<
gsh
,
bu
=
BU
<<
bsh
,
rv
=
RV
<<
rsh
,
gv
=
GV
<<
gsh
,
bv
=
BV
<<
bsh
,
rv
=
RV
<<
rsh
,
gv
=
GV
<<
gsh
,
bv
=
BV
<<
bsh
;
rnd
=
257
<<
(
S
-
1
);
const
unsigned
rnd
=
257u
<<
(
S
-
1
);
int
i
;
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
@@ -1504,7 +1504,8 @@ rgb16_32ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV,
...
@@ -1504,7 +1504,8 @@ rgb16_32ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV,
{
{
const
int
ru
=
RU
<<
rsh
,
gu
=
GU
<<
gsh
,
bu
=
BU
<<
bsh
,
const
int
ru
=
RU
<<
rsh
,
gu
=
GU
<<
gsh
,
bu
=
BU
<<
bsh
,
rv
=
RV
<<
rsh
,
gv
=
GV
<<
gsh
,
bv
=
BV
<<
bsh
,
rv
=
RV
<<
rsh
,
gv
=
GV
<<
gsh
,
bv
=
BV
<<
bsh
,
rnd
=
257
<<
S
,
maskgx
=
~
(
maskr
|
maskb
);
maskgx
=
~
(
maskr
|
maskb
);
const
unsigned
rnd
=
257u
<<
S
;
int
i
;
int
i
;
maskr
|=
maskr
<<
1
;
maskb
|=
maskb
<<
1
;
maskg
|=
maskg
<<
1
;
maskr
|=
maskr
<<
1
;
maskb
|=
maskb
<<
1
;
maskg
|=
maskg
<<
1
;
...
...
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