亚洲欧美第一页_禁久久精品乱码_粉嫩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丝袜美腿高跟国产极品老师| 国产综合色产在线精品| 久久成人久久鬼色| 久久精品二区亚洲w码| 蜜臀久久99精品久久久画质超高清 | 国产成人在线视频播放| 国产精品一卡二卡| 国产精品一区二区三区四区| 国产福利一区二区三区视频在线| 狠狠色狠狠色综合系列| 国内精品国产三级国产a久久| 亚洲一区二区三区爽爽爽爽爽| 欧美va亚洲va国产综合| 日韩欧美一二区| 久久午夜羞羞影院免费观看| 国产欧美一区二区三区在线看蜜臀| 久久精品一区二区三区不卡 | 日韩免费成人网| 精品国产麻豆免费人成网站| 欧美成人一区二区三区在线观看| 欧美一区二区视频在线观看2022| 欧美成人精品福利| 久久久久久久久久久久久夜| 欧美国产精品一区二区三区| 亚洲欧洲日产国产综合网| 亚洲午夜激情网站| 麻豆成人久久精品二区三区红| 国产乱码精品一品二品| 国产91清纯白嫩初高中在线观看| 91丨九色丨国产丨porny| 欧美在线不卡视频| 欧美sm极限捆绑bd| 国产精品久久久久久久久晋中| 一区二区三区日本| 免费成人深夜小野草| 国产91丝袜在线播放0| 色屁屁一区二区| 日韩欧美一二三四区| 国产精品免费久久| 午夜精品久久久久久久蜜桃app| 精品制服美女丁香| 91美女在线视频| 日韩欧美一区在线| 中文字幕欧美一区| 免费在线观看成人| 99亚偷拍自图区亚洲| 日韩一区二区三区高清免费看看| 国产欧美一区二区精品秋霞影院| 一区二区三区在线播| 久久99精品国产麻豆婷婷| 99久久综合色| 日韩免费高清视频| 一二三区精品福利视频| 国产综合成人久久大片91| 在线看日韩精品电影| 精品免费99久久| 亚洲午夜在线视频| 国产精品中文字幕一区二区三区| 欧美性生活一区| 欧美经典一区二区| 蜜乳av一区二区三区| 日本韩国欧美在线| 中文字幕国产一区二区| 美女www一区二区| 91电影在线观看| 中文字幕va一区二区三区| 久热成人在线视频| 欧美三级欧美一级| 亚洲私人黄色宅男| 国产精品一二三四| 日韩一区二区免费在线观看| 亚洲男人的天堂一区二区| 国产精品亚洲人在线观看| 欧美丰满少妇xxxxx高潮对白| 亚洲欧美一区二区久久| 成人激情动漫在线观看| 精品粉嫩超白一线天av| 奇米在线7777在线精品 | 欧美国产日韩在线观看| 蜜桃视频一区二区| 欧美日韩色综合| 亚洲老妇xxxxxx| 99热精品一区二区| 国产精品你懂的在线欣赏| 久久精品国产第一区二区三区| 欧美久久久久久久久| 亚洲最大色网站| 色婷婷av一区二区三区gif| 天天操天天干天天综合网| 国产欧美日韩精品a在线观看| 成人国产亚洲欧美成人综合网| 18涩涩午夜精品.www| 91视频在线观看免费| 最新国产精品久久精品| 韩日精品视频一区| 国产日韩欧美精品一区| 国产成人精品午夜视频免费| 日韩精品中文字幕在线不卡尤物 | 日韩国产精品久久| 色婷婷精品大视频在线蜜桃视频 | 国产不卡一区视频| 久久青草欧美一区二区三区| 久久99国产精品免费网站| 日韩欧美国产一区在线观看| 日韩国产精品久久久| 日韩欧美国产成人一区二区| 日韩成人av影视| 欧美zozozo| 国产999精品久久| 中文文精品字幕一区二区| 国产成a人亚洲| 国产精品全国免费观看高清| 成人美女视频在线观看| 一区在线播放视频| 91视频国产观看| 亚洲一区二区高清| 欧美日韩精品一区二区三区| 三级一区在线视频先锋| 精品少妇一区二区三区免费观看| 国产永久精品大片wwwapp| 久久精品视频一区| 成人a免费在线看| 亚洲女与黑人做爰| 欧美日韩国产免费| 麻豆精品国产传媒mv男同 | 裸体一区二区三区| 日韩欧美一级二级三级| 国产电影一区二区三区| 亚洲国产成人私人影院tom| 91啦中文在线观看| 亚洲成av人片一区二区三区| 日韩美女视频在线| 成人动漫一区二区在线| 一区二区三区四区精品在线视频 | 久久影音资源网| 成人av在线看| 亚洲18女电影在线观看| 精品盗摄一区二区三区| caoporen国产精品视频| 亚洲第一av色| 久久久久88色偷偷免费| 在线观看中文字幕不卡| 美国精品在线观看| 1024成人网色www| 欧美老肥妇做.爰bbww| 国产专区欧美精品| 亚洲乱码中文字幕| 日韩视频一区二区| 91污片在线观看| 乱一区二区av| 亚洲欧美另类小说| 这里只有精品99re| 成人一道本在线| 免费黄网站欧美| 亚洲欧美另类久久久精品2019| 日韩欧美成人一区| 91视视频在线直接观看在线看网页在线看| 男人操女人的视频在线观看欧美| 国产精品美女久久久久aⅴ国产馆| 欧美高清视频一二三区 | 欧美不卡一区二区三区四区| 91麻豆国产精品久久| 国内精品国产三级国产a久久| 亚洲一区视频在线观看视频| 国产三级一区二区| 欧美高清激情brazzers| 91香蕉视频mp4| 国产精品自在欧美一区| 青青草国产精品亚洲专区无| 亚洲色图都市小说| 日本一区二区视频在线| 日韩色视频在线观看| 欧美影院精品一区| 成人18精品视频| 国内精品视频666| 日本伊人午夜精品| 亚洲国产毛片aaaaa无费看| 国产精品视频看| 欧美xxx久久| 9191精品国产综合久久久久久 | 日韩视频在线观看一区二区| 欧美在线不卡一区| 99re66热这里只有精品3直播 | 不卡影院免费观看| 狠狠色综合色综合网络| 日本成人在线不卡视频| 亚洲第一会所有码转帖| 一区二区三区色| 亚洲女同一区二区| 专区另类欧美日韩| 中文子幕无线码一区tr| 久久免费午夜影院| 精品欧美一区二区三区精品久久| 欧美久久久久久久久中文字幕| 欧美在线观看你懂的| 91毛片在线观看| 91美女在线视频| 一本久久a久久精品亚洲|