TorgoGuy
2nd March 2004, 18:42
Sorry for the long post...
In working on my concise XviD (http://wellness.uwsp.edu/staff/ken/xvid/faq/) FAQ (see below), I figured it would be useful to quantify how using various XviD features affect encoding speed. I've done this initial test to start to figure this out. I've also included a few interesting (I hope) observations based on this data. There may not be anything new here, but I haven't found a recent thread with this information.
The Test:
I did a two pass encode with the options at the defaults and recorded encoding times for first and second passes. This became my baseline. The build was Koepi's XviD RC2. Actually not quite all settings were at defaults--all encodes in this test were done with the XviD status window disabled.
I then repeated the process turning features on and off individually and comparing the speed to the baseline.
The source material is the entire LOTR Fellowship (extended) movie, with a simple crop(16,64,688,352) and a trim to remove the fan club credits. No resizing was done. XviD was asked to hit a 1,222,000KB target size.
Results:
Below you will find the results. The first column tells you which non-default options were selected for a particular encode. The next three columns give the encoding time for the 1st pass, 2nd pass, and the total time. The times are given as a percentage compared to with default settings. For example, a value of 100% means it encoded at the same speed as with default options, a value of 200% would mean it took twice as long, and 50% would be half the time.
1st 2nd
Settings pass pass total
-------------------------------------
Defaults 100% 100% 100%
VHQ 4 100% 156% 138%
MPEG Matrix 105% 104% 104%
Adaptive Quant. 101% 102% 102%
Qpel 100% 169% 147%
GMC 100% 170% 148%
No B-VOPs 78% 78% 78%
Chroma Optim. 100% 101% 101%
MSP 0 56% 26% 35%
No Chroma Mot. 100% 78% 84%
Trellis 100% 104% 102%
VHQ 0 100% 89% 92%
Turbo 100% 76% 83%
Qpel w/ Turbo 100% 108% 105%
GMC & VHQ 4 100% 208% 173%
Cartoon 102% 100% 101%
"Fast" 59% 45% 50%
"Slow" 110% 381% 294%
"Fast" was defaults except: no B-VOPs, MSP 0, VHQ 0, No Chroma Motion, and Turbo (even though turbo should have no effect).
"Slow" was defaults except: MPEG quant, Adaptive quant, Qpel, GMC, Chroma Optimizer, VHQ 4, and Trellis. MSP is already 6 by default and chroma motion is already also "on" by default.
Observations:
Many options do not affect encoding time much. (Quant matrix, Adaptive Quant, Chroma Optimizer, Trellis, Qpel if turbo is enabled, and cartoon mode)
You can save time by reusing pass files: Looking at the .pass files, it looks like the following settings are ignored for the first pass when using fast first pass: VHQ, Qpel, GMC, Chroma Motion, Trellis, and Turbo. The good news about this is that if you keep your .pass file you don't have to re-do your first pass even if you want to modify any those settings on your second pass. For this test I did NOT reuse the pass file and redid the first pass every time.
XviD has great rate control: XviD's rate control performed very well except when MSP was set to 0, (see below). All encodes met the requested KB with less than 0.05% deviation except: 1) Both encodes with MSP 0 were 36% over requested size and 2) All 3 encodes that included Qpel were about 0.1% under size
Surprising fastest encode: The fastest encoding time was acheived by using the defaults with MSP set to 0. I thought I could improve on that speed (but not quality of course) by also disabling B-Frames, using VHQ 0, and no chroma motion. I even enabled Turbo (although without Qpel and B-Frames it shouldn't matter). That is the so-called "Fast" profile above. It ended up being slower. I have no idea why and will repeat those tests just to make sure the time measurements are correct. (I am confident that they are).
Quality Assessment? I kept all of the .pass files and AVI files. If there is interest I will post my subjective impression on the quality using the various options. Also if there is interest I can run some mathematical measurements (PSNR, SSIM, etc).
Notes:
I haven't done any testing (yet) with fast first pass disabled. (I forgot to).
My concise XviD FAQ (http://wellness.uwsp.edu/staff/ken/xvid/faq/) isn't really fit for consumption yet, but it is starting to take form. I know it is wordy in many spots (kinda reminds me of this post!) and I will fix it before I consider it "fit for consumption." Please don't email me with mistakes in it (yet) although feel free to let me know what you think of the general ideas in it. I do have Crusty's blessing to make this derivative of his FAQ.
I will repeat this with RC3 and 1.0 when it is available. It takes quite some time to run all of these encodes with such a long movie and I had my RC2 test in progress when RC3 came out. I wanted to do the whole movie to have a more "realistic" measurement rather than just a scene.
Remember, LOTR 1 is not necessarily representative of what will happen with other sources, but these numbers provide a general guide. I plan to do more testing.
Yes, I know this is not a cartoon and I used cartoon mode for one of the tests.
If you have a set of options you'd like see compared, let me know and I'll do it.
"What do you think sirs?"
In working on my concise XviD (http://wellness.uwsp.edu/staff/ken/xvid/faq/) FAQ (see below), I figured it would be useful to quantify how using various XviD features affect encoding speed. I've done this initial test to start to figure this out. I've also included a few interesting (I hope) observations based on this data. There may not be anything new here, but I haven't found a recent thread with this information.
The Test:
I did a two pass encode with the options at the defaults and recorded encoding times for first and second passes. This became my baseline. The build was Koepi's XviD RC2. Actually not quite all settings were at defaults--all encodes in this test were done with the XviD status window disabled.
I then repeated the process turning features on and off individually and comparing the speed to the baseline.
The source material is the entire LOTR Fellowship (extended) movie, with a simple crop(16,64,688,352) and a trim to remove the fan club credits. No resizing was done. XviD was asked to hit a 1,222,000KB target size.
Results:
Below you will find the results. The first column tells you which non-default options were selected for a particular encode. The next three columns give the encoding time for the 1st pass, 2nd pass, and the total time. The times are given as a percentage compared to with default settings. For example, a value of 100% means it encoded at the same speed as with default options, a value of 200% would mean it took twice as long, and 50% would be half the time.
1st 2nd
Settings pass pass total
-------------------------------------
Defaults 100% 100% 100%
VHQ 4 100% 156% 138%
MPEG Matrix 105% 104% 104%
Adaptive Quant. 101% 102% 102%
Qpel 100% 169% 147%
GMC 100% 170% 148%
No B-VOPs 78% 78% 78%
Chroma Optim. 100% 101% 101%
MSP 0 56% 26% 35%
No Chroma Mot. 100% 78% 84%
Trellis 100% 104% 102%
VHQ 0 100% 89% 92%
Turbo 100% 76% 83%
Qpel w/ Turbo 100% 108% 105%
GMC & VHQ 4 100% 208% 173%
Cartoon 102% 100% 101%
"Fast" 59% 45% 50%
"Slow" 110% 381% 294%
"Fast" was defaults except: no B-VOPs, MSP 0, VHQ 0, No Chroma Motion, and Turbo (even though turbo should have no effect).
"Slow" was defaults except: MPEG quant, Adaptive quant, Qpel, GMC, Chroma Optimizer, VHQ 4, and Trellis. MSP is already 6 by default and chroma motion is already also "on" by default.
Observations:
Many options do not affect encoding time much. (Quant matrix, Adaptive Quant, Chroma Optimizer, Trellis, Qpel if turbo is enabled, and cartoon mode)
You can save time by reusing pass files: Looking at the .pass files, it looks like the following settings are ignored for the first pass when using fast first pass: VHQ, Qpel, GMC, Chroma Motion, Trellis, and Turbo. The good news about this is that if you keep your .pass file you don't have to re-do your first pass even if you want to modify any those settings on your second pass. For this test I did NOT reuse the pass file and redid the first pass every time.
XviD has great rate control: XviD's rate control performed very well except when MSP was set to 0, (see below). All encodes met the requested KB with less than 0.05% deviation except: 1) Both encodes with MSP 0 were 36% over requested size and 2) All 3 encodes that included Qpel were about 0.1% under size
Surprising fastest encode: The fastest encoding time was acheived by using the defaults with MSP set to 0. I thought I could improve on that speed (but not quality of course) by also disabling B-Frames, using VHQ 0, and no chroma motion. I even enabled Turbo (although without Qpel and B-Frames it shouldn't matter). That is the so-called "Fast" profile above. It ended up being slower. I have no idea why and will repeat those tests just to make sure the time measurements are correct. (I am confident that they are).
Quality Assessment? I kept all of the .pass files and AVI files. If there is interest I will post my subjective impression on the quality using the various options. Also if there is interest I can run some mathematical measurements (PSNR, SSIM, etc).
Notes:
I haven't done any testing (yet) with fast first pass disabled. (I forgot to).
My concise XviD FAQ (http://wellness.uwsp.edu/staff/ken/xvid/faq/) isn't really fit for consumption yet, but it is starting to take form. I know it is wordy in many spots (kinda reminds me of this post!) and I will fix it before I consider it "fit for consumption." Please don't email me with mistakes in it (yet) although feel free to let me know what you think of the general ideas in it. I do have Crusty's blessing to make this derivative of his FAQ.
I will repeat this with RC3 and 1.0 when it is available. It takes quite some time to run all of these encodes with such a long movie and I had my RC2 test in progress when RC3 came out. I wanted to do the whole movie to have a more "realistic" measurement rather than just a scene.
Remember, LOTR 1 is not necessarily representative of what will happen with other sources, but these numbers provide a general guide. I plan to do more testing.
Yes, I know this is not a cartoon and I used cartoon mode for one of the tests.
If you have a set of options you'd like see compared, let me know and I'll do it.
"What do you think sirs?"