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 21extern "C" { 22#endif 23 24//////////////////////////////////////////////////////////////////// 25///////////////////////////// Parser control functions 26//////////////////////////////////////////////////////////////////// 27 28///// Reference list 29extern void h264_dpb_update_ref_lists(h264_Info * pInfo); 30extern void h264_dpb_reorder_lists(h264_Info * pInfo); 31 32extern void h264_dpb_insert_ref_lists(h264_DecodedPictureBuffer * p_dpb,int32_t NonExisting); 33 34///// POC 35extern void h264_hdr_decoding_poc (h264_Info * pInfo,int32_t NonExisting, int32_t frame_num); 36extern void h264_hdr_post_poc(h264_Info* pInfo,int32_t NonExisting, int32_t frame_num, int32_t use_old); 37 38///// DPB buffer mangement 39extern void h264_init_dpb(h264_DecodedPictureBuffer * p_dpb); 40 41extern void h264_dpb_unmark_for_reference(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc); 42extern void h264_dpb_unmark_for_long_term_reference(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc); 43extern void h264_dpb_unmark_long_term_frame_for_reference_by_frame_idx(h264_DecodedPictureBuffer *p_dpb, int32_t long_term_frame_idx); 44extern 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); 45extern void h264_dpb_mark_pic_long_term(h264_Info * pInfo, int32_t long_term_frame_idx, int32_t picNumX); 46extern void h264_dpb_mark_dangling_field(h264_DecodedPictureBuffer *p_dpb, int32_t fs_idc); 47 48extern void h264_dpb_update_queue_dangling_field(h264_Info * pInfo); 49extern void h264_dpb_is_used_for_reference(int32_t * flag); 50 51 52extern void h264_dpb_set_active_fs(h264_DecodedPictureBuffer * p_dpb,int32_t index); 53extern void h264_dpb_flush_dpb (h264_Info * pInfo,int32_t output_all, int32_t keep_complement, int32_t num_ref_frames); 54 55extern 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 59extern void h264_dpb_init_frame_store(h264_Info * pInfo); 60extern 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 63extern void h264_dpb_gaps_in_frame_num_mem_management(h264_Info * pInfo); 64 65extern int32_t h264_dpb_assign_frame_store(h264_Info * pInfo, int32_t NonExisting); 66 67extern void h264_dpb_get_smallest_poc(h264_DecodedPictureBuffer *p_dpb, int32_t *poc, int32_t *pos); 68extern void h264_dpb_remove_unused_frame_from_dpb(h264_DecodedPictureBuffer *p_dpb, int32_t * flag); 69 70extern void h264_dpb_sliding_window_memory_management(h264_DecodedPictureBuffer *p_dpb, 71 int32_t NonExisting, 72 int32_t num_ref_frames); 73extern 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 79extern void h264_dpb_split_field (h264_Info * pInfo); 80extern void h264_dpb_combine_field(int32_t use_old); 81 82extern 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 88extern void h264_dpb_store_previous_picture_in_dpb(h264_Info * pInfo, 89 int32_t NonExisting, 90 int32_t use_old); 91 92extern void h264_dpb_adaptive_memory_management (h264_Info * pInfo); 93 94extern 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 97extern void h264_dpb_remove_frame_from_dpb(h264_DecodedPictureBuffer *p_dpb, int32_t idx); 98extern void h264_dpb_frame_output(h264_Info * pInfo,int32_t fs_idc, int32_t direct, int32_t * existing); 99 100//////////////////////////////////////////////////////////// Globals 101extern frame_store *active_fs; 102 103 104 105#endif //_H264_DPB_CTL_H_ 106 107 108