aboutsummaryrefslogtreecommitdiff
path: root/src/dsp/obmc.cc
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2021-11-07 08:50:20 -0500
committerBoyuan Yang <byang@debian.org>2021-11-07 08:50:20 -0500
commit513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44 (patch)
tree249280ac94eb2b871de89cd1b166fff4ee00ab09 /src/dsp/obmc.cc
parent3c21ceac2f6a5adfab07d3d458880561543d0a31 (diff)
parent320ef65362608ee1148c299d8d5d7618af34e470 (diff)
downloadlibgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.gz
libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.bz2
libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.zip
Update upstream source from tag 'upstream/0.17.0'
Update to upstream version '0.17.0' with Debian dir 5b612b6a2d67788b0c85bac59e50edc1545bfd7e
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];