]> granicus.if.org Git - libvpx/commitdiff
vp9_active_[hv]_edge: add missing vpx_clear_system_state
authorJames Zern <jzern@google.com>
Thu, 28 Jul 2022 01:56:22 +0000 (18:56 -0700)
committerJames Zern <jzern@google.com>
Thu, 28 Jul 2022 01:56:22 +0000 (18:56 -0700)
this fixes runtime errors with clang -fsanitize=integer in x86 builds:

../vp9/encoder/vp9_rdopt.c:3250:17: runtime error: signed integer
  overflow: 18 - -2147483648 cannot be represented in type 'int'
../vp9/encoder/vp9_rdopt.c:3277:16: runtime error: signed integer
  overflow: 26 - -2147483648 cannot be represented in type 'int'

Bug: b/229626362
Change-Id: Ic9a5063c840b4fce7056f61362234721add056a6

vp9/encoder/vp9_rdopt.c

index 3b574ef172db73234b7d62443db31935595cee75..bfde5ab1a5d7636b338f61cf35547be50a4aeee2 100644 (file)
@@ -3242,6 +3242,7 @@ int vp9_active_h_edge(VP9_COMP *cpi, int mi_row, int mi_step) {
   // For two pass account for any formatting bars detected.
   if (cpi->oxcf.pass == 2) {
     TWO_PASS *twopass = &cpi->twopass;
+    vpx_clear_system_state();
 
     // The inactive region is specified in MBs not mi units.
     // The image edge is in the following MB row.
@@ -3269,6 +3270,7 @@ int vp9_active_v_edge(VP9_COMP *cpi, int mi_col, int mi_step) {
   // For two pass account for any formatting bars detected.
   if (cpi->oxcf.pass == 2) {
     TWO_PASS *twopass = &cpi->twopass;
+    vpx_clear_system_state();
 
     // The inactive region is specified in MBs not mi units.
     // The image edge is in the following MB row.