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

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

?? lencod.c

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

/*!
 ***********************************************************************
 *  \mainpage
 *     This is the H.264/AVC encoder reference software. For detailed documentation
 *     see the comments in each file.
 *
 *  \author
 *     The main contributors are listed in contributors.h
 *
 *  \version
 *     JM 9.2 (FRExt)
 *
 *  \note
 *     tags are used for document system "doxygen"
 *     available at http://www.doxygen.org
 */
/*!
 *  \file
 *     lencod.c
 *  \brief
 *     H.264/AVC reference encoder project main()
 *  \author
 *   Main contributors (see contributors.h for copyright, address and affiliation details)
 *   - Inge Lille-Langoy               <inge.lille-langoy@telenor.com>
 *   - Rickard Sjoberg                 <rickard.sjoberg@era.ericsson.se>
 *   - Stephan Wenger                  <stewe@cs.tu-berlin.de>
 *   - Jani Lainema                    <jani.lainema@nokia.com>
 *   - Byeong-Moon Jeon                <jeonbm@lge.com>
 *   - Yoon-Seong Soh                  <yunsung@lge.com>
 *   - Thomas Stockhammer              <stockhammer@ei.tum.de>
 *   - Detlev Marpe                    <marpe@hhi.de>
 *   - Guido Heising                   <heising@hhi.de>
 *   - Valeri George                   <george@hhi.de>
 *   - Karsten Suehring                <suehring@hhi.de>
 *   - Alexis Michael Tourapis         <alexis@mobilygen.com>
 ***********************************************************************
 */

#include "contributors.h"

#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/timeb.h>

#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#endif

#include "global.h"

#include "configfile.h"
#include "leaky_bucket.h"
#include "memalloc.h"
#include "intrarefresh.h"
#include "fmo.h"
#include "sei.h"
#include "parset.h"
#include "image.h"
#include "output.h"
#include "fast_me.h"
#include "ratectl.h"
#include "explicit_gop.h"

#define JM      "9 (FRExt)"
#define VERSION "9.2"
#define EXT_VERSION "(FRExt)"

InputParameters inputs,      *input = &inputs;			// 輸入參數
ImageParameters images,      *img   = &images;			
StatParameters  statistics,  *stats = &statistics;
SNRParameters   snrs,        *snr   = &snrs;
Decoders decoders, *decs=&decoders;


#ifdef _ADAPT_LAST_GROUP_
int initial_Bframes = 0;
#endif

Boolean In2ndIGOP = FALSE;
int    start_frame_no_in_this_IGOP = 0;
int    start_tr_in_this_IGOP = 0;
int    FirstFrameIn2ndIGOP=0;
int    cabac_encoding = 0;
int    frame_statistic_start;
extern ColocatedParams *Co_located;

void Init_Motion_Search_Module ();
void Clear_Motion_Search_Module ();
void report_frame_statistic();

/*!
 ***********************************************************************
 * \brief
 *    Main function for encoder.
 * \param argc
 *    number of command line arguments
 * \param argv
 *    command line arguments
 * \return
 *    exit code
 ***********************************************************************
 */
int main(int argc,char **argv)
{
  int M,N,n,np,nb;           //Rate control

  p_dec = p_in = -1;

  p_stat = p_log = p_trace = NULL;

  frame_statistic_start = 1;

  Configure (argc, argv);

  Init_QMatrix();

  Init_QOffsetMatrix();

  AllocNalPayloadBuffer();

  init_poc();
  GenerateParameterSets();

  init_img();

  frame_pic = malloc_picture();

  if (input->RDPictureDecision)
  {
    frame_pic2 = malloc_picture();
    frame_pic3 = malloc_picture();
  }

  if (input->PicInterlace != FRAME_CODING)
  {
    top_pic = malloc_picture();
    bottom_pic = malloc_picture();
  }
  init_rdopt ();

  if (input->PyramidCoding )
  {
      init_gop_structure();
      if (input->PyramidCoding == 3)
      {
        interpret_gop_structure();
      }
      else
      {
        create_pyramid();
      }
  }

  init_dpb(input);
  init_out_buffer();

  enc_picture = enc_frame_picture = enc_top_picture = enc_bottom_picture = NULL;

  init_global_buffers();
  create_context_memory ();

  Init_Motion_Search_Module ();

  information_init();

  //Rate control 
  if(input->RCEnable)
    rc_init_seq();

  if(input->FMEnable)
    DefineThreshold();

  // B pictures
  Bframe_ctr=0;
  tot_time=0;                 // time for total encoding session

#ifdef _ADAPT_LAST_GROUP_
  if (input->last_frame > 0)
    input->no_frames = 1 + (input->last_frame + input->jumpd) / (input->jumpd + 1);
  initial_Bframes = input->successive_Bframe;
#endif

  PatchInputNoFrames();

  // Write sequence header (with parameter sets)
  stats->bit_ctr_parametersets = 0;
  stats->bit_slice = start_sequence();
  stats->bit_ctr_parametersets += stats->bit_ctr_parametersets_n;
  start_frame_no_in_this_IGOP = 0;

  for (img->number=0; img->number < input->no_frames; img->number++)
  {
    img->nal_reference_idc = 1;

    //much of this can go in init_frame() or init_field()?
    //poc for this frame or field
    img->toppoc = (input->intra_period && input->idr_enable ? IMG_NUMBER % input->intra_period : IMG_NUMBER) * (2*(input->jumpd+1)); 

    if ((input->PicInterlace==FRAME_CODING)&&(input->MbInterlace==FRAME_CODING))
      img->bottompoc = img->toppoc;     //progressive
    else 
      img->bottompoc = img->toppoc+1;   //hard coded

    img->framepoc = min (img->toppoc, img->bottompoc);

    //frame_num for this frame
    //if (input->BRefPictures== 0 || input->successive_Bframe == 0 || img-> number < 2)
    if ((input->BRefPictures== 0 &&  input->PyramidCoding == 0) || input->successive_Bframe == 0 || img-> number < 2)// ||  input->PyramidCoding == 0)
      img->frame_num = (input->intra_period && input->idr_enable ? IMG_NUMBER % input->intra_period : IMG_NUMBER) % (1 << (log2_max_frame_num_minus4 + 4)); 
    else 
    {
      img->frame_num ++;
      if (input->intra_period && input->idr_enable)
      {
        if (0== (img->number % input->intra_period))
        {
          img->frame_num=0;
        }
      }
      img->frame_num %= (1 << (log2_max_frame_num_minus4 + 4)); 
    }
    
    //the following is sent in the slice header
    img->delta_pic_order_cnt[0]=0;

    if (input->BRefPictures)
    {
      if (img->number)
      {
        img->delta_pic_order_cnt[0]=+2 * input->successive_Bframe;
      }
    }

    SetImgType();

#ifdef _ADAPT_LAST_GROUP_
    if (input->successive_Bframe && input->last_frame && IMG_NUMBER+1 == input->no_frames)
    {                                           
      int bi = (int)((float)(input->jumpd+1)/(input->successive_Bframe+1.0)+0.499999);
      
      input->successive_Bframe = (input->last_frame-(img->number-1)*(input->jumpd+1))/bi-1;

      //about to code the last ref frame, adjust deltapoc         
      img->delta_pic_order_cnt[0]= -2*(initial_Bframes - input->successive_Bframe);
      img->toppoc += img->delta_pic_order_cnt[0];
      img->bottompoc += img->delta_pic_order_cnt[0];
    }
#endif

     //Rate control
    if (img->type == I_SLICE)
    {
      if(input->RCEnable)
      {
        if (input->intra_period == 0)
        {
          n = input->no_frames + (input->no_frames - 1) * input->successive_Bframe;
          
          /* number of P frames */
          np = input->no_frames-1; 
          
          /* number of B frames */
          nb = (input->no_frames - 1) * input->successive_Bframe;
        }else
        {
          N = input->intra_period*(input->successive_Bframe+1);
          M = input->successive_Bframe+1;
          n = (img->number==0) ? N - ( M - 1) : N;
          
          /* last GOP may contain less frames */
          if(img->number/input->intra_period >= input->no_frames / input->intra_period)
          {
            if (img->number != 0)
              n = (input->no_frames - img->number) + (input->no_frames - img->number - 1) * input->successive_Bframe + input->successive_Bframe;
            else
              n = input->no_frames  + (input->no_frames - 1) * input->successive_Bframe;
          }
          
          /* number of P frames */
          if (img->number == 0)
            np = (n + 2 * (M - 1)) / M - 1; /* first GOP */
          else
            np = (n + (M - 1)) / M - 1;
          
          /* number of B frames */
          nb = n - np - 1;
        }
        rc_init_GOP(np,nb);
      }
    }


    // which layer the image belonged to?
    if ( IMG_NUMBER % (input->NumFramesInELSubSeq+1) == 0 )
      img->layer = 0;
    else
      img->layer = 1;

    encode_one_frame(); // encode one I- or P-frame

    if (input->ReportFrameStats)
      report_frame_statistic();
    
    img->nb_references += 1;
    img->nb_references = min(img->nb_references, img->buf_cycle); // Tian Dong. PLUS1, +1, June 7, 2002

    encode_enhancement_layer();
    
    process_2nd_IGOP();
  }
  // terminate sequence
  terminate_sequence();

  flush_dpb();

  close(p_in);
  if (-1!=p_dec)
    close(p_dec);
  if (p_trace)
    fclose(p_trace);

  Clear_Motion_Search_Module ();

  RandomIntraUninit();
  FmoUninit();
  
  if (input->PyramidCoding)
    clear_gop_structure ();

  // free structure for rd-opt. mode decision
  clear_rdopt ();

#ifdef _LEAKYBUCKET_

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区综合| 亚洲成av人片| 亚洲一区二区三区四区五区中文| 亚洲成人一区在线| 国产精品一二二区| 欧美日韩国产首页| 国产精品传媒在线| 国内精品伊人久久久久av一坑| 色婷婷久久99综合精品jk白丝| 亚洲精品一线二线三线无人区| 亚洲成av人影院在线观看网| 成人性生交大片免费看视频在线| 制服丝袜亚洲色图| 亚洲成人av免费| 色婷婷久久综合| 国产精品欧美一级免费| 蜜臀va亚洲va欧美va天堂| 色狠狠一区二区三区香蕉| 国产女同互慰高潮91漫画| 五月婷婷综合在线| 欧美偷拍一区二区| 亚洲综合999| 在线免费不卡视频| 亚洲女人小视频在线观看| 成人黄色电影在线 | 成人免费一区二区三区视频 | 亚洲老妇xxxxxx| av一区二区三区在线| 久久久久久久av麻豆果冻| 美女诱惑一区二区| 日韩精品中文字幕在线一区| 男男gaygay亚洲| 欧美电影精品一区二区| 免费高清不卡av| 欧美电影免费观看高清完整版在线观看| 五月婷婷激情综合网| 欧美日韩国产天堂| 成人免费在线视频| 色国产精品一区在线观看| 亚洲女人小视频在线观看| 91视频一区二区| 一区二区三区中文字幕在线观看| 色综合久久综合| 亚洲成人精品影院| 欧美一二三区在线观看| 国产综合久久久久久鬼色| 久久久不卡影院| 成人禁用看黄a在线| 亚洲国产精品99久久久久久久久| 国产精一品亚洲二区在线视频| 日本一区二区久久| 色综合久久中文综合久久牛| 亚洲国产精品综合小说图片区| 777xxx欧美| 国产成人福利片| 一区二区在线观看不卡| 在线不卡中文字幕| 国产不卡在线播放| 国产精品久久久久影院亚瑟| 成人综合婷婷国产精品久久| 亚洲欧美日韩一区二区| 91精品蜜臀在线一区尤物| 国产一区二区不卡| 亚洲一区二区美女| 久久久久亚洲综合| 91福利国产成人精品照片| 麻豆国产精品官网| 中文字幕中文字幕在线一区| 欧美肥妇毛茸茸| 粉嫩av一区二区三区在线播放| 亚洲视频你懂的| 欧美日韩久久一区| 成人av电影在线观看| 亚洲电影第三页| 久久婷婷成人综合色| 日本韩国欧美在线| 国产综合成人久久大片91| 亚洲一区二区在线免费看| 久久午夜电影网| 色嗨嗨av一区二区三区| 精一区二区三区| 亚洲成av人片在线观看| 国产精品久久午夜| 2023国产精品视频| 在线综合+亚洲+欧美中文字幕| 成人深夜视频在线观看| 日本视频在线一区| 亚洲综合在线第一页| 国产亚洲精久久久久久| 69堂国产成人免费视频| 91伊人久久大香线蕉| 国产在线视频精品一区| 日本大胆欧美人术艺术动态| 亚洲欧洲av一区二区三区久久| 精品国精品自拍自在线| 777xxx欧美| 欧美剧在线免费观看网站| 色婷婷亚洲精品| jiyouzz国产精品久久| 国产精品亚洲午夜一区二区三区| 日韩高清不卡一区二区| 亚洲一区二区视频在线| 亚洲精品一二三区| 亚洲精品中文字幕在线观看| 国产精品国产精品国产专区不片| 久久久精品黄色| 久久精品亚洲乱码伦伦中文| 欧美一级高清片| 欧美一二三在线| 日韩一区二区三区视频| 91精品欧美综合在线观看最新 | 成人免费毛片app| 国产精品一区二区果冻传媒| 激情综合色播五月| 免费成人在线视频观看| 日产精品久久久久久久性色 | 亚洲免费观看高清完整版在线观看熊| 中文字幕乱码日本亚洲一区二区 | 亚洲午夜羞羞片| 午夜成人免费电影| 日韩av不卡在线观看| 久久精品国产秦先生| 狠狠色丁香婷婷综合久久片| 国产一区二区在线影院| 国产成+人+日韩+欧美+亚洲| 成人午夜碰碰视频| 91麻豆文化传媒在线观看| 欧美在线观看一区| 欧美一区二区三级| 久久久久免费观看| 亚洲另类在线视频| 亚洲成人动漫在线免费观看| 免费看精品久久片| 国产电影精品久久禁18| 9色porny自拍视频一区二区| 91激情在线视频| 日韩欧美中文字幕公布| 日韩欧美在线影院| 久久精品国产免费| 成人动漫一区二区在线| 色综合激情五月| 欧美视频一区在线| 精品乱人伦一区二区三区| 黄色日韩三级电影| 成人免费观看男女羞羞视频| 色综合久久综合网| 日韩女优av电影| 国产午夜一区二区三区| 国产精品成人在线观看| 五月天丁香久久| 国产精品一级片在线观看| 91久久精品国产91性色tv| 91精品欧美福利在线观看| 久久久噜噜噜久久中文字幕色伊伊| 自拍偷拍国产亚洲| 久久99久久久欧美国产| 91网页版在线| 欧美大片在线观看一区二区| 亚洲欧美日韩综合aⅴ视频| 乱中年女人伦av一区二区| 91麻豆国产自产在线观看| 日韩欧美国产午夜精品| 亚洲九九爱视频| 国产成人av影院| 91精品国产综合久久久久久 | 成人中文字幕电影| 51久久夜色精品国产麻豆| 亚洲欧洲av一区二区三区久久| 久久精品国产免费看久久精品| 91在线视频官网| 国产亚洲精品久| 美女网站一区二区| 欧美日免费三级在线| 中文字幕日韩一区| 国产黄色91视频| 欧美一区二区三区不卡| 亚洲国产精品视频| 91丨国产丨九色丨pron| 国产精品视频在线看| 久久99精品国产.久久久久| 欧美日本不卡视频| 一区二区三区四区高清精品免费观看| 东方欧美亚洲色图在线| 亚洲精品在线观| 日本91福利区| 777久久久精品| 日韩精品电影在线| 在线不卡的av| 一区二区三区四区高清精品免费观看| 成人av中文字幕| 国产精品成人免费| 不卡的av中国片| 成人欧美一区二区三区黑人麻豆| 成人做爰69片免费看网站| 国产亚洲自拍一区| 成人精品一区二区三区中文字幕| 久久久噜噜噜久噜久久综合| 国产精品888| 国产精品伦一区| 色综合久久88色综合天天|