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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rdopt.c

?? h264標(biāo)準(zhǔn)的VC實(shí)現(xiàn)
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
        {
          if(!mode)
          {     //direct mode
            enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = direct_ref_idx[LIST_0][img->block_x+i][img->block_y+j];
            enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j] = direct_ref_idx[LIST_1][img->block_x+i][img->block_y+j];
          }
          else
          {   //intra
            enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = -1;
            enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j] = -1;

          }
        }
    }
    else
    {
      for (j=0;j<4;j++)
        for (i=0;i<4;i++)
        {
          enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = (mode==0?0:-1);
        }
    }
  }
  else
  {
    if (bframe)
    {
      for (j=0;j<4;j++)
        for (i=0;i<4;i++)
        {
          k = 2*(j/2)+(i/2);
          l = 2*(j%2)+(i%2);

          if(mode == P8x8 && best8x8mode[k]==0)
          {
            enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = direct_ref_idx[LIST_0][img->block_x+i][img->block_y+j];
            enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j] = direct_ref_idx[LIST_1][img->block_x+i][img->block_y+j];
          }
          else
          {
            enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = (IS_FW ? best8x8fwref[mode][k] : -1);
            enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j] = (IS_BW ? best8x8bwref[mode][k] : -1);
          }
        }
    }
    else
    {
      for (j=0;j<4;j++)
        for (i=0;i<4;i++)
        {
          k = 2*(j/2)+(i/2);
          l = 2*(j%2)+(i%2);
          enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = (IS_FW ? best8x8fwref[mode][k] : -1);
        }
    }
  }

  for (j=0;j<4;j++)
  {
    for (i=0;i<4;i++)
    {
      enc_picture->ref_pic_id [LIST_0][img->block_x+i][img->block_y+j] =
        (enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j]>=0 ?
         enc_picture->ref_pic_num[LIST_0 + list_offset][enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j]]:
         -1);
    }
  }
  if (bframe)
  {
    for (j=0;j<4;j++)
    {
      for (i=0;i<4;i++)
      {
        enc_picture->ref_pic_id [LIST_1][img->block_x+i][img->block_y+j] =
          (enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j]>=0 ?
           enc_picture->ref_pic_num[LIST_1 + list_offset][enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j]]:
           -1);
      }

    }
  }


#undef IS_FW
#undef IS_BW
}


/*!
 *************************************************************************************
 * \brief
 *    Intra 16x16 mode decision
 *************************************************************************************
 */
void
Intra16x16_Mode_Decision (Macroblock* currMB, int* i16mode)
{
  // Residue Color Transform
  int residue_R, residue_G, residue_B;
  int c_ipmode = img->mb_data[img->current_mb_nr].c_ipred_mode;
  int i, j, temp;
  int pic_pix_x   = img->pix_x;
  int pic_pix_y   = img->pix_y;
  pel_t   **imgY_orig  = imgY_org;
  pel_t   ***imgUV_orig  = imgUV_org;
  int cr_cbp;

  intrapred_luma_16x16 ();   /* make intra pred for all 4 new modes */
  find_sad_16x16 (i16mode);   /* get best new intra mode */

  // Residue Color Transform
  if(img->residue_transform_flag)
  {
    for (j=0; j<16; j++)
      for (i=0; i<16; i++)
      {
        residue_B = imgUV_orig[0][pic_pix_y+j][pic_pix_x+i] - img->mprr_c[0][c_ipmode][i][j];
        residue_G = imgY_orig[pic_pix_y+j][pic_pix_x+i] - img->mprr_2[*i16mode][j][i];
        residue_R = imgUV_orig[1][pic_pix_y+j][pic_pix_x+i] - img->mprr_c[1][c_ipmode][i][j];
        
        /* Forward Residue Transform */
        resTrans_R[i][j] = residue_R-residue_B;
        temp = residue_B+(resTrans_R[i][j]>>1);
        resTrans_B[i][j] = residue_G-temp;
        resTrans_G[i][j] = temp+(resTrans_B[i][j]>>1);
        
        img->m7[i][j]  = resTrans_G[i][j];
      }
  }

  currMB->cbp = dct_luma_16x16 (*i16mode);

  // Residue Color Transform
  if(img->residue_transform_flag)
  {
    for (j=0; j<16; j++)
      for (i=0; i<16; i++)
      {
        rec_resG[i][j] = img->m7[i][j];
        img->m7[i][j]  = resTrans_R[i][j];
      }

    cr_cbp = dct_chroma(0, 0);

    for (j=0; j<16; j++)
      for (i=0; i<16; i++)
      {
        rec_resR[i][j] = img->m7[i][j];
        img->m7[i][j]  = resTrans_B[i][j];
      }
      
    cr_cbp = dct_chroma(1, cr_cbp);

    for (j=0; j<16; j++)
      for (i=0; i<16; i++)
      {
        rec_resB[i][j] = img->m7[i][j];
      }

    currMB->cbp += (cr_cbp<<4);

    /* Inverse Residue Transform */
    for (j=0; j<16; j++)
      for (i=0; i<16; i++)
      {
        temp      = rec_resG[i][j]-(rec_resB[i][j]>>1);
        residue_G = rec_resB[i][j]+temp;
        residue_B = temp - (rec_resR[i][j]>>1);
        residue_R = residue_B+rec_resR[i][j];
        
        enc_picture->imgUV[0][pic_pix_y+j][pic_pix_x+i] = min(img->max_imgpel_value_uv,max(0,residue_B+(int)img->mprr_c[0][c_ipmode][i][j]));
        enc_picture->imgY[pic_pix_y+j][pic_pix_x+i]     = min(img->max_imgpel_value,max(0,residue_G+(int)img->mprr_2[*i16mode][j][i]));
        enc_picture->imgUV[1][pic_pix_y+j][pic_pix_x+i] = min(img->max_imgpel_value_uv,max(0,residue_R+(int)img->mprr_c[1][c_ipmode][i][j]));
      }
  }
}



/*!
 *************************************************************************************
 * \brief
 *    Sets Coefficients and reconstruction for an 8x8 block
 *************************************************************************************
 */
void SetCoeffAndReconstruction8x8 (Macroblock* currMB)
{
  int block, k, j, i;


  //============= MIXED TRANSFORM SIZES FOR 8x8 PARTITION ==============
  //--------------------------------------------------------------------
  int l;
  int bframe = img->type==B_SLICE;
  int list_offset   = ((img->MbaffFrameFlag)&&(currMB->mb_field))? img->current_mb_nr%2 ? 4 : 2 : 0;

  if (currMB->luma_transform_size_8x8_flag)
  {
    assert(input->AllowTransform8x8);

    //============= set mode and ref. frames ==============
    for(i=0;i<4;i++)
    {
      currMB->b8mode[i]   = part8x8mode[i];
      currMB->b8pdir[i]   = part8x8pdir[i];
    }

    if (bframe)
    {
      for (j=0;j<4;j++)
        for (i=0;i<4;i++)
        {
          k = 2*(j/2)+(i/2);
          l = 2*(j%2)+(i%2);
          enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = part8x8fwref[k];
          enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j] = part8x8bwref[k];
        }
    }
    else
    {
      for (j=0;j<4;j++)
        for (i=0;i<4;i++)
        {
          k = 2*(j/2)+(i/2);
          l = 2*(j%2)+(i%2);
          enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j] = part8x8fwref[k];
        }
    }

    for (j=0;j<4;j++)
    {
      for (i=0;i<4;i++)
      {
        enc_picture->ref_pic_id [LIST_0][img->block_x+i][img->block_y+j] =
          (enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j]>=0 ?
          enc_picture->ref_pic_num[LIST_0 + list_offset][enc_picture->ref_idx[LIST_0][img->block_x+i][img->block_y+j]]:
        -1);
      }
    }
    if (bframe)
    {
      for (j=0;j<4;j++)
      {
        for (i=0;i<4;i++)
        {
          enc_picture->ref_pic_id [LIST_1][img->block_x+i][img->block_y+j] =
            (enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j]>=0 ?
            enc_picture->ref_pic_num[LIST_1 + list_offset][enc_picture->ref_idx[LIST_1][img->block_x+i][img->block_y+j]]:
          -1);
        }

      }
    }

    //====== set the mv's for 8x8 partition with transform size 8x8 ======
    //save the mv data for 4x4 transform
    StoreMV8x8(1);
    //set new mv data for 8x8 transform
    RestoreMV8x8(0);

    //============= get pre-calculated data ==============
    //restore coefficients from 8x8 transform
    for (block=0; block<4; block++)
    for (k=0; k<4; k++)
    for (j=0; j<2; j++)
    for (i=0; i<65; i++)
      img->cofAC[block][k][j][i] = cofAC_8x8ts[block][k][j][i];
    
    //restore reconstruction 
    if (cnt_nonz8_8x8ts <= _LUMA_8x8_COEFF_COST_ && 
        ((img->qp + img->bitdepth_luma_qp_scale)!=0 || img->lossless_qpprime_flag==0))
    {
      currMB->cbp     = 0;
      currMB->cbp_blk = 0;
      for (j=0; j<16; j++)
        for (i=0; i<16; i++)
          // Residue Color Transform
          if(!img->residue_transform_flag)
            enc_picture->imgY[img->pix_y+j][img->pix_x+i] = mpr_8x8ts[j][i];
          else
            rec_resG[i][j] = 0;
    }
    else
    {
      currMB->cbp     = cbp8_8x8ts;
      currMB->cbp_blk = cbp_blk8_8x8ts;
      for (j=0; j<16; j++)
        for (i=0; i<16; i++)
          // Residue Color Transform
          if(!img->residue_transform_flag)
            enc_picture->imgY[img->pix_y+j][img->pix_x+i] = rec_mbY_8x8ts[j][i];
          else
            rec_resG[i][j] =  rec_resG_8x8ts[i][j];
    }

    // Residue Color Transform
    for (j=0; j<16; j++)
    for (i=0; i<16; i++)
    {
      mprRGB[0][i][j] = mprRGB_8x8ts[0][i][j];
      mprRGB[1][i][j] = mprRGB_8x8ts[1][i][j];
      mprRGB[2][i][j] = mprRGB_8x8ts[2][i][j];
      resTrans_R[i][j] = resTrans_R_8x8ts[i][j];
      resTrans_B[i][j] = resTrans_B_8x8ts[i][j];
    }
  }
  else
  {
    //============= get pre-calculated data ==============
    //---------------------------------------------------
    //--- restore coefficients ---
    for (block=0; block<4+img->num_blk8x8_uv; block++)
    for (k=0; k<4; k++)
    for (j=0; j<2; j++)
    for (i=0; i<65; i++)
      img->cofAC[block][k][j][i] = cofAC8x8[block][k][j][i];

    if (cnt_nonz_8x8<=5 && img->type!=SP_SLICE &&
        ((img->qp + img->bitdepth_luma_qp_scale)!=0 || img->lossless_qpprime_flag==0))
    {
      currMB->cbp     = 0;
      currMB->cbp_blk = 0;
      for (j=0; j<16; j++)
      for (i=0; i<16; i++)
        // Residue Color Transform
        if(!img->residue_transform_flag)
          enc_picture->imgY[img->pix_y+j][img->pix_x+i] = mpr8x8[j][i];
        else
          rec_resG[i][j] = 0;
    }
    else
    {
      currMB->cbp     = cbp8x8;
      currMB->cbp_blk = cbp_blk8x8;
      for (j=0; j<16; j++)
      for (i=0; i<16; i++)
        // Residue Color Transform
        if(!img->residue_transform_flag)
          enc_picture->imgY[img->pix_y+j][img->pix_x+i] = rec_mbY8x8[j][i];
        else
          rec_resG[i][j] =  rec_resG_8x8[i][j];
    }

    // Residue Color Transform
    for (j=0; j<16; j++)
    for (i=0; i<16; i++)
    {
      mprRGB[0][i][j] = mprRGB_8x8[0][i][j];
      mprRGB[1][i][j] = mprRGB_8x8[1][i][j];
      mprRGB[2][i][j] = mprRGB_8x8[2][i][j];
      resTrans_R[i][j] = resTrans_R_8x8[i][j];
      resTrans_B[i][j] = resTrans_B_8x8[i][j];
    }
  }
}


/*!
 *************************************************************************************
 * \brief
 *    Sets motion vectors for an macroblock
 *************************************************************************************
 */
void SetMotionVectorsMB (Macroblock* currMB, int bframe)
{
  int i, j, k, l, m, mode8, pdir8, ref, by, bx, bxr;
  int ******all_mv  = img->all_mv;
  int ******pred_mv = img->pred_mv;
  int  bw_ref;

  for (j=0; j<4; j++)
    for (i=0; i<4; i++)
    {
      mode8 = currMB->b8mode[k=2*(j/2)+(i/2)];
      l     = 2*(j%2)+(i%2);
      by    = img->block_y+j;
      bxr   = img->block_x+i;
      bx    = img->block_x+i+4;


      
        pdir8 = currMB->b8pdir[k];
        ref    = enc_picture->ref_idx[LIST_0][bxr][by];
        bw_ref = enc_picture->ref_idx[LIST_1][bxr][by];

      
      if (!bframe)
      {
        if (pdir8>=0) //(mode8!=IBLOCK)&&(mode8!=I16MB))  // && ref != -1)
        {
          enc_picture->mv[LIST_0][bxr][by][0] = all_mv [i][j][LIST_0][ ref][mode8][0];
          enc_picture->mv[LIST_0][bxr][by][1] = all_mv [i][j][LIST_0][ ref][mode8][1];
        }
        else
        {
          enc_picture->mv[LIST_0][bxr][by][0] = 0;
          enc_picture->mv[LIST_0][bxr][by][1] = 0;
        }
      }
      else
      {
        if (pdir8==-1) // intra
        {
          enc_picture->mv[LIST_0][bxr][by][0] = 0;
          enc_picture->mv[LIST_0][bxr][by][1] = 0;
          enc_picture->mv[LIST_1][bxr][by][0] = 0;
          enc_picture->mv[LIST_1][bxr][by][1] = 0;
        }
        else if (pdir8==0) // forward
        {
          enc_picture->mv[LIST_0][bxr][by][0] = all_mv [i][j][LIST_0][ ref][mode8][0];
          enc_picture->mv[LIST_0][bxr][by][1] = all_mv [i][j][LIST_0][ ref][mode8][1];
          enc_picture->mv[LIST_1][bxr][by][0] = 0;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色999日韩国产欧美一区二区| 综合久久久久综合| 成人黄色免费短视频| 亚洲福利一区二区三区| 国产亚洲午夜高清国产拍精品 | 中文字幕高清不卡| 91精品国产麻豆国产自产在线 | 一区在线播放视频| 欧美xxxxx裸体时装秀| 一本久道久久综合中文字幕| 极品美女销魂一区二区三区免费| 亚洲一区二区三区四区在线观看 | 国产午夜精品美女毛片视频| 欧美精品一二三区| 色天使色偷偷av一区二区| 国产精品综合网| 麻豆免费看一区二区三区| 亚洲综合丁香婷婷六月香| 中文字幕免费一区| 精品国产91亚洲一区二区三区婷婷| 91精品91久久久中77777| 成人国产免费视频| 国产成人在线网站| 狠狠狠色丁香婷婷综合激情 | 久久久久久一二三区| 日韩欧美在线影院| 91精品国产手机| 欧美日韩中文字幕一区二区| 欧美做爰猛烈大尺度电影无法无天| 成人一级片在线观看| 国产精品性做久久久久久| 国产真实乱子伦精品视频| 久久国产欧美日韩精品| 蜜桃精品视频在线| 久久99这里只有精品| 狂野欧美性猛交blacked| 日本少妇一区二区| 久久精品国产一区二区三区免费看| 日韩精品久久理论片| 亚洲第一狼人社区| 日韩和欧美一区二区| 日韩一区精品字幕| 美女被吸乳得到大胸91| 久久国内精品视频| 狠狠v欧美v日韩v亚洲ⅴ| 韩国女主播成人在线| 国产精品一卡二卡在线观看| 国产麻豆精品在线观看| 成人美女在线视频| 色综合久久综合网欧美综合网 | 精品久久久影院| 久久久国产精品麻豆| 国产精品美女久久久久久久| 国产精品短视频| 一区二区三区不卡视频在线观看| 一区二区三区欧美在线观看| 视频一区国产视频| 成人一区二区三区在线观看| 国产丶欧美丶日本不卡视频| 亚洲成人精品影院| 国产精品久久久久久久久快鸭 | 中文字幕一区日韩精品欧美| 国产精品成人在线观看| 一区二区三区在线视频播放| 日本欧洲一区二区| 国产夫妻精品视频| 色久优优欧美色久优优| 宅男在线国产精品| 中文字幕欧美日韩一区| 一区二区三区在线视频免费 | 国产a精品视频| 欧美私人免费视频| 久久免费电影网| 亚洲另类中文字| 美女网站视频久久| 99久精品国产| 日韩欧美精品三级| 亚洲免费电影在线| 蜜臂av日日欢夜夜爽一区| www.av精品| 欧美一区午夜精品| 一本大道久久a久久综合| 日韩无一区二区| 国产日产欧美精品一区二区三区| 国产精品免费网站在线观看| 欧美一级艳片视频免费观看| 久久久精品免费网站| 亚洲一级在线观看| 国产酒店精品激情| 欧美精品第1页| 国产精品美女一区二区在线观看| 五月天丁香久久| 99re视频精品| 精品国产乱码久久久久久蜜臀| 亚洲欧美日韩国产成人精品影院| 男人的j进女人的j一区| 91久久国产综合久久| 久久久精品蜜桃| 免费高清视频精品| 欧美日韩一卡二卡三卡| 中文字幕免费观看一区| 紧缚奴在线一区二区三区| 欧美中文字幕不卡| 中文字幕一区二区三区视频| 久久99精品一区二区三区| 欧美日韩国产首页| 亚洲色图都市小说| 成人久久久精品乱码一区二区三区 | 国产偷国产偷亚洲高清人白洁 | 日韩一级精品视频在线观看| 亚洲欧洲日产国码二区| 高清av一区二区| 欧美人xxxx| 国产精品欧美一区喷水| 国产一区二区三区观看| 一区在线观看视频| av在线免费不卡| 国产精品自拍av| 国产传媒欧美日韩成人| 日本中文在线一区| 毛片一区二区三区| 秋霞电影网一区二区| 日韩不卡一区二区| 亚洲韩国一区二区三区| 欧美手机在线视频| 国产一区二区免费视频| 亚洲人成小说网站色在线| 欧美日韩国产天堂| 成人小视频在线观看| 亚洲电影第三页| 亚洲精品一区二区在线观看| 99re在线精品| 久久99热99| 亚洲成人自拍一区| 国产精品美女www爽爽爽| 911精品国产一区二区在线| 成人高清在线视频| 久久99在线观看| 青青草97国产精品免费观看| 亚洲视频一区二区免费在线观看| 欧美一区二区女人| 成人国产一区二区三区精品| eeuss鲁片一区二区三区在线观看| 丁香婷婷综合激情五月色| 99久久精品免费| 欧美三级韩国三级日本一级| 欧美不卡123| 亚洲视频 欧洲视频| 免费一区二区视频| 高清国产午夜精品久久久久久| 一本大道av一区二区在线播放| 欧美精品乱码久久久久久| 久久精品人人做| 亚洲成人动漫精品| 国产成人午夜精品影院观看视频| 色综合天天综合狠狠| 日韩午夜在线影院| 亚洲影视资源网| 99久久99久久精品免费观看| 日韩午夜精品视频| 亚洲va国产天堂va久久en| 国产不卡高清在线观看视频| 欧美一区二区福利视频| 亚洲日本免费电影| 福利电影一区二区| 精品国产露脸精彩对白| 日韩影院免费视频| 欧美性xxxxxxxx| 国产精品久久久久永久免费观看| 欧美在线观看视频在线| 在线观看亚洲a| √…a在线天堂一区| 国产高清视频一区| 色综合久久综合网| 欧美视频在线观看一区| 欧洲精品一区二区| 精品国产免费久久| 久久精品亚洲精品国产欧美kt∨| 欧美精品乱码久久久久久按摩| 国产三区在线成人av| 欧美精品一区二区高清在线观看| 亚洲高清一区二区三区| 91福利精品第一导航| 日韩高清在线不卡| 久久精品欧美一区二区三区麻豆| 色婷婷久久综合| 狂野欧美性猛交blacked| 国产精品另类一区| 欧美人狂配大交3d怪物一区| 国产高清一区日本| 偷拍与自拍一区| 中文字幕视频一区| 欧美va天堂va视频va在线| 99久久久精品免费观看国产蜜| 日本最新不卡在线| 亚洲在线视频一区| 国产精品丝袜久久久久久app| 欧美肥大bbwbbw高潮| 95精品视频在线| 国产高清不卡一区二区|