View Full Version : Lower color bit-depth for anime? Good idea?
JohnMK
28th October 2002, 05:48
Just wondering if it's feasible and a good idea for improved compressibility of anime. Huge swaths of the same color all over the place, and yet they still require as much bitrate as movies to look good. Why is that? Do filters exist that would do this for me?
ErMaC
28th October 2002, 07:09
I won't go into the various details about why it's harder to compress in some circumstances because there are probably people who can explain it far better than I can and I'm worried about getting my facts wrong. :)
Lowering your colordepth really won't help much. Your final encode will be in YV12 anyways, so dropping to 16bit RGB or whatever won't help except to make your picture look like ass.
If you want to smooth those large colored areas, use smoothers. Donald's Motion-constrained Smoother (Msmooth), even in it's very beta state, works pretty well at this. For more mature (but not animation specific) spatial smoother alternatives, try 2DCleanYUY2 or SpatialSoften. Convolution3d can also help in almost all cases to improve compressibility and picture quality. If you're encoding from a DVD source that's kinda noisy, try using the MPEG2Source Post-Processing DLL by MarcFD and set CPU=6 - that will help smooth the large patches of color.
Finally there's the more exotic filters like Dup and CopySame which can benefit compression a lot, but are very finicky and require a LOT of tweaking to get a picture without errors (see my post in the Dup thread).
I spend the vast majority of my encoding time working with animation and I must say it's very challenging, and allows for an awful lot of interesting filter combinations and specializations. You could never get away with using a filter like Dup on live action, but with Animation I can reduce filesizes by an average of 20%. It just takes an awful lot of works. Reminds me of the days of manual IVTC in TMPGEnc on Read or Die episode 2 for HQA :D
JohnMK
28th October 2002, 07:52
Excellent. Just what I was looking for.
bb
28th October 2002, 08:28
I'd still like to see something like a "Motion GIF" codec, probably similar to MJPEG or Huffyuv. I guess with some palette tweaking this could give good results. Maybe it's also possible to improve such a codec for the use of delta frames.
bb
ErMaC
28th October 2002, 09:33
Rather than Motion GIF, Motion PNG would be far better since PNG first off has no royalty/patent problems (as GIFs nowadays do) but is also just vastly superior in terms of quality. No one is gonna wanna do 256-color encodes of anything, dithering or no. PNG allows for both lossy and lossless intra-frame compression, and would certainly make for an interesting codec.
This would actually be really cool - could a Lossless Motion PNG codec rival Huffyuv in terms of size efficiency?
Xenoproctologist
28th October 2002, 11:29
@JohnMK:
The reason why anime is harder to compress, in a nutshell, is that sharp edges are very hard to compress, and anime is nothing if not loaded with sharp edges. Smoothing areas of flat color and removing noise will take you a long ways in reducing bitrate, but for exceptionally small file sizes, you have to soften those edges. Thus, it becomes a compromise: small files vs. sharp edges. It's one of those decisions you don't like to make--like reducing resolution to achieve a certain bitrate.
There are any number of softening or convolution filters which are easily found. I'm rather liking Convolution3d, at the moment.
@ErMaC:
MPNG rival HuffYUV for size efficiency? Probably, but I'd imagine that it'd be dirt-slow for encoding and decoding, both, as I don't think that it's a speed-optimized compression scheme. And isn't there already a "Motion GIF"? (e.g. GIF animations) :)
SILICON
28th October 2002, 12:50
Originally posted by Xenoproctologist
MPNG rival HuffYUV for size efficiency? Probably, but I'd imagine that it'd be dirt-slow for encoding and decoding, both, as I don't think that it's a speed-optimized compression scheme. And isn't there already a "Motion GIF"? (e.g. GIF animations) :)
I think that for easy and best compresion of anime the best is using delta frames Lempel-Zip compressed (Motion ZIP). Previously frames must be reduced to 256 colors.
For all types of films, the best and easy are hached HUFFYUV for stores pictures in YUV12. HUFFYUV need compress 16 bits per pixels (in YUV2). In YUV12 only need compress 12 bits /pixel (the 25% less)
Regars
-h
28th October 2002, 15:12
Huffyuv achieves better compression than PNG in almost all cases, as PNG's residual coder (LZ77) just isn't suited to anything bar line art (and most anime won't benefit from this anyway). I don't know why they didn't use static or switched-codebook huffman, it'd be simpler to implement and compresses better. Oh well.
I started work on a lossless motion-compensating codec a while back, but keep getting sidetracked :) I'm not sure when I'll be done with it. Initial results were better (and slower) than Huffy.
-h
abo_alkeem
28th October 2002, 21:54
convolution3D gave me very good results with animeBQ preset.
the guys in the avisynth forum r testing a new filter peachsmoother
seems promising.
Ookami
29th October 2002, 19:55
@bb
Have you looked at this codec?
Glzw 1.0
o What is it?
It is a lossless codec using the same algorithm as the well-know image format, gif. Due to its nature, photo realistic images don’t compress so well. Cartoons, not went through any DCT would be the best subjects, but unfortunately, they don’t exist. LOL ;-)
o Early release limitations
§ A bit slow.
http://vobsub.edensrising.com/codecs/codecs.html
If you know any free codec that is not listed here http://ookami.videoxone.de/elist/codecs.html , please, let me know. Thanks.
Cheers,
Mijo.
Belgabor
29th October 2002, 22:31
I checked out glzw and some other lossless codecs a long while ago. unfortunately i forgot what i exactly did, but here are the results (a text file i found on my hd):
Natural Anime
RGB 88.142 (100,00) 90.734 (100,00)
YUY2 (uncomp) 58.766 ( 66,67)
HuffYUV 28.498 ( 32,33) 34.494 ( 38,02)
AVImszh (YUV 4:2:2) 57.758 ( 65,53) 41.576 ( 45,82)
AVIzlib (YUV 4:2:2, ms) 46.842 ( 53,14) 33.582 ( 37,01)
AVIzlib (YUV 4:2:2, mc) 46.392 ( 52,63) 30.894 ( 34,05)
GLZW (keydist 64) 34.438 ( 39,07) 11.406 ( 12,57)
filesize (% of RGB)
iirc only huffyuv was fast enough to capture on my 1.4 Ghz athlon.
Cheers
Belgabor
RadicalEd
30th October 2002, 01:51
size looks good but the decoding was really slow and I noticed some weird colors around black edges (and in anime.. well, that's everything :/) so I wouldn't use it over huffyuv
bb
30th October 2002, 09:03
Originally posted by Ookami
@bb
Have you looked at this codec?
A few weeks ago I downloaded it - but I did not yet try it :rolleyes:
Ok, thanks, I will try it this weekend.
bb
SILICON
30th October 2002, 13:10
Natural Anime
RGB 88.142 (100,00) 90.734 (100,00)
YUY2 (uncomp) 58.766 ( 66,67)
HuffYUV 28.498 ( 32,33) 34.494 ( 38,02)
filesize (% of RGB)
[/B]
If the YUY2(uncomp) size are 58.766 , i think that YUY212 (uncomp) size will be 44.000 aprox. (less than AVIzlib)
The process are very fast. The best and easy is changed HUFFYUV for compress in YUY12 format.
HUFFYUV (if compress in YUY12) size expect about 21.000 (25% less)
Cheers
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.