xref: /rockchip-linux_mpp/mpp/codec/dec/avs2/avs2d_dpb.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 
17 #ifndef __AVS2D_DPB_H__
18 #define __AVS2D_DPB_H__
19 
20 #include "avs2d_global.h"
21 
22 #ifdef  __cplusplus
23 extern "C" {
24 #endif
25 
26 MPP_RET avs2d_dpb_create(Avs2dCtx_t *p_dec);
27 MPP_RET avs2d_dpb_destroy(Avs2dCtx_t *p_dec);
28 MPP_RET avs2d_dpb_insert(Avs2dCtx_t *p_dec, HalDecTask *task);
29 MPP_RET avs2d_dpb_flush(Avs2dCtx_t *p_dec);
30 MPP_RET dpb_remove_unused_frame(Avs2dCtx_t *p_dec);
31 Avs2dFrame_t* get_dpb_frm_by_slot_idx(Avs2dFrameMgr_t *mgr, RK_S32 slot_idx);
32 
33 #ifdef  __cplusplus
34 }
35 #endif
36 
37 #endif /*__AVS2D_DPB_H__*/
38