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

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

?? parset.c

?? jm_frext22.ZIP的壓縮文件,主要用于嵌入式系統圖象的編解碼的開發.
?? C
?? 第 1 頁 / 共 3 頁
字號:

/*!
 **************************************************************************************
 * \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;
  int frext_profile = ((IdentifyProfile()==FREXT_HP) || 
                      (IdentifyProfile()==FREXT_Hi10P) ||
                      (IdentifyProfile()==FREXT_Hi422) ||
                      (IdentifyProfile()==FREXT_Hi444));

  // *************************************************************************
  // 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;
  sps->constrained_set3_flag = 0; // HB 10062004

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

  // Fidelity Range Extensions stuff
  sps->bit_depth_luma_minus8   = input->BitDepthLuma - 8;
  sps->bit_depth_chroma_minus8 = input->BitDepthChroma - 8;
  img->lossless_qpprime_flag = input->lossless_qpprime_y_zero_flag & (sps->profile_idc==FREXT_Hi444); // S.SUN 06072004
  img->residue_transform_flag = input->residue_transform_flag; // WSKIM SAMSUNG AIT
  
  //! 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 = (input->rgb_input_flag && input->yuv_format==3);  // S.SUN 18072004

  {
    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);

  // Fidelity Range Extensions stuff
  // HB 10062004 start
  if(frext_profile)
  {
    pps->transform_8x8_mode_flag = input->AllowTransform8x8 ? 1:0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲美洲综合色网| 欧美亚洲免费在线一区| 亚洲蜜臀av乱码久久精品| 欧美日韩国产在线观看| 国产毛片精品视频| 一二三四区精品视频| 成人免费毛片a| 麻豆成人av在线| 99精品欧美一区二区蜜桃免费| 亚洲成在线观看| 国产精品久久一卡二卡| 日韩一区二区三区av| 色www精品视频在线观看| 国内国产精品久久| 日日噜噜夜夜狠狠视频欧美人| 国产精品乱码一区二三区小蝌蚪| 欧美一级黄色录像| 欧美日韩免费高清一区色橹橹 | 亚洲一二三四在线观看| 日韩免费在线观看| 欧美午夜一区二区三区| kk眼镜猥琐国模调教系列一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 91丨九色porny丨蝌蚪| 精品一区二区日韩| 日本亚洲电影天堂| 亚洲不卡av一区二区三区| 亚洲欧美综合色| 国产亚洲精品超碰| 成人黄色在线视频| 国产美女一区二区| 精品一区二区三区免费视频| 亚洲国产日日夜夜| 26uuu久久天堂性欧美| 欧美成人精品3d动漫h| 69精品人人人人| 在线观看一区二区视频| 91网页版在线| 99精品在线免费| av在线不卡观看免费观看| 成人午夜在线免费| 精品国精品自拍自在线| 国产白丝网站精品污在线入口| 久久99国产精品免费| 免费精品99久久国产综合精品| 无码av免费一区二区三区试看| 亚洲福利视频导航| 视频一区二区中文字幕| 日韩精品电影在线| 麻豆91在线播放| 九色porny丨国产精品| 久久97超碰色| 国产高清不卡二三区| 成人性生交大片免费看中文| 成人黄页毛片网站| 91国模大尺度私拍在线视频| 欧美综合在线视频| 69久久99精品久久久久婷婷| 日韩美女一区二区三区四区| av在线一区二区| 在线欧美日韩国产| 欧美精品乱人伦久久久久久| 欧美一二区视频| 久久视频一区二区| 国产日产亚洲精品系列| 欧美一区二区高清| 久久久久久久久久久黄色| 国产蜜臀av在线一区二区三区| 一色桃子久久精品亚洲| 亚洲午夜在线视频| 日本不卡1234视频| 国产成人精品1024| 欧美性色黄大片| wwww国产精品欧美| 亚洲欧洲一区二区在线播放| 一区二区三区在线视频免费| 日本不卡一区二区三区高清视频| 激情久久久久久久久久久久久久久久| 国产不卡视频一区二区三区| 欧美性大战久久久久久久蜜臀| 91精品国产综合久久香蕉的特点 | 国产精品小仙女| 91玉足脚交白嫩脚丫在线播放| 欧美日韩三级视频| 久久久久久免费| 亚洲女同ⅹxx女同tv| 美女性感视频久久| 99久久婷婷国产| 欧美一区二区三区在线电影 | 91精品国产乱码| 久久蜜桃一区二区| 亚洲精品老司机| 激情国产一区二区| 在线观看日韩电影| 婷婷一区二区三区| 国产清纯白嫩初高生在线观看91| 一区二区三区四区亚洲| 黑人巨大精品欧美一区| 91色在线porny| 精品处破学生在线二十三| 亚洲精选视频免费看| 韩国av一区二区三区四区| 成人免费在线视频| 中文字幕一区二区不卡| 日本伊人精品一区二区三区观看方式| 成人手机电影网| 这里只有精品视频在线观看| 1024亚洲合集| 国产乱子伦一区二区三区国色天香| 色哦色哦哦色天天综合| 久久精品一区二区| 日本va欧美va精品| 欧美中文字幕一二三区视频| 国产日韩欧美在线一区| 蜜桃传媒麻豆第一区在线观看| 色偷偷一区二区三区| 日本一区二区三区高清不卡| 久久精品国产澳门| 欧美三电影在线| 亚洲精品国产成人久久av盗摄| 国产精品主播直播| 精品国产乱子伦一区| 午夜av电影一区| 麻豆中文一区二区| 欧美另类变人与禽xxxxx| 亚洲免费在线看| 成人激情校园春色| 国产婷婷精品av在线| 国内精品写真在线观看| 日韩欧美国产三级| 日本美女视频一区二区| 波多野结衣在线aⅴ中文字幕不卡| 精品嫩草影院久久| 久久成人精品无人区| 7777精品伊人久久久大香线蕉经典版下载| 亚洲男人的天堂在线aⅴ视频| a4yy欧美一区二区三区| 成人av免费观看| 色噜噜狠狠成人网p站| 18成人在线视频| av成人老司机| 亚洲女同女同女同女同女同69| 99re亚洲国产精品| 亚洲三级视频在线观看| 91日韩一区二区三区| 尤物在线观看一区| 精品视频免费在线| 午夜欧美大尺度福利影院在线看| 欧美日韩色一区| 秋霞电影网一区二区| 日韩精品影音先锋| 国产精品中文字幕欧美| 中文av一区二区| 一本一道久久a久久精品 | 日韩精品一二三区| 91麻豆精品国产91久久久久久久久 | 亚洲蜜臀av乱码久久精品| 在线欧美日韩精品| 五月婷婷综合在线| 欧美videossexotv100| 韩国精品主播一区二区在线观看| 精品美女一区二区| 日韩国产精品久久| 2021中文字幕一区亚洲| 国产精品99久久久久久久vr | 国产精品久久久久一区二区三区| av一本久道久久综合久久鬼色| 亚洲视频在线一区| 欧美日本韩国一区| 国内精品视频666| 亚洲三级理论片| 欧美精品乱人伦久久久久久| 国内久久婷婷综合| 亚洲色图视频网站| 91精品国产欧美一区二区18| 国产成人午夜精品5599| 亚洲老司机在线| 欧美r级在线观看| 成人av在线资源网站| 亚洲图片一区二区| 久久在线观看免费| 欧美中文字幕久久| 国产一区二区三区在线看麻豆| 亚洲素人一区二区| 日韩一二在线观看| 91在线porny国产在线看| 欧美a级理论片| 欧美日韩黄视频| 懂色av中文字幕一区二区三区| 一区二区三区高清不卡| 精品国产乱码久久久久久久| 一本一道综合狠狠老| 国产在线播放一区| 亚洲一区二区在线免费观看视频| 337p日本欧洲亚洲大胆精品| 91福利资源站| 国产伦精一区二区三区| 亚洲国产美国国产综合一区二区| 久久久噜噜噜久久人人看 | www.欧美日韩|