Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
4fbccfab
Commit
4fbccfab
authored
13 years ago
by
Aneesh Dogra
Committed by
Ronald S. Bultje
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sunrast: Add support for gray8 decoding.
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
dae2ce36
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/sunrast.c
+2
-6
2 additions, 6 deletions
libavcodec/sunrast.c
with
2 additions
and
6 deletions
libavcodec/sunrast.c
+
2
−
6
View file @
4fbccfab
...
@@ -112,7 +112,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -112,7 +112,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
avctx
->
pix_fmt
=
PIX_FMT_MONOWHITE
;
avctx
->
pix_fmt
=
PIX_FMT_MONOWHITE
;
break
;
break
;
case
8
:
case
8
:
avctx
->
pix_fmt
=
PIX_FMT_PAL
8
;
avctx
->
pix_fmt
=
maplength
?
PIX_FMT_PAL8
:
PIX_FMT_GRAY
8
;
break
;
break
;
case
24
:
case
24
:
avctx
->
pix_fmt
=
(
type
==
RT_FORMAT_RGB
)
?
PIX_FMT_RGB24
:
PIX_FMT_BGR24
;
avctx
->
pix_fmt
=
(
type
==
RT_FORMAT_RGB
)
?
PIX_FMT_RGB24
:
PIX_FMT_BGR24
;
...
@@ -140,13 +140,9 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -140,13 +140,9 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
if
(
depth
!=
8
&&
maplength
)
{
if
(
depth
!=
8
&&
maplength
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"useless colormap found or file is corrupted, trying to recover
\n
"
);
av_log
(
avctx
,
AV_LOG_WARNING
,
"useless colormap found or file is corrupted, trying to recover
\n
"
);
}
else
if
(
depth
==
8
)
{
}
else
if
(
maplength
)
{
unsigned
int
len
=
maplength
/
3
;
unsigned
int
len
=
maplength
/
3
;
if
(
!
maplength
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"colormap expected
\n
"
);
return
-
1
;
}
if
(
maplength
%
3
||
maplength
>
768
)
{
if
(
maplength
%
3
||
maplength
>
768
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"invalid colormap length
\n
"
);
av_log
(
avctx
,
AV_LOG_WARNING
,
"invalid colormap length
\n
"
);
return
-
1
;
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment