[MPlayer-dev-eng] [PATCH] XviD 1.1.x support

Loren Merritt lorenm at u.washington.edu
Sat Oct 2 22:33:12 CEST 2004


On Sat, 2 Oct 2004, Guillaume POIRIER wrote:
> Le sam 02/10/2004 à 20:09, Reimar Döffinger a écrit :
>
>>>  	mod->mux->bih->biSizeImage =
>>> -		mod->mux->bih->biWidth * mod->mux->bih->biHeight * 3;
>>> +		mod->mux->bih->biWidth * mod->mux->bih->biHeight * 3 / 2;
>>
>> Why /2?
>
> To get half the value? ;-p
>
> Heck I know?
> Sorry here, I just send patches, I didn't do the coding :-(
>
>>> -	mod->mux->bih->biBitCount = 24;
>>> +	mod->mux->bih->biBitCount = 12;
>>
>> Hmm.. ?
>
> Still here, I'm sure that it can be explained, but I'm not the guy in
> charge here.

I don't know why it worked before, but xvid (i.e. mpeg-4) uses a yuv 
4:2:0 colorspace, which takes 12 bits per pixel. Thus the byte-size 
of an image is width*height*3/2.

--Loren Merritt


More information about the MPlayer-dev-eng mailing list