[MPlayer-dev-eng] [PATCH] biPlanes must always be 1 in avi files (bug #146)

Arpi arpi at mplayerhq.hu
Thu Dec 30 13:48:14 CET 2004


Hi,

> Hi,
> this patch makes sure that biPlanes is always 1 when writing an AVI, as
> according to Microsoft that's how it must be (see bugzilla for more
> information).
> I intend to apply soon.

i'm object it.
first, check a bunch of wild files, they all have 0 there.
the planes=1 is only true for the uncompressed rgb files.
for yuv files and codecs it's 0.
(m$ specs tell about rgb only, yuv formats were added later by non-m$
ppl, and they define their own rules... i think virtualdub should be
followed as the most popular and most used tool for creating avi on win32)

> +          int planes = s->bih->biPlanes;.
> +          // according to the specs this must always be 1.
> +          s->bih->biPlanes = 1;.
>            le2me_BITMAPINFOHEADER(s->bih);.
>            write_avi_chunk(f,ckidSTREAMFORMAT,biSize,s->bih); /*
> BITMAPINFOHEADER */.
>            le2me_BITMAPINFOHEADER(s->bih);.
> +          s->bih->biPlanes = planes;.

also, why do you save & restore the old value of biPlanes ???


A'rpi / MPlayer, Astral & ESP-team

--
Girls are like internet domain names, the ones I like are already taken.




More information about the MPlayer-dev-eng mailing list