Commit 43f2b6a990 for aom
commit 43f2b6a99000057184332c8c2dd4bedc19fdec6f
Author: Jerome Jiang <jianj@google.com>
Date: Wed Jul 1 10:50:06 2026 -0400
Fix MSVC C4334 warnings in txb_rdopt.c
Use 1LL instead of 1 for 64-bit shifts to avoid implicit
conversion warnings in Visual Studio.
Change-Id: Ib7d79d8bc8c6b512b9b1183f3564390b38669469
diff --git a/av1/encoder/txb_rdopt.c b/av1/encoder/txb_rdopt.c
index 14c903eba1..e23630a880 100644
--- a/av1/encoder/txb_rdopt.c
+++ b/av1/encoder/txb_rdopt.c
@@ -55,11 +55,11 @@ static inline void update_coeff_general(
int64_t dist_diff_0, dist_diff_low_0;
if (qmatrix == NULL) {
const int64_t tqc2 = (int64_t)tqc * 2;
- dist_diff_0 = ((int64_t)dqc * (dqc - tqc2)) * (1 << (2 * shift));
+ dist_diff_0 = ((int64_t)dqc * (dqc - tqc2)) * (1LL << (2 * shift));
dist_diff_low_0 =
(abs_qc == 1)
? 0
- : (((int64_t)dqc_low * (dqc_low - tqc2)) * (1 << (2 * shift)));
+ : (((int64_t)dqc_low * (dqc_low - tqc2)) * (1LL << (2 * shift)));
} else {
const int64_t dist0 = get_coeff_dist(tqc, 0, shift, qmatrix, ci);
dist_diff_0 = get_coeff_dist(tqc, dqc, shift, qmatrix, ci) - dist0;
@@ -121,7 +121,7 @@ static AOM_FORCE_INLINE void update_coeff_simple(
if (qmatrix == NULL) {
dist_diff_0 =
((int64_t)abs_dqc * (abs_dqc - ((int64_t)abs_tqc * 2))) *
- (1 << (2 * shift));
+ (1LL << (2 * shift));
} else {
const int64_t dist0 = get_coeff_dist(abs_tqc, 0, shift, qmatrix, ci);
dist_diff_0 =
@@ -157,9 +157,9 @@ static AOM_FORCE_INLINE void update_coeff_simple(
if (qmatrix == NULL) {
const int64_t abs_tqc2 = (int64_t)abs_tqc << 1;
dist_diff_0 =
- ((int64_t)abs_dqc * (abs_dqc - abs_tqc2)) * (1 << (2 * shift));
+ ((int64_t)abs_dqc * (abs_dqc - abs_tqc2)) * (1LL << (2 * shift));
dist_diff_low_0 = ((int64_t)abs_dqc_low * (abs_dqc_low - abs_tqc2)) *
- (1 << (2 * shift));
+ (1LL << (2 * shift));
} else {
const int64_t dist0 = get_coeff_dist(abs_tqc, 0, shift, qmatrix, ci);
dist_diff_0 =
@@ -223,11 +223,11 @@ static AOM_FORCE_INLINE void update_coeff_eob(
int64_t dist, dist_low;
if (qmatrix == NULL) {
const int64_t tqc2 = (int64_t)tqc * 2;
- dist = ((int64_t)dqc * (dqc - tqc2)) * (1 << (2 * shift));
+ dist = ((int64_t)dqc * (dqc - tqc2)) * (1LL << (2 * shift));
dist_low =
(abs_qc == 1)
? 0
- : (((int64_t)dqc_low * (dqc_low - tqc2)) * (1 << (2 * shift)));
+ : (((int64_t)dqc_low * (dqc_low - tqc2)) * (1LL << (2 * shift)));
} else {
const int64_t dist0 = get_coeff_dist(tqc, 0, shift, qmatrix, ci);
dist = get_coeff_dist(tqc, dqc, shift, qmatrix, ci) - dist0;