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
b4016ef3
Commit
b4016ef3
authored
Mar 18, 2017
by
Martin Vignali
Committed by
Paul B Mahol
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/exr: add support for uint32
parent
b265e5ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
exr.c
libavcodec/exr.c
+12
-5
No files found.
libavcodec/exr.c
View file @
b4016ef3
...
...
@@ -3,7 +3,7 @@
* Copyright (c) 2006 Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
* Copyright (c) 2009 Jimmy Christensen
*
* B44/B44A, Tile added by Jokyo Images support by CNC - French National Center for Cinema
* B44/B44A, Tile
, UINT32
added by Jokyo Images support by CNC - French National Center for Cinema
*
* This file is part of FFmpeg.
*
...
...
@@ -1236,7 +1236,7 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
*
ptr_x
++
=
exr_flt2uint
(
bytestream_get_le32
(
&
a
));
}
}
}
else
{
}
else
if
(
s
->
pixel_type
==
EXR_HALF
)
{
// 16-bit
for
(
x
=
0
;
x
<
td
->
xsize
;
x
++
)
{
int
c
;
...
...
@@ -1247,6 +1247,15 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
if
(
channel_buffer
[
3
])
*
ptr_x
++
=
exr_halflt2uint
(
bytestream_get_le16
(
&
a
));
}
}
else
if
(
s
->
pixel_type
==
EXR_UINT
)
{
for
(
x
=
0
;
x
<
td
->
xsize
;
x
++
)
{
for
(
c
=
0
;
c
<
rgb_channel_count
;
c
++
)
{
*
ptr_x
++
=
bytestream_get_le32
(
&
rgb
[
c
])
>>
16
;
}
if
(
channel_buffer
[
3
])
*
ptr_x
++
=
bytestream_get_le32
(
&
a
)
>>
16
;
}
}
// Zero out the end if xmax+1 is not w
...
...
@@ -1648,6 +1657,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
switch
(
s
->
pixel_type
)
{
case
EXR_FLOAT
:
case
EXR_HALF
:
case
EXR_UINT
:
if
(
s
->
channel_offsets
[
3
]
>=
0
)
{
if
(
!
s
->
is_luma
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA64
;
...
...
@@ -1662,9 +1672,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
}
}
break
;
case
EXR_UINT
:
avpriv_request_sample
(
avctx
,
"32-bit unsigned int"
);
return
AVERROR_PATCHWELCOME
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Missing channel list.
\n
"
);
return
AVERROR_INVALIDDATA
;
...
...
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