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
2f16b6a5
Commit
2f16b6a5
authored
Sep 27, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j2kenc: fix arguments for ff_j2k_getnbctxno()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0db973e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
j2kenc.c
libavcodec/j2kenc.c
+5
-3
No files found.
libavcodec/j2kenc.c
View file @
2f16b6a5
...
...
@@ -487,11 +487,12 @@ static int getnmsedec_ref(int x, int bpno)
static
void
encode_sigpass
(
J2kT1Context
*
t1
,
int
width
,
int
height
,
int
bandno
,
int
*
nmsedec
,
int
bpno
)
{
int
y0
,
x
,
y
,
mask
=
1
<<
(
bpno
+
NMSEDEC_FRACBITS
);
int
vert_causal_ctx_csty_loc_symbol
;
for
(
y0
=
0
;
y0
<
height
;
y0
+=
4
)
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
y0
;
y
<
height
&&
y
<
y0
+
4
;
y
++
){
if
(
!
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
J2K_T1_SIG
)
&&
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
J2K_T1_SIG_NB
)){
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
),
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
,
vert_causal_ctx_csty_loc_symbol
),
bit
=
t1
->
data
[
y
][
x
]
&
mask
?
1
:
0
;
ff_mqc_encode
(
&
t1
->
mqc
,
t1
->
mqc
.
cx_states
+
ctxno
,
bit
);
if
(
bit
){
...
...
@@ -523,6 +524,7 @@ static void encode_refpass(J2kT1Context *t1, int width, int height, int *nmsedec
static
void
encode_clnpass
(
J2kT1Context
*
t1
,
int
width
,
int
height
,
int
bandno
,
int
*
nmsedec
,
int
bpno
)
{
int
y0
,
x
,
y
,
mask
=
1
<<
(
bpno
+
NMSEDEC_FRACBITS
);
int
vert_causal_ctx_csty_loc_symbol
;
for
(
y0
=
0
;
y0
<
height
;
y0
+=
4
)
for
(
x
=
0
;
x
<
width
;
x
++
){
if
(
y0
+
3
<
height
&&
!
(
...
...
@@ -543,7 +545,7 @@ static void encode_clnpass(J2kT1Context *t1, int width, int height, int bandno,
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
]
&
(
J2K_T1_SIG
|
J2K_T1_VIS
))){
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
,
vert_causal_ctx_csty_loc_symbol
);
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
...
...
@@ -559,7 +561,7 @@ static void encode_clnpass(J2kT1Context *t1, int width, int height, int bandno,
}
else
{
for
(
y
=
y0
;
y
<
y0
+
4
&&
y
<
height
;
y
++
){
if
(
!
(
t1
->
flags
[
y
+
1
][
x
+
1
]
&
(
J2K_T1_SIG
|
J2K_T1_VIS
))){
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
);
int
ctxno
=
ff_j2k_getnbctxno
(
t1
->
flags
[
y
+
1
][
x
+
1
],
bandno
,
vert_causal_ctx_csty_loc_symbol
);
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