Log in

View Full Version : higher comp % with psy enhance off


Subwars
28th February 2004, 04:02
hey guys not sure if this has allready been talked about much did a quick search didn't really come up with anything

with psyvis enhancements basicly as far as what i've read about it in the past and know, is that it takes out certain parts/pixels that arn't visible to the human eye, therefor making compression better and movie quality improved correct? well to a certain extent anyway

but i've notice with divx 5.1.1 i can do a comp check with it off and end up with a percentage of lets say 80% at xx res, but then if i do it again with the psy turned on one would expect the % to go up but it goes down to like say 65% at same res.

this doesn't really make sence to me any comments on this what trully is better to just leave it off bringing % up, or leave it on and have the % down a bit :confused:

ps.. it's on fast mode as well never actually done one with it in slow mode

jggimi
28th February 2004, 05:07
Have you reviewed the DivX 5.1 Guide (http://www.divx.com/support/guides/DivXGuide51.pdf), pages 56-60?

It describes, in some detail, the functions of the algorithms used for both Fast and Slow PVE.

It also provides a methodology to "see" the effects upon your content, by highlighting the pvLumaFlat and pvLumaTexture valuations in the Preview Window.

DigitAl56K
29th February 2004, 03:15
The compressability test (as far as I know) uses a quality-based encoding mode. Because Psy changes the picture you will see a lower compressability score, which is actually a little decieving. Do your compressability tests with Psy off, then turn it on again afterwards if you want to use it during encoding.

TheCreamCrackerBoy
29th February 2004, 21:38
Hello, mr. Subwars,

According to my experience, psy enhance effects OFF usually do better final encoding results at low bit rates.

The explanation - as far as I know - is the following: While a video frame can contain informations that can be supressed (according to psy enhance algorithms), it doesn't mean that the next video frame contains the same amount of 'non-supressable' information. If we have, for example, a scene containing 100 frames, each frame can contain really different 'non supressable' informations, speccialy if you are inversing telecine (29.97 frames/sec to 23.97 frames/sec).

Usually, psy enchance effects off makes a movie lightly 'blurred' compared to a movie with psy effects on (fast). Otherwise, this blur usually hides a bit of the loss of quality provided by the video compression.

Please note that I think that psy effects off are better encoding at LOW bit rates, for example, to compress the entire movie into a 1 cd of 700 Mb.

[]'s

The Cream Cracker Boy.

piscator
1st March 2004, 17:26
Originally posted by DigitAl56K
The compressability test (as far as I know) uses a quality-based encoding mode. Because Psy changes the picture you will see a lower compressability score, which is actually a little decieving. Do your compressability tests with Psy off, then turn it on again afterwards if you want to use it during encoding.

A *little* deceiving? The difference actually is quite big :eek:
I did two tests and the difference between psy=fast and psy=off is about 10% to 15%.
+ Movie 1: 63,3% vs 76,3% (5% comp. test)
+ Movie 2: 59,5% vs 68,8% (5% comp. test)

codec settings:
1) -b1q 2.0 -psy 2 -key 300 -b -g -sc 50 -pq 5 -profile 0 -nf
2) -b1q 2.0 -psy 0 -key 300 -b -g -sc 50 -pq 5 -profile 0 -nf

Actually, I should have guessed that psy=fast is a bad idea during compressability checks, but still... I think the difference is a bit big. If you compare the difference between e.g. the Neutral Bicubic resize filter and the Lanczos sharp resize filter, it's just 4% to 6%.

I think I'm going to do a '1-pass quality' test on a full movie to see if psy=fast actually improves the compressability. If it does not, it's a bit senseless to use.

Soulhunter
1st March 2004, 20:57
Source:

The Matrix - Lobby Shootout / 3:07 min. @ 25fps / 720x400 pix. (Lanczos)


Results:

Quantizer2 / No B-Frames / No PVE / Slowest
Size: 133.623.808 Bytes / Avg. PSNR: 46.68 / Time: About 29:40 min. (2600XP)

Quantizer2 / No B-Frames / Fast PVE / Slowest
Size: 173.719.552 Bytes / Avg. PSNR: 47.42 / Time: About 30:13 min. (2600XP)

Quantizer2 / No B-Frames / Slow PVE / Slowest
Size: 216.211.456 Bytes / Avg. PSNR: 46.29 / Time: About 30:18 min. (2600XP)


Bye

piscator
1st March 2004, 21:37
@Soulhunter. Thanks for your quick results. I'm still busy on a full movie and will post the results when ready.

Your results, however, show that using PsyVis decrease the compressability of the clip. So, it's a bad feature to use, right?

No PVE : Fast PVE : Slow PVE =
127 MB : 166 MB : 206 MB =
100% : 131% : 162%

greetz,
Piscator

Soulhunter
1st March 2004, 21:46
Originally posted by piscator
So, it's a bad feature to use, right?

Still like DivX 5.1.1 for low bitrates... -> 512* res. / 120min / 1x CD-R

But I do mainly high bitrates XviD encodes... -> 1024* res. / 120min / 1x DVD-R

So judge for your self... ;)


Bye

DigitAl56K
1st March 2004, 21:55
Originally posted by piscator
[B]@Soulhunter. Thanks for your quick results. I'm still busy on a full movie and will post the results when ready.

Your results, however, show that using PsyVis decrease the compressability of the clip. So, it's a bad feature to use, right?


No, you're missing the point :) Because of the way the Psychovis works (and really you should read the 5.1 guide for the best explanation) the compressability tests will be wrong if you do them with Psychovis on.

Here's what I would do:
1. Turn off Psy
2. Run the compressability test as normal
3. Turn Psy back on and estimate that I'm either going to get a slightly better quality than I otherwise would have, or that I can reduce the bitrate slightly on what the compressability test suggested.

piscator
1st March 2004, 22:11
Originally posted by Soulhunter
Still like DivX 5.1.1 for low bitrates... -> 512* res. / 120min / 1x CD-R

But I do mainly high bitrates XviD encodes... -> 1024* res. / 120min / 1x DVD-R

So judge for your self... ;)

Bye

Ah yes. I seem to recall a previous discussion on ridiculous :D high resolutions, lots of filters and incredably big file sizes :devil:


Originally posted by DigitAl56K
No, you're missing the point :) Because of the way the Psychovis works (and really you should read the 5.1 guide for the best explanation) the compressability tests will be wrong if you do them with Psychovis on.

Here's what I would do:
1. Turn off Psy
2. Run the compressability test as normal
3. Turn Psy back on and estimate that I'm either going to get a slightly better quality than I otherwise would have, or that I can reduce the bitrate slightly on what the compressability test suggested.

I got the point why you should turn off PsyVis during compressability checks. I was just a bit amazed about the huge difference with Psy=fast and Psy=off.

The results Soulhunter posted was not a compressability check, but a full encode of a clip. In that case I might expect the filesize of the clip encoded with PsyVis=on to be LOWER than the clip encoded with PsyVis=off.
Instead, the results show that PsyVis=fast gives a 31% increase of filesize and PsyVis=slow gives a 62% (!!) increase of filesize compared to not using PsyVis.

Anyway, I'll await the results of my own full movie encode and see how the filesizes differ.

greetz,
Piscator

piscator
2nd March 2004, 00:09
Source:
+ Jurassic Parc III (movie 2 from earlier in thread)
+ 01:28:25 @ 25fps
+ 630x336 (Lanczos & Undot).


Results for a full 1-pass encode (so no comp. test!)

Standard / 1-pass Quantizer2 / B-Frames / GMC / No PVE
-b1q 2.0 -psy 0 -key 300 -b -g -sc 50 -pq 5 -profile 0 -nf
Size: 1167 MB, Time: about 02:11:00 (1800XP)

Standard / 1-pass Quantizer2 / B-Frames / GMC / PVE is fast
-b1q 2.0 -psy 2 -key 300 -b -g -sc 50 -pq 5 -profile 0 -nf
Size: 1357 MB, Time: about 02:36:00 (1800XP)

Thus:
No PVE : fast PVE = 1167 MB : 1357 MB = 100% : 116%

Conclusion:
Using PsyVis for 1-pass quality encodes results in a BIGGER filesize (this case 16%), while a SMALLER filesize should be expected. Hence, using PsyVis decreases the compressability. The same might be expected for multipass encodes.

The Manual states 'quote':
"If you want, you can enable the Psychovisual Enhancements, which use a model of the human eye to save bits in areas where the eye wouldn't notice."
--> Clearly, it doesn't save any bits. So, PsyVis doesn't behave as might be expected.

As a side-note, the accuracy of a 5% comp. check using no PVE with the results above:
+ 5% comp test is: 68.8% for an estimated video size of 844 MB.
+ Full encode is: 844/1167 = 73,3%. So comp. check is just 4.5% off.

greetz,
Piscator

DigitAl56K
2nd March 2004, 00:15
Originally posted by piscator
In that case I might expect the filesize of the clip encoded with PsyVis=on to be LOWER than the clip encoded with PsyVis=off.
Instead, the results show that PsyVis=fast gives a 31% increase of filesize and PsyVis=slow gives a 62% (!!) increase of filesize compared to not using PsyVis.


Yes but only in 1-Pass, Quality-based mode. If you do a regular 1-Pass or Mutlipass you don't have this problem.

piscator
2nd March 2004, 00:51
Originally posted by DigitAl56K
Yes but only in 1-Pass, Quality-based mode. If you do a regular 1-Pass or Mutlipass you don't have this problem.


Alright, so it was a bit presumptuous :D of me to assume the same would go for 1-pass or multipass. Still, I find it strange that for a fixed quantizer value, the filesize is so much bigger. So encoding the credits with Gordian Knot should always be done with PsyVis off, since a fixed quantizer is used there.

So, to test your statement, I could go for a 1-pass at ridiculous high bitrate (say 5000kbps). Obviously, I would get an undersized result. And, in this case, the filesize using PsyVis should be lower than not using PsyVis, right? I'm not an easy believer :p.

greetz,
Piscator

piscator
2nd March 2004, 01:50
Source:
+ Jurassic Parc III (movie 2 from earlier in thread)
+ 01:28:25 @ 25fps, first 10 minutes only.
+ 640x336 (Lanczos & Undot).

Results:
Standard / 1-pass @ 5000kbps / B-Frames / GMC / No PVE
-bv1 5000 -psy 0 -key 300 -b -g -sc 50 -pq 5 -vbv 50000000,3145728,2359296 -profile 0 -nf
Size: 307MB

Standard / 1-pass @ 5000kbps / B-Frames / GMC / PVE is fast
-bv1 5000 -psy 2 -key 300 -b -g -sc 50 -pq 5 -vbv 50000000,3145728,2359296 -profile 0 -nf
Size: 264MB

In this case, the use of PVE=fast results in a 14% lower filesize. So, I guess PVE can indeed make files smaller :D

greetz,
Piscator

Subwars
2nd March 2004, 03:50
ok thats interesting to find out how it differs from a set quantizer to an actuall bitrate the track that piscator was on was the same as what i was thinking still seems stupid how that happens having it on a specific quantizer the file size turns out bigger

but all makes alot more sence now thanks to everyone this was definatly a thread that needed to be talk about though

something i noticed in the divx manual jggimi gave the link for about the whole psy thing is something about using it in the last couple of pass's.. i myself use gk - 4 pass's - standard/slowest - usually 2 cd's... should we actually leave psy off for first pass's and enable it on that last pass during the slowest compress

i feel like every pass it's on it's taking more and more bits out of the movie making the quality less and less but maybe if it's only enabled on that last pass it will take only whats really not noticable leaving the quality still pretty good.....

DigitAl56K
2nd March 2004, 08:06
Originally posted by piscator
So, to test your statement, I could go for a 1-pass at ridiculous high bitrate (say 5000kbps). Obviously, I would get an undersized result. And, in this case, the filesize using PsyVis should be lower than not using PsyVis, right? I'm not an easy believer :p.

No, if you get an undersized file the psycho-vis will still give you a larger file because you will basically be doing a q=1 encoding.

Psycho-vis is not about getting smaller files, its about getting better quality at a given file size/average bitrate.

Nazgul
2nd March 2004, 15:39
@piscator: PVE isn't really going to be of all that much use at bitrates that would give you undersized files. The whole point of it is to gain perceived image quality by conserving bits in areas where the human eye won't notice them and use those bits in other areas where it'll make more difference. But when there's already more than enough bits to go around, what's the point?

If you want to really see the effect of PVE, a better option would be to encode at a low bitrate, low enough that without PVE the image looks visibly degraded(try a bitrate that gives less than 50% on a comp. test, maybe), then encode again with PVE and check for improvement. Contrary to what TheCreamCrackerBoy says, they really were meant for low-bitrate encodes, as a way to make better use of a limited number of bits. I've found them quite useful in my encodes, and I'm usually stingy with bitrate.

piscator
2nd March 2004, 16:39
@Subwars. It's not a good idea to change parameters between different passes, since the quantification and motion estimation vectors are reused from pass to pass. So, if you do this, you could get weird artefacts. The only change I make in the last pass is to set the encoding quality to slowest (all previous passes I do at standard), to improve encoding time quite a bit.

@DigitAl56K. Actually my test at 1-pass with extremely high bitrate (just two posts above yours) shows that in this case PVE=fast gives a considerable smaller file than not using PVE. So, how would you explain that? :)


@Nazgul.
Since PVE is defined as "to gain perceived image quality by conserving bits in areas where the human eye won't notice them and use those bits in other areas where it'll make more difference"

My whole point is that one should be able to prove the effect of PVE by merely filesize. Following this statement and using undersized files, PVE conserves bits in areas where the human eye won't notice them and since the bitrate is so high it shouldn't put bits in other areas because the bitrate is high enough anyway. Hence, the filesize using PVE should be SMALLER. IMHO, this is the only logical conclusion.

I know that the effect of PVE should be noticable using low bitrates encodes. But it's kinda difficult to prove which video stream looks better. And taking snapshots of frames and argueing which frame looks better, isn't a good method of comparing video compression quality. And, it's in the Eye of the Beholder (and the eye usually is a 'little' biased ;)) Comparing filesize and compressability is a lot easier. One can't argue the filesize :D



So the conclusions so far:
+ One shouldn't use PVE in compressability checks. The result will be off. I can understand why that is, but I find the huge difference (10 to 15%) suspicious.
+ One shouldn't use PVE in 1-pass quality encodes (I didn't know this before yesterday). Using PVE=fast results in 31% bigger filesize, and using PVE=slow results in 62% bigger filesize (Soulhunters result). My result using PVE=fast resulted in a 16% bigger filesize. These are huge differences, and I would like to know why that is since I can't see the logic of it.
+ Using PVE in a 1-pass encode at really high bitrate actually shows that using PVE reduces filesize quite a bit (14%). Again, the difference is huge. To the point of amazing :rolleyes:

All in all, one can conclude the PVE has quite a big impact on filesize (and hence in compressability) whether favorable or not.

greetz,
Piscator

Soulhunter
2nd March 2004, 21:00
Originally posted by piscator
Ah yes. I seem to recall a previous discussion on ridiculous :D high resolutions, lots of filters and incredably big file sizes :devil:.Yeah... !?! :D
Originally posted by piscator
The results Soulhunter posted was not a compressability check, but a full encode of a clip.Same as a comp-check with fixed Q2... ;)


Bye

Sharktooth
6th March 2004, 16:09
Psy should be used ONLY with FIXED(1 pass) or AVERAGE(nth pass) BITRATE!

piscator
8th March 2004, 00:10
Originally posted by Sharktooth
Psy should be used ONLY with FIXED(1 pass) or AVERAGE(nth pass) BITRATE!

Trial and Error shows as much. Would have been nice to know this beforehand and it would be nice to know why it is so :rolleyes:

temporance
9th March 2004, 15:13
Originally posted by Sharktooth
Psy should be used ONLY with FIXED(1 pass) or AVERAGE(nth pass) BITRATE! I disagree. It's also beneficial with constant-Q.

However, for any given quantizer, (e.g. Q=2), psy moves the balance between bitrate and perceived quality. So things are not quite what you're used to (E.g. larger files with better quality than without psy).