Log in

View Full Version : Building XviD


AndyP
22nd October 2002, 18:18
Apologies if this has been asked before. I have successfully managed to build xvid.dll from the sources (hurrah :D ) and was wondering what Nic/Koepi/others did differently in their builds. I did some searching and found a couple of posts that detailed some of the differences, and I have some questions......

In a post Nic said:

1) Add #ifdef __cplusplus extern "C" in image.h - I haven't done this - what does it do???
2) Get rid of fprintf(stderr in xvid.c - I can't find this. I think it was removed in the CVS. Am I correct??
3) Set TOOSMALL_LIMIT - Found in mbtransquant.c and done!
4) Set BFRAMES and BFRAMES_DEC in all project settings - BFRAMES seems to be set by default, do I need BFRAMES_DEC as well?? (and what does it do??)

In a post Koepi said:

To activate EPZS you have to comment out motion.h and uncomment the EPZS code. I can't find anything like this is motion.h?? is EPZS default now??

I have uncommented the frame.general line in codec.c. Do I need to do anything else to activate EPZS??

Finally, what other magic tricks do you do to get your (excellent) builds - if you don't mind sharing??

Sorry if this is obvious, and sorry if not relevant.

Kind Regards,
Andy :)

sysKin
23rd October 2002, 10:53
Originally posted by AndyP
[B]4) Set BFRAMES and BFRAMES_DEC in all project settings - BFRAMES seems to be set by default, do I need BFRAMES_DEC as well?? (and what does it do??)
BFRAMES_DEC is a decoding support for B-frames - you can build without it and only decode with, say, ffdshow but there is no reason for this ;)
To activate EPZS you have to comment out motion.h and uncomment the EPZS code. I can't find anything like this is motion.h?? is EPZS default now?? There is a completely new motion estimation code. It was based on PMVfast, but if you would point out differences between PMVFast and EPZS, the new code would be closer to EPZS...

Radek

Nic
23rd October 2002, 11:03
"Add #ifdef __cplusplus extern "C" in image.h - I haven't done this - what does it do??? "
Dont worry about that, that was from a post discussing what I have to do. That line is for my DShow filter, & is not actually needed in xvidcore (I can do it from my DShow filter, as I do now)

for dev3-api, you can just compile it after setting toosmall_limit without making changes. To add Qpel to all presets, you add the qpel refine flags to the pmv_presets in the vfw & add frame.general |= XVID_QUARTERPEL.

Hope that helps, I have compiled a stable build in ages, so I dont know whats needed to make that....

Cheers,
-Nic

AndyP
23rd October 2002, 12:36
Hi

Many thanks for the replies. I have added the:

frame.general |= XVID_QUARTERPEL;

line to codec.c and adjusted the pmv_presets as follows:

int pmvfast_presets[7] = {
0, PMV_QUICKSTOP16, 0, 0,
0 | PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8,
0 | PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8 |
PMV_ADVANCEDDIAMOND16, PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 |
PMV_HALFPELREFINE8 | PMV_HALFPELDIAMOND8 | PMV_USESQUARES16 |
PMV_QUARTERPELREFINE8 | PMV_QUARTERPELREFINE16
};

It seems to make a difference if the halfpel refine 8/16 is left in as well as adding the qpel refines (the resulting file is smaller) so I assume that is the way to do it. (Exactly the same size as an output from Koepi's build but binary compare different, but then you guys compile with ICL so I assume that's normal)

Thanks for pointing out about the new ME. Had my brain been in gear at the time I would have remembered that! :D

One other question. I notice in some posts that you can check-out the source using a program called cvs. I assume that this is a unix command as I can find nothing similar in WinXP. Do you know if there is a Windows equivalent??

Kind Regards,
Andy

Nic
23rd October 2002, 12:59
Download an app called WinCVS,
I dont recommend the GUI, I use the command line program in your:
C:\Program Files\GNU\WinCvs 1.2 or similar.

then use something like:
cvs -d:pserver:anonymous@cvs.xvid.org:/xvid co -R -r dev-api-3 vfw
cvs -d:pserver:anonymous@cvs.xvid.org:/xvid co -R -r dev-api-3 xvidcore
cvs -d:pserver:anonymous@cvs.xvid.org:/xvid co -R -r dev-api-3 dshow

you may have to login using:
cvs -d:pserver:anonymous@cvs.xvid.org:/xvid login

Cheers,
-Nic

AndyP
23rd October 2002, 22:25
Found it.

Many Thanks,
Andy