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
328e7932
Commit
328e7932
authored
Jan 16, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support gray8a pam decoding.
parent
dc2f652a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
pnm.c
libavcodec/pnm.c
+3
-0
pnmdec.c
libavcodec/pnmdec.c
+5
-0
No files found.
libavcodec/pnm.c
View file @
328e7932
...
...
@@ -118,6 +118,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
}
else
{
avctx
->
pix_fmt
=
PIX_FMT_GRAY16BE
;
}
}
else
if
(
depth
==
2
)
{
if
(
maxval
==
255
)
avctx
->
pix_fmt
=
PIX_FMT_GRAY8A
;
}
else
if
(
depth
==
3
)
{
if
(
maxval
<
256
)
{
avctx
->
pix_fmt
=
PIX_FMT_RGB24
;
...
...
libavcodec/pnmdec.c
View file @
328e7932
...
...
@@ -75,6 +75,11 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
if
(
s
->
maxval
<
255
)
upgrade
=
1
;
goto
do_read
;
case
PIX_FMT_GRAY8A
:
n
=
avctx
->
width
*
2
;
components
=
2
;
sample_len
=
8
;
goto
do_read
;
case
PIX_FMT_GRAY16BE
:
case
PIX_FMT_GRAY16LE
:
n
=
avctx
->
width
*
2
;
...
...
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