h.264

来自「H.264编码解码器源码(c语言版本)」· 264 代码 · 共 105 行

264
105
字号
/*! ************************************************************************************** * \file *    parset.c * \brief *    Picture and Sequence Parameter set generation and handling *  \date 25 November 2002 * \author *    Main contributors (see contributors.h for copyright, address and affiliation details)  *      - Stephan Wenger        <stewe@cs.tu-berlin.de> * ************************************************************************************** */#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <memory.h>#include "parsetcommon.h"#include "memalloc.h"/*!  ************************************************************************************* * \brief *    Allocates memory for a pps * * \param none * * \return *    pointer to a pps ************************************************************************************* */ pic_parameter_set_rbsp_t *AllocPPS () {   pic_parameter_set_rbsp_t *p;   if ((p=calloc (sizeof (pic_parameter_set_rbsp_t), 1)) == NULL)     no_mem_exit ("AllocPPS: PPS");   if ((p->slice_group_id = calloc (SIZEslice_group_id, 1)) == NULL)     no_mem_exit ("AllocPPS: slice_group_id");   return p; } /*!  ************************************************************************************* * \brief *    Allocates memory for am sps * * \param none * * \return *    pointer to a sps ************************************************************************************* */ seq_parameter_set_rbsp_t *AllocSPS () {   seq_parameter_set_rbsp_t *p;   if ((p=calloc (sizeof (seq_parameter_set_rbsp_t), 1)) == NULL)     no_mem_exit ("AllocSPS: SPS");   return p; } /*!  ************************************************************************************* * \brief *    Frees a pps * * \param pps to be freed * * \return *    none ************************************************************************************* */  void FreePPS (pic_parameter_set_rbsp_t *pps) {   assert (pps != NULL);   if (pps->slice_group_id != NULL) free (pps->slice_group_id);   free (pps); }  /*!  ************************************************************************************* * \brief *    Frees a sps * * \param sps to be freed * * \return *    none ************************************************************************************* */  void FreeSPS (seq_parameter_set_rbsp_t *sps) {   assert (sps != NULL);   free (sps);  }

⌨️ 快捷键说明

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