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
a534862b
Commit
a534862b
authored
Nov 24, 2016
by
Martin Vignali
Committed by
Michael Niedermayer
Dec 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavformat : add Photoshop PSD demuxer.
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
90af9629
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
Makefile
libavformat/Makefile
+1
-0
allformats.c
libavformat/allformats.c
+1
-0
img2dec.c
libavformat/img2dec.c
+32
-0
No files found.
libavformat/Makefile
View file @
a534862b
...
...
@@ -235,6 +235,7 @@ OBJS-$(CONFIG_IMAGE_PGM_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_PICTOR_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_PNG_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_PPM_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_PSD_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_QDRAW_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER)
+=
img2dec.o
img2.o
OBJS-$(CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER)
+=
img2dec.o
img2.o
...
...
libavformat/allformats.c
View file @
a534862b
...
...
@@ -366,6 +366,7 @@ void av_register_all(void)
REGISTER_DEMUXER
(
IMAGE_PICTOR_PIPE
,
image_pictor_pipe
);
REGISTER_DEMUXER
(
IMAGE_PNG_PIPE
,
image_png_pipe
);
REGISTER_DEMUXER
(
IMAGE_PPM_PIPE
,
image_ppm_pipe
);
REGISTER_DEMUXER
(
IMAGE_PSD_PIPE
,
image_psd_pipe
);
REGISTER_DEMUXER
(
IMAGE_QDRAW_PIPE
,
image_qdraw_pipe
);
REGISTER_DEMUXER
(
IMAGE_SGI_PIPE
,
image_sgi_pipe
);
REGISTER_DEMUXER
(
IMAGE_SUNRAST_PIPE
,
image_sunrast_pipe
);
...
...
libavformat/img2dec.c
View file @
a534862b
...
...
@@ -822,6 +822,37 @@ static int png_probe(AVProbeData *p)
return
0
;
}
static
int
psd_probe
(
AVProbeData
*
p
)
{
const
uint8_t
*
b
=
p
->
buf
;
int
ret
=
0
;
uint16_t
color_mode
;
if
(
AV_RL32
(
b
)
==
MKTAG
(
'8'
,
'B'
,
'P'
,
'S'
))
{
ret
+=
1
;
}
else
{
return
0
;
}
if
((
b
[
4
]
==
0
)
&&
(
b
[
5
]
==
1
))
{
/* version 1 is PSD, version 2 is PSB */
ret
+=
1
;
}
else
{
return
0
;
}
if
((
AV_RL32
(
b
+
6
)
==
0
)
&&
(
AV_RL16
(
b
+
10
)
==
0
))
/* reserved must be 0 */
ret
+=
1
;
color_mode
=
AV_RB16
(
b
+
24
);
if
((
color_mode
<=
9
)
&&
(
color_mode
!=
5
)
&&
(
color_mode
!=
6
))
ret
+=
1
;
if
(
ret
)
return
AVPROBE_SCORE_EXTENSION
+
ret
;
return
0
;
}
static
int
sgi_probe
(
AVProbeData
*
p
)
{
const
uint8_t
*
b
=
p
->
buf
;
...
...
@@ -947,6 +978,7 @@ IMAGEAUTO_DEMUXER(pgmyuv, AV_CODEC_ID_PGMYUV)
IMAGEAUTO_DEMUXER
(
pictor
,
AV_CODEC_ID_PICTOR
)
IMAGEAUTO_DEMUXER
(
png
,
AV_CODEC_ID_PNG
)
IMAGEAUTO_DEMUXER
(
ppm
,
AV_CODEC_ID_PPM
)
IMAGEAUTO_DEMUXER
(
psd
,
AV_CODEC_ID_PSD
)
IMAGEAUTO_DEMUXER
(
qdraw
,
AV_CODEC_ID_QDRAW
)
IMAGEAUTO_DEMUXER
(
sgi
,
AV_CODEC_ID_SGI
)
IMAGEAUTO_DEMUXER
(
sunrast
,
AV_CODEC_ID_SUNRAST
)
...
...
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