⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slice.h

📁 Nokia H.264/AVC Encoder/Decoder Usage Manual
💻 H
字号:
/*COPYRIGHT, LICENSE AND WARRANTY INFORMATIONThis software module has been originally developed by Nokia Corporation. Provided that a person, entity or a company willing to use the Software (hereinafter Licensee) comply with all the terms and conditions of this Statement and subject to the limitations set forth in this Statement Nokia grants to such Licensee a non-exclusive, sub-licensable, worldwide, limited license under copyrights owned by Nokia to use the Software for the sole purpose of creating, manufacturing, selling, marketing, or  distributing (including the right to make modifications to the Software) a fully compliant decoder implementation (hereinafter "Decoder") of ITU-T Recommendation H.264 / ISO/IEC International Standard 14496-10 and an encoder implementation producing output that is decodable with the Decoder.Nokia retains the ownership of copyrights to the Software. There is no patent nor other intellectual property right of Nokia licensed under this Statement (except the copyright license above). Licensee hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if patent licenses  are required, it is their responsibility to acquire the license before utilizing the Software.The license by Nokia is subject to that the Licensee grants to Nokia the non-exclusive, worldwide, royalty-free, perpetual and irrevocable covenant that the Licensee(s) shall not bring a suit before any court or administrative agency or otherwise assert a claim for infringement under the Licensee intellectual property rights that, but for a license, would be infringed by the Software against     (a)  Nokia or Nokia's Affiliate; or     (b)  other recipient of a license and covenant not to sue with respect         to the Software from Nokia; or    (c)  contractor, customer or distributor of a party listed above in a         or b,  which suit or claim is related to the Software or use thereof.The Licensee(s) further agrees to grant a reciprocal license to Nokia (as granted by Nokia to the Licensee(s) on the modifications made by Licensee(s) to the Software. THE SOFTWARE IS PROVIDED "AS IS" AND THE ORIGINAL DEVELOPER DISCLAIMS ANY AND ALL WARRANTIES WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. THOSE INTENDING TO USE THE SOFTWARE ARE EXPRESSLY ADVISED THAT ITS USE MAY INFRINGE EXISTING PATENTS AND BE SUBJECT TO ROYALTY PAYMENTS TO PATENT OWNERS. ANYONE USING THE SOFTWARE ON THE BASIS OF THIS LICENSE AGREES TO OBTAIN THE NECESSARY PERMISSIONS FROM ANY AND ALL APPLICABLE PATENT OWNERS FOR SUCH USE.IN NO EVENT SHALL THE ORIGINAL DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.This copyright, license and warranty information notice must be retained in all copies and derivative works of the Software or substantial portions thereof.*/#ifndef _SLICE_H_#define _SLICE_H_#include "globals.h"#include "bitbuffer.h"#include "framebuffer.h"#include "motcomp.h"#include "parameterset.h"#include "dpb.h"#ifdef ERROR_CONCEALMENT#include "errorconcealment.h"#endif/* Error codes */#define SLICE_ERR_NON_EXISTING_PPS     -5#define SLICE_ERR_NON_EXISTING_SPS     -4#define SLICE_ERR_UNSUPPORTED_FEATURE  -3#define SLICE_ERR_ILLEGAL_VALUE        -2#define SLICE_ERROR                    -1#define SLICE_OK                        0#define MAX_SLICE_GROUP_NUM      8#define MAX_NUM_OF_REORDER_CMDS  17#define MAX_NUM_OF_MMCO_OPS      35typedef struct _sliceMMCO_s {  unsigned int memory_management_control_operation;  unsigned int difference_of_pic_nums_minus1;  unsigned int long_term_pic_num;  unsigned int long_term_frame_idx;  unsigned int max_long_term_frame_idx_plus1;} sliceMMCO_s;typedef struct _sliceRefPicListReorderCmd_s {  unsigned int reordering_of_pic_nums_idc;  unsigned int abs_diff_pic_num_minus1;  unsigned int long_term_pic_num;} sliceRefPicListReorderCmd_s;typedef struct _slice_s {  /* Copied from NAL deader */  int nalType;  int nalRefIdc;  u_int32       maxFrameNum;  unsigned int  isIDR;  unsigned int  qp;  unsigned int  picHasMMCO5;  /*   * These are slice header syntax elements   */  unsigned int  first_mb_in_slice;  unsigned int  slice_type;  unsigned int  pic_parameter_set_id;  unsigned int  frame_num; /* unsigned int  field_pic_flag; */   /* unsigned int  bottom_field_flag; */    unsigned int  idr_pic_id;    unsigned int  pic_order_cnt_lsb;      int32         delta_pic_order_cnt_bottom;    int32         delta_pic_order_cnt_0;      int32         delta_pic_order_cnt_1;    unsigned int  redundant_pic_cnt; /* unsigned int  direct_spatial_mv_pred_flag; */  unsigned int  num_ref_idx_active_override_flag;    unsigned int  num_ref_idx_l0_active_minus1;   /* unsigned int  num_ref_idx_l1_active_minus1; */  unsigned int  ref_pic_list_reordering_flag0;    sliceRefPicListReorderCmd_s reorderCmdList[MAX_NUM_OF_REORDER_CMDS];/* pred_weight_table() */  /* if( nal_unit_type  = =  5 ) */    unsigned int  no_output_of_prior_pics_flag;    unsigned int  long_term_reference_flag;  /* else */    unsigned int  adaptive_ref_pic_marking_mode_flag;      sliceMMCO_s mmcoCmdList[MAX_NUM_OF_MMCO_OPS];  int           slice_qp_delta;   /* unsigned int  sp_for_switch_flag; */ /* int           slice_qs_delta; */    unsigned int  disable_deblocking_filter_idc;      int           slice_alpha_c0_offset_div2;      int           slice_beta_offset_div2;    unsigned int  slice_group_change_cycle;} slice_s;slice_s *sliceOpen();void sliceClose(slice_s *slice);int sliceGetHeader(slice_s *slice, seq_parameter_set_s *spsList[],                   pic_parameter_set_s *ppsList[], bitbuffer_s *bitbuf);int sliceDecodeMacroblocks(slice_s *slice, frmBuf_s *recoBuf, dpb_s *dpb,#ifdef ERROR_CONCEALMENT                           errorConcealment_s *pEc,#endif                           pic_parameter_set_s *pps,                           mbAttributes_s *mbData, int sliceID,                           bitbuffer_s *bitbuf);int sliceInitRefPicList(dpb_s *dpb, frmBuf_s *refPicList[],                        int numRefPicActive);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -