Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-10-09 03:58:48 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-10-09 03:58:48 +0400
commitb49d94e4f25e22c613eb767d72b053e77d6319bc (patch)
treeee9e6c7f205f6f004b83ea9934063503d3a31f88 /libavcodec/targa.c
parenta02762995bc5951d5d8178c8ca8b4769d4568d48 (diff)
Support decoding of targa files with 32bit palette.
Diffstat (limited to 'libavcodec/targa.c')
-rw-r--r--libavcodec/targa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index e0c19366a4..8cef685587 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -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++)