aboutsummaryrefslogtreecommitdiff
path: root/src/dsp/obmc.cc
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2021-11-07 08:50:18 -0500
committerBoyuan Yang <byang@debian.org>2021-11-07 08:50:18 -0500
commit320ef65362608ee1148c299d8d5d7618af34e470 (patch)
treec47911c219d1e35b8b0771e9e0176eff0e0d08ec /src/dsp/obmc.cc
parent2381d803c76105f44717d75f089ec37f51e5cfe4 (diff)
downloadlibgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.gz
libgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.bz2
libgav1-320ef65362608ee1148c299d8d5d7618af34e470.zip
New upstream version 0.17.0
Diffstat (limited to 'src/dsp/obmc.cc')
-rw-r--r--src/dsp/obmc.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/dsp/obmc.cc b/src/dsp/obmc.cc
index 46d1b5b..6b5c6e3 100644
--- a/src/dsp/obmc.cc
+++ b/src/dsp/obmc.cc
@@ -30,15 +30,18 @@ namespace {
// 7.11.3.10 (from top samples).
template <typename Pixel>
-void OverlapBlendVertical_C(void* const prediction,
+void OverlapBlendVertical_C(void* LIBGAV1_RESTRICT const prediction,
const ptrdiff_t prediction_stride, const int width,
- const int height, const void* const obmc_prediction,
+ const int height,
+ const void* LIBGAV1_RESTRICT const obmc_prediction,
const ptrdiff_t obmc_prediction_stride) {
auto* pred = static_cast<Pixel*>(prediction);
const ptrdiff_t pred_stride = prediction_stride / sizeof(Pixel);
const auto* obmc_pred = static_cast<const Pixel*>(obmc_prediction);
const ptrdiff_t obmc_pred_stride = obmc_prediction_stride / sizeof(Pixel);
const uint8_t* const mask = kObmcMask + height - 2;
+ assert(width >= 4);
+ assert(height >= 2);
for (int y = 0; y < height; ++y) {
const uint8_t mask_value = mask[y];
@@ -53,16 +56,19 @@ void OverlapBlendVertical_C(void* const prediction,
// 7.11.3.10 (from left samples).
template <typename Pixel>
-void OverlapBlendHorizontal_C(void* const prediction,
- const ptrdiff_t prediction_stride,
- const int width, const int height,
- const void* const obmc_prediction,
- const ptrdiff_t obmc_prediction_stride) {
+void OverlapBlendHorizontal_C(
+ void* LIBGAV1_RESTRICT const prediction, const ptrdiff_t prediction_stride,
+ const int width, const int height,
+ const void* LIBGAV1_RESTRICT const obmc_prediction,
+ const ptrdiff_t obmc_prediction_stride) {
auto* pred = static_cast<Pixel*>(prediction);
const ptrdiff_t pred_stride = prediction_stride / sizeof(Pixel);
const auto* obmc_pred = static_cast<const Pixel*>(obmc_prediction);
const ptrdiff_t obmc_pred_stride = obmc_prediction_stride / sizeof(Pixel);
const uint8_t* const mask = kObmcMask + width - 2;
+ assert(width >= 2);
+ assert(height >= 4);
+
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
const uint8_t mask_value = mask[x];