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
83286153
Commit
83286153
authored
Apr 04, 2016
by
Martin Vignali
Committed by
Paul B Mahol
Apr 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavcodec/exr : add support for compression in tile
parent
062ad630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
exr.c
libavcodec/exr.c
+17
-22
No files found.
libavcodec/exr.c
View file @
83286153
...
...
@@ -780,9 +780,9 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize,
int
size
=
channel
->
pixel_type
;
for
(
j
=
0
;
j
<
size
;
j
++
)
wav_decode
(
ptr
+
j
,
s
->
x
delta
,
size
,
s
->
ysize
,
s
->
x
delta
*
size
,
maxval
);
ptr
+=
s
->
x
delta
*
s
->
ysize
*
size
;
wav_decode
(
ptr
+
j
,
s
->
x
size
,
size
,
s
->
ysize
,
s
->
x
size
*
size
,
maxval
);
ptr
+=
s
->
x
size
*
s
->
ysize
*
size
;
}
apply_lut
(
td
->
lut
,
tmp
,
dsize
/
sizeof
(
uint16_t
));
...
...
@@ -790,9 +790,9 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize,
out
=
td
->
uncompressed_data
;
for
(
i
=
0
;
i
<
s
->
ysize
;
i
++
)
for
(
j
=
0
;
j
<
s
->
nb_channels
;
j
++
)
{
uint16_t
*
in
=
tmp
+
j
*
s
->
x
delta
*
s
->
ysize
+
i
*
s
->
xdelta
;
memcpy
(
out
,
in
,
s
->
x
delta
*
2
);
out
+=
s
->
x
delta
*
2
;
uint16_t
*
in
=
tmp
+
j
*
s
->
x
size
*
s
->
ysize
+
i
*
s
->
xsize
;
memcpy
(
out
,
in
,
s
->
x
size
*
2
);
out
+=
s
->
x
size
*
2
;
}
return
0
;
...
...
@@ -830,11 +830,11 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src,
switch
(
channel
->
pixel_type
)
{
case
EXR_FLOAT
:
ptr
[
0
]
=
in
;
ptr
[
1
]
=
ptr
[
0
]
+
s
->
x
delta
;
ptr
[
2
]
=
ptr
[
1
]
+
s
->
x
delta
;
in
=
ptr
[
2
]
+
s
->
x
delta
;
ptr
[
1
]
=
ptr
[
0
]
+
s
->
x
size
;
ptr
[
2
]
=
ptr
[
1
]
+
s
->
x
size
;
in
=
ptr
[
2
]
+
s
->
x
size
;
for
(
j
=
0
;
j
<
s
->
x
delta
;
++
j
)
{
for
(
j
=
0
;
j
<
s
->
x
size
;
++
j
)
{
uint32_t
diff
=
(
*
(
ptr
[
0
]
++
)
<<
24
)
|
(
*
(
ptr
[
1
]
++
)
<<
16
)
|
(
*
(
ptr
[
2
]
++
)
<<
8
);
...
...
@@ -844,9 +844,9 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src,
break
;
case
EXR_HALF
:
ptr
[
0
]
=
in
;
ptr
[
1
]
=
ptr
[
0
]
+
s
->
x
delta
;
in
=
ptr
[
1
]
+
s
->
x
delta
;
for
(
j
=
0
;
j
<
s
->
x
delta
;
j
++
)
{
ptr
[
1
]
=
ptr
[
0
]
+
s
->
x
size
;
in
=
ptr
[
1
]
+
s
->
x
size
;
for
(
j
=
0
;
j
<
s
->
x
size
;
j
++
)
{
uint32_t
diff
=
(
*
(
ptr
[
0
]
++
)
<<
8
)
|
*
(
ptr
[
1
]
++
);
pixel
+=
diff
;
...
...
@@ -922,8 +922,8 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
int
c
,
iY
,
iX
,
y
,
x
;
/* calc B44 block count */
nbB44BlockW
=
s
->
x
delta
/
4
;
if
((
s
->
x
delta
%
4
)
!=
0
)
nbB44BlockW
=
s
->
x
size
/
4
;
if
((
s
->
x
size
%
4
)
!=
0
)
nbB44BlockW
++
;
nbB44BlockH
=
s
->
ysize
/
4
;
...
...
@@ -957,8 +957,8 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
indexHgY
=
iY
*
4
;
for
(
y
=
indexHgY
;
y
<
FFMIN
(
indexHgY
+
4
,
s
->
ysize
);
y
++
)
{
for
(
x
=
indexHgX
;
x
<
FFMIN
(
indexHgX
+
4
,
s
->
x
delta
);
x
++
)
{
indexOut
=
(
c
*
s
->
x
delta
+
y
*
s
->
xdelta
*
s
->
nb_channels
+
x
)
*
2
;
for
(
x
=
indexHgX
;
x
<
FFMIN
(
indexHgX
+
4
,
s
->
x
size
);
x
++
)
{
indexOut
=
(
c
*
s
->
x
size
+
y
*
s
->
xsize
*
s
->
nb_channels
+
x
)
*
2
;
indexTmp
=
(
y
-
indexHgY
)
*
4
+
(
x
-
indexHgX
);
td
->
uncompressed_data
[
indexOut
]
=
tmpBuffer
[
indexTmp
]
&
0xff
;
td
->
uncompressed_data
[
indexOut
+
1
]
=
tmpBuffer
[
indexTmp
]
>>
8
;
...
...
@@ -1531,11 +1531,6 @@ static int decode_header(EXRContext *s)
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Invalid tile attribute.
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
s
->
compression
!=
EXR_RAW
)
{
avpriv_report_missing_feature
(
s
->
avctx
,
"Compression in tile %d"
,
s
->
compression
);
return
AVERROR_PATCHWELCOME
;
}
}
s
->
scan_line_size
=
s
->
xdelta
*
s
->
current_channel_offset
;
...
...
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