View Full Version : Psy RDO When Transcoding From Lossy Source?
Makaveli84
20th September 2013, 01:41
Hello,
I've read a lot about Psy RDO, but I still don't have a good comprehension on whether this option should be used when transcoding from a lossy encode source??
Would it make any difference if the lossy encode had used Psy RDO vs not having used it? So basically, what I'm asking is whether applying Psy RDO multiple times on the original source degrades the quality, or helps preserve the nearest quality to source?
Blue_MiSfit
20th September 2013, 08:49
As always, it depends.
Most, if not all sources are lossy. Psy RDO helps in the majority of cases.
raffriff42
20th September 2013, 13:49
So basically, what I'm asking is whether applying Psy RDO multiple times on the original source degrades the quality, or helps preserve the nearest quality to source? How it works (simply): the human eye doesn't just want the image to look similar to the original, it wants the image to have similar complexity. Therefore, we would rather see a somewhat distorted but still detailed block than a non-distorted but completely blurred block.
Sounds bad for multigenerational quality, as the distortions will increase exponentially. (However, I would have to run tests before saying for sure) What settings are you thinking of using? For multigenerational work I would suggest CRF 16 at the worst, at which point psy optimizations would have little effect anyway.
mandarinka
20th September 2013, 16:00
But when you encode without psyrdo, there are losses too, so "multigenerational" compression will harm too - maybe more...
detmek
20th September 2013, 16:20
Exactly. So, do a few encodings on short portion of video and compare results. There is no universal or best solution.
Makaveli84
20th September 2013, 16:40
Sounds bad for multigenerational quality, as the distortions will increase exponentially.
But when you encode without psyrdo, there are losses too, so "multigenerational" compression will harm too - maybe more...
See, two rational arguments that lead to conflicting conclusions. That's why I'm asking. I tend to believe that multi-psyrdo will cause exponential distortion (I came to this conclusion both by theory and practice), but I might be wrong about the theoretical part, and I'm always worried about the placebo effects in subjective human testing, so that's why I am trying to figure out what the math says here.
What settings are you thinking of using? For multigenerational work I would suggest CRF 16 at the worst, at which point psy optimizations would have little effect anyway.
Hmm, it depends, but I it usually fluctuates between CRF 16 to 18. So is it safe to assume that "psy optimizations would have little effect anyway" in this range?
Exactly. So, do a few encodings on short portion of video and compare results. There is no universal or best solution.
"I'm always worried about the placebo effects in subjective human testing, so that's why I am trying to figure out what the math says here." - Makaveli84
detmek
20th September 2013, 17:55
There is no math. PsyRD is psycho-visual enhancement. It generates errors to improve visual experience. So, if you like it - use it. If you don't like it - don't use it. It is very simple, and very subjective.
Usually, PsyRD is usefull.
Makaveli84
20th September 2013, 18:12
There is no math. PsyRD is psycho-visual enhancement. It generates errors to improve visual experience. So, if you like it - use it. If you don't like it - don't use it. It is very simple, and very subjective.
Usually, PsyRD is usefull.
"Generating errors", especially non random "errors", is math. Also, this is not a PsyRDO discussion, but rather an inquiry regarding the multi-application of it and its pros vs cons.
detmek
20th September 2013, 19:49
You are missing the point. There is no "math" to express your subjective feelling. Also, multi-application of PsyRDO can lead to better results in some situations and to worse results in others. And there is no way to calculate or measure that. If there was a way to measure subjestive quality x264 encoder would already be using that model for its internal decisions.
burfadel
21st September 2013, 06:05
I would have to say yes to using Psy RDO, the main thing is to set the strength to your liking. If it is too strong at 1.00, try say, 0.6. Another related option is psy-trellis, which is even more difficult. I do suggest trying it out though and seeing for yourself, just try a low strength for it (say, 0.1), and not 1.0! Remember there are a couple of other settings that can be beneficial (some subjectively), such as AQ method, probably the most realistic thing to say if you decide to choose any of these options is to adjust things like ME, and Subme to 'higher' levels (such as Subme 10, ME as UMH, trellis as always etc). The reason for this is that they are beneficial settings, albeit small, but if you go to the extent of tweaking quality with adjusting Psy-RD, it makes sense to also max these settings as well. Just remember that encoding will be slower.
raffriff42
21st September 2013, 06:17
The effects of psy-rd are much smaller than I had expected, and much *better* than I had expected - even after five generations. Fine detail is sharper and subtle textures look better, but large flat areas can develop blocking/banding; sharp edges can have more ringing than they otherwise would.
... caution: your mileage may vary ...
EDIT test not valid; images deleted - see post #13
Here are the test details:
Application: VirtualDub 1.10.4
Encoder: x264 version 0.125.2200 (as an "external encoder")
base command line:
--crf 24 --preset medium --demuxer raw
--input-res 1280x720 --fps 30/1
--colorprim bt709 --transfer bt709 --colormatrix bt709
command line, psy test - same as above, except added:
--psy-rd 0.75:0.75
(choosing a value at random in my ignorance)
Per MediaInfo, the only difference was
"psy_rd=0.75:0.75" (vs. default "1.00:0.00")
and
"chroma_qp_offset=-4" (vs. default "-2")
I also did some tests at CRF 22 and the difference was much more subtle, but still present.
EDIT doh - shoulda not tested in CRF mode (http://forum.doom9.org/showthread.php?p=1160768#post1160768). More bits always look better. First gen dub was 10% larger compared to default; 5th generation 15% larger.
burfadel
21st September 2013, 06:37
The second setting in psy-rd 0.75:0.75 is psy-trellis. Try some different settings like psy-rd 0.8:0.2 (weaker psy-trellis) and see how things go. Dark_Shikari has admitted the psy-trellis metric (that is, the strength at setting 1.00) is far too strong, but it's not something you can really change now without stuffing people around. The results you got (ringing on sharp edges) is probably caused by your psy-trellis being too strong. Also remember the other settings I suggested (me UMH, subme 10, trellis always).
raffriff42
21st September 2013, 07:18
Thank you, burfadel! Will look into it.
EDIT
Here's (https://www.dropbox.com/sh/eid1aia9cvfdu55/4nNTABpAZ_) another set of sample images, grabbed from fifth-generation dubs, cropped.
This test was done in Handrake, 2-pass, 2000 kbps. Psy still look better, IMO, with the sources tested.
"psy=dft" setting per MediaInfo:
cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=20 / rc=2pass / mbtree=1 / bitrate=2000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
"psy=0.5" setting - same as above, but
subme=6 / psy_rd=0.50:0.00 / trellis=1 / chroma_qp_offset=-2
(yes, shoulda kept subme and trellis the same between tests. Shoulda followed your suggestions re: UMH & subme)
Makaveli84
22nd September 2013, 00:37
I would have to say yes to using Psy RDO, the main thing is to set the strength to your liking. If it is too strong at 1.00, try say, 0.6. Another related option is psy-trellis, which is even more difficult. I do suggest trying it out though and seeing for yourself, just try a low strength for it (say, 0.1), and not 1.0! Remember there are a couple of other settings that can be beneficial (some subjectively), such as AQ method, probably the most realistic thing to say if you decide to choose any of these options is to adjust things like ME, and Subme to 'higher' levels (such as Subme 10, ME as UMH, trellis as always etc). The reason for this is that they are beneficial settings, albeit small, but if you go to the extent of tweaking quality with adjusting Psy-RD, it makes sense to also max these settings as well. Just remember that encoding will be slower.
I'm already using me=UMH, subme=9. As for trellis = always, well I don't wanna start a new debate here, but I've tested with and without it, and most of the time in CRF, it yields smaller files, which leads me to believe that visual quality is the same with better compression. So to me, trellis=always vs final macroblock is a matter of smaller file + slower encoding vs larger file + faster encoding, with visual quality the same, in which case I'll choose faster encoding.
I'll check the samples posted here and comment on them later.
burfadel
22nd September 2013, 03:37
If size isn't a big issue, you could always use a lower CRF :). Alternatively, by using more efficient settings you could use the saved bandwidth by lowering the CRF (say, to 19.8 from 20 or whatever).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.