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

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

?? cabac.c

?? jm_frext22.ZIP的壓縮文件,主要用于嵌入式系統(tǒng)圖象的編解碼的開發(fā).
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
  int bframe=(img->type==B_SLICE);
  MotionInfoContexts *ctx = (img->currentSlice)->mot_ctx;
  Macroblock *currMB = &img->mb_data[img->current_mb_nr];


  if (bframe)
  {
    if (currMB->mb_available_up == NULL)
      b = 0;
    else
      b = (currMB->mb_available_up->skip_flag==0 ? 0 : 1);
    if (currMB->mb_available_left == NULL)
      a = 0;
    else
      a = (currMB->mb_available_left->skip_flag==0 ? 0 : 1);
    
    act_ctx = 7 + a + b;
    
    if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][act_ctx]) == 1)
      se->value1 = se->value2 = 0;
    else
      se->value1 = se->value2 = 1;
  }
  else
  {
    if (currMB->mb_available_up == NULL)
      b = 0;
    else
      b = (( (currMB->mb_available_up)->skip_flag != 0) ? 1 : 0 );
    if (currMB->mb_available_left == NULL)
      a = 0;
    else
      a = (( (currMB->mb_available_left)->skip_flag != 0) ? 1 : 0 );

    act_ctx = a + b;

    if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][act_ctx]) == 1)
      se->value1 = 0;
    else
      se->value1 = 1;
  }

  currMB->skip_flag = se->value1;

#if TRACE
  fprintf(p_trace, "@%d %s\t\t%d\t%d %d\n",symbolCount++, se->tracestring, se->value1,a,b);
  fflush(p_trace);
#endif
  if (!se->value1)
  {
    last_dquant=0;
  }
  return;
}

/*!
***************************************************************************
* \brief
*    This function is used to arithmetically decode the macroblock
*    intra_pred_size flag info of a given MB.
***************************************************************************
*/

void readMB_transform_size_flag_CABAC( SyntaxElement *se,
                                  struct inp_par *inp,
                                  struct img_par *img,
                                  DecodingEnvironmentPtr dep_dp)
{
  int a, b;
  int act_ctx = 0;
  int act_sym;
  
  MotionInfoContexts *ctx         = (img->currentSlice)->mot_ctx;
  Macroblock         *currMB      = &img->mb_data[img->current_mb_nr];
  
  if (currMB->mb_available_up == NULL)
    b = 0;
  else 
    b = currMB->mb_available_up->luma_transform_size_8x8_flag;
  
  if (currMB->mb_available_left == NULL)
    a = 0;
  else 
    a = currMB->mb_available_left->luma_transform_size_8x8_flag;
  
  act_ctx     = a + b;
  
  
  act_sym = biari_decode_symbol(dep_dp, ctx->transform_size_contexts + act_ctx );
  se->value1 = act_sym;
  
#if TRACE
  fprintf(p_trace, "@%d %s\t\t%d\t%d %d\n",symbolCount++, se->tracestring, se->value1,a,b);
  fflush(p_trace);
#endif
  
}

/*!
 ************************************************************************
 * \brief
 *    This function is used to arithmetically decode the macroblock
 *    type info of a given MB.
 ************************************************************************
 */
void readMB_typeInfo_CABAC( SyntaxElement *se,
                            struct inp_par *inp,
                            struct img_par *img,
                            DecodingEnvironmentPtr dep_dp)
{
  int a, b;
  int act_ctx;
  int act_sym;
  int bframe=(img->type==B_SLICE);
  int mode_sym;
  int ct = 0;
  int curr_mb_type;


  MotionInfoContexts *ctx = (img->currentSlice)->mot_ctx;
  Macroblock *currMB = &img->mb_data[img->current_mb_nr];

  if(img->type == I_SLICE)  // INTRA-frame
  {
    if (currMB->mb_available_up == NULL)
      b = 0;
    else 
      b = (((currMB->mb_available_up)->mb_type != I4MB && currMB->mb_available_up->mb_type != I8MB) ? 1 : 0 );

    if (currMB->mb_available_left == NULL)
      a = 0;
    else 
      a = (((currMB->mb_available_left)->mb_type != I4MB && currMB->mb_available_left->mb_type != I8MB) ? 1 : 0 );
      
    act_ctx = a + b;
    act_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx);
    se->context = act_ctx; // store context

    if (act_sym==0) // 4x4 Intra
    {
      curr_mb_type = act_sym;
    }
    else // 16x16 Intra
    {
      mode_sym = biari_decode_final(dep_dp);
      if(mode_sym == 1)
      {
        curr_mb_type = 25;
      }
      else
      {
        act_sym = 1;
        act_ctx = 4;
        mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx ); // decoding of AC/no AC
        act_sym += mode_sym*12;
        act_ctx = 5;
        // decoding of cbp: 0,1,2
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
        if (mode_sym!=0)
        {
          act_ctx=6;
          mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          act_sym+=4;
          if (mode_sym!=0)
              act_sym+=4;
            }
          // decoding of I pred-mode: 0,1,2,3
          act_ctx = 7;
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          act_sym += mode_sym*2;
          act_ctx = 8;
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          act_sym += mode_sym;
          curr_mb_type = act_sym;
      }
    }
  }
  else if(img->type == SI_SLICE)  // SI-frame
  {
    // special ctx's for SI4MB
    if (currMB->mb_available_up == NULL)
      b = 0;
    else 
      b = (( (currMB->mb_available_up)->mb_type != SI4MB) ? 1 : 0 );
    if (currMB->mb_available_left == NULL)
      a = 0;
    else 
      a = (( (currMB->mb_available_left)->mb_type != SI4MB) ? 1 : 0 );

    act_ctx = a + b;
    act_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[4] + act_ctx);
    se->context = act_ctx; // store context

    if (act_sym==0) //  SI 4x4 Intra
    {
      curr_mb_type = 0;
    }
    else // analog INTRA_IMG
    {
      if (currMB->mb_available_up == NULL)
        b = 0;
      else 
        b = (( (currMB->mb_available_up)->mb_type != I4MB) ? 1 : 0 );
      if (currMB->mb_available_left == NULL)
        a = 0;
      else 
        a = (( (currMB->mb_available_left)->mb_type != I4MB) ? 1 : 0 );

      act_ctx = a + b;
      act_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx);
      se->context = act_ctx; // store context
      
      
      if (act_sym==0) // 4x4 Intra
      {
        curr_mb_type = 1;
      }
      else // 16x16 Intra
      {
        mode_sym = biari_decode_final(dep_dp);
        if( mode_sym==1 )
        {
          curr_mb_type = 26;
        }
        else
        {
          act_sym = 2;
          act_ctx = 4;
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx ); // decoding of AC/no AC
          act_sym += mode_sym*12;
          act_ctx = 5;
          // decoding of cbp: 0,1,2
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          if (mode_sym!=0)
          {
            act_ctx=6;
            mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
            act_sym+=4;
            if (mode_sym!=0)
              act_sym+=4;
          }
          // decoding of I pred-mode: 0,1,2,3
          act_ctx = 7;
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          act_sym += mode_sym*2;
          act_ctx = 8;
          mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[0] + act_ctx );
          act_sym += mode_sym;
          curr_mb_type = act_sym;
        }
      }
    }
  }
  else
  {
    if (bframe)
    {
      ct = 1;
      if (currMB->mb_available_up == NULL)
        b = 0;
      else
        b = (( (currMB->mb_available_up)->mb_type != 0) ? 1 : 0 );
      if (currMB->mb_available_left == NULL)
        a = 0;
      else
        a = (( (currMB->mb_available_left)->mb_type != 0) ? 1 : 0 );

      act_ctx = a + b;

      if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][act_ctx]))
      {
        if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][4]))
        {
          if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][5]))
          {
            act_sym=12;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=8;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=4;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=2;

            if      (act_sym==24)  act_sym=11;
            else if (act_sym==26)  act_sym=22;
            else
            {
              if (act_sym==22)     act_sym=23;
              if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=1; 
            }
          }
          else
          {
            act_sym=3;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=4;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=2;
            if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym+=1;
          }
        }
        else
        {
          if (biari_decode_symbol (dep_dp, &ctx->mb_type_contexts[2][6])) act_sym=2;
          else                                                            act_sym=1;
        }
      }
      else
      {
        act_sym = 0;
      }
    }
    else // P-frame
    {
      {
        if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][4] )) 
        {
          if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][7] ))   act_sym = 7;
          else                                                              act_sym = 6;
        }
        else
        {
          if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][5] ))
          {
            if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][7] )) act_sym = 2;
            else                                                            act_sym = 3;
          }
          else
          {
            if (biari_decode_symbol(dep_dp, &ctx->mb_type_contexts[1][6] )) act_sym = 4;
            else                                                            act_sym = 1;
          }
        }
      }
    }

    if (act_sym<=6 || (((img->type == B_SLICE)?1:0) && act_sym<=23))
    {
      curr_mb_type = act_sym;
    }
    else  // additional info for 16x16 Intra-mode
    {
      mode_sym = biari_decode_final(dep_dp);
      if( mode_sym==1 )
      {
        if(bframe)  // B frame
          curr_mb_type = 48;
        else      // P frame
          curr_mb_type = 31;
      }
      else
      {
        act_ctx = 8;
        mode_sym =  biari_decode_symbol(dep_dp, ctx->mb_type_contexts[1] + act_ctx ); // decoding of AC/no AC
        act_sym += mode_sym*12;

        // decoding of cbp: 0,1,2
        act_ctx = 9;
        mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[1] + act_ctx );
        if (mode_sym != 0)
        {
          act_sym+=4;
          mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[1] + act_ctx );
          if (mode_sym != 0)
            act_sym+=4;
        }

        // decoding of I pred-mode: 0,1,2,3
        act_ctx = 10;
        mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[1] + act_ctx );
        act_sym += mode_sym*2;
        mode_sym = biari_decode_symbol(dep_dp, ctx->mb_type_contexts[1] + act_ctx );
        act_sym += mode_sym;
        curr_mb_type = act_sym;
      }
    }
  }
  se->value1 = curr_mb_type;

//  if (curr_mb_type >= 23)       printf(" stopx");
#if TRACE
  fprintf(p_trace, "@%d %s\t\t\t%d\n",symbolCount++, se->tracestring, se->value1);
  fflush(p_trace);
#endif
}

/*!
 ************************************************************************
 * \brief
 *    This function is used to arithmetically decode a pair of
 *    intra prediction modes of a given MB.
 ************************************************************************
 */
void readIntraPredMode_CABAC( SyntaxElement *se,
                              struct inp_par *inp,
                              struct img_par *img,
                              DecodingEnvironmentPtr dep_dp)
{
  TextureInfoContexts *ctx     = img->currentSlice->tex_ctx;
  int act_sym;

  // use_most_probable_mode
  act_sym = biari_decode_symbol(dep_dp, ctx->ipr_contexts);

  // remaining_mode_selector
  if (act_sym == 1)
    se->value1 = -1;
  else
  {
    se->value1  = 0;
    se->value1 |= (biari_decode_symbol(dep_dp, ctx->ipr_contexts+1)     );
    se->value1 |= (biari_decode_symbol(dep_dp, ctx->ipr_contexts+1) << 1);
    se->value1 |= (biari_decode_symbol(dep_dp, ctx->ipr_contexts+1) << 2);
  }

#if TRACE
  fprintf(p_trace, "@%d %s\t\t\t%d\n",symbolCount++, se->tracestring, se->value1);
  fflush(p_trace);
#endif
}
/*!
 ************************************************************************
 * \brief
 *    This function is used to arithmetically decode the reference
 *    parameter of a given MB.
 ************************************************************************
 */
void readRefFrame_CABAC( SyntaxElement *se,
                         struct inp_par *inp,
                         struct img_par *img,
                         DecodingEnvironmentPtr dep_dp)
{
  MotionInfoContexts *ctx = img->currentSlice->mot_ctx;
  Macroblock *currMB = &img->mb_data[img->current_mb_nr];

  int   addctx  = 0;
  int   a, b;
  int   act_ctx;
  int   act_sym;
  int** refframe_array = dec_picture->ref_idx[se->value2];
  int   b8a, b8b;

  PixelPos block_a, block_b;
  
  getLuma4x4Neighbour(img->current_mb_nr, img->subblock_x, img->subblock_y, -1,  0, &block_a);
  getLuma4x4Neighbour(img->current_mb_nr, img->subblock_x, img->subblock_y,  0, -1, &block_b);

  b8a=((block_a.x/2)%2)+2*((block_a.y/2)%2);
  b8b=((block_b.x/2)%2)+2*((block_b.y/2)%2);

  if (!block_b.available)
    b=0;
  else if ( (img->mb_data[block_b.mb_addr].mb_type==IPCM) || IS_DIRECT(&img->mb_data[block_b.mb_addr]) || (img->mb_data[block_b.mb_addr].b8mode[b8b]==0 && img->mb_data[block_b.mb_addr].b8pdir[b8b]==2))
    b=0;
  else 
  {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91色porny| 香蕉成人伊视频在线观看| 成人av在线资源网站| 一区二区三区电影在线播| 欧美老肥妇做.爰bbww视频| 久久精品国产99国产精品| 国产欧美精品区一区二区三区| 成人国产在线观看| 视频一区免费在线观看| 国产三级三级三级精品8ⅰ区| 色一区在线观看| 美女网站色91| 精品国产91洋老外米糕| 97精品久久久久中文字幕| 日韩电影免费一区| 久久久久久久久久久久久久久99 | 欧美激情自拍偷拍| 在线观看一区二区视频| 国产综合久久久久久久久久久久| 国产精品久久久一本精品| 欧美精品一级二级三级| 国产精品一品二品| 婷婷中文字幕综合| 亚洲欧美怡红院| 欧美日韩aaa| jizzjizzjizz欧美| 国产资源精品在线观看| 亚洲美女屁股眼交3| 久久久91精品国产一区二区精品 | 亚洲男人电影天堂| 日韩一区二区三区三四区视频在线观看| 成人小视频免费在线观看| 视频一区二区国产| 国产精品成人网| 2014亚洲片线观看视频免费| 欧美高清dvd| 91黄色激情网站| 这里是久久伊人| 国产精品伊人色| 麻豆久久久久久| 肉肉av福利一精品导航| 国内精品第一页| 青青青爽久久午夜综合久久午夜 | 国产美女主播视频一区| 国产一区视频网站| 国产成人午夜片在线观看高清观看| 国产一区二区在线视频| 国产一区在线观看麻豆| 成人性生交大片免费看视频在线| 不卡的av在线| 色综合天天综合网国产成人综合天| 色综合视频一区二区三区高清| 色婷婷久久综合| 欧美日韩三级一区| 日韩欧美国产精品一区| 久久久午夜精品| 国产精品女同一区二区三区| 亚洲色图.com| 水蜜桃久久夜色精品一区的特点 | 国产成人免费在线| 色综合亚洲欧洲| 欧美日韩国产免费| 欧美大黄免费观看| 中文幕一区二区三区久久蜜桃| 亚洲欧洲日本在线| 午夜久久久久久| 国产精品一二三区| 在线观看不卡视频| 日韩欧美一级在线播放| 亚洲国产精品激情在线观看| 亚洲一区视频在线观看视频| 日韩高清在线电影| 成人av第一页| 欧美精品 日韩| 国产精品网站导航| 性感美女极品91精品| 国产精品一区二区男女羞羞无遮挡| 9i在线看片成人免费| 欧美精品123区| 欧美国产激情一区二区三区蜜月| 亚洲综合免费观看高清完整版| 久久国产精品99精品国产| 成人av免费网站| 欧美一区二区三区在线| 国产精品久久久久aaaa| 日本不卡一区二区三区| 成人av电影观看| 日韩欧美123| 一区二区免费看| 国产乱妇无码大片在线观看| 欧美视频一区二区三区四区| 久久蜜臀中文字幕| 亚洲国产精品欧美一二99| 国产jizzjizz一区二区| 69堂成人精品免费视频| 国产精品少妇自拍| 麻豆国产一区二区| 在线观看日韩毛片| 国产精品亲子伦对白| 美国三级日本三级久久99| 欧洲国产伦久久久久久久| 国产亚洲精品aa午夜观看| 日韩高清中文字幕一区| 色视频欧美一区二区三区| 久久久久久久久久看片| 美女视频一区二区三区| 精品视频全国免费看| 国产精品卡一卡二卡三| 国产一区中文字幕| 日韩一级完整毛片| 午夜精品久久久久久久久久| 91免费国产在线| 欧美精彩视频一区二区三区| 久久国产三级精品| 这里只有精品电影| 亚洲电影第三页| 欧美在线制服丝袜| 亚洲免费观看高清完整版在线观看熊 | 欧美一区二区三区四区高清| 自拍偷拍国产精品| 国产91精品一区二区| 精品久久久久香蕉网| 蜜臀久久久久久久| 欧美美女bb生活片| 亚洲一区二区三区四区五区黄| yourporn久久国产精品| 国产欧美1区2区3区| 国产精品123| 精品国产一区二区精华| 蜜桃视频第一区免费观看| 56国语精品自产拍在线观看| 一区二区三区在线免费| proumb性欧美在线观看| 中文字幕免费一区| 成人在线综合网| 最新国产の精品合集bt伙计| av电影在线观看一区| 亚洲色图欧美激情| 欧美在线高清视频| 亚洲一区二区av在线| 欧美日韩一级二级| 日韩精品电影一区亚洲| 日韩欧美一卡二卡| 国产一区视频网站| 中文乱码免费一区二区| 一本色道亚洲精品aⅴ| 夜夜揉揉日日人人青青一国产精品 | 国产婷婷一区二区| 成人av电影免费在线播放| 一区在线播放视频| 色哟哟日韩精品| 午夜国产不卡在线观看视频| 欧美一区二区在线播放| 激情另类小说区图片区视频区| 久久精品亚洲国产奇米99| 99re66热这里只有精品3直播| 亚洲色图制服丝袜| 欧美日韩一区二区电影| 免费高清在线一区| 国产欧美一二三区| 在线观看日韩精品| 精品一区二区三区日韩| 国产精品私房写真福利视频| 欧美亚洲国产一区二区三区va| 日韩精品亚洲专区| 欧美激情一区二区三区在线| 色悠悠久久综合| 日韩高清在线观看| 国产精品你懂的在线欣赏| 在线免费观看不卡av| 久久99热这里只有精品| 国产精品国产三级国产普通话99| 在线观看一区二区视频| 精品在线亚洲视频| 亚洲精品国产第一综合99久久| 欧美一区二区三区在| 不卡视频一二三四| 男人的天堂亚洲一区| 欧美激情一区二区三区全黄| 欧美午夜片在线看| 国产99久久久国产精品免费看| 亚洲午夜电影在线| 久久青草国产手机看片福利盒子| 91久久精品日日躁夜夜躁欧美| 日本不卡不码高清免费观看| 亚洲婷婷综合色高清在线| 日韩一区二区免费视频| 色综合中文字幕国产 | 午夜精品123| 国产精品免费视频一区| 51久久夜色精品国产麻豆| 99久久免费精品| 免费成人在线播放| 亚洲一区二区五区| 国产精品天天看| 26uuu精品一区二区| 欧美日韩国产区一| 色88888久久久久久影院野外| 国产一区二区精品久久91| 午夜电影久久久|