Log in

View Full Version : More on Anime optimizations...


Zarxrax
18th April 2002, 21:59
I dont really know if this relates too closely to xvid, but perhaps it COULD be implemented into xvid in some form or another, or if not maybe someone could take the idea and devlope a different codec. Anyways this is just an idea i've had, and I'm tossing it up to all you guys that know more than me regarding video encoding.
I've noticed that in anime, there is often LOTS of repetitive animation. Could it be possible to take advantage of this fact in order to make anime content more compressable?
For example, when a character talks, there is typically 3 different mouth positions. Open, middle, and closed. Now say you have a scene, and all that happens is the character talks for about 10 seconds. For the sake of simplicity lets say that this is the only movement occuring onscreen. Now in typical compression, it would store the image of the mouth in each delta frame. Now if it can examine the "closed" mouth position, when that same "closed" frame comes up again, it could see that it has already compressed that exact same stuff already, so it could just extract the data from that previous frame.
Now this is all fine and dandy, but of course usually you have lots of stuff moving onscreen at once, for example the background could be panning while the character is standing there talking. You could still take advantage of the repetitiveness by examining the similarities in motion between frames. For example when encoding a character talking against a panning background, it would store the information for the difference in the background, but on the mouth part of the image, it could still reference the previous data.

I'm not really sure if this would be practical though, and it would likely put an insane demand on the cpu :p

Teegedeck
18th April 2002, 23:42
Hello,

the talking heads etc. idea has come up several times on the xvid.org forum, too, but it's just not technically feasible; I think the encoder would have to keep too many frames in memory and it would not work inside MPEG4-specs. More importantly, MPEG4-codecs just dislike anime (sharp lines, uniformous colours). If you look around, you will find a discussion about MPEG4's limitations on our very forum. The idea to create a new codec has also been discussed on xvid.org but been dismissed. I recall gruel (or was it suxen_drol? investigate yourself!) wanted to implement a different idea that could work inside of MPEG4-specs if he got any spare time -- he wanted to use the overlay function(that usually only is used for subtitles) to encode the infamous harsh-contrast black lines in anime separately from the rest of the picture. Sounded promising, I hope he'll get around doing it someday.

Teegedeck
19th April 2002, 13:13
Part of what you suggest could be done with object-oriented encoding (layers). But I believe development still is miles away from actually utilizing this idea.

Hanty
19th April 2002, 18:21
It basically boils down to this:
Encoding Anime today is more difficult with the current set of tools than encoding motion pictures at at "equal" quality.

Alot of people in the Rip releases scene refuse to acknowledge this. (I guess they like to think that they are doing the most complex stuff)

OUTPinged_
19th April 2002, 18:44
the bad situations for codecs are quick animation pannings. i wonder if an algo which would calculate motion vectors for uniform color areas basing on movement of the edges can be implemented (it was in some mpeg4 profile, edge masking or something, devel people can tell us what it was).

still, it looks like the development is going on quick and that is enough. i will get my hands on a great deal of dvds for summer to rip, so i am in no rush and expecting loads of sweet xvid progress this spring :-)