• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ///////////////////////////////////////////////////////////////////////
2 //
3 //               INTEL CORPORATION PROPRIETARY INFORMATION
4 //  This software is supplied under the terms of a license agreement or
5 //  nondisclosure agreement with Intel Corporation and may not be copied
6 //  or disclosed except in accordance with the terms of that agreement.
7 //        Copyright (c) 2001-2006 Intel Corporation. All Rights Reserved.
8 //
9 //  Description:    MPEG-4 header.
10 //
11 */
12 
13 
14 #ifndef _H264_DPB_CTL_H_
15 #define _H264_DPB_CTL_H_
16 
17 
18 #include "h264.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 ////////////////////////////////////////////////////////////////////
25 ///////////////////////////// Parser control functions
26 ////////////////////////////////////////////////////////////////////
27 
28 ///// Reference list
29 extern void h264_dpb_update_ref_lists(h264_Info * pInfo);
30 extern void h264_dpb_reorder_lists(h264_Info * pInfo);
31 
32 extern void h264_dpb_insert_ref_lists(h264_DecodedPictureBuffer * p_dpb,int32_t NonExisting);
33 
34 ///// POC
35 extern void h264_hdr_decoding_poc (h264_Info * pInfo,int32_t NonExisting, int32_t frame_num);
36 extern void h264_hdr_post_poc(h264_Info* pInfo,int32_t NonExisting, int32_t frame_num, int32_t use_old);
37 
38 ///// DPB buffer mangement
39 extern void h264_init_dpb(h264_DecodedPictureBuffer * p_dpb);
40 
41 extern void h264_dpb_unmark_for_reference(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc);
42 extern void h264_dpb_unmark_for_long_term_reference(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc);
43 extern void h264_dpb_unmark_long_term_frame_for_reference_by_frame_idx(h264_DecodedPictureBuffer *p_dpb, int32_t long_term_frame_idx);
44 extern void h264_dpb_unmark_long_term_field_for_reference_by_frame_idx(h264_DecodedPictureBuffer *p_dpb, int32_t long_term_frame_idx, int32_t fs_idc, int32_t polarity);
45 extern void h264_dpb_mark_pic_long_term(h264_Info * pInfo, int32_t long_term_frame_idx, int32_t picNumX);
46 extern void h264_dpb_mark_dangling_field(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc);
47 
48 extern void h264_dpb_update_queue_dangling_field(h264_Info * pInfo);
49 extern void h264_dpb_is_used_for_reference(int32_t * flag);
50 
51 
52 extern void h264_dpb_set_active_fs(h264_DecodedPictureBuffer * p_dpb,int32_t index);
53 extern void h264_dpb_flush_dpb (h264_Info * pInfo,int32_t output_all, int32_t keep_complement, int32_t num_ref_frames);
54 
55 extern void h264_dpb_idr_memory_management (h264_Info * pInfo,
56 											seq_param_set_used_ptr active_sps,
57 											int32_t no_output_of_prior_pics_flag);
58 
59 extern void h264_dpb_init_frame_store(h264_Info * pInfo);
60 extern void h264_dpb_reset_dpb(h264_Info * pInfo,int32_t PicWidthInMbs, int32_t FrameHeightInMbs,
61 							   int32_t SizeChange, int32_t no_output_of_prior_pics_flag);
62 
63 extern void h264_dpb_gaps_in_frame_num_mem_management(h264_Info * pInfo);
64 
65 extern int32_t h264_dpb_assign_frame_store(h264_Info * pInfo, int32_t NonExisting);
66 
67 extern void h264_dpb_get_smallest_poc(h264_DecodedPictureBuffer *p_dpb, int32_t *poc, int32_t *pos);
68 extern void h264_dpb_remove_unused_frame_from_dpb(h264_DecodedPictureBuffer *p_dpb, int32_t * flag);
69 
70 extern void h264_dpb_sliding_window_memory_management(h264_DecodedPictureBuffer *p_dpb,
71 													  int32_t NonExisting,
72 													  int32_t num_ref_frames);
73 extern int32_t h264_dpb_queue_update(h264_Info * pInfo,
74 									 int32_t push,
75 									 int32_t direct,
76 									 int32_t frame_request,
77 									 int32_t num_ref_frames);
78 
79 extern void h264_dpb_split_field (h264_Info * pInfo);
80 extern void h264_dpb_combine_field(int32_t use_old);
81 
82 extern void h264_dpb_insert_picture_in_dpb(h264_Info * pInfo,
83 										   int32_t used_for_reference,
84 										   int32_t add2dpb,
85 										   int32_t NonExisting,
86 										   int32_t use_old);
87 
88 extern void h264_dpb_store_previous_picture_in_dpb(h264_Info * pInfo,
89 											int32_t NonExisting,
90 											int32_t use_old);
91 
92 extern void h264_dpb_adaptive_memory_management (h264_Info * pInfo);
93 
94 extern int32_t h264_dpb_output_one_frame_from_dpb(h264_Info* pInfo,
95 			int32_t direct, int32_t request, int32_t num_ref_frames);
96 
97 extern void h264_dpb_remove_frame_from_dpb(h264_DecodedPictureBuffer *p_dpb, int32_t idx);
98 extern void h264_dpb_frame_output(h264_Info * pInfo,int32_t fs_idc, int32_t direct, int32_t * existing);
99 
100 //////////////////////////////////////////////////////////// Globals
101 extern frame_store *active_fs;
102 
103 
104 
105 #endif  //_H264_DPB_CTL_H_
106 
107 
108