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
e8c0defe
Commit
e8c0defe
authored
11 years ago
by
Janne Grunau
Browse files
Options
Downloads
Patches
Plain Diff
8bps: decode 24bit files correctly as rgb32 on bigendian
parent
c3386bd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/8bps.c
+7
-11
7 additions, 11 deletions
libavcodec/8bps.c
with
7 additions
and
11 deletions
libavcodec/8bps.c
+
7
−
11
View file @
e8c0defe
...
@@ -168,17 +168,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
...
@@ -168,17 +168,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
case
32
:
case
32
:
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB32
;
c
->
planes
=
4
;
c
->
planes
=
4
;
#if HAVE_BIGENDIAN
/* handle planemap setup later for decoding rgb24 data as rbg32 */
c
->
planemap
[
0
]
=
1
;
// 1st plane is red
c
->
planemap
[
1
]
=
2
;
// 2nd plane is green
c
->
planemap
[
2
]
=
3
;
// 3rd plane is blue
c
->
planemap
[
3
]
=
0
;
// 4th plane is alpha???
#else
c
->
planemap
[
0
]
=
2
;
// 1st plane is red
c
->
planemap
[
1
]
=
1
;
// 2nd plane is green
c
->
planemap
[
2
]
=
0
;
// 3rd plane is blue
c
->
planemap
[
3
]
=
3
;
// 4th plane is alpha???
#endif
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error: Unsupported color depth: %u.
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error: Unsupported color depth: %u.
\n
"
,
...
@@ -186,6 +176,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
...
@@ -186,6 +176,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_RGB32
)
{
c
->
planemap
[
0
]
=
HAVE_BIGENDIAN
?
1
:
2
;
// 1st plane is red
c
->
planemap
[
1
]
=
HAVE_BIGENDIAN
?
2
:
1
;
// 2nd plane is green
c
->
planemap
[
2
]
=
HAVE_BIGENDIAN
?
3
:
0
;
// 3rd plane is blue
c
->
planemap
[
3
]
=
HAVE_BIGENDIAN
?
0
:
3
;
// 4th plane is alpha???
}
return
0
;
return
0
;
}
}
...
...
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