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
69b97739
Commit
69b97739
authored
May 26, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j2k: s/getnbctxno/getsigctxno/g
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5157ec89
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
j2k.c
libavcodec/j2k.c
+2
-2
j2k.h
libavcodec/j2k.h
+1
-1
j2kdec.c
libavcodec/j2kdec.c
+2
-2
j2kenc.c
libavcodec/j2kenc.c
+3
-3
No files found.
libavcodec/j2k.c
View file @
69b97739
...
...
@@ -103,7 +103,7 @@ static void tag_tree_zero(Jpeg2000TgtNode *t, int w, int h)
}
}
static
int
get
nb
ctxno
(
int
flag
,
int
bandno
)
static
int
get
sig
ctxno
(
int
flag
,
int
bandno
)
{
int
h
,
v
,
d
;
...
...
@@ -166,7 +166,7 @@ void ff_j2k_init_tier1_luts(void)
int
i
,
j
;
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
j
=
0
;
j
<
4
;
j
++
)
ff_jpeg2000_sigctxno_lut
[
i
][
j
]
=
get
nb
ctxno
(
i
,
j
);
ff_jpeg2000_sigctxno_lut
[
i
][
j
]
=
get
sig
ctxno
(
i
,
j
);
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
j
=
0
;
j
<
16
;
j
++
)
ff_jpeg2000_sgnctxno_lut
[
i
][
j
]
=
getsgnctxno
(
i
+
(
j
<<
8
),
&
ff_jpeg2000_xorbit_lut
[
i
][
j
]);
...
...
libavcodec/j2k.h
View file @
69b97739
...
...
@@ -213,7 +213,7 @@ void ff_j2k_set_significant(Jpeg2000T1Context *t1, int x, int y, int negative);
extern
uint8_t
ff_jpeg2000_sigctxno_lut
[
256
][
4
];
static
inline
int
ff_j2k_get
nb
ctxno
(
int
flag
,
int
bandno
)
static
inline
int
ff_j2k_get
sig
ctxno
(
int
flag
,
int
bandno
)
{
return
ff_jpeg2000_sigctxno_lut
[
flag
&
255
][
bandno
];
}
...
...
libavcodec/j2kdec.c
View file @
69b97739
...
...
@@ -631,7 +631,7 @@ static void decode_sigpass(Jpeg2000T1Context *t1, int width, int height, int bpn
int
flags_mask
=
-
1
;
if
(
vert_causal_ctx_csty_symbol
&&
y
==
y0
+
3
)
flags_mask
&=
~
(
JPEG2000_T1_SIG_S
|
JPEG2000_T1_SIG_SW
|
JPEG2000_T1_SIG_SE
);
if
(
ff_mqc_decode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ff_j2k_get
nb
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
flags_mask
,
bandno
))){
if
(
ff_mqc_decode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ff_j2k_get
sig
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
flags_mask
,
bandno
))){
int
xorbit
,
ctxno
=
ff_jpeg2000_getsgnctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
&
xorbit
);
if
(
bpass_csty_symbol
)
t1
->
data
[
y
][
x
]
=
ff_mqc_decode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ctxno
)
?
-
mask
:
mask
;
...
...
@@ -694,7 +694,7 @@ static void decode_clnpass(Jpeg2000DecoderContext *s, Jpeg2000T1Context *t1, int
int
flags_mask
=
-
1
;
if
(
vert_causal_ctx_csty_symbol
&&
y
==
y0
+
3
)
flags_mask
&=
~
(
JPEG2000_T1_SIG_S
|
JPEG2000_T1_SIG_SW
|
JPEG2000_T1_SIG_SE
);
dec
=
ff_mqc_decode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ff_j2k_get
nb
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
flags_mask
,
dec
=
ff_mqc_decode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ff_j2k_get
sig
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
flags_mask
,
bandno
));
}
}
...
...
libavcodec/j2kenc.c
View file @
69b97739
...
...
@@ -480,7 +480,7 @@ static void encode_sigpass(Jpeg2000T1Context *t1, int width, int height, int ban
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
y0
;
y
<
height
&&
y
<
y0
+
4
;
y
++
){
if
(
!
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
JPEG2000_T1_SIG
)
&&
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
JPEG2000_T1_SIG_NB
)){
int
ctxno
=
ff_j2k_get
nb
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
),
int
ctxno
=
ff_j2k_get
sig
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
),
bit
=
t1
->
data
[
y
][
x
]
&
mask
?
1
:
0
;
ff_mqc_encode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ctxno
,
bit
);
if
(
bit
){
...
...
@@ -532,7 +532,7 @@ static void encode_clnpass(Jpeg2000T1Context *t1, int width, int height, int ban
ff_mqc_encode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
MQC_CX_UNI
,
rlen
&
1
);
for
(
y
=
y0
+
rlen
;
y
<
y0
+
4
;
y
++
){
if
(
!
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
(
JPEG2000_T1_SIG
|
JPEG2000_T1_VIS
))){
int
ctxno
=
ff_j2k_get
nb
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
int
ctxno
=
ff_j2k_get
sig
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
if
(
y
>
y0
+
rlen
)
ff_mqc_encode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ctxno
,
t1
->
data
[
y
][
x
]
&
mask
?
1
:
0
);
if
(
t1
->
data
[
y
][
x
]
&
mask
){
// newly significant
...
...
@@ -548,7 +548,7 @@ static void encode_clnpass(Jpeg2000T1Context *t1, int width, int height, int ban
}
else
{
for
(
y
=
y0
;
y
<
y0
+
4
&&
y
<
height
;
y
++
){
if
(
!
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
(
JPEG2000_T1_SIG
|
JPEG2000_T1_VIS
))){
int
ctxno
=
ff_j2k_get
nb
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
int
ctxno
=
ff_j2k_get
sig
ctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
ff_mqc_encode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ctxno
,
t1
->
data
[
y
][
x
]
&
mask
?
1
:
0
);
if
(
t1
->
data
[
y
][
x
]
&
mask
){
// newly significant
int
xorbit
;
...
...
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