comparison xsubdec.c @ 5489:dc54869af30b libavcodec

Colours except background should not be transparent
author reimar
date Sun, 05 Aug 2007 12:11:24 +0000
parents 0f736b1402ca
children 12d77ed34985
comparison
equal deleted inserted replaced
5488:0f736b1402ca 5489:dc54869af30b
72 sub->rects[0].rgba_palette = av_malloc(sub->rects[0].nb_colors * 4); 72 sub->rects[0].rgba_palette = av_malloc(sub->rects[0].nb_colors * 4);
73 73
74 // read palette 74 // read palette
75 for (i = 0; i < sub->rects[0].nb_colors; i++) 75 for (i = 0; i < sub->rects[0].nb_colors; i++)
76 sub->rects[0].rgba_palette[i] = bytestream_get_be24(&buf); 76 sub->rects[0].rgba_palette[i] = bytestream_get_be24(&buf);
77 // make all except background (first entry) non-transparent
78 for (i = 1; i < sub->rects[0].nb_colors; i++)
79 sub->rects[0].rgba_palette[i] |= 0xff000000;
77 80
78 // process RLE-compressed data 81 // process RLE-compressed data
79 rlelen = FFMIN(rlelen, buf_end - buf); 82 rlelen = FFMIN(rlelen, buf_end - buf);
80 init_get_bits(&gb, buf, rlelen * 8); 83 init_get_bits(&gb, buf, rlelen * 8);
81 bitmap = sub->rects[0].bitmap; 84 bitmap = sub->rects[0].bitmap;