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
6d7f5667
Commit
6d7f5667
authored
Apr 05, 2016
by
Martin Vignali
Committed by
Paul B Mahol
Apr 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/exr: enable mipmap, ripmap decoding
parent
37497488
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
exr.c
libavcodec/exr.c
+7
-5
No files found.
libavcodec/exr.c
View file @
6d7f5667
...
@@ -73,11 +73,13 @@ enum ExrTileLevelMode {
...
@@ -73,11 +73,13 @@ enum ExrTileLevelMode {
EXR_TILE_LEVEL_ONE
,
EXR_TILE_LEVEL_ONE
,
EXR_TILE_LEVEL_MIPMAP
,
EXR_TILE_LEVEL_MIPMAP
,
EXR_TILE_LEVEL_RIPMAP
,
EXR_TILE_LEVEL_RIPMAP
,
EXR_TILE_LEVEL_UNKNOWN
,
};
};
enum
ExrTileLevelRound
{
enum
ExrTileLevelRound
{
EXR_TILE_ROUND_UP
,
EXR_TILE_ROUND_UP
,
EXR_TILE_ROUND_DOWN
,
EXR_TILE_ROUND_DOWN
,
EXR_TILE_ROUND_UNKNOWN
,
};
};
typedef
struct
EXRChannel
{
typedef
struct
EXRChannel
{
...
@@ -1011,9 +1013,9 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
...
@@ -1011,9 +1013,9 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
if
(
data_size
<=
0
||
data_size
>
buf_size
)
if
(
data_size
<=
0
||
data_size
>
buf_size
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
(
tileLevelX
||
tileLevelY
)
{
/* tile
of low resolution (Mipmap, rimmap)
*/
if
(
tileLevelX
||
tileLevelY
)
{
/* tile
level, is not the full res level
*/
av
_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Wrong Tile level %i / %i.
\n
"
,
tileLevelX
,
tileLevelY
);
av
priv_report_missing_feature
(
s
->
avctx
,
"Subres tile before full res tile"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
}
line
=
s
->
tile_attr
.
ySize
*
tileY
;
line
=
s
->
tile_attr
.
ySize
*
tileY
;
...
@@ -1490,13 +1492,13 @@ static int decode_header(EXRContext *s)
...
@@ -1490,13 +1492,13 @@ static int decode_header(EXRContext *s)
s
->
tile_attr
.
level_mode
=
tileLevel
&
0x0f
;
s
->
tile_attr
.
level_mode
=
tileLevel
&
0x0f
;
s
->
tile_attr
.
level_round
=
(
tileLevel
>>
4
)
&
0x0f
;
s
->
tile_attr
.
level_round
=
(
tileLevel
>>
4
)
&
0x0f
;
if
(
s
->
tile_attr
.
level_mode
!=
EXR_TILE_LEVEL_ONE
)
{
if
(
s
->
tile_attr
.
level_mode
>=
EXR_TILE_LEVEL_UNKNOWN
)
{
avpriv_report_missing_feature
(
s
->
avctx
,
"Tile level mode %d"
,
avpriv_report_missing_feature
(
s
->
avctx
,
"Tile level mode %d"
,
s
->
tile_attr
.
level_mode
);
s
->
tile_attr
.
level_mode
);
return
AVERROR_PATCHWELCOME
;
return
AVERROR_PATCHWELCOME
;
}
}
if
(
s
->
tile_attr
.
level_round
!=
EXR_TILE_ROUND_UP
)
{
if
(
s
->
tile_attr
.
level_round
>=
EXR_TILE_ROUND_UNKNOWN
)
{
avpriv_report_missing_feature
(
s
->
avctx
,
"Tile level round %d"
,
avpriv_report_missing_feature
(
s
->
avctx
,
"Tile level round %d"
,
s
->
tile_attr
.
level_round
);
s
->
tile_attr
.
level_round
);
return
AVERROR_PATCHWELCOME
;
return
AVERROR_PATCHWELCOME
;
...
...
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