xref: /rockchip-linux_mpp/mpp/hal/common/av1/film_grain_noise_table.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2021 Rockchip Electronics Co. LTD
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 #ifndef __FILM_GRAIN_NOISE_TABLE_H__
17 #define __FILM_GRAIN_NOISE_TABLE_H__
18 #include "rk_type.h"
19 
20 void GenerateLumaGrainBlock(RK_S32 luma_grain_block[][82], RK_S32 bitdepth,
21                             RK_U8 num_y_points, RK_S32 grain_scale_shift,
22                             RK_S32 ar_coeff_lag, RK_S32 ar_coeffs_y[],
23                             RK_S32 ar_coeff_shift, RK_S32 grain_min, RK_S32 grain_max,
24                             RK_U16 random_seed);
25 
26 void GenerateChromaGrainBlock(
27     RK_S32 luma_grain_block[][82], RK_S32 cb_grain_block[][44],
28     RK_S32 cr_grain_block[][44], RK_S32 bitdepth, RK_U8 num_y_points, RK_U8 num_cb_points,
29     RK_U8 num_cr_points, RK_S32 grain_scale_shift, RK_S32 ar_coeff_lag,
30     RK_S32 ar_coeffs_cb[], RK_S32 ar_coeffs_cr[], RK_S32 ar_coeff_shift, RK_S32 grain_min,
31     RK_S32 grain_max, RK_U8 chroma_scaling_from_luma, RK_U16 random_seed);
32 
33 #endif  //__FILM_GRAIN_NOISE_TABLE_H__