xref: /rockchip-linux_mpp/mpp/codec/dec/h264/h264d_dpb.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2 *
3 * Copyright 2015 Rockchip Electronics Co. LTD
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 #ifndef _H264D_DPB_H_
19 #define _H264D_DPB_H_
20 
21 
22 #include "rk_type.h"
23 #include "mpp_err.h"
24 #include "h264d_global.h"
25 
26 
27 #ifdef  __cplusplus
28 extern "C" {
29 #endif
30 
31 void    update_ref_list(H264_DpbBuf_t *p_Dpb);
32 void    update_ltref_list(H264_DpbBuf_t *p_Dpb);
33 void    free_storable_picture(H264_DecCtx_t *p_Dec, H264_StorePic_t *p);
34 void    free_frame_store(H264_DecCtx_t *p_Dec, H264_FrameStore_t *f);
35 
36 MPP_RET idr_memory_management(H264_DpbBuf_t *p_Dpb, H264_StorePic_t *p);
37 MPP_RET insert_picture_in_dpb(H264dVideoCtx_t *p_Vid, H264_FrameStore_t *fs,    H264_StorePic_t *p, RK_U8 combine_flag);
38 MPP_RET store_picture_in_dpb (H264_DpbBuf_t *p_Dpb, H264_StorePic_t *p);
39 
40 MPP_RET check_mvc_dpb(H264dVideoCtx_t*p_Vid, H264_DpbBuf_t *p_Dpb_layer_0,  H264_DpbBuf_t* p_Dpb_layer_1);
41 MPP_RET init_dpb    (H264dVideoCtx_t *p_Vid, H264_DpbBuf_t *p_Dpb, RK_S32 type);
42 MPP_RET flush_dpb   (H264_DpbBuf_t   *p_Dpb, RK_S32 type);
43 MPP_RET output_dpb  (H264_DecCtx_t *p_Dec, H264_DpbBuf_t *p_Dpb);
44 
45 void    free_dpb    (H264_DpbBuf_t   *p_Dpb);
46 MPP_RET exit_picture(H264dVideoCtx_t *p_Vid, H264_StorePic_t **dec_pic);
47 
48 RK_U32  get_field_dpb_combine_flag(H264_FrameStore_t *p_last, H264_StorePic_t *p);
49 H264_StorePic_t *alloc_storable_picture(H264dVideoCtx_t *p_Vid, RK_S32 structure);
50 
51 #ifdef  __cplusplus
52 }
53 #endif
54 
55 //========================================
56 #endif /* end of _H264D_DPB_H_ */
57 
58