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
9e4cb03a
Commit
9e4cb03a
authored
Jun 08, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "mixed declarations and code" warnings.
parent
d552f616
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
j2kdec.c
libavcodec/j2kdec.c
+2
-3
qtrleenc.c
libavcodec/qtrleenc.c
+4
-2
No files found.
libavcodec/j2kdec.c
View file @
9e4cb03a
...
...
@@ -692,6 +692,8 @@ static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Contex
int
width
,
int
height
,
int
bandpos
)
{
int
passno
=
cblk
->
npasses
,
pass_t
=
2
,
bpno
=
cblk
->
nonzerobits
-
1
,
y
,
clnpass_cnt
=
0
;
int
bpass_csty_symbol
=
J2K_CBLK_BYPASS
&
codsty
->
cblk_style
;
int
vert_causal_ctx_csty_symbol
=
J2K_CBLK_VSC
&
codsty
->
cblk_style
;
for
(
y
=
0
;
y
<
height
+
2
;
y
++
)
memset
(
t1
->
flags
[
y
],
0
,
(
width
+
2
)
*
sizeof
(
int
));
...
...
@@ -703,9 +705,6 @@ static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Contex
cblk
->
data
[
cblk
->
length
]
=
0xff
;
cblk
->
data
[
cblk
->
length
+
1
]
=
0xff
;
int
bpass_csty_symbol
=
J2K_CBLK_BYPASS
&
codsty
->
cblk_style
;
int
vert_causal_ctx_csty_symbol
=
J2K_CBLK_VSC
&
codsty
->
cblk_style
;
while
(
passno
--
){
switch
(
pass_t
){
case
0
:
decode_sigpass
(
t1
,
width
,
height
,
bpno
+
1
,
bandpos
,
...
...
libavcodec/qtrleenc.c
View file @
9e4cb03a
...
...
@@ -231,10 +231,11 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
else
if
(
rlecode
>
0
)
{
/* bulk copy */
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_GRAY8
)
{
int
j
;
// QT grayscale colorspace has 0=white and 255=black, we will
// ignore the palette that is included in the AVFrame because
// PIX_FMT_GRAY8 has defined color mapping
for
(
int
j
=
0
;
j
<
rlecode
*
s
->
pixel_size
;
++
j
)
for
(
j
=
0
;
j
<
rlecode
*
s
->
pixel_size
;
++
j
)
bytestream_put_byte
(
buf
,
*
(
this_line
+
i
*
s
->
pixel_size
+
j
)
^
0xff
);
}
else
{
bytestream_put_buffer
(
buf
,
this_line
+
i
*
s
->
pixel_size
,
rlecode
*
s
->
pixel_size
);
...
...
@@ -244,8 +245,9 @@ static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t
else
{
/* repeat the bits */
if
(
s
->
avctx
->
pix_fmt
==
PIX_FMT_GRAY8
)
{
int
j
;
// QT grayscale colorspace has 0=white and 255=black, ...
for
(
int
j
=
0
;
j
<
s
->
pixel_size
;
++
j
)
for
(
j
=
0
;
j
<
s
->
pixel_size
;
++
j
)
bytestream_put_byte
(
buf
,
*
(
this_line
+
i
*
s
->
pixel_size
+
j
)
^
0xff
);
}
else
{
bytestream_put_buffer
(
buf
,
this_line
+
i
*
s
->
pixel_size
,
s
->
pixel_size
);
...
...
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