• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The libgav1 Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Constants and utility functions used for overlap blend implementations.
16// This will be included inside an anonymous namespace on files where these are
17// necessary.
18
19// This is a flat array of masks for each block dimension from 2 to 32. The
20// starting index for each length is length-2.
21constexpr uint8_t kObmcMask[62] = {
22    // Obmc Mask 2
23    45, 64,
24    // Obmc Mask 4
25    39, 50, 59, 64,
26    // Obmc Mask 8
27    36, 42, 48, 53, 57, 61, 64, 64,
28    // Obmc Mask 16
29    34, 37, 40, 43, 46, 49, 52, 54, 56, 58, 60, 61, 64, 64, 64, 64,
30    // Obmc Mask 32
31    33, 35, 36, 38, 40, 41, 43, 44, 45, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58,
32    59, 60, 60, 61, 62, 64, 64, 64, 64, 64, 64, 64, 64};
33