]> granicus.if.org Git - libvpx/commitdiff
Fix segmentation fault in hbd path
authorDeepa K G <deepa.kg@ittiam.com>
Fri, 11 Jan 2019 12:32:12 +0000 (18:02 +0530)
committerJohann Koenig <johannkoenig@google.com>
Mon, 14 Jan 2019 22:28:50 +0000 (22:28 +0000)
When CONFIG_VP9_HIGHBITDEPTH is enabled,
lowbd modules were called in the hbd path.
This patch fixes the issue.

(cherry picked from commit 797ec1cd66c04fd335adba8ecc01dc93eab1898e)

BUG=webm:1589

Change-Id: I1caf701514dbf80eb75b953f40b1e7238f265a2c

vp9/encoder/vp9_temporal_filter.c

index db23b8e6ff86a8cfa2a86e1031cdccbe8c918dd1..cd340c3943ae744a8715bdc6540fff41b4472c86 100644 (file)
@@ -110,11 +110,16 @@ static void temporal_filter_predictors_mb_c(
             CONVERT_TO_SHORTPTR(y_mb_ptr + y_offset), stride,
             CONVERT_TO_SHORTPTR(&pred[p_offset]), BW, &mv, scale, xs, ys,
             which_mv, kernel, MV_PRECISION_Q3, x, y, xd->bd);
+      } else {
+        vp9_build_inter_predictor(y_mb_ptr + y_offset, stride, &pred[p_offset],
+                                  BW, &mv, scale, xs, ys, which_mv, kernel,
+                                  MV_PRECISION_Q3, x, y);
       }
-#endif  // CONFIG_VP9_HIGHBITDEPTH
+#else
       vp9_build_inter_predictor(y_mb_ptr + y_offset, stride, &pred[p_offset],
                                 BW, &mv, scale, xs, ys, which_mv, kernel,
                                 MV_PRECISION_Q3, x, y);
+#endif  // CONFIG_VP9_HIGHBITDEPTH
       k++;
     }
   }
@@ -143,8 +148,18 @@ static void temporal_filter_predictors_mb_c(
             CONVERT_TO_SHORTPTR(&pred[(BLK_PELS << 1) + p_offset]),
             uv_block_width, &mv, scale, xs, ys, which_mv, kernel,
             mv_precision_uv, x, y, xd->bd);
+      } else {
+        vp9_build_inter_predictor(u_mb_ptr + uv_offset, uv_stride,
+                                  &pred[BLK_PELS + p_offset], uv_block_width,
+                                  &mv, scale, xs, ys, which_mv, kernel,
+                                  mv_precision_uv, x, y);
+
+        vp9_build_inter_predictor(v_mb_ptr + uv_offset, uv_stride,
+                                  &pred[(BLK_PELS << 1) + p_offset],
+                                  uv_block_width, &mv, scale, xs, ys, which_mv,
+                                  kernel, mv_precision_uv, x, y);
       }
-#endif  // CONFIG_VP9_HIGHBITDEPTH
+#else
       vp9_build_inter_predictor(u_mb_ptr + uv_offset, uv_stride,
                                 &pred[BLK_PELS + p_offset], uv_block_width, &mv,
                                 scale, xs, ys, which_mv, kernel,
@@ -154,6 +169,7 @@ static void temporal_filter_predictors_mb_c(
                                 &pred[(BLK_PELS << 1) + p_offset],
                                 uv_block_width, &mv, scale, xs, ys, which_mv,
                                 kernel, mv_precision_uv, x, y);
+#endif  // CONFIG_VP9_HIGHBITDEPTH
       k++;
     }
   }