Commit b132ad641a for aom

commit b132ad641a68b658b838637c861ccacdf8e4b0af
Author: Frank Galligan <fgalligan@google.com>
Date:   Thu Nov 12 01:34:05 2026 -0800

    encodemb: skip trellis when block eob is 0

    Gate get_txb_ctx() and av1_optimize_b() on p->eobs[block] != 0 in
    encode_block(). When eob is 0, av1_optimize_b() only computes the
    skipped-block dummy_rate_cost, which encode_block() ignores.

    Speedup vs origin/main (AMD EPYC 7B13, --cpu-used=6, bit-exact):
      -2.60% (1T) / -3.43% (8T) 1080p allintra, -0.04% 720p good (1T).
    Binary size (x86_64 -O3): libaom.a .text +0.1 KiB (+0.00%),
      .rodata +0.1 KiB (+0.01%); stripped aomenc +0.0 KiB (+0.00%).
    Memory (peak RSS, 1080p allintra): 1T -1900 KiB (-3.96%),
      8T -3620 KiB.

    TAG=agy
    CONV=b929a630-a6cd-45a0-979c-1767c30178ee

    Change-Id: Ibcaf09ae51329077a76478ca101115262f3c0b0b

diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index d8e930edec..1cd750095f 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -360,7 +360,7 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
                       &quant_param);
     av1_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
                     &quant_param);
-    if (use_trellis) {
+    if (use_trellis && p->eobs[block]) {
       TXB_CTX txb_ctx;
       get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx);
       av1_optimize_b(args->cpi, x, plane, block, tx_size, tx_type, &txb_ctx,