Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
6c559a0a
Commit
6c559a0a
authored
Jan 22, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/pnm: Support decoding ya16.
parent
196dd72b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
pnm.c
libavcodec/pnm.c
+4
-1
pnmdec.c
libavcodec/pnmdec.c
+7
-0
No files found.
libavcodec/pnm.c
View file @
6c559a0a
...
@@ -122,8 +122,11 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
...
@@ -122,8 +122,11 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY16
;
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY16
;
}
}
}
else
if
(
depth
==
2
)
{
}
else
if
(
depth
==
2
)
{
if
(
maxval
==
255
)
if
(
maxval
<
256
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY8A
;
avctx
->
pix_fmt
=
AV_PIX_FMT_GRAY8A
;
}
else
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YA16
;
}
}
else
if
(
depth
==
3
)
{
}
else
if
(
depth
==
3
)
{
if
(
maxval
<
256
)
{
if
(
maxval
<
256
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
...
...
libavcodec/pnmdec.c
View file @
6c559a0a
...
@@ -108,6 +108,13 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -108,6 +108,13 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
if
(
s
->
maxval
<
65535
)
if
(
s
->
maxval
<
65535
)
upgrade
=
2
;
upgrade
=
2
;
goto
do_read
;
goto
do_read
;
case
AV_PIX_FMT_YA16
:
n
=
avctx
->
width
*
4
;
components
=
2
;
sample_len
=
16
;
if
(
s
->
maxval
<
65535
)
upgrade
=
2
;
goto
do_read
;
case
AV_PIX_FMT_MONOWHITE
:
case
AV_PIX_FMT_MONOWHITE
:
case
AV_PIX_FMT_MONOBLACK
:
case
AV_PIX_FMT_MONOBLACK
:
n
=
(
avctx
->
width
+
7
)
>>
3
;
n
=
(
avctx
->
width
+
7
)
>>
3
;
...
...
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