18.02.2025, 13:26
I read x264 code and I insist, rc_lookahead value is relevant regardless of mbtree status. In your second link (encoder.c L1108+), there is nothing that overrides lookahead value to zero if mbtree is disabled.
To have more evidence, please search for "i_lookahead" in ratecontrol.c and pay attention to the logic flow. If i_lookahead is zero, then all size prediction of future frame is skipped and it fallbacks to reactive logic at line 2330+ (mere example, there are others "bad" fix-ups for this insane case of no lookahead). You can add debug print there to verify this that lookahead is used properly regardless of mbtree status.
Furthermore, if you look at many commercial blu-rays, SEI data always have rc_lookahead > 0, regardless of mbtree. Example: https://forum.blu-ray.com/showpost.php?p...tcount=377
To have more evidence, please search for "i_lookahead" in ratecontrol.c and pay attention to the logic flow. If i_lookahead is zero, then all size prediction of future frame is skipped and it fallbacks to reactive logic at line 2330+ (mere example, there are others "bad" fix-ups for this insane case of no lookahead). You can add debug print there to verify this that lookahead is used properly regardless of mbtree status.
Furthermore, if you look at many commercial blu-rays, SEI data always have rc_lookahead > 0, regardless of mbtree. Example: https://forum.blu-ray.com/showpost.php?p...tcount=377