Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th December 2007, 14:46   #1  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 2,019
trellis question

Hi,

x264 supports 2 trellis settings. trellis=1 and trellis=2. As I understand it, when using the first trellis setting, trellis only kicks in when needed. What I don't get is how does x264 "knows" when to use trellis and when not? Is there some threshold that must be met in something before trellis=1 kicks in?

Also, as I've read here, trellis doesn't work with deadzones. But isn't it possible to do something like...

1) use trellis and get the values
2) use deadzone and get the values
3) compare the values of trellis with those from deadzone
4) use the best value (either from trellis or from deadzone)
microchip8 is offline   Reply With Quote
Old 5th December 2007, 14:59   #2  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by froggy1 View Post
Hi,

x264 supports 2 trellis settings. trellis=1 and trellis=2. As I understand it, when using the first trellis setting, trellis only kicks in when needed. What I don't get is how does x264 "knows" when to use trellis and when not? Is there some threshold that must be met in something before trellis=1 kicks in?
trellis = 1 works only for final transform (for decision between different mb modes it's not used)
trellis = 2 works every time transform is called.

Quote:
Originally Posted by froggy1 View Post
Also, as I've read here, trellis doesn't work with deadzones. But isn't it possible to do something like...

1) use trellis and get the values
2) use deadzone and get the values
3) compare the values of trellis with those from deadzone
4) use the best value (either from trellis or from deadzone)
ha! the question is how to determine what's the best trellis tries to optimize RD function (and actually reaches the maximum for given mb), while dead-zones is kinda magic - you'll need (and you can) to tune them up for every movie in order to achieve whatever result you want.
Sergey A. Sablin is offline   Reply With Quote
Old 5th December 2007, 20:34   #3  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Trellis always gives better results, PSNR-wise, than deadzone.

However, for strong grain or cases where you want more sharpness retained, low deadzone settings can look better than trellis (if that's what you want, of course). Also note that Trellis 2 has a habit of decimating grain/fine detail.
Dark Shikari is offline   Reply With Quote
Old 5th December 2007, 21:30   #4  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Quote:
Originally Posted by Dark Shikari View Post
Trellis always gives better results, PSNR-wise, than deadzone.

However, for strong grain or cases where you want more sharpness retained, low deadzone settings can look better than trellis (if that's what you want, of course). Also note that Trellis 2 has a habit of decimating grain/fine detail.
But isn't Trellis "optimized" for PSNR anyway?
Sagekilla is offline   Reply With Quote
Old 5th December 2007, 21:53   #5  |  Link
ToS_Maverick
x264 Tester
 
Join Date: Dec 2005
Location: Austria, near Vienna
Posts: 223
Dark Shikari, didn't you mention somewhere that you develop(ed) an adaptive deadzone algorythm?
ToS_Maverick is offline   Reply With Quote
Old 5th December 2007, 22:09   #6  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Sagekilla View Post
But isn't Trellis "optimized" for PSNR anyway?
That's the point; its optimized for PSNR vs bits, and as a result can decimate fine detail in favor of bitrate savings.
Quote:
Originally Posted by ToS_Maverick View Post
Dark Shikari, didn't you mention somewhere that you develop(ed) an adaptive deadzone algorythm?
Yeah, but it was pretty crappy IMO. I need a good "reason" to use a lower deadzone; i.e. a way to tell the algorithm what kind of blocks lower deadzone is good for.
Dark Shikari is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.