Log in

View Full Version : A Small Codec Comparison (Anime)


DeathTheSheep
25th March 2005, 03:12
All tested codecs were tested in their respective "maximum quality" modes and no psychovisual enhancements were on.
For codecs that could use B-frames, 1 B-frame was used. I used 150kbps bitrate in 2-pass mode, but since the first VP7 encodes were way off, I used quality mode to estimate filesize.

Encoding rig:
Processor: Intel Celeron 2.3ghz
Processor specs: 128k L2 cache, ~300mhz fsb
Memory: 512MB DDR SDRAM

:cool: DIVX - HiggsBosson 1461 alpha
http://www.detritus.qc.ca/files/DeathTheSheep/DIVX.avi
Minimum Average Maximum
Mean Absolute Deviation: 0.4484 7.9928 16.3564
Mean Deviation: -2.4490 -0.0808 +1.9799
PSNR: 21.6078 26.4861 47.5010
Overall PSNR: 26.0757
FPS (on pass 2 encode): 14.1019

Notes: Blocky, slow encode. Could see what was going on, but the very prominent blocks made it difficult. No (noticeable) motion artifacts. As clean an encode as possible with an ASP codec.


:cool:HDX4 - v1.5
http://www.detritus.qc.ca/files/DeathTheSheep/HDX4.avi
Minimum Average Maximum
Mean Absolute Deviation: 0.4425 9.5775 20.2937
Mean Deviation: -5.3267 +0.0450 +4.2485
PSNR: 19.6891 24.7819 48.4639
Overall PSNR: 24.2862
FPS (on pass 2 encode): 66.9701

Notes: Preposterously fast encoding. At first I thought it was a bug/something wrong when I saw the speed (faster than PASS 1!) However, slightly less detail than DivX and clear motion artifacts.


:cool:XVid - 1.1b
Crashed my computer immediately. Nothing I did fixed this, and no recent CVS builds fixed this either. Works only in 1-pass mode, but didn't try it (yet).


:cool:WMV9 - VFW
http://www.detritus.qc.ca/files/DeathTheSheep/WM9.avi

Minimum Average Maximum
Mean Absolute Deviation: 0.4569 7.4665 20.0117
Mean Deviation: -3.1730 -0.2020 +2.3120
PSNR: 19.7737 26.5545 49.8919
Overall PSNR: 25.9125
FPS (on pass 2 encode): 4.9367

Notes: Exteremely slow encoding (max quality and complexity). Decoded well, very pleasing visual impression. This is surprizing considering how poorly WMV performed in the past. Ah, with such terribly slow encoding speeds, I suppose quality HAD to be increased. Overall, surprising, and I like it. No motion artifacts, only a tiny bit of blocking, appealed to the senses.


:cool:VP7 - 1.0.0
http://www.detritus.qc.ca/files/DeathTheSheep/VP7_old.avi
Minimum Average Maximum
Mean Absolute Deviation: 1.2764 7.0024 15.3512
Mean Deviation: -1.9817 +0.0474 +1.9397
PSNR: 22.2918 27.5747 45.1205
Overall PSNR: 27.1782
FPS (1 pass QP mode): ~7.5

Notes: This is the 1st version. 2-pass mode was broken, and fps count was off (I estimated). Look below for more detailed notes.


:cool:VP7 - 1.0.4
http://www.detritus.qc.ca/files/DeathTheSheep/VP7_new.avi
Minimum Average Maximum
Mean Absolute Deviation: 1.0000 6.9500 14.7403
Mean Deviation: -1.9117 +0.0287 +1.4872
PSNR: 22.5618 27.6646 45.9123
Overall PSNR: 27.2733
FPS (on pass 2 encode): 7.4652

Notes: Even though it wasn't on constant quality (and therefore experianced some quality jumps throughout the clip), it still acheived noticeably higher PSNR than its slightly older counterpart. The clip looked a bit washed, but since it's anime, that look works well with it. Visually, VP7 looks better than even WMV9 above. I'm impressed. Good representation of fading and subtle tones, and the characters actually stand out from the background, an improvement over the previous version (or so I percieve of it).


:cool:VP6 - 1.4.2
http://www.detritus.qc.ca/files/DeathTheSheep/VP6_q56.avi
///DATA UNDETERMINED\\\
FPS (on pass 2 encode): 15.4398

Notes: I liked the picture. Visually looked the clearest of them all, but some clear and ugly blocking in scenes of high motion (reminds me of NeroDigital's old B-frame problem). Still, it makes for a pretty good crisp visual effect, whereas WMV9 looks more washed. VP7 seems like a run-between in the "motion blocking" department. This codec best demonstrates "full luma range."


:cool:x264 - Revision 177
http://www.detritus.qc.ca/files/DeathTheSheep/x264Old.avi
http://www.detritus.qc.ca/files/DeathTheSheep/x264REDO.avi

Minimum Average Maximum
Mean Absolute Deviation: 0.3610 6.4252 20.4393
Mean Deviation: -3.6155 +0.5814 +2.8651
PSNR: 19.6051 28.7100 48.7708
Overall PSNR: 28.0336
FPS (on pass 2 encode): 12.9024

Notes: In terms of sheer PSNR, x264 still wins. But truthfully, the AVI is all jacked up. The first 2 frames are cut off, and the last 2 are simply missing. A hassle to compute accurate PSNR, so only compared the first last 2148 frames (vs 2150, due to the first 2 being cut off). However, the visual impression isn't quite as good as with VP7 or RealVideo, but slighty better than WMV9. There were a couple annoying rectangular blocking arifacts during scenes of high motion.



:cool:RV10 (Sirber Edition)
http://www.detritus.qc.ca/files/DeathTheSheep/Real10.rmvb
Minimum Average Maximum
Mean Absolute Deviation: 0.2805 7.6570 19.0189
Mean Deviation: -1.9690 +0.3915 +3.5458
PSNR: 20.4849 27.3998 51.0253
Overall PSNR: 26.5160
FPS (on pass 2 encode): Uh... It's a low-priority encoder.
(Inaccurate fps result).

Notes: Wow, I haven't used RealVideo in quite a while, and I am pleased. Although it looks a bit like the characters are carved into pudding popcicles (and colored less than liberally), it's pretty block-free. The wierd rmvb container is a little... inconveniant, but it's ok if I use a directshow script for VirtualDub (for editing). The picture? This codec does a good job of smoothing the picture to appeal to the senses. However, it leaves some noise during motion, and there is an odd jello-like effect in some motion prediction. However, it clearly does the best (or ties for the best with VP7) in terms of representing areas of darker color (it can display the dark blue amidst the black without blocking).



RESULTS
--------------------------------
Overall, x264 wins the PSNR department, VP7 wins in the looks department (at least for this source), and HDX4 wins in the speed department (by one heck of a long shot).

HDX4 looses in the PSNR dept and the looks department (but only by a little, 2nd to DivX). WMV9 looses in the speed department.


I hope I made this test well. Uh, Sirber's gettin' the source.

PS: Have any of you guyz ever heard of ftp? My dear God, I've never known anything so cool in my life. Even vnc doesn't compare. Wow. Maybe I'm just out of it, but this should be the way of the future.

Sirber
25th March 2005, 03:26
Screens / files please! Thanks! :D

I can host if you wish! :)

[edit]

Could you add RV10?

Doom9
25th March 2005, 09:52
150kbit/s? Geez. You can use higher bitrates on a PDA or a PSP. We're not in the VCD age anymore.

And considering that the XviD team has consistently suggested to not use any b-frames for animated content.. I'd disable them.

stephanV
25th March 2005, 10:28
i find the PSNR values rather shocking...

/me is curious about screenshots...

yaz
25th March 2005, 10:29
Originally posted by Doom9
150kbit/s? Geez. You can use higher bitrates on a PDA or a PSP. We're not in the VCD age anymore. naah :D vcd is far above 1Mb/s (iirc, is sg like 1150)
Originally posted by Doom9
And considering that the XviD team has consistently suggested to not use any b-frames for animated content.. yep ... but i can't recall any hard evidence of it ... hmmm ... i see, i should do some tests by my own ;)
the bests
y

On2Tech
25th March 2005, 11:44
Can you post the settings you used with each codec, please? If possible also some more stats on the clip. Re width and height of images, frame rate, etc.

dragongodz
25th March 2005, 12:02
150kbit/s? Geez.
ahhh the same ridiculously low type of bitrate used when complaining B frames didnt work. you didnt learn anything from that about such bitrates ?

considering that the XviD team has consistently suggested to not use any b-frames for animated content.. I'd disable them.
yep ... but i can't recall any hard evidence of it ... hmmm ... i see, i should do some tests by my own
well thats one i have to disagree with them on. 1 B frame on animated material has always worked fine for me, i did try 1 and none B frames on several different animated sources before coming to that conclusion. but people should try it for themselves and decide.

yaz
25th March 2005, 12:29
Originally posted by dragongodz
... 1 B frame on animated material has always worked fine for me, i did try 1 and none B frames on several different animated sources before coming to that conclusion. but people should try it for themselves and decide. well, i can just confirm this. having tested many different animated sorces i concluded to the same. but it was a time ago. that's why i thought it's time to repeat ;)

the bests
y

DeathTheSheep
25th March 2005, 19:45
Source: Anime (Naruto intro).
Size: 320*240
Framerate: 23.976
Key Frame Interval: 1000 frames (except WMV9)
Bitrate Mode: Variable
Pass Configuration: 2-Pass (unless stated otherwise)

Codec Settings:
DIVX:
1. "Insane Quality" Mode
2. 1 B-frame
3. No psychovisual enhancements
4. No noise reduction
5. "Unrestricted" profile
6. No pre- or post-processing*
7. H263 quantization type

HDX4:
1. "High Definition" profile
2. 1 B-frame
3. "Motion" quality -> "Highest"
4. No pre- or post-processing*

XVID:
1. "Unrestricted" profile
2. Motion search precision -> "Ultra High"
3. Chroma Motion
4. VHQ "Wide Search"
5. 1 B-VOP with 1.5 quantizor ratio
6. No specialized options (QuarterPel, GMC, etc)

WMV9:
1. Key Frame Interval: 5000ms
2. Decoder Complexity -> "Complex"
3. Performance -> [slider bar at farthest right]

VP7 v1.0.0:
1. VBR playback mode
2. Noise Reduction: 0 (default)
3. Sharpness: 0 (default)
4. MinQ=54
5. MaxQ=54
6. 1-Pass Quality

VP7 v1.0.4:
1. VBR playback mode
2. Noise Reduction: 0 (default)
3. Sharpness: 0 (default)
4. MinQ=50
5. MaxQ=57

VP6:
1. Advanced Profile
2. 1-Pass Quality
3. Noise Reduction: 0
4. Quantizer: 56

x264:
1. Cabac
2. Deblocking filter: 0
3. Reference Frames: 8
4. Min IDR interval: 50
5. Macroblock partitions: [All checked]
6. Partition Decision quality: "5 (Max Quality)"
7. Keyframe Boost: 0
8. B-Frame reduction: 60
9. 3 B-Frames (ACCIDENT, WILL REDO), weighted, pyramid enabled.


As you can see, I messed up the x264 encode. Perhaps that is a good thing for the other codecs or a good thing for x264.

Sirber
25th March 2005, 19:54
Why 1-pass for VP6?

DeathTheSheep
25th March 2005, 20:21
@sirber 1:
RV10? I'll nab myself an encoder pretty soon...do you have any idea of anything that encodes in RV10? No? :D

OK, I'll use RealAnime ;-) Just need to update from version "1.something."

As for why I used 1-pass... Well, basically I thought 2-pass was the reason for the video flipping upside-down in AVISynth, but it wasn't (it flipped anyway, regardless), but by then I'd lost the original encode, and it did no good anyway (there is no data anyway). Therefore, I just used my eyes on the QP version. It actually looked a bit better.

Sirber
25th March 2005, 20:29
Be sure not to use the new rate control :)

Joe Fenton
25th March 2005, 21:15
I generally use bitrates somewhere between 900 and 1200 kbps and 1 bframe when encoding anime. The bframe makes a night and day difference on every encoding I've ever done since bframes were enabled in xvid. Just try to encode Cowboy Bebop without bframes... looks like complete crap (pardon my French).

Sirber
25th March 2005, 21:19
beside the (), no there are no french there ;)

DeathTheSheep
26th March 2005, 00:48
Teeheehee... Now THAT's what I call some good results.
See the nice crafty way I circumvented that stupid space removal problem?

I hope vB doesn't matter that I'm ABUSING thier code insertion tag... heheheh....

So, I updated x264's encode (it actually did better than before) and I added RV10. I made some more detailed comments about some of the codecs, too.

I'm still having the VP6 and Xvid problems I've outlined. How can these be resolved?

Sirber
26th March 2005, 01:08
How's the uploading?

DeathTheSheep
26th March 2005, 04:47
F... gurgle
T... gurgle
P... gurgle

...

Uh, yeah, I'm done. I think. 'M I missin' something?

Sirber
26th March 2005, 15:04
Cou can update your first post with those:

http://www.detritus.qc.ca/files/DeathTheSheep/DIVX.avi
http://www.detritus.qc.ca/files/DeathTheSheep/HDX4.avi
http://www.detritus.qc.ca/files/DeathTheSheep/VP6_q56.avi
http://www.detritus.qc.ca/files/DeathTheSheep/VP7_new.avi
http://www.detritus.qc.ca/files/DeathTheSheep/VP7_old.avi
http://www.detritus.qc.ca/files/DeathTheSheep/WM9.avi
http://www.detritus.qc.ca/files/DeathTheSheep/x264Old.avi
http://www.detritus.qc.ca/files/DeathTheSheep/x264REDO.avi
http://www.detritus.qc.ca/files/DeathTheSheep/Real10.rmvb

I think VP7 is the best so far on that clip.

Inventive Software
26th March 2005, 15:25
Seems good. Would like some specs for the encode machine. :D

BTW, I plan to do a codec test on a slightly less capable machine. (Read the specs in my sig and you'll find out just how slightly is.)

Sirber
26th March 2005, 15:47
Resulted quality doesn't change if you change CPU.

DeathTheSheep
26th March 2005, 18:06
@iSoftware:
Yep, check out the top of the post; I added it just an hour ago.


Anyway, I updated the post to include clips. The general concensus so far is that VP7 is the best, but I welcome opinions. I'm still trying new things and tweaking the codecs a bit.

Cheerio,

Sagittaire
26th March 2005, 20:55
In your PSNR test you must use CPUFree = 0 (CPU-adaptative PP desactivation) for best PSNR with VP7 7.0.0.4 ...

In fact for very high quantizer with complexe source (no possible bframe for MPEG4 or MPEG4 like) VP7 is by far the best visually and for metric ...

On2Tech
28th March 2005, 10:50
Originally posted by Sagittaire
In your PSNR test you must use CPUFree = 0 (CPU-adaptative PP desactivation) for best PSNR with VP7 7.0.0.4 ...


Regarding strCpuFree Sagitairre is correct.

The current version of the VP7 decoder by default attempts to auto adapt the level of post processing to try and insure smooth playback on lower powered CPUs.

However, if you are running a metric test through and external program such as avisynth, it is quite likely that this mechanism will trigger even on faster CPUs and you may get results where post processing is disabled completely.

To turn off this auto adjust mechanism you will need to add “strCpuFree” to the registry for VP7 and set it to 0.

HKEY_LOCAL_MACHINE
SOFTWARE
On2 Technologies
VFW Encoder/Decoder Settings
Vp70
strCpuFree = 0

DeathTheSheep
29th March 2005, 00:42
Ah, I see. However, upon checking out the registry, said key doesn't even exist! :eek:

I'm sure I have the most recent version and that I'm looking in the right place.

Strange, huh? Am I doing something wrong?

On2Tech
29th March 2005, 01:12
Unfortunately we don't add the string in the installer.

You'll have to manually add it to test PSNR via right clicking in the right panel selecting new strValue..

When not there we use a default of 70.

Originally posted by DeathTheSheep
Ah, I see. However, upon checking out the registry, said key doesn't even exist! :eek:

I'm sure I have the most recent version and that I'm looking in the right place.

Strange, huh? Am I doing something wrong?