[FFmpeg-trac] #967(avcodec:open): iff ilbm ham8 with masking decodes incorrectly (was: iff ilbm ham8 with transparency decodes incorrectly)
FFmpeg
trac at avcodec.org
Thu Apr 26 18:21:11 CEST 2012
#967: iff ilbm ham8 with masking decodes incorrectly
------------------------------------+-----------------------------------
Reporter: ami_stuff | Owner:
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: iff | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by ami_stuff):
this fixes the colors for ham8 with masking (stencil):
libavcodec/iff.c:
{{{
if (s->masking == MASK_HAS_MASK) {
- if (s->bpp >= 8) {
+ if (s->bpp >= 8 && !s->ham) {
avctx->pix_fmt = PIX_FMT_RGB32;
av_freep(&s->mask_buf);
av_freep(&s->mask_palbuf);
s->mask_buf = av_malloc((s->planesize * 32) +
FF_INPUT_BUFFER_PADDING_SIZE);
if (!s->mask_buf)
return AVERROR(ENOMEM);
s->mask_palbuf = av_malloc((2 << s->bpp) *
sizeof(uint32_t) + FF_INPUT_BUFFER_PADDING_SIZE);
if (!s->mask_palbuf) {
av_freep(&s->mask_buf);
return AVERROR(ENOMEM);
}
}
s->bpp++;
} else if (s->masking != MASK_NONE && s->masking !=
MASK_HAS_TRANSPARENT_COLOR) {
av_log(avctx, AV_LOG_ERROR, "Masking not supported\n");
return AVERROR_PATCHWELCOME;
}}}
but the problem with graphic artifacts still remains.
libsdl_image decodes correctly attached images.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/967#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list