xref: /aosp_15_r20/external/libavc/decoder/ih264d_api_utils.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1 /******************************************************************************
2  *
3  * Copyright (C) 2021 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19  */
20 
21 /*****************************************************************************/
22 /*                                                                           */
23 /*  File Name         : ih264d_api_utils.h                                   */
24 /*                                                                           */
25 /*  Description       : This file contains function prototypes for non-API   */
26 /*                      functions defined in ih264d_api.c                    */
27 /*****************************************************************************/
28 
29 #ifndef _IH264D_API_UTILS_H_
30 #define _IH264D_API_UTILS_H_
31 
32 #include "ih264_typedefs.h"
33 #include "iv.h"
34 
35 #define MIN_IN_BUFS 1
36 #define MIN_OUT_BUFS_420 3
37 #define MIN_OUT_BUFS_422ILE 1
38 #define MIN_OUT_BUFS_RGB565 1
39 #define MIN_OUT_BUFS_420SP 2
40 
41 extern WORD32 ih264d_create(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
42 
43 extern WORD32 ih264d_delete(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
44 
45 extern WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
46 
47 extern WORD32 ih264d_set_params(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
48 
49 extern WORD32 ih264d_set_num_cores(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
50 
51 extern WORD32 ih264d_set_processor(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
52 
53 extern WORD32 ih264d_set_degrade(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
54 
55 extern WORD32 ih264d_set_flush_mode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
56 
57 extern WORD32 ih264d_get_buf_info(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op);
58 
59 extern UWORD32 ih264d_get_outbuf_size(WORD32 u4_pic_wd, UWORD32 u4_pic_ht, UWORD8 u1_chroma_format,
60                                       UWORD32 *pu4_buf_size);
61 
62 extern void ih264d_export_sei_params(ivd_sei_decode_op_t *ps_sei_decode_op, dec_struct_t *ps_dec);
63 
64 extern UWORD32 ih264d_map_error(UWORD32 i4_err_status);
65 
66 extern void ih264d_signal_decode_thread(dec_struct_t *ps_dec);
67 
68 extern void ih264d_signal_bs_deblk_thread(dec_struct_t *ps_dec);
69 
70 extern WORD32 ih264d_deblock_display(dec_struct_t *ps_dec);
71 
72 #endif
73