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

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

?? image.c

?? 一個簡單的視頻會議VC++MFC工程文件
?? C
?? 第 1 頁 / 共 5 頁
字號:
 */
void field_picture (Picture *top, Picture *bottom)
{
  //Rate control
  int old_pic_type;              // picture type of top field used for rate control    
  int TopFieldBits;
  
  //Rate control
  old_pic_type = img->type;

  stats->em_prev_bits_fld = 0;
  stats->em_prev_bits = &stats->em_prev_bits_fld;
  img->number *= 2;
  img->buf_cycle *= 2;
  img->height = (input->img_height+img->auto_crop_bottom) / 2; 
  img->height_cr = img->height_cr_frame / 2;
  img->fld_flag = 1;
  img->PicSizeInMbs = img->FrameSizeInMbs/2;
  // Top field
  
//  img->bottom_field_flag = 0;
  enc_top_picture  = alloc_storable_picture (img->structure, img->width, img->height, img->width_cr, img->height_cr);
  enc_top_picture->poc=img->toppoc;
  enc_top_picture->frame_poc = img->toppoc;
  enc_top_picture->pic_num = img->frame_num;
  enc_top_picture->frame_num = img->frame_num;
  enc_top_picture->coded_frame = 0;
  enc_top_picture->MbaffFrameFlag = img->MbaffFrameFlag = FALSE;
  img->ThisPOC = img->toppoc;
  
  img->structure = TOP_FIELD;
  enc_picture = enc_top_picture;
  copy_params();

  put_buffer_top ();
  init_field ();
  if (img->type == B_SLICE)       //all I- and P-frames
    nextP_tr_fld--;


  img->fld_flag = 1;
//  img->bottom_field_flag = 0;
 
  //Rate control
  if(input->RCEnable)
  {
    img->BasicUnit=input->basicunit;

    if(input->PicInterlace==FIELD_CODING)
      rc_init_pict(0,1,1); 
    else
      rc_init_pict(0,1,0);

    img->qp  = updateQuantizationParameter(1); 
   }
  img->TopFieldFlag=1;

  code_a_picture(top_pic);
  enc_picture->structure = 1;
    
  store_picture_in_dpb(enc_top_picture);

  top->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);

  //Rate control
  TopFieldBits=top->bits_per_picture;

  //  Bottom field
//  img->bottom_field_flag = 0;
  enc_bottom_picture  = alloc_storable_picture (img->structure, img->width, img->height, img->width_cr, img->height_cr);
  enc_bottom_picture->poc=img->bottompoc;
  enc_bottom_picture->frame_poc = img->bottompoc;
  enc_bottom_picture->pic_num = img->frame_num;
  enc_bottom_picture->frame_num = img->frame_num;
  enc_bottom_picture->coded_frame = 0;
  enc_bottom_picture->MbaffFrameFlag = img->MbaffFrameFlag = FALSE;
  img->ThisPOC = img->bottompoc;
  img->structure = BOTTOM_FIELD;
  enc_picture = enc_bottom_picture;
  copy_params();
  put_buffer_bot ();
  img->number++;

  init_field ();

  if (img->type == B_SLICE)       //all I- and P-frames
    nextP_tr_fld++;             //check once coding B field

 if (img->type == I_SLICE && input->IntraBottom!=1)
    img->type = P_SLICE;

  img->fld_flag = 1;
//  img->bottom_field_flag = 1;

  //Rate control
  if(input->RCEnable)  setbitscount(TopFieldBits);
  if(input->RCEnable)
  {
    rc_init_pict(0,0,0); 
    img->qp  = updateQuantizationParameter(0); 
  }
  img->TopFieldFlag=0;

  enc_picture->structure = 2;
  code_a_picture(bottom_pic);

  bottom->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);

  // the distortion for a field coded frame (consisting of top and bottom field)
  // lives in the top->distortion varaibles, thye bottom-> are dummies
  distortion_fld (&top->distortion_y, &top->distortion_u, &top->distortion_v);

}


/*!
 ************************************************************************
 * \brief
 *    Distortion Field
 ************************************************************************
 */
static void distortion_fld (float *dis_fld_y, float *dis_fld_u, float *dis_fld_v)
{

  img->number /= 2;
  img->buf_cycle /= 2;
  img->height = (input->img_height+img->auto_crop_bottom);
  img->height_cr = img->height_cr_frame;
  img->total_number_mb =
    (img->width * img->height) / (MB_BLOCK_SIZE * MB_BLOCK_SIZE);

  combine_field ();

  imgY_org = imgY_org_frm;
  imgUV_org = imgUV_org_frm;

  find_distortion (snr, img);   // find snr from original frame picture

  *dis_fld_y = snr->snr_y;
  *dis_fld_u = snr->snr_u;
  *dis_fld_v = snr->snr_v;
}


/*!
 ************************************************************************
 * \brief
 *    Picture Structure Decision
 ************************************************************************
 */
static int picture_structure_decision (Picture *frame, Picture *top, Picture *bot)
{
  double lambda_picture;
  int bframe = (img->type == B_SLICE);
  float snr_frame, snr_field;
  int bit_frame, bit_field;

  lambda_picture = 0.85 * pow (2, img->bitdepth_lambda_scale + ((img->qp - SHIFT_QP) / 3.0)) * (bframe ? 4 : 1);
  
  snr_frame = frame->distortion_y + frame->distortion_u + frame->distortion_v;
  //! all distrortions of a field picture are accumulated in the top field
  snr_field = top->distortion_y + top->distortion_u + top->distortion_v;
  bit_field = top->bits_per_picture + bot->bits_per_picture;
  bit_frame = frame->bits_per_picture;

  return decide_fld_frame (snr_frame, snr_field, bit_field, bit_frame, lambda_picture);
}


/*!
 ************************************************************************
 * \brief
 *    Field Mode Buffer
 ************************************************************************
 */
static void field_mode_buffer (int bit_field, float snr_field_y, float snr_field_u, float snr_field_v)
{
  put_buffer_frame ();

  snr->snr_y = snr_field_y;
  snr->snr_u = snr_field_u;
  snr->snr_v = snr_field_v;
}


/*!
 ************************************************************************
 * \brief
 *    Frame Mode Buffer
 ************************************************************************
 */
static void frame_mode_buffer (int bit_frame, float snr_frame_y, float snr_frame_u, float snr_frame_v)
{
  put_buffer_frame ();

  if ((input->PicInterlace != FRAME_CODING)||(input->MbInterlace != FRAME_CODING))
  {
    img->height = img->height / 2;
    img->height_cr = img->height_cr / 2;
    img->number *= 2;
    
    put_buffer_top ();
     
    img->number++;
    put_buffer_bot ();
    
    img->number /= 2;         // reset the img->number to field
    img->height = (input->img_height+img->auto_crop_bottom);
    img->height_cr = img->height_cr_frame;
    img->total_number_mb =
      (img->width * img->height) / (MB_BLOCK_SIZE * MB_BLOCK_SIZE);
    
    snr->snr_y = snr_frame_y;
    snr->snr_u = snr_frame_u;
    snr->snr_v = snr_frame_v;
    put_buffer_frame ();
    
  }
}


/*!
 ************************************************************************
 * \brief
 *    mmco initializations should go here
 ************************************************************************
 */
static void init_dec_ref_pic_marking_buffer()
{
  img->dec_ref_pic_marking_buffer=NULL;
}


/*!
 ************************************************************************
 * \brief
 *    Initializes the parameters for a new frame
 ************************************************************************
 */
static void init_frame ()
{
  int i;
  int prevP_no, nextP_no;
  
  last_P_no = last_P_no_frm;

  img->current_mb_nr = 0;
  img->current_slice_nr = 0;
  stats->bit_slice = 0;

  img->mb_y = img->mb_x = 0;
  img->block_y = img->pix_y = img->pix_c_y = 0; 
  img->block_x = img->pix_x = img->block_c_x = img->pix_c_x = 0;

  // The 'slice_nr' of each macroblock is set to -1 here, to guarantee the correct encoding 
  // with FMO (if no FMO, encoding is correct without following assignment), 
  // for which MBs may not be encoded with scan order
  for(i=0;i< ((img->width/MB_BLOCK_SIZE)*(img->height/MB_BLOCK_SIZE));i++)
    img->mb_data[i].slice_nr=-1;
	
  //if (img->type != B_SLICE)
  if (img->b_frame_to_code == 0)
  {
    img->tr = start_tr_in_this_IGOP + IMG_NUMBER * (input->jumpd + 1);
    
    img->imgtr_last_P_frm = img->imgtr_next_P_frm;
    img->imgtr_next_P_frm = img->tr;
    
#ifdef _ADAPT_LAST_GROUP_
    if (input->last_frame && img->number + 1 == input->no_frames)
      img->tr = input->last_frame;
#endif
    
    if (IMG_NUMBER != 0 && input->successive_Bframe != 0)     // B pictures to encode
      nextP_tr_frm = img->tr;
    
    //Rate control
    if(!input->RCEnable)                  // without using rate control
    {
      if (img->type == I_SLICE)
#ifdef _CHANGE_QP_
        if (input->qp2start > 0 && img->tr >= input->qp2start)
          img->qp = input->qp02;
        else
#endif    
        img->qp = input->qp0;   // set quant. parameter for I-frame
      else
      {
#ifdef _CHANGE_QP_
        if (input->qp2start > 0 && img->tr >= input->qp2start)
          img->qp = input->qpN2;
        else
#endif
          img->qp = input->qpN;
        
        if (img->type == SP_SLICE)
        {
          img->qp = input->qpsp;
          img->qpsp = input->qpsp_pred;
        }   
      }
    }

    img->mb_y_intra = img->mb_y_upd;  //  img->mb_y_intra indicates which GOB to intra code for this frame
    
    if (input->intra_upd > 0) // if error robustness, find next GOB to update
    {
      img->mb_y_upd = (IMG_NUMBER / input->intra_upd) % (img->height / MB_BLOCK_SIZE);
    }
  }
  else
  {
    img->p_interval = input->jumpd + 1;
    prevP_no = start_tr_in_this_IGOP + (IMG_NUMBER - 1) * img->p_interval;
    nextP_no = start_tr_in_this_IGOP + (IMG_NUMBER) * img->p_interval;
    
#ifdef _ADAPT_LAST_GROUP_
    last_P_no[0] = prevP_no;
    for (i = 1; i < img->buf_cycle; i++)
      last_P_no[i] = last_P_no[i - 1] - img->p_interval;
    
    if (input->last_frame && img->number + 1 == input->no_frames)
    {
      nextP_no = input->last_frame;
      img->p_interval = nextP_no - prevP_no;
    }
#endif
    
    img->b_interval =
      ((double) (input->jumpd + 1) / (input->successive_Bframe + 1.0) );

    if (input->PyramidCoding == 3)
      img->b_interval = 1.0;

    if (input->PyramidCoding)
      img->tr = prevP_no + (int) (img->b_interval  * (double) (1 + gop_structure[img->b_frame_to_code - 1].display_no));      // from prev_P
    else      
      img->tr = prevP_no + (int) (img->b_interval * (double) img->b_frame_to_code);      // from prev_P
    

    if (img->tr >= nextP_no)
      img->tr = nextP_no - 1;
    //Rate control
    if(!input->RCEnable && input->PyramidCoding !=3)                  // without using rate control
    {    
#ifdef _CHANGE_QP_
      if (input->qp2start > 0 && img->tr >= input->qp2start)
      {
        img->qp = input->qpB2;
      }
      else
#endif
      {
        img->qp = input->qpB;
      }

      if (img->nal_reference_idc)
      {
#ifdef _CHANGE_QP_
        if (input->qp2start > 0 && img->tr >= input->qp2start)
        {
          img->qp = Clip3(0,51,input->qpB2 + input->qpBRS2Offset);
        }
        else
#endif
        {
          img->qp = Clip3(0,51,input->qpB + input->qpBRSOffset);
        }
      }
    }
    else if (input->PyramidCoding ==3)  
    {
      img->qp =  gop_structure[img->b_frame_to_code - 1].slice_qp;

    }

  }
  
  UpdateSubseqInfo (img->layer);        // Tian Dong (Sept 2002)
  UpdateSceneInformation (0, 0, 0, -1); // JVT-D099, scene information SEI, nothing included by default

  //! Commented out by StW, needs fixing in SEI.h to keep the trace file clean
  //  PrepareAggregationSEIMessage ();

  img->total_number_mb = (img->width * img->height) / (MB_BLOCK_SIZE * MB_BLOCK_SIZE);

  img->no_output_of_prior_pics_flag = 0;
  img->long_term_reference_flag = 0;

  init_dec_ref_pic_marking_buffer();
}

/*!
 ************************************************************************
 * \brief
 *    Initializes the parameters for a new field
 ************************************************************************
 */
static void init_field ()
{
  int i;
  int prevP_no, nextP_no;

  last_P_no = last_P_no_fld;

  img->current_mb_nr = 0;
  img->current_slice_nr = 0;
  stats->bit_slice = 0;

  input->jumpd *= 2;
  input->successive_Bframe *= 2;
  img->number /= 2;
  img->buf_cycle /= 2;

  img->mb_y = img->mb_x = 0;
  img->block_y = img->pix_y = img->pix_c_y = 0; // define vertical positions
  img->block_x = img->pix_x = img->block_c_x = img->pix_c_x = 0;        // define horizontal positions

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区欧美小说| 中文字幕在线一区| 99久久综合国产精品| 日韩电影在线观看电影| 国产日产精品一区| 在线观看91精品国产麻豆| 成人三级伦理片| 蜜桃久久av一区| 一区二区三区成人| 亚洲国产成人一区二区三区| 制服.丝袜.亚洲.另类.中文 | 国产一区二区福利| 亚洲午夜久久久久| 中文字幕一区二区三区色视频| 日韩女优毛片在线| 欧美日韩一级视频| 99久久精品国产毛片| 另类的小说在线视频另类成人小视频在线| 亚洲区小说区图片区qvod| 国产日韩欧美一区二区三区乱码 | 亚洲国产色一区| 中文一区在线播放| 欧美精品一区二区三区视频| 欧美日本一区二区三区| 在线视频国产一区| 99久久国产综合色|国产精品| 国产a精品视频| 国产精品影视网| 精品在线一区二区三区| 日韩av一级电影| 婷婷开心久久网| 亚洲va天堂va国产va久| 亚洲一区二区三区四区在线免费观看 | 爽好久久久欧美精品| 一区二区激情视频| 一区二区三区欧美| 一区二区三区四区在线免费观看 | 欧美中文字幕一二三区视频| 538在线一区二区精品国产| 在线日韩国产精品| 欧美主播一区二区三区| 欧美三级韩国三级日本三斤| 欧美性受极品xxxx喷水| 欧美色倩网站大全免费| 欧美日韩一区国产| 欧美亚洲另类激情小说| 欧美伦理影视网| 欧美一区二区三区在线观看 | 综合av第一页| 亚洲图片激情小说| 一二三四区精品视频| 亚洲一区二区三区国产| 午夜视黄欧洲亚洲| 美女高潮久久久| 国产乱淫av一区二区三区 | 国内精品在线播放| 国产一区二区三区四区五区入口| 国产一区二区精品久久| 大美女一区二区三区| 91丨九色丨国产丨porny| 欧美三级在线视频| 日韩免费性生活视频播放| 国产亚洲成aⅴ人片在线观看| 欧美高清在线视频| 一区二区三区四区蜜桃| 日韩综合在线视频| 国产一区二区在线影院| 99久久99久久精品国产片果冻 | 26uuu国产在线精品一区二区| 国产亚洲欧美一区在线观看| 亚洲视频在线一区| 日韩影视精彩在线| 国产乱码精品一区二区三区五月婷 | 精品欧美黑人一区二区三区| 亚洲国产精品成人综合| 蜜臀久久99精品久久久久宅男 | 日本一区二区三区久久久久久久久不 | 久久se这里有精品| www.av亚洲| 欧美精品一二三| 国产亚洲午夜高清国产拍精品 | 狠狠色丁香久久婷婷综合_中| 国产成人丝袜美腿| 91行情网站电视在线观看高清版| 欧美日本一道本在线视频| 久久免费视频一区| 一区二区三区蜜桃| 极品少妇xxxx精品少妇| 日本高清无吗v一区| 久久美女高清视频| 亚洲一二三四区| 国产成人精品一区二| 在线播放91灌醉迷j高跟美女| 国产精品久久夜| 日本伊人色综合网| 91麻豆免费在线观看| 精品国精品国产尤物美女| 亚洲综合色自拍一区| 国产成人综合亚洲91猫咪| 欧美日韩精品福利| 国产精品天美传媒| 六月婷婷色综合| 在线看日本不卡| 国产欧美日韩精品在线| 美女视频黄a大片欧美| 91国产丝袜在线播放| 欧美激情一区二区三区四区| 免费三级欧美电影| 欧美日韩中文另类| 黑人巨大精品欧美黑白配亚洲| 色综合久久久久| 国产精品色哟哟| 国产夫妻精品视频| 久久综合色天天久久综合图片| 爽爽淫人综合网网站| 欧美天堂亚洲电影院在线播放| 成人免费小视频| 成人av综合在线| 久久久久久久久久久久久夜| 久久av老司机精品网站导航| 5858s免费视频成人| 亚洲一区二区影院| 在线观看日韩电影| 国产精品黄色在线观看| 国产成人免费av在线| 久久亚洲精品国产精品紫薇| 麻豆精品精品国产自在97香蕉 | 欧美系列一区二区| 成人欧美一区二区三区| 99视频在线精品| 国产精品电影一区二区| 国产成人精品网址| 国产日韩欧美不卡| 高清shemale亚洲人妖| 国产亚洲婷婷免费| 国产精品538一区二区在线| 亚洲精品一区在线观看| 国产做a爰片久久毛片| 久久亚洲精品国产精品紫薇| 国产精一品亚洲二区在线视频| 精品国产精品网麻豆系列 | 一本一道久久a久久精品| 国产精品成人免费| 91视频观看视频| 一区二区在线看| 日本韩国欧美三级| 亚洲va欧美va人人爽午夜| 欧美蜜桃一区二区三区| 日本欧美一区二区三区乱码| 欧美一区二区久久| 另类小说图片综合网| 亚洲精品视频一区二区| 欧美视频一区二区三区| 青青草视频一区| 久久久久国色av免费看影院| 高清不卡在线观看| 亚洲人精品午夜| 欧美情侣在线播放| 乱一区二区av| 亚洲国产精品高清| 欧美性猛交xxxx乱大交退制版| 天堂午夜影视日韩欧美一区二区| 日韩欧美你懂的| 国产成人免费在线观看不卡| 亚洲三级电影网站| 欧美日韩亚洲综合一区二区三区| 免费不卡在线视频| 亚洲国产激情av| 欧美日韩日日夜夜| 国内精品国产三级国产a久久| 国产日产亚洲精品系列| 在线观看亚洲一区| 久久精品av麻豆的观看方式| 国产精品久久久久久久岛一牛影视| 欧美性做爰猛烈叫床潮| 激情五月婷婷综合网| 亚洲天堂久久久久久久| 91精品国产综合久久久蜜臀图片| 国产精品99久久久久| 亚洲成a人片综合在线| 国产日韩影视精品| 欧美剧在线免费观看网站| 国产精品香蕉一区二区三区| 一区二区三区美女| 精品国产精品网麻豆系列| 91国产丝袜在线播放| 国产一区二区三区免费看| 亚洲国产一区二区视频| 久久女同精品一区二区| 欧美丝袜丝交足nylons| 国产91富婆露脸刺激对白| 亚洲一二三区在线观看| 久久精品一级爱片| 欧美日韩激情一区二区| 99国产麻豆精品| 国产一区视频网站| 天天操天天色综合| 中文字幕一区二区三区视频| 精品国产青草久久久久福利| 欧美日韩一区在线|