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
f8dea10d
Commit
f8dea10d
authored
Jan 14, 2012
by
Carl Eugen Hoyos
Committed by
Vittorio Giovara
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sgi: decode images with 4 channels at 8 and 16 bits
parent
ab7c6462
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Changelog
Changelog
+1
-0
sgidec.c
libavcodec/sgidec.c
+2
-2
No files found.
Changelog
View file @
f8dea10d
...
...
@@ -11,6 +11,7 @@ version <next>:
- XBM decoder
- bmp standalone parser
- OpenEXR image decoder
- support decoding 4-channel SGI images
version 10:
...
...
libavcodec/sgidec.c
View file @
f8dea10d
...
...
@@ -198,8 +198,8 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
pix_fmt
=
s
->
bytes_per_channel
==
2
?
AV_PIX_FMT_GRAY16BE
:
AV_PIX_FMT_GRAY8
;
}
else
if
(
s
->
depth
==
SGI_RGB
)
{
avctx
->
pix_fmt
=
s
->
bytes_per_channel
==
2
?
AV_PIX_FMT_RGB48BE
:
AV_PIX_FMT_RGB24
;
}
else
if
(
s
->
depth
==
SGI_RGBA
&&
s
->
bytes_per_channel
==
1
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
}
else
if
(
s
->
depth
==
SGI_RGBA
)
{
avctx
->
pix_fmt
=
s
->
bytes_per_channel
==
2
?
AV_PIX_FMT_RGBA64BE
:
AV_PIX_FMT_RGBA
;
}
else
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"wrong picture format
\n
"
);
return
-
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