UMP
1st December 2003, 02:08
When trying to encode with the new XviD 1.0 Beta I experience access violations in xvid.dll.
I finally got rid of the access violation by enlarging the input buffer before and after the actual data, but here is what I then get after the encoding :
http://fairuse.free.fr/ken.jpg
Since FU feeds the encoder with an I420 color space input, I suspect that I should do some color space conversion before sending the data to the encoder, but I don't know which color space will be accepted by xvid, since after some searching it seemed to me that XviD can deal with I420 input. :confused:
Does anyone have a suggestion ?
Thanks,
ump
EDIT:
I finally found what was going on. :)
FU was using this code to initialize input, which worked fine with old XviD builds and with DivX, but hanged with recent XviD builds :
_in.bmiHeader.biPlanes = 1;
_in.bmiHeader.biBitCount = 24;
_in.bmiHeader.biSizeImage = dim.x * dim.y * 3 / 2;
_in.bmiHeader.biCompression = FourCc("I420");
But an I420 color space seems to be coded on 12 bits. This one works fine with latest XviD :
_in.bmiHeader.biPlanes = 1;
_in.bmiHeader.biBitCount = 12;
_in.bmiHeader.biSizeImage = dim.x * dim.y * 3 / 2;
_in.bmiHeader.biCompression = FourCc("I420");
Sorry for the useless post. Anyway I won't delete it in case it could be useful to someone else, and hoping I'm not violating rules #8 nor #12. :o
ump
I finally got rid of the access violation by enlarging the input buffer before and after the actual data, but here is what I then get after the encoding :
http://fairuse.free.fr/ken.jpg
Since FU feeds the encoder with an I420 color space input, I suspect that I should do some color space conversion before sending the data to the encoder, but I don't know which color space will be accepted by xvid, since after some searching it seemed to me that XviD can deal with I420 input. :confused:
Does anyone have a suggestion ?
Thanks,
ump
EDIT:
I finally found what was going on. :)
FU was using this code to initialize input, which worked fine with old XviD builds and with DivX, but hanged with recent XviD builds :
_in.bmiHeader.biPlanes = 1;
_in.bmiHeader.biBitCount = 24;
_in.bmiHeader.biSizeImage = dim.x * dim.y * 3 / 2;
_in.bmiHeader.biCompression = FourCc("I420");
But an I420 color space seems to be coded on 12 bits. This one works fine with latest XviD :
_in.bmiHeader.biPlanes = 1;
_in.bmiHeader.biBitCount = 12;
_in.bmiHeader.biSizeImage = dim.x * dim.y * 3 / 2;
_in.bmiHeader.biCompression = FourCc("I420");
Sorry for the useless post. Anyway I won't delete it in case it could be useful to someone else, and hoping I'm not violating rules #8 nor #12. :o
ump