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
b46fb615
Commit
b46fb615
authored
Dec 31, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiff.c: Use switch / case instead of if / else where appropriate.
parent
1a6a088f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
tiff.c
libavcodec/tiff.c
+6
-3
No files found.
libavcodec/tiff.c
View file @
b46fb615
...
...
@@ -108,19 +108,22 @@ static void av_always_inline horizontal_fill(unsigned int bpp, uint8_t* dst,
{
int
i
;
if
(
bpp
==
2
)
{
switch
(
bpp
)
{
case
2
:
for
(
i
=
0
;
i
<
width
;
i
++
)
{
dst
[(
i
+
offset
)
*
4
+
0
]
=
(
usePtr
?
src
[
i
]
:
c
)
>>
6
;
dst
[(
i
+
offset
)
*
4
+
1
]
=
(
usePtr
?
src
[
i
]
:
c
)
>>
4
&
0x3
;
dst
[(
i
+
offset
)
*
4
+
2
]
=
(
usePtr
?
src
[
i
]
:
c
)
>>
2
&
0x3
;
dst
[(
i
+
offset
)
*
4
+
3
]
=
(
usePtr
?
src
[
i
]
:
c
)
&
0x3
;
}
}
else
if
(
bpp
==
4
)
{
break
;
case
4
:
for
(
i
=
0
;
i
<
width
;
i
++
)
{
dst
[(
i
+
offset
)
*
2
+
0
]
=
(
usePtr
?
src
[
i
]
:
c
)
>>
4
;
dst
[(
i
+
offset
)
*
2
+
1
]
=
(
usePtr
?
src
[
i
]
:
c
)
&
0xF
;
}
}
else
{
break
;
default
:
if
(
usePtr
)
{
memcpy
(
dst
+
offset
,
src
,
width
);
}
else
{
...
...
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