Le 02/05/2015 12:51, Michael Niedermayer a écrit :
On Sat, May 02, 2015 at 02:41:33AM +0200, Jerome Martinez wrote:shouldn't it be if (fs->transparency) decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], (f->version >= 4 && !f->chroma_planes) ? 1 : 2);yes, i think so too, please send a patch,
Attached
note though this isnt a bug as the case where this matters isnt supported
Sure (version 4 not considered stable).
>From 0847ef91514a1a05ae1a09e170f470a884f74283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= <[email protected]> Date: Sat, 2 May 2015 13:23:12 +0200 Subject: [PATCH] ffv1dec: plane_index is 1 in case of version 4 gray+alpha. Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0. --- libavcodec/ffv1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index fda3f09..3877768 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -441,7 +441,7 @@ static int decode_slice(AVCodecContext *c, void *arg) decode_plane(fs, p->data[2] + ps*cx+cy*p->linesize[2], chroma_width, chroma_height, p->linesize[2], 1); } if (fs->transparency) - decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], 2); + decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], f->version >= 4 && !f->chroma_planes) ? 1 : 2); } else { uint8_t *planes[3] = { p->data[0] + ps * x + y * p->linesize[0], p->data[1] + ps * x + y * p->linesize[1], -- 1.9.5.msysgit.1
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
