git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
47e9215
)
brender_pix: use a grayscale palette as fallback instead of a uninitialized one.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 20 Feb 2013 23:21:47 +0000
(
00:21
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 20 Feb 2013 23:26:50 +0000
(
00:26
+0100)
Improves: 3-0-CORPSE.PIX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/brender_pix.c
patch
|
blob
|
history
diff --git
a/libavcodec/brender_pix.c
b/libavcodec/brender_pix.c
index
5245fa0
..
6c63244
100644
(file)
--- a/
libavcodec/brender_pix.c
+++ b/
libavcodec/brender_pix.c
@@
-193,6
+193,14
@@
static int brpix_decode_frame(AVCodecContext *avctx,
s->frame.palette_has_changed = 1;
chunk_type = bytestream2_get_be32(&gb);
+ } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
+ uint32_t *pal_out = (uint32_t *)s->frame.data[1];
+ int i;
+
+ for (i = 0; i < 256; ++i) {
+ *pal_out++ = (0xFFU << 24) | (i * 0x010101);
+ }
+ s->frame.palette_has_changed = 1;
}
data_len = bytestream2_get_be32(&gb);