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
57aff885
Commit
57aff885
authored
Nov 03, 2006
by
Kostya Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RGB32 support in Targa
Originally committed as revision 6883 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
25225c37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
targa.c
libavcodec/targa.c
+10
-0
No files found.
libavcodec/targa.c
View file @
57aff885
...
...
@@ -68,6 +68,9 @@ static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, uint8_t *sr
dst
[
1
]
=
src
[
1
];
dst
[
2
]
=
src
[
2
];
break
;
case
4
:
*
((
uint32_t
*
)
dst
)
=
LE_32
(
src
);
break
;
}
dst
+=
depth
;
if
(
!
type
)
...
...
@@ -128,6 +131,9 @@ static int decode_frame(AVCodecContext *avctx,
case
24
:
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
break
;
case
32
:
avctx
->
pix_fmt
=
PIX_FMT_RGBA32
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Bit depth %i is not supported
\n
"
,
s
->
bpp
);
return
-
1
;
...
...
@@ -195,6 +201,10 @@ static int decode_frame(AVCodecContext *avctx,
uint16_t
*
dst16
=
(
uint16_t
*
)
dst
;
for
(
x
=
0
;
x
<
s
->
width
;
x
++
)
dst16
[
x
]
=
LE_16
(
buf
+
x
*
2
);
}
else
if
((
s
->
bpp
+
1
)
>>
3
==
4
){
uint32_t
*
dst32
=
(
uint32_t
*
)
dst
;
for
(
x
=
0
;
x
<
s
->
width
;
x
++
)
dst32
[
x
]
=
LE_32
(
buf
+
x
*
4
);
}
else
#endif
memcpy
(
dst
,
buf
,
s
->
width
*
((
s
->
bpp
+
1
)
>>
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