• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 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// Each row below contains weights used for a corresponding block size. Because
16// they are adjacent powers of 2, the index of each row is the sum of the sizes
17// of preceding rows, minus 4.
18// The weights need to be declared as uint8_t or uint16_t, depending on the
19// bitdepth, so the values are held in a single canonical place.
20// clang-format off
21    // block dimension = 4
22    255, 149, 85, 64,
23    // block dimension = 8
24    255, 197, 146, 105, 73, 50, 37, 32,
25    // block dimension = 16
26    255, 225, 196, 170, 145, 123, 102, 84, 68, 54, 43, 33, 26, 20, 17, 16,
27    // block dimension = 32
28    255, 240, 225, 210, 196, 182, 169, 157, 145, 133, 122, 111, 101, 92, 83, 74,
29    66, 59, 52, 45, 39, 34, 29, 25, 21, 17, 14, 12, 10, 9, 8, 8,
30    // block dimension = 64
31    255, 248, 240, 233, 225, 218, 210, 203, 196, 189, 182, 176, 169, 163, 156,
32    150, 144, 138, 133, 127, 121, 116, 111, 106, 101, 96, 91, 86, 82, 77, 73,
33    69, 65, 61, 57, 54, 50, 47, 44, 41, 38, 35, 32, 29, 27, 25, 22, 20, 18, 16,
34    15, 13, 12, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4
35    // clang-format on
36