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

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

?? lencod.c

?? jm_frext22.ZIP的壓縮文件,主要用于嵌入式系統圖象的編解碼的開發.
?? 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 8.6 (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-Lang鴜               <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>
 *   - Karsten Suehring                <suehring@hhi.de>
 *   - Valeri George                   <george@hhi.de>
 ***********************************************************************
 */

#include "contributors.h"

#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/timeb.h>
#include <stdlib.h>
#if defined WIN32
  #include <conio.h>
#endif
#include <assert.h>

#include "global.h"
#include "configfile.h"
#include "leaky_bucket.h"
#include "memalloc.h"
#include "mbuffer.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"

#define JM      "FREXT"
#define VERSION "8.6"
#define EXT_VERSION "2.2"

InputParameters inputs, *input = &inputs;
ImageParameters images, *img   = &images;
StatParameters  stats,  *stat  = &stats;
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_stat = p_log = p_trace = NULL;

  frame_statistic_start = 1;

  Configure (argc, argv);

  Init_QMatrix();

  AllocNalPayloadBuffer();

  init_poc();
  GenerateParameterSets();

  init_img();

  frame_pic = malloc_picture();

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

  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)
  stat->bit_ctr_parametersets = 0;
  stat->bit_slice = start_sequence();
  stat->bit_ctr_parametersets += stat->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->successive_Bframe+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->StoredBPictures == 0 || input->successive_Bframe == 0 || img->number < 2)
      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->StoredBPictures)
    {
      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

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

    if ((input->successive_Bframe != 0) && (IMG_NUMBER > 0)) // B-frame(s) to encode
    {
      img->type = B_SLICE;            // set image type to B-frame

      if (input->NumFramesInELSubSeq == 0) 
        img->layer = 0;
      else 
        img->layer = 1;

      if (input->StoredBPictures == 0 )
      {
      img->frame_num++;                 //increment frame_num once for B-frames
        img->frame_num %= (1 << (log2_max_frame_num_minus4 + 4));
      }
      img->nal_reference_idc = 0;     

      for(img->b_frame_to_code=1; img->b_frame_to_code<=input->successive_Bframe; img->b_frame_to_code++)
      {

        img->nal_reference_idc = 0;     
        if (input->StoredBPictures == 1 )

        {
          img->nal_reference_idc = 1;
          img->frame_num++;                 //increment frame_num once for B-frames
          img->frame_num %= (1 << (log2_max_frame_num_minus4 + 4));
        }

        //! somewhere here the disposable flag was set -- B frames are always disposable in this encoder.
        //! This happens now in slice.c, terminate_slice, where the nal_reference_idc is set up
        //poc for this B frame
        img->toppoc = 2 + (input->intra_period && input->idr_enable ? (IMG_NUMBER% input->intra_period)-1 : IMG_NUMBER-1)*(2*(input->successive_Bframe+1)) + 2* (img->b_frame_to_code-1);
  
        if ((input->PicInterlace==FRAME_CODING)&&(input->MbInterlace==FRAME_CODING))
          img->bottompoc = img->toppoc;     //progressive
        else 
          img->bottompoc = img->toppoc+1;
        
        img->framepoc = min (img->toppoc, img->bottompoc);

        //the following is sent in the slice header
        if (!input->StoredBPictures)
        {
          img->delta_pic_order_cnt[0]= 2*(img->b_frame_to_code-1);
        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品婷婷国产综合久久竹菊| 欧美日韩高清在线播放| 91蝌蚪porny| 国产日韩综合av| 久久av资源站| 久久久国产精华| 国产一区二区三区在线观看免费| 欧美一区二区三区人| 日韩精品国产欧美| 91精品国产欧美一区二区| 亚洲一级在线观看| 欧美视频在线播放| 午夜精品一区在线观看| 99re这里只有精品视频首页| 国产精品欧美极品| 91香蕉视频黄| 亚洲成年人网站在线观看| 欧美色图第一页| 天堂久久久久va久久久久| 9191久久久久久久久久久| 亚洲福利一二三区| 日韩欧美激情在线| 日本不卡视频在线| 精品久久五月天| 福利一区二区在线| 综合久久久久久| 欧美精品v国产精品v日韩精品 | 日韩一区二区视频| 麻豆精品国产传媒mv男同| 3d成人动漫网站| 久久 天天综合| 国产欧美日韩不卡| 波多野洁衣一区| 亚洲国产一区二区在线播放| 色88888久久久久久影院野外 | 欧美影院精品一区| 日韩av网站在线观看| 国产无遮挡一区二区三区毛片日本| 粉嫩在线一区二区三区视频| 亚洲欧美区自拍先锋| 欧美一区二区三区色| 成人国产精品免费观看视频| 亚洲永久免费视频| 2017欧美狠狠色| 成人h精品动漫一区二区三区| 一区二区三区 在线观看视频| 欧美精品久久天天躁| 国产成人免费在线观看| 亚洲自拍另类综合| 久久久99精品久久| 欧美日韩国产综合一区二区三区| 麻豆视频一区二区| 亚洲欧美日韩国产综合在线| 欧美日韩不卡一区| 成人国产精品视频| 久久精品国产亚洲一区二区三区| 欧美α欧美αv大片| 色偷偷88欧美精品久久久| 另类中文字幕网| 国产亚洲综合性久久久影院| 欧美日韩mp4| 日本大香伊一区二区三区| 91最新地址在线播放| 成人在线综合网站| 国产精品123| 国产精品一卡二| 国内精品伊人久久久久av影院| 午夜视频一区二区三区| 亚洲线精品一区二区三区八戒| 国产精品狼人久久影院观看方式| 精品乱码亚洲一区二区不卡| 欧美一级午夜免费电影| 欧美日韩不卡一区二区| 欧美日韩精品一区二区三区 | 91蝌蚪porny九色| 91丨九色丨蝌蚪丨老版| 99在线精品免费| 91香蕉国产在线观看软件| av中文字幕一区| 91视频一区二区| 一本一本大道香蕉久在线精品 | 欧美成人免费网站| 91精品国产色综合久久| 日韩三级在线免费观看| 精品久久久久久久久久久久久久久 | 狠狠色综合日日| 韩国毛片一区二区三区| 国产精品一区在线观看乱码| 黄色精品一二区| 国产91在线看| 色屁屁一区二区| 欧美性大战久久| 7777精品伊人久久久大香线蕉的 | 久久久.com| 国产亚洲美州欧州综合国| 国产欧美日韩视频在线观看| 国产欧美一区二区三区网站| |精品福利一区二区三区| 亚洲精品欧美激情| 亚洲午夜久久久久| 日本女优在线视频一区二区| 精品一区二区三区久久| 国产成人综合视频| 成人av第一页| 在线亚洲免费视频| 91精品国产入口| 国产精品人人做人人爽人人添| 亚洲色图欧美激情| 日韩和欧美的一区| 成人国产电影网| 欧美美女直播网站| 26uuu精品一区二区三区四区在线| 国产欧美日韩精品一区| 午夜激情久久久| 国产不卡视频一区| 91精品福利视频| 日韩欧美的一区二区| 国产精品卡一卡二卡三| 婷婷国产在线综合| 不卡电影一区二区三区| 欧美二区在线观看| 国产欧美日韩麻豆91| 视频精品一区二区| 国产福利一区二区三区视频在线 | 国产激情偷乱视频一区二区三区| 99精品国产91久久久久久| 在线电影院国产精品| 欧美国产激情一区二区三区蜜月| 亚洲一线二线三线视频| 国产一区啦啦啦在线观看| 91久久精品一区二区三| 国产欧美一区二区精品性色超碰| 一区二区三区精品视频在线| 国产一区二区三区免费| 欧美顶级少妇做爰| 国产精品夫妻自拍| 韩国女主播成人在线| 91精品国产黑色紧身裤美女| 亚洲欧洲精品天堂一级| 韩国一区二区视频| 91麻豆精品国产91久久久更新时间 | 久久综合综合久久综合| 欧洲av在线精品| 国产精品狼人久久影院观看方式| 另类小说图片综合网| 欧美精品1区2区| 伊人一区二区三区| 91丨porny丨蝌蚪视频| 久久精品夜夜夜夜久久| 麻豆久久久久久| 91福利在线观看| 亚洲欧美中日韩| 播五月开心婷婷综合| 国产欧美日韩综合精品一区二区| 久久超级碰视频| 欧美一区二区视频网站| 午夜电影一区二区三区| 欧美日韩一区二区三区四区| 亚洲精品成人悠悠色影视| 成人av网站在线| 日韩一区有码在线| 91在线高清观看| 一色桃子久久精品亚洲| 99久久精品情趣| 中文字幕综合网| av一区二区三区| 国产精品二三区| 成人av中文字幕| 中文字幕日韩av资源站| 91视频一区二区| 一区二区三区在线视频观看| 色婷婷综合久久久久中文| 国产精品国产三级国产aⅴ中文 | 国产成人免费9x9x人网站视频| 日韩欧美一级二级三级久久久| 婷婷久久综合九色综合绿巨人| 欧美二区三区91| 激情都市一区二区| 国产精品色在线观看| gogo大胆日本视频一区| 日韩一区有码在线| 欧美性受xxxx黑人xyx| 天天免费综合色| 精品欧美一区二区三区精品久久| 经典一区二区三区| 亚洲国产经典视频| 色乱码一区二区三区88| 五月天激情综合| 久久嫩草精品久久久久| 91亚洲资源网| 日韩电影免费在线观看网站| 精品国产凹凸成av人网站| 国产精华液一区二区三区| 依依成人精品视频| 日韩三级在线观看| www.欧美日韩国产在线| 亚洲亚洲精品在线观看| 久久人人97超碰com| 99国产精品久久久久久久久久久| 亚洲在线观看免费视频|