Log in

View Full Version : Question: --trellis together with --no-dct-decimate


JoeBG
17th May 2007, 09:15
Hi,

normally dct-decimate is off when x264 uses b-frames. When x264 uses trellis dct-decimate is on. Wouldn´t it be better combine --trellis with --no-dct-decimate or what is the reason why dct-decimate is by default when using trellis?

Thanks for your help :)

Manao
17th May 2007, 10:15
Trellis, when enabled, occurs in inter, intra & bidir macroblocks.
DCT decimation, when enabled, occurs only in inter & bidir macroblocks.
DCT decimation is always enabled on bframes, even with --no-dct-decimate
trellis disables DCT decimation on macroblocks using the 8x8 transform.
trellis is never used on chroma - and chroma is never encoded using the 8x8 transform
trellis and DCT decimation can be used together when the 4x4 transform is used.

The reason behind using DCT decimation with trellis seems to be that trellis, with a 4x4 transform, considers 4x4 blocks independently, while DCT decimation works on 4 4x4 blocks ( and tries to zero all of them when possible ). So while trellis alone is optimal on a 4x4 block, it may still be improved with an additional computation on the 8x8 block.

JoeBG
17th May 2007, 10:26
Trellis, when enabled, occurs in inter, intra & bidir macroblocks.
DCT decimation, when enabled, occurs only in inter & bidir macroblocks.
DCT decimation is always enabled on bframes, even with --no-dct-decimate
trellis disables DCT decimation on macroblocks using the 8x8 transform.
trellis is never used on chroma - and chroma is never encoded using the 8x8 transform
trellis and DCT decimation can be used together when the 4x4 transform is used.

The reason behind using DCT decimation with trellis seems to be that trellis, with a 4x4 transform, considers 4x4 blocks independently, while DCT decimation works on 4 4x4 blocks ( and tries to zero all of them when possible ). So while trellis alone is optimal on a 4x4 block, it may still be improved with an additional computation on the 8x8 block.

:thanks:

:confused: Uff.....so should I use them together? :)

Manao
17th May 2007, 10:34
I don't know.

There are already some people that doesn't like DCT decimation. They really shouldn't use trellis + DCT decimation.

For the rest, it's better to test for themselves, though the difference will be really small and the tests may not be conclusive.

For my part, I would trust trellis to zero enough 4x4 blocks so that DCT decimation can be omitted. But that's a gut feeling without much testing to back it up.