aboutsummaryrefslogtreecommitdiff
path: root/src/frame_scratch_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame_scratch_buffer.h')
-rw-r--r--src/frame_scratch_buffer.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/frame_scratch_buffer.h b/src/frame_scratch_buffer.h
index 90c3bb8..1b0d2e0 100644
--- a/src/frame_scratch_buffer.h
+++ b/src/frame_scratch_buffer.h
@@ -17,10 +17,13 @@
#ifndef LIBGAV1_SRC_FRAME_SCRATCH_BUFFER_H_
#define LIBGAV1_SRC_FRAME_SCRATCH_BUFFER_H_
+#include <array>
#include <condition_variable> // NOLINT (unapproved c++11 header)
#include <cstdint>
#include <memory>
#include <mutex> // NOLINT (unapproved c++11 header)
+#include <new>
+#include <utility>
#include "src/loop_restoration_info.h"
#include "src/residual_buffer_pool.h"
@@ -46,9 +49,24 @@ using IntraPredictionBuffer =
// Buffer to facilitate decoding a frame. This struct is used only within
// DecoderImpl::DecodeTiles().
-struct FrameScratchBuffer {
+// The alignment requirement is due to the SymbolDecoderContext member
+// symbol_decoder_context and the TileScratchBufferPool member
+// tile_scratch_buffer_pool.
+struct FrameScratchBuffer : public MaxAlignedAllocable {
LoopRestorationInfo loop_restoration_info;
- Array2D<int16_t> cdef_index;
+ Array2D<int8_t> cdef_index;
+ // Encodes the block skip information as a bitmask for the entire frame which
+ // will be used by the cdef process.
+ //
+ // * The size of this array is rows4x4 / 2 * column4x4 / 16.
+ // * Each row of the bitmasks array (cdef_skip) stores the bitmask for 2 rows
+ // of 4x4 blocks.
+ // * Each entry in the row will store the skip information for 16 4x4 blocks
+ // (8 bits).
+ // * If any of the four 4x4 blocks in the 8x8 block is not a skip block, then
+ // the corresponding bit (as described below) will be set to 1.
+ // * For the 4x4 block at column4x4 the bit index is (column4x4 >> 1).
+ Array2D<uint8_t> cdef_skip;
Array2D<TransformSize> inter_transform_sizes;
BlockParametersHolder block_parameters_holder;
TemporalMotionField motion_field;