PDA

View Full Version : CRF and Trellis


dyscoria
18th August 2008, 11:44
When using CRF, is the use of trellis=2:

1. a straightforward exchange between encode speed and quality
(slower encode, same quality achieved than without trellis, but using less bitrate)
2. a straightforward exchange between encode speed and quality
(slower encode, higher quality achieved than without trellis, using the same bitrate)
3. not a straightforward exchange between encode speed and quality
4. not all that useful for CRF
5. not any of the above?

I don't use MeGUI, but having a look at some of the XML profiles, I think trellis wasn't activated for any of the single pass CRF encodes, which leads me to think it's not that good for CRF, but then again i've definately seen it used by members in this forum. I've got a level of quality I think i'm happy with, but trellis seems to shave off a few MB. I'm just thinking is there any situation in which using trellis would reduce the quality for a specific CRF level, for example reduce grain retention or increase blockiness, or is it simply another analysis method to better redistribute bitrate and would rarely result in worse quality?

Thanks!

akupenguin
18th August 2008, 12:20
Straightforward exchange between speed and quality-per-bitrate.
It will often increase quality and decrease bitrate, but may modify the absolute values in other ways. This includes some probability of reducing quality at a given CRF (as long as it decreases bitrate more). But who said t0 was exactly the "right" quality? Neither t0, t2, nor any other x264 option are perfectly constant quality; if t2 decreases quality that might just indicate that t0 was slightly higher than average quality on this video. In any case, the difference is almost certainly smaller than the precision with which you identified your favorite CRF.

I don't use MeGUI, but having a look at some of the XML profiles, I think trellis wasn't activated for any of the single pass CRF encodes
Then MeGUI is wrong.

Sharktooth
18th August 2008, 12:55
in megui trellis is off for fast presets only.

cogman
18th August 2008, 15:12
I thought I heard that trellis of 1 would often give better results then 2. Was I mistaken?

wyti
18th August 2008, 15:14
Yes, trellis 1 is faster and is not applied everywhere, it may offer a better quality / speed tradeof, but i thik trellis 1 can't do better than trellis 2 quality wise

Sagekilla
18th August 2008, 17:15
Trellis 1 is faster, since it's done only during the final encode of a macroblock. So it has limited usage and therefore fewer chances to increase quality relative to bitrate. Trellis 2 is used during all decisions, so it's a lot slower but also better quality.

LoRd_MuldeR
18th August 2008, 17:20
I thought I heard that trellis of 1 would often give better results then 2. Was I mistaken?

AFAIK some time ago Trellis=2 had a tendency to remove very fine details, so some people preferred Trellis=1.

--trellis 2 is actually known for its tendency to kill off fine detail.

But this should be gone with Psy RDO and Psy Trellis ;)

Sagekilla
18th August 2008, 17:31
I think it also depended on your bitrate/CRF too.. If you used a low enough CRF, trellis would kill off less fine detail. But, this doesn't matter anymore thanks to Dark Shikari's wonderful PSY-RD!

dyscoria
18th August 2008, 18:48
Thanks for the responses, that clears it up!

Would I be right in thinking trellis=1 and trellis=2 give exactly the same result for a single pass CRF encode? I'm sure i tested it recently and the bitrate, SSIM and encode time were exactly the same.

Dark Shikari
18th August 2008, 19:07
Thanks for the responses, that clears it up!

Would I be right in thinking trellis=1 and trellis=2 give exactly the same result for a single pass CRF encode? I'm sure i tested it recently and the bitrate, SSIM and encode time were exactly the same.They were the same because you were using a subme below 6; trellis 2 is only different from trellis 1 at subme >= 6.