From 320ef65362608ee1148c299d8d5d7618af34e470 Mon Sep 17 00:00:00 2001 From: Boyuan Yang Date: Sun, 7 Nov 2021 08:50:18 -0500 Subject: New upstream version 0.17.0 --- src/tile_scratch_buffer.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/tile_scratch_buffer.h') diff --git a/src/tile_scratch_buffer.h b/src/tile_scratch_buffer.h index 3eaf8b8..828f550 100644 --- a/src/tile_scratch_buffer.h +++ b/src/tile_scratch_buffer.h @@ -17,8 +17,13 @@ #ifndef LIBGAV1_SRC_TILE_SCRATCH_BUFFER_H_ #define LIBGAV1_SRC_TILE_SCRATCH_BUFFER_H_ +#include #include +#include +#include #include // NOLINT (unapproved c++11 header) +#include +#include #include "src/dsp/constants.h" #include "src/utils/common.h" @@ -42,9 +47,10 @@ struct TileScratchBuffer : public MaxAlignedAllocable { const int pixel_size = 1; #endif + static_assert(kConvolveScaleBorderRight >= kConvolveBorderRight, ""); constexpr int unaligned_convolve_buffer_stride = kMaxScaledSuperBlockSizeInPixels + kConvolveBorderLeftTop + - kConvolveBorderRight; + kConvolveScaleBorderRight; convolve_block_buffer_stride = Align( unaligned_convolve_buffer_stride * pixel_size, kMaxAlignment); constexpr int convolve_buffer_height = kMaxScaledSuperBlockSizeInPixels + @@ -53,6 +59,13 @@ struct TileScratchBuffer : public MaxAlignedAllocable { convolve_block_buffer = MakeAlignedUniquePtr( kMaxAlignment, convolve_buffer_height * convolve_block_buffer_stride); +#if LIBGAV1_MSAN + // Quiet msan warnings in ConvolveScale2D_NEON(). Set with random non-zero + // value to aid in future debugging. + memset(convolve_block_buffer.get(), 0x66, + convolve_buffer_height * convolve_block_buffer_stride); +#endif + return convolve_block_buffer != nullptr; } -- cgit v1.2.3