xref: /OK3568_Linux_fs/external/rknpu2/examples/3rdparty/rga/RK356X/include/RgaUtils.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (C) 2016 Rockchip Electronics Co., Ltd.
3*4882a593Smuzhiyun  * Authors:
4*4882a593Smuzhiyun  *  Zhiqin Wei <wzq@rock-chips.com>
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Licensed under the Apache License, Version 2.0 (the "License");
7*4882a593Smuzhiyun  * you may not use this file except in compliance with the License.
8*4882a593Smuzhiyun  * You may obtain a copy of the License at
9*4882a593Smuzhiyun  *
10*4882a593Smuzhiyun  *      http://www.apache.org/licenses/LICENSE-2.0
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * Unless required by applicable law or agreed to in writing, software
13*4882a593Smuzhiyun  * distributed under the License is distributed on an "AS IS" BASIS,
14*4882a593Smuzhiyun  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15*4882a593Smuzhiyun  * See the License for the specific language governing permissions and
16*4882a593Smuzhiyun  * limitations under the License.
17*4882a593Smuzhiyun  */
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #ifndef _rga_utils_h_
20*4882a593Smuzhiyun #define _rga_utils_h_
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun // -------------------------------------------------------------------------------
23*4882a593Smuzhiyun float get_bpp_from_format(int format);
24*4882a593Smuzhiyun int get_perPixel_stride_from_format(int format);
25*4882a593Smuzhiyun int get_buf_from_file(void *buf, int f, int sw, int sh, int index);
26*4882a593Smuzhiyun int output_buf_data_to_file(void *buf, int f, int sw, int sh, int index);
27*4882a593Smuzhiyun const char *translate_format_str(int format);
28*4882a593Smuzhiyun int get_buf_from_file_FBC(void *buf, int f, int sw, int sh, int index);
29*4882a593Smuzhiyun int output_buf_data_to_file_FBC(void *buf, int f, int sw, int sh, int index);
30*4882a593Smuzhiyun #endif
31*4882a593Smuzhiyun 
32