亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲乱码一区二区三区在线观看| 99re热视频这里只精品| 日本视频一区二区三区| 国产在线国偷精品产拍免费yy| 午夜精品福利一区二区蜜股av| 久国产精品韩国三级视频| 不卡av在线网| 欧美日韩国产高清一区二区| 91国在线观看| 国产精品私人影院| 欧美影院午夜播放| 久久久午夜电影| 首页亚洲欧美制服丝腿| 欧美亚洲一区二区在线| 欧美日韩黄色一区二区| 《视频一区视频二区| 狠狠色狠狠色综合系列| 成人av在线观| 久久久蜜臀国产一区二区| 精品在线你懂的| 久久久久久影视| 亚洲黄色性网站| fc2成人免费人成在线观看播放| 69堂成人精品免费视频| 日韩欧美电影在线| 人人狠狠综合久久亚洲| 4438x成人网最大色成网站| 亚洲一区二区三区视频在线播放| 国产精品一色哟哟哟| 26uuu成人网一区二区三区| 老司机午夜精品| av电影天堂一区二区在线| 精品福利视频一区二区三区| 国产一区激情在线| 国产精品久久久久影院老司| av不卡在线观看| 亚洲免费电影在线| 欧美精选午夜久久久乱码6080| 亚洲欧美日韩精品久久久久| 91黄视频在线| 久久精品国产秦先生| 日本一区二区动态图| 一本到不卡精品视频在线观看| 亚洲综合无码一区二区| 欧美成人bangbros| 一二三区精品福利视频| 日韩精品自拍偷拍| 色婷婷久久久久swag精品| 制服丝袜亚洲精品中文字幕| 欧美精品一卡两卡| 精品一区二区三区久久| 国产清纯白嫩初高生在线观看91| 国产精品一区二区久久不卡 | 一个色综合网站| 在线播放一区二区三区| 亚洲国产综合人成综合网站| 欧美精品在线观看播放| 六月丁香综合在线视频| 中文字幕永久在线不卡| 成人v精品蜜桃久久一区| 日韩国产精品久久| 亚洲在线中文字幕| 国产精品日日摸夜夜摸av| 欧美一级精品大片| 色狠狠色噜噜噜综合网| 久久精品国产99国产精品| 亚洲美女免费视频| 国产精品福利影院| 欧美高清视频不卡网| 欧美专区亚洲专区| 成人app在线观看| 国产精品456露脸| 欧美国产乱子伦| 久久免费精品国产久精品久久久久 | 亚洲色欲色欲www在线观看| 欧美成人video| 欧美成人欧美edvon| 久久综合色鬼综合色| 精品蜜桃在线看| 久久精品一区二区三区四区| 精品噜噜噜噜久久久久久久久试看 | 黄色日韩三级电影| 国产91高潮流白浆在线麻豆| 国产黄色精品网站| 韩国女主播成人在线| 久久精品国产久精国产爱| 国产精品88av| 欧美在线视频全部完| 日韩视频一区二区三区| 91色porny在线视频| 欧美日韩电影一区| 日韩一级大片在线观看| 久久久久久久久99精品| 日韩欧美色电影| 国产精品国产自产拍高清av | 精品视频一区三区九区| 成人性视频免费网站| 欧美情侣在线播放| 久久久久久亚洲综合影院红桃| 一区二区成人在线| 久久久www成人免费毛片麻豆 | 国产午夜精品一区二区三区嫩草 | 免费成人你懂的| 99riav一区二区三区| 日韩一区二区高清| 一区二区在线电影| 国产一区二区三区四区五区美女 | 久久综合久久综合久久| 亚洲福利一二三区| 91麻豆自制传媒国产之光| 欧美日韩在线直播| 亚洲免费电影在线| 婷婷综合另类小说色区| 国产一区二区精品久久91| 色综合久久中文字幕综合网| 国产网站一区二区| 欧美激情一区二区三区蜜桃视频| 亚洲乱码精品一二三四区日韩在线| 色婷婷亚洲一区二区三区| 麻豆精品久久久| 自拍偷在线精品自拍偷无码专区| 欧美性受xxxx| 成人h版在线观看| 五月激情综合网| 欧美一区二区三区影视| 国产精品1区2区| 日韩av网站在线观看| 亚洲欧洲色图综合| 欧美mv日韩mv| 欧美视频完全免费看| 99久久精品国产观看| 国产一区二区三区综合| 日韩精品成人一区二区在线| 国产精品毛片久久久久久| 日韩欧美另类在线| 欧美午夜一区二区| 色婷婷久久久综合中文字幕| 粉嫩绯色av一区二区在线观看| 日韩成人一区二区| 亚洲综合在线视频| 1024精品合集| 国产精品久99| 国产精品国产三级国产三级人妇 | 丁香一区二区三区| 国产一区二区三区免费观看| 精品午夜一区二区三区在线观看| 偷拍亚洲欧洲综合| 日本午夜一区二区| 蜜桃视频一区二区三区| 日本欧美久久久久免费播放网| 亚洲国产欧美一区二区三区丁香婷| 一区二区三区四区乱视频| 亚洲三级在线免费| 亚洲美女区一区| 视频精品一区二区| 精品在线观看免费| 国产aⅴ综合色| 色婷婷av一区二区三区软件| 欧美日韩中文字幕精品| 日韩亚洲欧美在线观看| 中文欧美字幕免费| 日本一区二区三级电影在线观看 | 一二三四社区欧美黄| 亚洲一区自拍偷拍| 久久99久久精品欧美| 成人av影院在线| 欧美欧美欧美欧美| 久久嫩草精品久久久精品一| 国产精品久久久久久久蜜臀| 亚洲综合自拍偷拍| 国产精品夜夜爽| 欧美天堂亚洲电影院在线播放| 日韩欧美你懂的| 亚洲一区二区精品久久av| 国产在线精品免费| 一本色道亚洲精品aⅴ| 337p粉嫩大胆噜噜噜噜噜91av| 中文字幕综合网| 国产成人精品aa毛片| 欧美视频第二页| 中文字幕人成不卡一区| 日韩高清一级片| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 久久精品国产网站| 欧美日韩一区不卡| 亚洲欧美日韩综合aⅴ视频| 国内成人精品2018免费看| 91精品欧美综合在线观看最新| 国产偷国产偷亚洲高清人白洁| 日韩成人dvd| 欧美日韩一区成人| 午夜视频在线观看一区二区| 成人黄色国产精品网站大全在线免费观看 | 日韩在线一区二区| 欧美人狂配大交3d怪物一区| 三级久久三级久久久| 在线播放91灌醉迷j高跟美女 | 欧美色手机在线观看| 丝袜a∨在线一区二区三区不卡| 欧美群妇大交群的观看方式|