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
b49d94e4
Commit
b49d94e4
authored
Oct 08, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support decoding of targa files with 32bit palette.
parent
a0276299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
targa.c
libavcodec/targa.c
+5
-0
No files found.
libavcodec/targa.c
View file @
b49d94e4
...
...
@@ -181,6 +181,7 @@ static int decode_frame(AVCodecContext *avctx,
return
-
1
;
}
switch
(
csize
)
{
case
32
:
pal_sample_size
=
4
;
break
;
case
24
:
pal_sample_size
=
3
;
break
;
case
16
:
case
15
:
pal_sample_size
=
2
;
break
;
...
...
@@ -201,6 +202,10 @@ static int decode_frame(AVCodecContext *avctx,
return
AVERROR_INVALIDDATA
;
}
switch
(
pal_sample_size
)
{
case
4
:
for
(
t
=
0
;
t
<
colors
;
t
++
)
*
pal
++
=
bytestream2_get_le32u
(
&
s
->
gb
);
break
;
case
3
:
/* RGB24 */
for
(
t
=
0
;
t
<
colors
;
t
++
)
...
...
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