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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? image.c

?? 一個(gè)簡(jiǎn)單的視頻會(huì)議VC++MFC工程文件
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
      
      img->fld_flag = picture_structure_decision (frame_pic, top_pic, bottom_pic);
      update_field_frame_contexts (img->fld_flag);

      //Rate control
      if(img->fld_flag==0)
        img->FieldFrame=1;
      /*the current choice is field coding*/
      else
        img->FieldFrame=0;
    }
    else
   
      img->fld_flag = 0;
  }

  if (img->fld_flag)
    stat->bit_ctr_emulationprevention += stat->em_prev_bits_fld;
  else
    stat->bit_ctr_emulationprevention += stat->em_prev_bits_frm;

  if (img->type != B_SLICE)
  {
    img->pstruct_next_P = img->fld_flag;
  }

  // Here, img->structure may be either FRAME or BOTTOM FIELD depending on whether AFF coding is used
  // The picture structure decision changes really only the fld_flag

  if (img->fld_flag)            // field mode (use field when fld_flag=1 only)
  {
    field_mode_buffer (bits_fld, dis_fld_y, dis_fld_u, dis_fld_v);
    writeout_picture (top_pic);
    writeout_picture (bottom_pic);
  }
  else                          //frame mode
  {
    frame_mode_buffer (bits_frm, dis_frm_y, dis_frm_u, dis_frm_v);
    writeout_picture (frame_pic);
  }

  if (frame_pic)
    free_slice_list(frame_pic);
  if (top_pic)
    free_slice_list(top_pic);
  if (bottom_pic)
    free_slice_list(bottom_pic);

  /*
  // Tian Dong (Sept 2002)
  // in frame mode, the newly reconstructed frame has been inserted to the mem buffer
  // and it is time to prepare the spare picture SEI payload.
  if (input->InterlaceCodingOption == FRAME_CODING
      && input->SparePictureOption && img->type != B_SLICE)
    CalculateSparePicture ();
*/

  //Rate control
  if(input->RCEnable)
  {
    bits = stat->bit_ctr-stat->bit_ctr_n;
    rc_update_pict_frame(bits);
  }

/*
    
  if (input->InterlaceCodingOption == FRAME_CODING)
  {
    if (input->rdopt == 2 && img->type != B_SLICE)
      UpdateDecoders ();      // simulate packet losses and move decoded image to reference buffers
    
    if (input->RestrictRef)
      UpdatePixelMap ();
  }
*/

  find_snr ();

  time (&ltime2);               // end time sec
#ifdef WIN32
  _ftime (&tstruct2);           // end time ms
#else
  ftime (&tstruct2);            // end time ms
#endif

  tmp_time = (ltime2 * 1000 + tstruct2.millitm) - (ltime1 * 1000 + tstruct1.millitm);
  tot_time = tot_time + tmp_time;

  if (input->PicInterlace == ADAPTIVE_CODING)
  {
    if (img->fld_flag)
    {
      // store bottom field
      store_picture_in_dpb(enc_bottom_picture);
      free_storable_picture(enc_frame_picture);
    }
    else
    {
      // replace top with frame
      replace_top_pic_with_frame(enc_frame_picture);
      free_storable_picture(enc_bottom_picture);
    }
  }
  else
  {
    if (img->fld_flag)
    {
      store_picture_in_dpb(enc_bottom_picture);
    }
    else
    {
      store_picture_in_dpb(enc_frame_picture);
    }
  }


#ifdef _LEAKYBUCKET_
  // Store bits used for this frame and increment counter of no. of coded frames
  Bit_Buffer[total_frame_buffer] = stat->bit_ctr - stat->bit_ctr_n;
  total_frame_buffer++;
#endif

  // POC200301: Verify that POC coding type 2 is not used if more than one consecutive 
  // non-reference frame is requested or if decoding order is different from output order
  if (img->pic_order_cnt_type == 2)
  {
    if (!img->nal_reference_idc) consecutive_non_reference_pictures++;
    else consecutive_non_reference_pictures = 0;

    if (frame_no < prev_frame_no || consecutive_non_reference_pictures>1)
      error("POC type 2 cannot be applied for the coding pattern where the encoding /decoding order of pictures are different from the output order.\n", -1);
    prev_frame_no = frame_no;
  }

  if (stat->bit_ctr_parametersets_n!=0)
    ReportNALNonVLCBits(tmp_time, me_time);

  if (IMG_NUMBER == 0)
    ReportFirstframe(tmp_time,me_time);
    //ReportFirstframe(tmp_time);
  else
  {
    //Rate control
    if(input->RCEnable)
    {
      if((!input->PicInterlace)&&(!input->MbInterlace))
        bits=stat->bit_ctr-stat->bit_ctr_n;
      else
      {
        bits = stat->bit_ctr -Pprev_bits; // used for rate control update */
        Pprev_bits = stat->bit_ctr;
      }
    }

    switch (img->type)
    {
    case I_SLICE:
      stat->bit_ctr_P += stat->bit_ctr - stat->bit_ctr_n;
	  ReportIntra(tmp_time,me_time);
      //ReportIntra(tmp_time);
      break;
    case SP_SLICE:
      stat->bit_ctr_P += stat->bit_ctr - stat->bit_ctr_n;
      ReportSP(tmp_time,me_time);
      //ReportSP(tmp_time);
      break;
    case B_SLICE:
      stat->bit_ctr_B += stat->bit_ctr - stat->bit_ctr_n;
      if (img->nal_reference_idc>0)
        ReportBS(tmp_time,me_time);
        //ReportBS(tmp_time);
      else
        ReportB(tmp_time,me_time);
        //ReportB(tmp_time);

      break;
    default:      // P
      stat->bit_ctr_P += stat->bit_ctr - stat->bit_ctr_n;
      ReportP(tmp_time,me_time);
      //ReportP(tmp_time);
    }
  }
  stat->bit_ctr_n = stat->bit_ctr;

  //Rate control
  if(input->RCEnable) 
  {
    rc_update_pict(bits);
      /*update the parameters of quadratic R-D model*/
    if((img->type==P_SLICE)&&(active_sps->frame_mbs_only_flag))
      updateRCModel();
    else if((img->type==P_SLICE)&&(!active_sps->frame_mbs_only_flag)\
      &&(img->IFLAG==0))
      updateRCModel();
  }

  stat->bit_ctr_parametersets_n=0;

  FreeSourceframe (srcframe);

  if (IMG_NUMBER == 0)
    return 0;
  else
    return 1;
}


/*!
 ************************************************************************
 * \brief
 *    This function write out a picture
 * \return
 *    0 if OK,                                                         \n
 *    1 in case of error
 *
 ************************************************************************
 */
static int writeout_picture(Picture *pic)
{
  Bitstream *currStream;
  int partition, slice;
  Slice *currSlice;

  img->currentPicture=pic;

  for (slice=0; slice<pic->no_slices; slice++)
  {
    currSlice = pic->slices[slice];
    for (partition=0; partition<currSlice->max_part_nr; partition++)
    {
      currStream = (currSlice->partArr[partition]).bitstream;
      assert (currStream->bits_to_go == 8);    //! should always be the case, the 
                                               //! byte alignment is done in terminate_slice
			writeUnit (currSlice->partArr[partition].bitstream,partition);

    }           // partition loop
  }           // slice loop
  return 0;   
}


/*!
 ************************************************************************
 * \brief
 *    Encodes a frame picture
 ************************************************************************
 */
void frame_picture (Picture *frame)
{

  img->structure = FRAME;
  img->PicSizeInMbs = img->FrameSizeInMbs;

  enc_frame_picture  = alloc_storable_picture (img->structure, img->width, img->height, img->width_cr, img->height_cr);
  img->ThisPOC=enc_frame_picture->poc=img->framepoc;
  enc_frame_picture->top_poc    = img->toppoc;
  enc_frame_picture->bottom_poc = img->bottompoc;

  enc_frame_picture->frame_poc = img->framepoc;

  enc_frame_picture->pic_num = img->frame_num;
  enc_frame_picture->coded_frame = 1;

  enc_frame_picture->MbaffFrameFlag = img->MbaffFrameFlag = (input->MbInterlace != FRAME_CODING);

  enc_picture=enc_frame_picture;

  stat->em_prev_bits_frm = 0;
  stat->em_prev_bits = &stat->em_prev_bits_frm;

  if (img->MbaffFrameFlag)
  {
    CopyTopFieldToOldImgOrgVariables (srcframe);
    CopyBottomFieldToOldImgOrgVariables (srcframe);
  }

  img->fld_flag = 0;
  code_a_picture(frame);

  frame->bits_per_picture = 8 * ((((img->currentSlice)->partArr[0]).bitstream)->byte_pos);
  
  if (img->structure==FRAME)
  {
    find_distortion (snr, img);      
    frame->distortion_y = snr->snr_y;
    frame->distortion_u = snr->snr_u;
    frame->distortion_v = snr->snr_v;
  }
}


/*!
 ************************************************************************
 * \brief
 *    Encodes a field picture, consisting of top and bottom field
 ************************************************************************
 */
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;

  stat->em_prev_bits_fld = 0;
  stat->em_prev_bits = &stat->em_prev_bits_fld;
  img->number *= 2;
  img->buf_cycle *= 2;
  img->height = input->img_height / 2;
  img->height_cr = input->img_height / 4;
  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->coded_frame = 0;
  enc_top_picture->MbaffFrameFlag = img->MbaffFrameFlag = FALSE;
  img->ThisPOC = img->toppoc;
  
  img->structure = TOP_FIELD;
  enc_picture = enc_top_picture;
  put_buffer_top ();
  init_field ();
  if (img->type == B_SLICE)       //all I- and P-frames
    nextP_tr_fld--;

  CopyTopFieldToOldImgOrgVariables (srcframe);
  
  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->coded_frame = 0;
  enc_bottom_picture->MbaffFrameFlag = img->MbaffFrameFlag = FALSE;
  img->ThisPOC = img->bottompoc;
  img->structure = BOTTOM_FIELD;
  enc_picture = enc_bottom_picture;
  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;

  CopyBottomFieldToOldImgOrgVariables (srcframe);
  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)
{

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合狠狠综合久久综合88| 欧美成人一区二区三区片免费| 国产精品亚洲午夜一区二区三区| 香蕉影视欧美成人| 亚洲人成精品久久久久| 欧美极品xxx| 久久综合久久综合九色| www日韩大片| 久久久久高清精品| 国产精品久久久久久久久快鸭 | 日韩精彩视频在线观看| 午夜电影网一区| 男女男精品网站| 国模娜娜一区二区三区| 国产激情精品久久久第一区二区 | 五月婷婷激情综合网| 首页国产丝袜综合| 久久国产免费看| 国产凹凸在线观看一区二区| 成人h精品动漫一区二区三区| 99久久精品国产导航| 欧洲一区二区三区在线| 在线电影国产精品| 精品三级在线观看| 中文字幕不卡的av| 一区二区三区高清在线| 婷婷成人综合网| 国产麻豆精品95视频| 成人丝袜视频网| 日本道精品一区二区三区 | 18涩涩午夜精品.www| 一区二区国产视频| 久久精品国产亚洲a| 福利一区二区在线| 色综合天天综合网天天狠天天 | 精品国产乱码久久久久久牛牛 | 国产一区二区三区美女| 成人av影视在线观看| 色成人在线视频| 日韩欧美一区二区免费| 日本一区二区不卡视频| 亚洲一区二区成人在线观看| 精品亚洲成a人| 一本色道久久综合亚洲精品按摩| 91精品国产综合久久福利| 日本一区免费视频| 五月婷婷综合网| caoporen国产精品视频| 欧美一区二区三区爱爱| 亚洲欧洲日本在线| 男人操女人的视频在线观看欧美| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产一区二区三区视频在线播放| 色综合色综合色综合 | 亚洲欧美色图小说| 韩国在线一区二区| 欧美视频日韩视频| 中文字幕成人av| 理论片日本一区| 91黄色免费版| 国产亚洲视频系列| 天堂蜜桃91精品| 9色porny自拍视频一区二区| 日韩一区二区三区电影在线观看 | 久久综合久久鬼色中文字| 一区二区成人在线| 国产成人精品三级麻豆| 欧美一级在线观看| 一区二区三区在线不卡| 国产suv精品一区二区883| 欧美精品日韩精品| 一区二区三区精品在线| av网站免费线看精品| 久久久久久久综合日本| 日本va欧美va欧美va精品| 在线中文字幕一区二区| 国产精品高潮呻吟| 国内欧美视频一区二区| 欧美顶级少妇做爰| 一二三四区精品视频| www..com久久爱| 久久久久久免费网| 久久99热99| 欧美高清激情brazzers| 亚洲伊人色欲综合网| 波多野结衣在线一区| 精品国产a毛片| 久久 天天综合| 日韩免费高清电影| 日韩和欧美的一区| 欧美一区二区三区在线视频| 午夜电影久久久| 欧美狂野另类xxxxoooo| 午夜视频一区在线观看| 欧美四级电影在线观看| 一区二区三区加勒比av| 91网站最新网址| 亚洲少妇屁股交4| 成a人片国产精品| 亚洲国产日韩a在线播放| 91一区二区三区在线播放| 国产精品久久久久永久免费观看 | 精品一区二区三区的国产在线播放| 欧美日韩国产综合视频在线观看 | 精品一区二区三区视频在线观看| 日韩一区二区电影在线| 麻豆视频观看网址久久| 日韩欧美一级在线播放| 精品伊人久久久久7777人| 精品久久久久久久久久久院品网| 免费欧美高清视频| 精品国产凹凸成av人导航| 国产剧情av麻豆香蕉精品| 国产日韩精品一区二区浪潮av | 欧美视频三区在线播放| 香蕉影视欧美成人| 91精品国产入口在线| 免费观看日韩av| 久久网站热最新地址| 丁香天五香天堂综合| 亚洲女同ⅹxx女同tv| 欧日韩精品视频| 日韩成人一级大片| 久久人人97超碰com| 成人av免费在线观看| 一区二区三区免费看视频| 欧美挠脚心视频网站| 久久99精品久久久久久国产越南| 久久人人爽人人爽| 99久久er热在这里只有精品66| 亚洲精品乱码久久久久久日本蜜臀| 欧美日韩综合在线免费观看| 蜜臀av国产精品久久久久| 日本一区二区三区高清不卡| 99国产精品国产精品毛片| 亚洲午夜视频在线观看| 日韩欧美不卡在线观看视频| 国产丶欧美丶日本不卡视频| 一区二区三区在线免费视频| 欧美一级二级在线观看| 福利视频网站一区二区三区| 亚洲成人自拍偷拍| 国产无人区一区二区三区| 欧美亚洲动漫精品| 国产精品一区二区果冻传媒| 一区二区视频在线| 精品动漫一区二区三区在线观看| av中文字幕亚洲| 美美哒免费高清在线观看视频一区二区| 国产视频一区二区在线观看| 91影院在线观看| 捆绑紧缚一区二区三区视频| 亚洲日本青草视频在线怡红院| 91精品国产免费| 成人理论电影网| 青青草伊人久久| 亚洲色图在线看| 精品国产免费人成在线观看| 色噜噜偷拍精品综合在线| 韩国女主播成人在线| 亚洲第一精品在线| 国产精品乱码妇女bbbb| 欧美一区2区视频在线观看| 99视频精品免费视频| 久久精品999| 亚洲与欧洲av电影| 国产精品三级在线观看| 欧美电影免费观看高清完整版在线| 99久久精品免费| 国产乱一区二区| 奇米色777欧美一区二区| 亚洲精品美腿丝袜| 国产精品视频线看| 久久综合狠狠综合| 4438成人网| 欧美午夜精品一区二区三区| 成人午夜激情视频| 久久精品999| 日本视频一区二区三区| 亚洲一级二级在线| 一区在线中文字幕| 国产欧美日韩精品a在线观看| 欧美一区二区播放| 欧美性大战久久| 成年人国产精品| 成人在线视频首页| 国产成人丝袜美腿| 精品一区二区在线播放| 免费的成人av| 男女视频一区二区| 午夜免费久久看| 亚洲国产综合色| 一区二区三区小说| 伊人婷婷欧美激情| 国产精品久久三| 国产精品美女久久久久久久久| 国产校园另类小说区| 久久无码av三级| 久久久久久免费网| 久久久久综合网|