Le 02/05/2015 01:37, Michael Niedermayer a écrit :
plane_count was 2 for gray prior to version 4 [...]

Got it.
Maybe I missed something else, but looks like decode_plane() is never called with plane_index = 1 if chroma_planes is 0. Was it an implementation bug and actually plane_index = 1 is never used in the case of gray?

Additionally, I read this code:

>         if (fs->transparency)
> decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], 2);

plane_index is 2 for the alpha plane if transparency is 1, in all cases.
but I understood that for version >= 4, plane_count is 2 if grey+alpha, so plane_index = 2 would not be possible.

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);

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to