View Full Version : Curve Compression
atreya2011
20th April 2004, 04:56
I dont know if this issue has been dealt with before. It is related to curve compression feature in XviD codec. It takes off bits from high bitrate scenes and gives it to low bitrate scenes if it is enabled. Can the opposite of this be implemented in XviD i.e. shave off bits from low bitrate scenes and give them to high bitrate scenes (or Curve Expansion)?
Sirber
20th April 2004, 12:55
Wasn't that "Alt. CC" from Pre XviD 1.0?
kilg0r3
20th April 2004, 13:20
Micht be that can enter negative values in the Curve compression section. Just try it out.
atreya2011
20th April 2004, 16:16
Correct me if I am wrong, when you say negative values, it is obvious that I should enter the same negative value to both right?
kilg0r3
20th April 2004, 18:23
no idea sorry.
atreya2011
20th April 2004, 18:43
I will do some tests and see it for myself, it might take some time though *sigh*. Thanks for the idea kilgor
Soulhunter
24th April 2004, 19:57
Originally posted by atreya2011
It takes off bits from high bitrate scenes and gives it to low bitrate scenes if it is enabled.
IIRC there are two independent settings for high n' low bitrate scenes !!!
So you can "take off bits" also from low bitrate scenes...
Bye
atreya2011
24th April 2004, 20:20
http://img9.imageshack.us/img9/853/configwind.GIF
Thanks for the reply but it clearly says high bitrate scene degradation and low bitrate scene improvement.
Soulhunter
24th April 2004, 23:59
Yeah, I had just an other build in my mind... ;)
http://img8.imageshack.us/img8/6472/snap0000343.PNG
Bye
ObiKenobi
25th April 2004, 00:03
Originally posted by atreya2011
Thanks for the reply but it clearly says high bitrate scene degradation and low bitrate scene improvement. [/B]
Well try negative numbers and see what happens.
atreya2011
25th April 2004, 19:31
@ObiKenobi
Originally posted by kilg0r3
Micht be that can enter negative values in the Curve compression section. Just try it out.
Thats exactly what Kilgor said although I have not tried that out yet. The only doubt I have is that do I need to enter the same negative value in both?
Leak
25th April 2004, 19:48
Originally posted by atreya2011
The only doubt I have is that do I need to enter the same negative value in both?
Actually, you might have a problem there as the entry field in XviD's config dialog doesn't allow you to enter a minus into it. You can paste text containing a minus, but if you hit okay then and re-open the dialog, both settings are back to 0.
So I'd guess this is a no-go... :(
np: Gescom - Two Of (0161 comp.)
TheUnforgiven
26th April 2004, 10:08
maybe its just the GUI try putting it into the registry or passing it through the virtualdub job file.
atreya2011
5th May 2004, 09:56
Sorry for the realllly late reply, but the registry technique did not work either :(
atreya2011
10th May 2004, 08:39
Ahumm. Does anyone know what to do now?
atreya2011
17th May 2004, 17:04
Sorry for repeating , and pardon me if this is a noob issue, but is there a solution ?
Didée
18th May 2004, 15:54
Originally posted by atreya2011
But is there a solution ?
Actually, there isn't.
You request simply makes no sense - or at least very little.
Let's pull some numbers out of a hat, and play a little with them:
- say, a "typical" high-bitrate-frame is 5~10 times as big as a low-bitrate frame
Then, to give the hi-BR frame 10% more bits, you'd need to shave off 10% bits from 5~10 of the lo-BR frames.
This already shows it's hardly practical to assign bits from lo-BR to hi-BR.
And it gets even worse: the above example is incorrect! Why? Because lowering the quant for a hi-BR frame will increase its size much more, VERY much more, than the size of a lo-BR frame will be decreased by increasing its quant ... in an extreme case, you might end with pulling 10% out of each of one hundred lo-BR frames, just to improve the quantizer of one single hi-BR frame by 1. (!)
In short: if you'd pull enough bitrate out of your low-bitrate scenes, so that they look *totally* crappy, then you'd have enough bits to improve your high-bitrate scenes by a tiny amount.
So, curve compression at "0 - 0" is just the maximum you can do.
- Didée
atreya2011
18th May 2004, 16:05
Thanks for the reply. I understand what you are saying, but the reason I came up with this issue is that, I feel, we can save some bits from still motion scenes and scenes in which 2 people are just talking and the like. Scenes like that dont need a low quant anyways as they would look quite good at a moderately high quant also.
Thats my opinion anyway
And thanks for the reply
Magno
18th May 2004, 18:59
well, i have never tried it, but i think the values XVID will receive in that boxes are percentages, so maybe if you set the inverse for the value you want, you will get the desired effect. so if you want to reduce a 10% of bitrate from low-bitrate scenes, maybe you should enter 0.01 in the box.
Try it and tell us :D
Hi everybody!
Having read "The Unofficial XviD FAQ" by crusty point C9 "Two-pass second pass 'more' settings explained"(http://www.vslcatena.nl/~ronald/docs/xvidfaq.html)
I got the idea, that optimal values for "max overflow improvement%" and "max overflow degradation%" might be calculated by creating a simple derivative (hope its the mathematically correct term) of the bitrate curve, taken from the stats file.
Could someone tell me whether I´m on the right trak?
Didée
20th May 2004, 16:40
@ atreya2011
> I understand what you are saying
Really ?
> but [...] I feel, we can save some bits from still motion scenes
> and scenes in which 2 people are just talking and the like.
Ah, you didn't.
Sure you could save bits from those scenes - but it just doesn't count anything. What you are going to do is: to pour a gin-glass in a bathtub. You won't improve your bathing, but you'll lose the enjoying of the liquor.
> Scenes like that dont need a low quant anyways as they would look quite good at a moderately high quant also.
They need the low quants, they need them ...
Firstly, still scenes are very small, even at low quants.
Secondly, if you upper the quants on still scenes, then you'll quantize away all those fine details (and the sharpness as well) that can only be perceived in still scenes.. This is especially true for the "two people talking" scenario - the wrinkles, the wrinkles ...
Again, you would degrade your still scenes very noticeably, but you hardly would notice any imrovement on the high motion scenes.
I suggest you try the following, manually:
(second variant in parantheses)
Take a still scene with two people talking, and a high bitrate scene.
Encode both a quant = 3 (4)
Then, encode the still scene at quant = 4 (5).
Encode the high bitrate scene at quant = 2.5 (3)
Compare the filesize drop of the still scene with the increase of the high bitrate scene.
Also visually compare the "improvement" of the high BR scene with the degration of the low BR scene.
Then draw your own conclusions. Gin-glass and bathtub ...
Of course that's just my humble opinion, anyway ;)
- Didée
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.