Fix a UBSan warning

BUG=aomedia:2340

Change-Id: Iff56ee44e9689508e33d8bbe80e53bd0e8bbc8fb
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 60461f9..80ca286 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -3281,8 +3281,8 @@
       // high_energy threshold assumes that every pixel within a txfm block
       // has a residue energy of at least 25% of the maximum, i.e. 128 * 128
       // for 8 bit, then the threshold is scaled based on input bit depth.
-      const int64_t high_energy_thresh = (128 * 128 * tx_size_2d[tx_size])
-                                         << ((xd->bd - 8) * 2);
+      const int64_t high_energy_thresh =
+          ((int64_t)128 * 128 * tx_size_2d[tx_size]) << ((xd->bd - 8) * 2);
       const int is_high_energy = (block_sse >= high_energy_thresh);
       if (tx_size == TX_64X64 || is_high_energy) {
         // Because 3 out 4 quadrants of transform coefficients are forced to