1 /* 2 * Copyright 2019 The libgav1 Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef LIBGAV1_SRC_DSP_CONSTANTS_H_ 18 #define LIBGAV1_SRC_DSP_CONSTANTS_H_ 19 20 // This file contains DSP related constants that have a direct relationship with 21 // a DSP component. 22 23 #include <cstdint> 24 25 #include "src/utils/constants.h" 26 27 namespace libgav1 { 28 29 enum { 30 kCflLumaBufferStride = 32, 31 }; // anonymous enum 32 33 extern const int8_t kFilterIntraTaps[kNumFilterIntraPredictors][8][8]; 34 35 // Values in this enum can be derived as the sum of subsampling_x and 36 // subsampling_y (since subsampling_x == 0 && subsampling_y == 1 case is never 37 // allowed by the bitstream). 38 enum SubsamplingType : uint8_t { 39 kSubsamplingType444, // subsampling_x = 0, subsampling_y = 0. 40 kSubsamplingType422, // subsampling_x = 1, subsampling_y = 0. 41 kSubsamplingType420, // subsampling_x = 1, subsampling_y = 1. 42 kNumSubsamplingTypes 43 }; 44 45 extern const uint16_t kSgrScaleParameter[16][2]; 46 47 extern const uint8_t kCdefPrimaryTaps[2][2]; 48 49 extern const int8_t kCdefDirectionsPadded[12][2][2]; 50 51 } // namespace libgav1 52 53 #endif // LIBGAV1_SRC_DSP_CONSTANTS_H_ 54