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
7c9fcdfa
Commit
7c9fcdfa
authored
Jun 09, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/jpeg2000dec: Fix some 5/3 bitexactness issues
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ecefce41
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
9 deletions
+25
-9
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+17
-1
vsynth1-jpeg2000
tests/ref/vsynth/vsynth1-jpeg2000
+2
-2
vsynth2-jpeg2000
tests/ref/vsynth/vsynth2-jpeg2000
+2
-2
vsynth3-jpeg2000
tests/ref/vsynth/vsynth3-jpeg2000
+2
-2
vsynth_lena-jpeg2000
tests/ref/vsynth/vsynth_lena-jpeg2000
+2
-2
No files found.
libavcodec/jpeg2000dec.c
View file @
7c9fcdfa
...
...
@@ -1145,7 +1145,21 @@ static void dequantization_int(int x, int y, Jpeg2000Cblk *cblk,
int32_t
*
datap
=
&
comp
->
i_data
[(
comp
->
coord
[
0
][
1
]
-
comp
->
coord
[
0
][
0
])
*
(
y
+
j
)
+
x
];
int
*
src
=
t1
->
data
[
j
];
for
(
i
=
0
;
i
<
w
;
++
i
)
datap
[
i
]
=
(
src
[
i
]
*
band
->
i_stepsize
+
(
1
<<
14
))
>>
15
;
datap
[
i
]
=
(
src
[
i
]
*
band
->
i_stepsize
)
/
32768
;
}
}
static
void
dequantization_int_97
(
int
x
,
int
y
,
Jpeg2000Cblk
*
cblk
,
Jpeg2000Component
*
comp
,
Jpeg2000T1Context
*
t1
,
Jpeg2000Band
*
band
)
{
int
i
,
j
;
int
w
=
cblk
->
coord
[
0
][
1
]
-
cblk
->
coord
[
0
][
0
];
for
(
j
=
0
;
j
<
(
cblk
->
coord
[
1
][
1
]
-
cblk
->
coord
[
1
][
0
]);
++
j
)
{
int32_t
*
datap
=
&
comp
->
i_data
[(
comp
->
coord
[
0
][
1
]
-
comp
->
coord
[
0
][
0
])
*
(
y
+
j
)
+
x
];
int
*
src
=
t1
->
data
[
j
];
for
(
i
=
0
;
i
<
w
;
++
i
)
datap
[
i
]
=
(
src
[
i
]
*
band
->
i_stepsize
+
(
1
<<
14
))
>>
15
;
}
}
...
...
@@ -1228,6 +1242,8 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
if
(
codsty
->
transform
==
FF_DWT97
)
dequantization_float
(
x
,
y
,
cblk
,
comp
,
&
t1
,
band
);
else
if
(
codsty
->
transform
==
FF_DWT97_INT
)
dequantization_int_97
(
x
,
y
,
cblk
,
comp
,
&
t1
,
band
);
else
dequantization_int
(
x
,
y
,
cblk
,
comp
,
&
t1
,
band
);
}
/* end cblk */
...
...
tests/ref/vsynth/vsynth1-jpeg2000
View file @
7c9fcdfa
ed9c45dc090a03c2eb9c35cf76e4d914 *tests/data/fate/vsynth1-jpeg2000.avi
2306906 tests/data/fate/vsynth1-jpeg2000.avi
1774b621bd92a53a24712cb77e9f0b28
*tests/data/fate/vsynth1-jpeg2000.out.rawvideo
stddev: 5.
37 PSNR: 33.52
MAXDIFF: 63 bytes: 7603200/ 7603200
64166a8fbb730a7a132c50ee89592672
*tests/data/fate/vsynth1-jpeg2000.out.rawvideo
stddev: 5.
41 PSNR: 33.46
MAXDIFF: 63 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-jpeg2000
View file @
7c9fcdfa
b918de21dec4310f87af3788ed458462 *tests/data/fate/vsynth2-jpeg2000.avi
1513144 tests/data/fate/vsynth2-jpeg2000.avi
1d33de510f21eaad6c3cecfcf29798ba
*tests/data/fate/vsynth2-jpeg2000.out.rawvideo
stddev:
4.99 PSNR: 34.17 MAXDIFF: 70
bytes: 7603200/ 7603200
d30f637670a60de6cc8d177047f32a59
*tests/data/fate/vsynth2-jpeg2000.out.rawvideo
stddev:
5.04 PSNR: 34.07 MAXDIFF: 71
bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth3-jpeg2000
View file @
7c9fcdfa
7ea4e3901817f06a3de59ee70836f5d9 *tests/data/fate/vsynth3-jpeg2000.avi
63772 tests/data/fate/vsynth3-jpeg2000.avi
11b954cc1b0091399fa4342a6bb432b2
*tests/data/fate/vsynth3-jpeg2000.out.rawvideo
stddev: 5.5
0 PSNR: 33.31
MAXDIFF: 48 bytes: 86700/ 86700
ddfc0e8e033aeecf334c1450148dab44
*tests/data/fate/vsynth3-jpeg2000.out.rawvideo
stddev: 5.5
2 PSNR: 33.28
MAXDIFF: 48 bytes: 86700/ 86700
tests/ref/vsynth/vsynth_lena-jpeg2000
View file @
7c9fcdfa
9283c83bc8dc830bd48ad66f71ae42e8 *tests/data/fate/vsynth_lena-jpeg2000.avi
1151148 tests/data/fate/vsynth_lena-jpeg2000.avi
e7d79c9e11d0fe97f03e38be66c34e4f
*tests/data/fate/vsynth_lena-jpeg2000.out.rawvideo
stddev: 4.4
1 PSNR: 35.23 MAXDIFF: 63
bytes: 7603200/ 7603200
71a9ee7ad7c3dad60aa6641712c1f9e4
*tests/data/fate/vsynth_lena-jpeg2000.out.rawvideo
stddev: 4.4
4 PSNR: 35.17 MAXDIFF: 61
bytes: 7603200/ 7603200
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