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
a291345b
Commit
a291345b
authored
Oct 12, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: do not use av_pix_fmt_descriptors directly
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
82eba226
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
swscale.c
libswscale/swscale.c
+2
-2
utils.c
libswscale/utils.c
+1
-1
No files found.
libswscale/swscale.c
View file @
a291345b
...
...
@@ -73,7 +73,7 @@ static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW,
int
bits
=
desc
->
comp
[
0
].
depth_minus1
;
int
sh
=
bits
-
4
;
if
((
isAnyRGB
(
c
->
srcFormat
)
||
c
->
srcFormat
==
AV_PIX_FMT_PAL8
)
&&
av_pix_fmt_descriptors
[
c
->
srcFormat
].
comp
[
0
].
depth_minus1
<
15
)
if
((
isAnyRGB
(
c
->
srcFormat
)
||
c
->
srcFormat
==
AV_PIX_FMT_PAL8
)
&&
desc
->
comp
[
0
].
depth_minus1
<
15
)
sh
=
9
;
for
(
i
=
0
;
i
<
dstW
;
i
++
)
{
...
...
@@ -99,7 +99,7 @@ static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW,
int
sh
=
desc
->
comp
[
0
].
depth_minus1
;
if
(
sh
<
15
)
sh
=
isAnyRGB
(
c
->
srcFormat
)
||
c
->
srcFormat
==
AV_PIX_FMT_PAL8
?
13
:
av_pix_fmt_descriptors
[
c
->
srcFormat
].
comp
[
0
].
depth_minus1
;
sh
=
isAnyRGB
(
c
->
srcFormat
)
||
c
->
srcFormat
==
AV_PIX_FMT_PAL8
?
13
:
desc
->
comp
[
0
].
depth_minus1
;
for
(
i
=
0
;
i
<
dstW
;
i
++
)
{
int
j
;
...
...
libswscale/utils.c
View file @
a291345b
...
...
@@ -1234,7 +1234,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
// try to avoid drawing green stuff between the right end and the stride end
for
(
i
=
0
;
i
<
c
->
vChrBufSize
;
i
++
)
if
(
av_pix_fmt_descriptors
[
c
->
dstFormat
].
comp
[
0
].
depth_minus1
==
15
){
if
(
desc_dst
->
comp
[
0
].
depth_minus1
==
15
){
av_assert0
(
c
->
dstBpc
>
14
);
for
(
j
=
0
;
j
<
dst_stride
/
2
+
1
;
j
++
)
((
int32_t
*
)(
c
->
chrUPixBuf
[
i
]))[
j
]
=
1
<<
18
;
...
...
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