diff options
author | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
commit | 513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44 (patch) | |
tree | 249280ac94eb2b871de89cd1b166fff4ee00ab09 /src/tile_scratch_buffer.h | |
parent | 3c21ceac2f6a5adfab07d3d458880561543d0a31 (diff) | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-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/tile_scratch_buffer.h')
-rw-r--r-- | src/tile_scratch_buffer.h | 15 |
1 files changed, 14 insertions, 1 deletions
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 <cstddef> #include <cstdint> +#include <cstring> +#include <memory> #include <mutex> // NOLINT (unapproved c++11 header) +#include <new> +#include <utility> #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<ptrdiff_t>( 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<uint8_t>( 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; } |