亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? parset.c

?? 一個簡單的視頻會議VC++MFC工程文件
?? C
?? 第 1 頁 / 共 2 頁
字號:

/*!
 **************************************************************************************
 * \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 <malloc.h>
#include <string.h>
 
#include "global.h"
#include "contributors.h"
#include "parsetcommon.h"
#include "nalu.h"
#include "parset.h"
#include "fmo.h"
#include "vlc.h"
#include "mbuffer.h"

// Local helpers
static int IdentifyProfile();
static int IdentifyLevel();
static int IdentifyNumRefFrames();
static int GenerateVUISequenceParameters();

extern ColocatedParams *Co_located;


/*! 
 *************************************************************************************
 * \brief
 *    generates a sequence and picture parameter set and stores these in global
 *    active_sps and active_pps
 *
 * \return
 *    A NALU containing the Sequence ParameterSet
 *
 *************************************************************************************
*/
void GenerateParameterSets ()
{
  seq_parameter_set_rbsp_t *sps = NULL; 
  pic_parameter_set_rbsp_t *pps = NULL;

  sps = AllocSPS();
  pps = AllocPPS();

  FillParameterSetStructures (sps, pps);
  
  active_sps = sps;
  active_pps = pps;
}

/*! 
*************************************************************************************
* \brief
*    frees global parameter sets active_sps and active_pps
*
* \return
*    A NALU containing the Sequence ParameterSet
*
*************************************************************************************
*/
void FreeParameterSets ()
{
  FreeSPS (active_sps);
  FreePPS (active_pps);
}

/*! 
*************************************************************************************
* \brief
*    int GenerateSeq_parameter_set_NALU ();
*
* \note
*    Uses the global variables through FillParameterSetStructures()
*
* \return
*    A NALU containing the Sequence ParameterSet
*
*************************************************************************************
*/

NALU_t *GenerateSeq_parameter_set_NALU ()
{
  NALU_t *n = AllocNALU(64000);
  int RBSPlen = 0;
  int NALUlen;
  byte rbsp[MAXRBSPSIZE];

  RBSPlen = GenerateSeq_parameter_set_rbsp (active_sps, rbsp);
  NALUlen = RBSPtoNALU (rbsp, n, RBSPlen, NALU_TYPE_SPS, NALU_PRIORITY_HIGHEST, 0, 1);
  n->startcodeprefix_len = 4;

  return n;
}


/*! 
*************************************************************************************
* \brief
*    NALU_t *GeneratePic_parameter_set_NALU ();
*
* \note
*    Uses the global variables through FillParameterSetStructures()
*
* \return
*    A NALU containing the Picture Parameter Set
*
*************************************************************************************
*/

NALU_t *GeneratePic_parameter_set_NALU()
{
  NALU_t *n = AllocNALU(64000);
  int RBSPlen = 0;
  int NALUlen;
  byte rbsp[MAXRBSPSIZE];

  RBSPlen = GeneratePic_parameter_set_rbsp (active_pps, rbsp);
  NALUlen = RBSPtoNALU (rbsp, n, RBSPlen, NALU_TYPE_PPS, NALU_PRIORITY_HIGHEST, 0, 1);
  n->startcodeprefix_len = 4;

  return n;
}

/*!
 ************************************************************************
 * \brief
 *    FillParameterSetStructures: extracts info from global variables and
 *    generates a picture and sequence parameter set structure
 *
 * \param sps
 *    Sequence parameter set to be filled
 * \param pps
 *    Picture parameter set to be filled
 * \par
 *    Function reads all kinds of values from several global variables,
 *    including input-> and image-> and fills in the sps and pps.  Many
 *    values are current hard-coded to defaults, especially most of the
 *    VUI stuff.  Currently, the sps and pps structures are fixed length
 *    with the exception of the fully flexible FMO map (mode 6).  This
 *    mode is not supported.  Hence, the function does not need to
 *    allocate memory for the FMOmap, the pointer slice_group_id is
 *    always NULL.  If one wants to implement FMO mode 6, one would need
 *    to malloc the memory for the map here, and the caller would need
 *    to free it after use.
 *
 * \par 
 *    Limitations
 *    Currently, the encoder does not support multiple parameter sets,
 *    primarily because the config file does not support it.  Hence the
 *    pic_parameter_set_id and the seq_parameter_set_id are always zero.
 *    If one day multiple parameter sets are implemented, it would
 *    make sense to break this function into two, one for the picture and
 *    one for the sequence.
 *    Currently, FMO is not supported
 *    The following pps and sps elements seem not to be used in the encoder 
 *    or decoder and, hence, a guessed default value is conveyed:
 *
 *    pps->num_ref_idx_l0_active_minus1 = img->num_ref_pic_active_fwd_minus1;
 *    pps->num_ref_idx_l1_active_minus1 = img->num_ref_pic_active_bwd_minus1;
 *    pps->chroma_qp_index_offset = 0;
 *    sps->required_frame_num_update_behaviour_flag = FALSE;
 *    sps->direct_temporal_constrained_flag = FALSE;
 *
 * \par
 *    Regarding the QP
 *    The previous software versions coded the absolute QP only in the 
 *    slice header.  This is kept, and the offset in the PPS is coded 
 *    even if we could save bits by intelligently using this field.
 *
 ************************************************************************
 */

void FillParameterSetStructures (seq_parameter_set_rbsp_t *sps, 
                                 pic_parameter_set_rbsp_t *pps)
{
  unsigned i;
  // *************************************************************************
  // Sequence Parameter Set
  // *************************************************************************
  assert (sps != NULL);
  assert (pps != NULL);
  // Profile and Level should be calculated using the info from the config
  // file.  Calculation is hidden in IndetifyProfile() and IdentifyLevel()
  sps->profile_idc = IdentifyProfile();
  sps->level_idc = IdentifyLevel();

  // needs to be set according to profile
  sps->constrained_set0_flag = 0;
  sps->constrained_set1_flag = 0;
  sps->constrained_set2_flag = 0;

  // Parameter Set ID hardcoded to zero
  sps->seq_parameter_set_id = 0;

  //! POC stuff:
  //! The following values are hard-coded in init_poc().  Apparently,
  //! the poc implementation covers only a subset of the poc functionality.
  //! Here, the same subset is implemented.  Changes in the POC stuff have
  //! also to be reflected here
  sps->log2_max_frame_num_minus4 = log2_max_frame_num_minus4;
  sps->log2_max_pic_order_cnt_lsb_minus4 = log2_max_pic_order_cnt_lsb_minus4;
  
  sps->pic_order_cnt_type = input->pic_order_cnt_type;
  sps->num_ref_frames_in_pic_order_cnt_cycle = img->num_ref_frames_in_pic_order_cnt_cycle;
  sps->delta_pic_order_always_zero_flag = img->delta_pic_order_always_zero_flag;
  sps->offset_for_non_ref_pic = img->offset_for_non_ref_pic;
  sps->offset_for_top_to_bottom_field = img->offset_for_top_to_bottom_field;

  for (i=0; i<img->num_ref_frames_in_pic_order_cnt_cycle; i++)
  {
    sps->offset_for_ref_frame[i] = img->offset_for_ref_frame[i];
  }
  // End of POC stuff

  // Number of Reference Frames
  sps->num_ref_frames = IdentifyNumRefFrames();

  //required_frame_num_update_behaviour_flag hardcoded to zero
  sps->gaps_in_frame_num_value_allowed_flag = FALSE;    // double check

  sps->frame_mbs_only_flag = !(input->PicInterlace || input->MbInterlace);

  // Picture size, finally a simple one :-)
  sps->pic_width_in_mbs_minus1 = (input->img_width/16) -1;
  sps->pic_height_in_map_units_minus1 = ((input->img_height/16)/ (2 - sps->frame_mbs_only_flag)) - 1;

  // a couple of flags, simple
  sps->mb_adaptive_frame_field_flag = (FRAME_CODING != input->MbInterlace);
  sps->direct_8x8_inference_flag = input->directInferenceFlag;

  // Sequence VUI not implemented, signalled as not present
  sps->vui_parameters_present_flag = FALSE;
  
  {
    int PicWidthInMbs, PicHeightInMapUnits, FrameHeightInMbs;
    int width, height;
    PicWidthInMbs = (sps->pic_width_in_mbs_minus1 +1);
    PicHeightInMapUnits = (sps->pic_height_in_map_units_minus1 +1);
    FrameHeightInMbs = ( 2 - sps->frame_mbs_only_flag ) * PicHeightInMapUnits;
    
    width = PicWidthInMbs * MB_BLOCK_SIZE;
    height = FrameHeightInMbs * MB_BLOCK_SIZE;
    
    Co_located = alloc_colocated (width, height,sps->mb_adaptive_frame_field_flag);
    
  }
  // *************************************************************************
  // Picture Parameter Set 
  // *************************************************************************

  pps->seq_parameter_set_id = 0;
  pps->pic_parameter_set_id = 0;
  pps->entropy_coding_mode_flag = (input->symbol_mode==UVLC?0:1);

  // JVT-Fxxx (by Stephan Wenger, make this flag unconditional
  pps->pic_order_present_flag = img->pic_order_present_flag;


  // Begin FMO stuff
  pps->num_slice_groups_minus1 = input->num_slice_groups_minus1;

	
  //! Following set the parameter for different slice group types
  if (pps->num_slice_groups_minus1 > 0)
    switch (input->slice_group_map_type)
    {
    case 0:
			
      pps->slice_group_map_type = 0;
      for(i=0; i<=pps->num_slice_groups_minus1; i++)
      {
        pps->run_length_minus1[i]=input->run_length_minus1[i];
      }
			
      break;
    case 1:
      pps->slice_group_map_type = 1;
      break;
    case 2:
      // i loops from 0 to num_slice_groups_minus1-1, because no info for background needed
      pps->slice_group_map_type = 2;
      for(i=0; i<pps->num_slice_groups_minus1; i++)
      {
        pps->top_left[i] = input->top_left[i];
        pps->bottom_right[i] = input->bottom_right[i];      
      }
     break;
    case 3:
    case 4:
    case 5:
      pps->slice_group_map_type = input->slice_group_map_type;
			
      pps->slice_group_change_direction_flag = input->slice_group_change_direction_flag;
      pps->slice_group_change_rate_minus1 = input->slice_group_change_rate_minus1;
      break;
    case 6:
      pps->slice_group_map_type = 6;   
      pps->pic_size_in_map_units_minus1 = 
				((input->img_height/MB_BLOCK_SIZE)/(2-sps->frame_mbs_only_flag))
				*(input->img_width/MB_BLOCK_SIZE) -1;
			
      for (i=0;i<=pps->pic_size_in_map_units_minus1; i++)
        pps->slice_group_id[i] = input->slice_group_id[i];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线一区二区三区| 91偷拍与自偷拍精品| 一本大道久久精品懂色aⅴ| 97久久精品人人爽人人爽蜜臀| 99精品视频在线播放观看| 色欧美日韩亚洲| 精品国产一区二区三区久久影院 | 国产精品国产三级国产有无不卡| 国产精品三级视频| 图片区小说区区亚洲影院| 大桥未久av一区二区三区中文| 97精品久久久久中文字幕| 欧美一个色资源| 亚洲精品国产一区二区三区四区在线| 亚洲6080在线| 99久久综合狠狠综合久久| 精品久久久久久亚洲综合网| 国产精品传媒入口麻豆| 久色婷婷小香蕉久久| 不卡视频免费播放| 亚洲国产电影在线观看| 激情偷乱视频一区二区三区| 欧美猛男gaygay网站| 亚洲欧美日韩小说| 美女视频免费一区| 4438x亚洲最大成人网| 亚洲欧美另类在线| 99久精品国产| 亚洲精品ww久久久久久p站| av福利精品导航| 国产亚洲综合色| 国产传媒日韩欧美成人| 精品国产乱码久久久久久闺蜜| 午夜伊人狠狠久久| 日韩免费观看高清完整版| 成人免费高清视频| 岛国av在线一区| 婷婷综合五月天| 欧美午夜理伦三级在线观看| 日韩二区在线观看| 亚洲小说春色综合另类电影| 精品国产sm最大网站| 欧美日韩国产影片| 日韩一区精品字幕| 91行情网站电视在线观看高清版| 亚洲国产精品传媒在线观看| 国产**成人网毛片九色 | 97se亚洲国产综合自在线| 久久久久久久久岛国免费| 国产自产高清不卡| 国产精品视频免费| 91同城在线观看| 婷婷丁香激情综合| 欧美精品一区二区三区蜜臀| 风间由美一区二区av101| 国产日韩精品一区二区三区| 风间由美一区二区三区在线观看| 中文字幕一区二区三区不卡| 欧美日韩一级黄| 美国三级日本三级久久99| 亚洲婷婷在线视频| 久久久综合视频| 欧美一区二区三区色| 成人h动漫精品一区二区| 狠狠色狠狠色综合系列| 天堂午夜影视日韩欧美一区二区| 中文字幕在线不卡一区二区三区| 欧美r级电影在线观看| 欧美丝袜丝交足nylons| 色综合天天综合狠狠| 成人性生交大合| 久久精品国产99久久6| 视频在线观看一区| 亚洲天堂av一区| 亚洲精选免费视频| 一片黄亚洲嫩模| 亚洲一区二区三区中文字幕在线| 日韩理论片中文av| 最新久久zyz资源站| 国产精品久久久久久久久图文区 | 日本高清无吗v一区| 欧美性色欧美a在线播放| 精品理论电影在线观看| 91小视频在线观看| 91精品国产综合久久久久久久| 国产视频亚洲色图| 欧美日韩成人激情| 欧美日韩情趣电影| 在线观看日韩毛片| 91免费版在线| 91麻豆精品国产91久久久使用方法| 欧美精品久久久久久久多人混战| 国产日本欧洲亚洲| 日韩极品在线观看| 一本色道亚洲精品aⅴ| 欧美r级在线观看| 婷婷国产v国产偷v亚洲高清| 91尤物视频在线观看| www国产成人免费观看视频 深夜成人网| 中文字幕一区二区三区在线不卡| 日韩电影在线观看一区| 亚洲va欧美va天堂v国产综合| 麻豆成人久久精品二区三区红| 国产在线观看免费一区| 精品无人码麻豆乱码1区2区 | 夜夜夜精品看看| 国产精品女同一区二区三区| 亚洲成人免费在线观看| 精品一区二区在线视频| 国产一区二区三区美女| 欧美日本视频在线| 洋洋av久久久久久久一区| 51精品视频一区二区三区| 韩国女主播一区二区三区| 欧美一区二区在线观看| 国产高清视频一区| 91视频在线看| 日韩一区和二区| 国产精品三级视频| 免费久久精品视频| jizz一区二区| 日韩一级在线观看| 成人欧美一区二区三区视频网页| 午夜国产精品一区| 成人国产亚洲欧美成人综合网| 欧美色图12p| 国产精品一区二区你懂的| 天堂久久久久va久久久久| 亚洲欧洲精品一区二区精品久久久| 亚洲国产精品自拍| 99麻豆久久久国产精品免费| 日韩一级视频免费观看在线| 国产精品高潮呻吟| 国产一区二区三区国产| 91国偷自产一区二区三区成为亚洲经典 | 国产精品国产三级国产有无不卡| 亚洲第一主播视频| 91免费观看视频| 国产精品区一区二区三| 激情六月婷婷久久| 7777精品伊人久久久大香线蕉超级流畅| 国产精品色在线| 国产真实乱子伦精品视频| 欧美日韩高清一区二区| 中文字幕日韩av资源站| 国产毛片精品国产一区二区三区| 4438x成人网最大色成网站| 一区二区三区蜜桃| 97精品久久久午夜一区二区三区| 国产日产欧美一区| 国产又黄又大久久| 日韩精品一区二区三区在线播放| 亚洲国产成人高清精品| 91久久精品国产91性色tv| 国产精品精品国产色婷婷| 国产69精品久久777的优势| 2020国产成人综合网| 另类小说一区二区三区| 8x福利精品第一导航| 亚洲综合网站在线观看| 色偷偷一区二区三区| 亚洲欧洲精品一区二区三区| 成人动漫中文字幕| 日本一区二区三区久久久久久久久不| 精品影视av免费| 精品国产凹凸成av人导航| 美女视频网站黄色亚洲| 欧美大片一区二区| 久久精品国产秦先生| 亚洲精品在线电影| 国产乱淫av一区二区三区 | 欧美性做爰猛烈叫床潮| 一级精品视频在线观看宜春院| 色综合久久99| 亚洲伦在线观看| 在线观看国产日韩| 亚洲18女电影在线观看| 91精品综合久久久久久| 免费看精品久久片| 久久精品欧美一区二区三区麻豆| 国产精品88av| 国产精品久久久久久久久免费相片| hitomi一区二区三区精品| 日韩伦理av电影| 欧美日韩亚洲国产综合| 男男gaygay亚洲| 久久免费视频一区| 91丨porny丨中文| 午夜精品久久久久久久99水蜜桃| 欧美一区二区三区免费| 国产精品一二三区在线| 亚洲欧洲精品一区二区三区不卡| 欧美丝袜丝交足nylons| 美女高潮久久久| 国产精品沙发午睡系列990531| 91免费观看视频| 麻豆精品国产91久久久久久| 欧美极品xxx| 欧美三级电影一区| 国产主播一区二区|