Log in

View Full Version : Feature request - quantizer matrix presets


zettai
13th May 2002, 19:16
Hi there,

I have a good working knowledge of how quantizer matrices work with mpeg1 and jpeg encoding but I've no real experience of how wavelets work in the mpeg4 standard. However, provided that the same basic principles are the same, this feature request should work ^^

I was wondering if it is possible to include a number of quantizer matrix presets in Xvid for encoding different footage types, similar to the setting that are available in TMPEG.

I know that generally (i.e. when encoding natural images), it is better to have less bias towards high spatial frequencies, hence the high numbers in the bottom-right of the quantizer matrix to increase the compression due to quantizer rounding. However, I mainly encode anime and so I use a quantizer matrix very similar to the one that TMPG uses so that high spatial frequencies are given equal weight during quantisation in order to better represent the sharp edges of animation and CG.

The request is simply to have a couple of quantizer presets that may benefit people who don't know much about setting up a quantizer matrix.

This, of course, only works if the mpeg4 standard follows the same general rules as the other FDCT systems I've looked at ^_^ If not, ignore me ^^;;;

Teegedeck
13th May 2002, 23:23
For a start, we would be very happy if perhaps you could come up with some custom matrices for special content like anime. They can be quite easily created/saved/loaded in the XviD config dialogue. I also think that the possibility to have custom quantization matrices is a great benefit that hasn't been used up to now. If you have some experience with that stuff, please give us a hand.

zettai
14th May 2002, 00:18
OK, well I tell you what - I'll do a little reasearch.

I know what goes on with old-school MPEGs and their Discrete Cosine Transform routines, so I know how setting the quanitzers will effect things. However, I've no experience of wavelets so I'm going to do a little research, some test clips and maybe some polls (as these things can be pretty subjective sometimes ^_^)

I think it should be fairly easy to come up with quantizer matrices once I know how the spatial frequencies work, so we'll see.

MfA
14th May 2002, 01:26
MPEG-4 uses bog standard DCT for the block based video coding.

Koepi
14th May 2002, 01:57
As you're SO smart ^^^^^^^^^^;;;;;;;;;;;; OOOO $$$$ (???? wtf? didn't you learn simplest human conversation rules?)

...
well...
while you're so smart you might have "overlooked" (sorry, dunno the right translation. this means, you MISSED something) that you're requesting the h263 matrix.

any further word spent on your request would be more than just loose time.

^^^^^^^^^^^^^^^^^^^^^:::ooooOOOOOOOO;;;;;;;;

P.S.: is this AOL stuff or what? Just click and you're "in"?

Hanty
14th May 2002, 09:04
Chill Koepi, zettai is even offering his help on developing this.
You might be the one ending up requesting a custom matrix from him sometime, and what goes around comes around.

Koepi
14th May 2002, 09:59
Hanty,

there are no wavelets in XviD. There are no wavelets in DivX5.
I doubt there will be wavelets in any mpeg4 codec any time before
2010. They simply aren't developed and researched enough.

So he is requesting the usual h263 quant matrix ("best for anime").

If he'd done some research he would know that.

Full Stop.

zettai
14th May 2002, 10:04
Well thanks for nothing, Koepi.

When I offer to help the last thing I expect is to be patronised and ridiculed.

I really cannot believe that reaction... I had no idea the Xvid developers were so stuck up.

Just because I'm not a programmer or an mpeg-4 developer doesn't mean I'm an idiot. I *did* say that I don't know anything about the mpeg4 spec, so the last thing I expected has someone to say HAHAHAHAHAHHAHA YOU'RE SO DUMB TRY LEARNING THE MPEG4 SPECIFICATIONS OFF BY HEART BEFORE YOU OPEN YOUR MOUTH.

¬.¬

I'm not impressed.

Koepi
14th May 2002, 10:42
I dislike your strange ^-^-^-^-^-)));;; stuff.
I dislike your attitude of demanding a red carpet for "no real help".
If you want to help you should start with research.
(this is the usual way to offer help btw.)

Not painting strange stuff, talking about things that you didn't look up first, and after that telling "you don't want my help? you are an a**hole!".

You're a little too demanding.

And I take it as personal insult against all XviD developers that you make a general case out of my personal dislike of your behaviour - those people are fine people.

Draw your conclusions, paint your crap.

But pretty please not here. Or - if you KNOW what you're talking about, then you are free to do so :P

Custom matrices aren't a big issue btw., I even already explain them in the xvid help file, so it should be easy for every one to play around with it.

zettai
14th May 2002, 10:58
Koepi,

If you read my posts again, you will see that I was being perfectly polite, generous an inoffensive.

Certainly, I am out of my depth when it comes to the finer points of xvid development but all you had to say was:

'Thank you for your suggestion. However, I don't think having custom matrices will be particularly useful. For further reference, you may want to just stick with using the h.263 matrix for anime encoding. Also, wavelets aren't implemented in the visual specification of mpeg4 at this time, only the texture spec and so it is not a part of xvid.'

That would be the poilte thing to do. Instead you decided that because I use non-standard smilies and because I have an avatar that offends you in some way, you decided to ridicule me.

I didn't expect a red carpet (note: in my post I said that if I was out of my depth that you should ignore me). I just expected a reasonable amount of courtesy.

I agree that people who do not read the faqs and the software documentation are time-wasters but to expect people to have detailed knowledge about the mpeg4 spec before posting is a little extreme.

"I even already explain them in the xvid help file, so it should be easy for every one to play around with it."

I know this, I have *read* the xvid help file. I do know how they work, despite your branding of me as an ignoramus, I was merely suggesting that there are lots of people who *don't* know how the custom matrices work and that it might be useful to offer a variety of presets.

All you had to say was "It won't make any radical difference to the encoding so it's not worth our time" and that would have been that.

Koepi
14th May 2002, 11:16
Yes,

I agree I could have been a little more polite.
But I saw many indices that you didn't make your "homework" _before_ posting that _feature request_.

-h mentioned in many posts he wrote that the h263 matrix is something like "constant 32 for the whole table", thus treating all frequencies with the same weight - which is what you want, if I read your first post correctly.
The matrices work the same way as in mpeg1 and mpeg2 - I wrote about that in the XOE/XviD help. I explained where you have to change values for affecting the high/low/mid frequencies.

If I see something like this, where the basic information needed is all over the place, you nearly can't ignore it as it is in many many threads here as well, I get very annoyed - and thus this reaction.

Well, I hope we can settle this down now.

Regards,
Koepi

zettai
14th May 2002, 11:39
"-h mentioned in many posts he wrote that the h263 matrix is something like "constant 32 for the whole table", thus treating all frequencies with the same weight - which is what you want, if I read your first post correctly. "

Yeah, that's what I'm after.

I don't know why I didn't spot it either.... well, possibly because in your Xvid Options Explained pdf, the information about the h.263 matrix is on the next page, which I didn't notice. I hate acrobat reader.

So, yeah, it was entirely my fault for not reading about the h.263 matrix. Thanks for letting me know.

As for the whole wavelets idea, I was thrown off the scent by a friend of mine who was convinced that mpeg4 technology used wavelets, this is why I was uncertain as to whether what I know about DCT in mpeg would still apply.

Anyway, yes, this all could have been avoided. I am sorry for wasting your time... but I usually don't take kindly to being called an AOL-user but all is forgiven now :p

OUTPinged_
15th May 2002, 01:00
Zettai, there are several xvid developer persons and all will have different attitude to ypur posts. Koepi might be moody, too :-)


btw, reading mpeg4 papers wont hurt at all *hint* *hint*



And more, wasnt animation-tweaked quant. table supposed to be more MPEG-like? i mean, no one gives a F how hard these gradients will be compressed, its only the sharp lines that matter.

Can anyone suggest any good link where to find any research data on building quant. table?

trbarry
15th May 2002, 01:43
Have Xvid custom quant tables ever been fixed? I tried to make one a few weeks ago and it looked like changing them had no effect. I couldn't make, save, or load them. Maybe it was just me doing something stupid but I though -h confirmed they were probably broke and I don't remember any subsequent notes about it.

I was actually trying to do more or less the opposite of what zettai wants. I wanted to see if the quant tables could be made to act like a filter just by raising all the higher quants to throw away all high frequencies.

- Tom

PS - (betraying further clueless-ness) Whatever is ^^;;; supposed to portray? ;)

sffubs
15th May 2002, 09:15
uManiacs says on his site that custom quants was fixed on 10/5/02.

-s

zettai
15th May 2002, 09:31
Yeah, the custom quantizer tables definitely work. You can easily test them by putting all the numbers to really really high values (like 510 :P) except one of them and you can see that particular cosine pattern being used for everything that isn't a plain block.