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
e0b8fff6
Commit
e0b8fff6
authored
Jun 30, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: fix yuv range correction when using 16-bit scaling.
parent
ce2649af
Show 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 @
e0b8fff6
...
...
@@ -1982,8 +1982,8 @@ static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
int32_t
*
dstU
=
(
int32_t
*
)
_dstU
;
int32_t
*
dstV
=
(
int32_t
*
)
_dstV
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
dstU
[
i
]
=
(
FFMIN
(
dstU
[
i
],
30775
)
*
4663
-
9289992
)
>>
12
;
//-264
dstV
[
i
]
=
(
FFMIN
(
dstV
[
i
],
30775
)
*
4663
-
9289992
)
>>
12
;
//-264
dstU
[
i
]
=
(
FFMIN
(
dstU
[
i
],
30775
<<
4
)
*
4663
-
(
9289992
<<
4
)
)
>>
12
;
//-264
dstV
[
i
]
=
(
FFMIN
(
dstV
[
i
],
30775
<<
4
)
*
4663
-
(
9289992
<<
4
)
)
>>
12
;
//-264
}
}
static
void
chrRangeFromJpeg16_c
(
int16_t
*
_dstU
,
int16_t
*
_dstV
,
int
width
)
...
...
@@ -1992,8 +1992,8 @@ static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
int32_t
*
dstU
=
(
int32_t
*
)
_dstU
;
int32_t
*
dstV
=
(
int32_t
*
)
_dstV
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
dstU
[
i
]
=
(
dstU
[
i
]
*
1799
+
4081085
)
>>
11
;
//1469
dstV
[
i
]
=
(
dstV
[
i
]
*
1799
+
4081085
)
>>
11
;
//1469
dstU
[
i
]
=
(
dstU
[
i
]
*
1799
+
(
4081085
<<
4
)
)
>>
11
;
//1469
dstV
[
i
]
=
(
dstV
[
i
]
*
1799
+
(
4081085
<<
4
)
)
>>
11
;
//1469
}
}
static
void
lumRangeToJpeg16_c
(
int16_t
*
_dst
,
int
width
)
...
...
@@ -2001,14 +2001,14 @@ static void lumRangeToJpeg16_c(int16_t *_dst, int width)
int
i
;
int32_t
*
dst
=
(
int32_t
*
)
_dst
;
for
(
i
=
0
;
i
<
width
;
i
++
)
dst
[
i
]
=
(
FFMIN
(
dst
[
i
],
30189
)
*
19077
-
39057361
)
>>
14
;
dst
[
i
]
=
(
FFMIN
(
dst
[
i
],
30189
<<
4
)
*
19077
-
(
39057361
<<
4
)
)
>>
14
;
}
static
void
lumRangeFromJpeg16_c
(
int16_t
*
_dst
,
int
width
)
{
int
i
;
int32_t
*
dst
=
(
int32_t
*
)
_dst
;
for
(
i
=
0
;
i
<
width
;
i
++
)
dst
[
i
]
=
(
dst
[
i
]
*
14071
+
33561947
)
>>
14
;
dst
[
i
]
=
(
dst
[
i
]
*
14071
+
(
33561947
<<
4
)
)
>>
14
;
}
static
void
hyscale_fast_c
(
SwsContext
*
c
,
int16_t
*
dst
,
int
dstWidth
,
...
...
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