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
66bb5cd5
Commit
66bb5cd5
authored
Aug 14, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: remove hScale16N() and use ronalds reformated version of it.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3652409f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
swscale.c
libswscale/swscale.c
+4
-19
utils.c
libswscale/utils.c
+1
-1
No files found.
libswscale/swscale.c
View file @
66bb5cd5
...
...
@@ -2057,6 +2057,9 @@ static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW, const uint8_t
const
uint16_t
*
src
=
(
const
uint16_t
*
)
_src
;
int
sh
=
av_pix_fmt_descriptors
[
c
->
srcFormat
].
comp
[
0
].
depth_minus1
;
if
(
sh
<
15
)
sh
=
isAnyRGB
(
c
->
srcFormat
)
||
c
->
srcFormat
==
PIX_FMT_PAL8
?
13
:
av_pix_fmt_descriptors
[
c
->
srcFormat
].
comp
[
0
].
depth_minus1
;
for
(
i
=
0
;
i
<
dstW
;
i
++
)
{
int
j
;
int
srcPos
=
filterPos
[
i
];
...
...
@@ -2089,21 +2092,6 @@ static void hScale8To15_c(SwsContext *c, int16_t *dst, int dstW, const uint8_t *
}
}
static
inline
void
hScale16N_c
(
int16_t
*
dst
,
int
dstW
,
const
uint16_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
long
filterSize
,
int
shift
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
dstW
;
i
++
)
{
int
srcPos
=
filterPos
[
i
];
int
val
=
0
;
for
(
j
=
0
;
j
<
filterSize
;
j
++
)
{
val
+=
((
int
)
src
[
srcPos
+
j
])
*
filter
[
filterSize
*
i
+
j
];
}
dst
[
i
]
=
FFMIN
(
val
>>
shift
,
(
1
<<
15
)
-
1
);
// the cubic equation does overflow ...
}
}
static
inline
void
hScale16NX_c
(
int16_t
*
dst
,
int
dstW
,
const
uint16_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
long
filterSize
,
int
shift
)
{
...
...
@@ -2945,9 +2933,6 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
if
(
c
->
srcBpc
==
8
)
{
if
(
c
->
dstBpc
<=
10
)
{
if
((
isAnyRGB
(
c
->
srcFormat
)
&&
av_pix_fmt_descriptors
[
c
->
srcFormat
].
comp
[
0
].
depth_minus1
<
15
)
||
c
->
srcFormat
==
PIX_FMT_PAL8
)
c
->
hScale16
=
hScale16N_c
;
c
->
hScale
=
hScale8To15_c
;
if
(
c
->
flags
&
SWS_FAST_BILINEAR
)
{
c
->
hyscale_fast
=
hyscale_fast_c
;
...
...
@@ -2955,7 +2940,7 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
}
}
else
{
c
->
hScale
=
hScale8To19_c
;
av_assert0
(
c
->
hScale16
!=
hScale16N
_c
&&
c
->
hScale16
!=
hScale16N
X_c
);
av_assert0
(
c
->
hScale16
!=
hScale16NX_c
);
}
}
else
{
if
(
c
->
dstBpc
>
10
){
...
...
libswscale/utils.c
View file @
66bb5cd5
...
...
@@ -848,7 +848,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
c
->
dstBpc
=
1
+
av_pix_fmt_descriptors
[
dstFormat
].
comp
[
0
].
depth_minus1
;
if
(
c
->
dstBpc
<
8
)
c
->
dstBpc
=
8
;
if
(
isAnyRGB
(
srcFormat
)
&&
c
->
dstBpc
==
16
)
if
(
isAnyRGB
(
srcFormat
)
||
srcFormat
==
PIX_FMT_PAL8
)
c
->
srcBpc
=
16
;
if
(
c
->
dstBpc
==
16
)
dst_stride
<<=
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