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
95a41311
Commit
95a41311
authored
Sep 11, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jpeg2000: Factor out band stepsize initialization
parent
7fb93eae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
jpeg2000.c
libavcodec/jpeg2000.c
+25
-14
No files found.
libavcodec/jpeg2000.c
View file @
95a41311
...
...
@@ -195,21 +195,13 @@ void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, int x, int y,
static
const
uint8_t
lut_gain
[
2
][
4
]
=
{
{
0
,
0
,
0
,
0
},
{
0
,
1
,
1
,
2
}
};
static
int
init_band
(
AVCodecContext
*
avctx
,
Jpeg2000ResLevel
*
reslevel
,
Jpeg2000Component
*
comp
,
static
void
init_band_stepsize
(
AVCodecContext
*
avctx
,
Jpeg2000Band
*
band
,
Jpeg2000CodingStyle
*
codsty
,
Jpeg2000QuantStyle
*
qntsty
,
int
bandno
,
int
gbandno
,
int
reslevelno
,
int
cbps
,
int
dx
,
int
dy
)
int
cbps
)
{
Jpeg2000Band
*
band
=
reslevel
->
band
+
bandno
;
uint8_t
log2_band_prec_width
,
log2_band_prec_height
;
int
declvl
=
codsty
->
nreslevels
-
reslevelno
;
// N_L -r see ISO/IEC 15444-1:2002 B.5
int
cblkno
,
precno
;
int
nb_precincts
;
int
i
,
j
;
/* TODO: Implementation of quantization step not finished,
* see ISO/IEC 15444-1:2002 E.1 and A.6.4. */
switch
(
qntsty
->
quantsty
)
{
...
...
@@ -250,6 +242,25 @@ static int init_band(AVCodecContext *avctx,
band
->
f_stepsize
*=
0
.
5
;
band
->
i_stepsize
=
band
->
f_stepsize
*
(
1
<<
16
);
}
static
int
init_band
(
AVCodecContext
*
avctx
,
Jpeg2000ResLevel
*
reslevel
,
Jpeg2000Component
*
comp
,
Jpeg2000CodingStyle
*
codsty
,
Jpeg2000QuantStyle
*
qntsty
,
int
bandno
,
int
gbandno
,
int
reslevelno
,
int
cbps
,
int
dx
,
int
dy
)
{
Jpeg2000Band
*
band
=
reslevel
->
band
+
bandno
;
uint8_t
log2_band_prec_width
,
log2_band_prec_height
;
int
declvl
=
codsty
->
nreslevels
-
reslevelno
;
// N_L -r see ISO/IEC 15444-1:2002 B.5
int
cblkno
,
precno
;
int
nb_precincts
;
int
i
,
j
;
init_band_stepsize
(
avctx
,
band
,
codsty
,
qntsty
,
bandno
,
gbandno
,
reslevelno
,
cbps
);
/* computation of tbx_0, tbx_1, tby_0, tby_1
* see ISO/IEC 15444-1:2002 B.5 eq. B-15 and tbl B.1
...
...
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