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

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

?? image.c

?? jm_frext22.ZIP的壓縮文件,主要用于嵌入式系統(tǒng)圖象的編解碼的開發(fā).
?? C
?? 第 1 頁 / 共 4 頁
字號:
        
        /* LC: Initializing CABAC for the current data stream. */

        if (active_pps->entropy_coding_mode_flag)
        {
          int ByteStartPosition = currStream->frame_bitoffset/8;
          if (currStream->frame_bitoffset % 8 != 0) 
            ByteStartPosition++;
          
          arideco_start_decoding (&currSlice->partArr[2].de_cabac, currStream->streamBuffer, 
            ByteStartPosition, &currStream->read_len, img->type);
        }

        /* LC: resilience code to be inserted */

        FreeNALU(nalu);
        return current_header;

        break;
      case NALU_TYPE_SEI:
        printf ("read_new_slice: Found NALU_TYPE_SEI, len %d\n", nalu->len);
        InterpretSEIMessage(nalu->buf,nalu->len,img);
        break;
      case NALU_TYPE_PPS:
        ProcessPPS(nalu);
        break;

      case NALU_TYPE_SPS:
        ProcessSPS(nalu);
        break;
      case NALU_TYPE_AUD:
//        printf ("read_new_slice: Found 'Access Unit Delimiter' NAL unit, len %d, ignored\n", nalu->len);
        break;
      case NALU_TYPE_EOSEQ:
//        printf ("read_new_slice: Found 'End of Sequence' NAL unit, len %d, ignored\n", nalu->len);
        break;
      case NALU_TYPE_EOSTREAM:
//        printf ("read_new_slice: Found 'End of Stream' NAL unit, len %d, ignored\n", nalu->len);
        break;
      case NALU_TYPE_FILL:
        printf ("read_new_slice: Found NALU_TYPE_FILL, len %d\n", nalu->len);
        printf ("Skipping these filling bits, proceeding w/ next NALU\n");
        break;
      default:
        printf ("Found NALU type %d, len %d undefined, ignore NALU, moving on\n", nalu->nal_unit_type, nalu->len);
    }
  }
  FreeNALU(nalu);

  return  current_header;
}


/*!
 ************************************************************************
 * \brief
 *    Initializes the parameters for a new picture
 ************************************************************************
 */
void init_picture(struct img_par *img, struct inp_par *inp)
{
  int i,k,l;
  if (dec_picture)
  {
    // this may only happen on slice loss
    exit_picture();
  }

  if (img->frame_num != img->pre_frame_num && img->frame_num != (img->pre_frame_num + 1) % img->MaxFrameNum) 
  {
    if (active_sps->gaps_in_frame_num_value_allowed_flag == 0)
    {
      /* Advanced Error Concealment would be called here to combat unintentional loss of pictures. */
      error("An unintentional loss of pictures occurs! Exit\n", 100);
    }
    fill_frame_num_gap(img);
  }
  img->pre_frame_num = img->frame_num;
  img->num_dec_mb = 0;

  //calculate POC
  decode_poc(img);
  //  dumppoc (img);

  if (img->structure==FRAME ||img->structure==TOP_FIELD)
  {
#ifdef WIN32
    _ftime (&(img->tstruct_start));             // start time ms
#else
    ftime (&(img->tstruct_start));              // start time ms
#endif
    time( &(img->ltime_start));                // start time s
  }

  dec_picture = alloc_storable_picture (img->structure, img->width, img->height, img->width_cr, img->height_cr);
  dec_picture->top_poc=img->toppoc;
  dec_picture->bottom_poc=img->bottompoc;
  dec_picture->frame_poc=img->framepoc;

  // reset all variables of the error concealment instance before decoding of every frame.
  // here the third parameter should, if perfectly, be equal to the number of slices per frame.
  // using little value is ok, the code will allocate more memory if the slice number is larger
  ercReset(erc_errorVar, img->PicSizeInMbs, img->PicSizeInMbs, dec_picture->size_x);
  erc_mvperMB = 0;

  switch (img->structure )
  {
  case TOP_FIELD:
    {
      dec_picture->poc=img->toppoc;
      img->number *= 2;
      break;
    }
  case BOTTOM_FIELD:
    {
      dec_picture->poc=img->bottompoc;
      img->number++;
      break;
    }
  case FRAME:
    {
      dec_picture->poc=img->framepoc;
      break;
    }
  default:
    error("img->structure not initialized", 235);
  }
    
  img->current_slice_nr=0;

  if (img->type > SI_SLICE)
  {
    set_ec_flag(SE_PTYPE);
    img->type = P_SLICE;  // concealed element
  }

  // CAVLC init
  for (i=0;i < (int)img->PicSizeInMbs; i++)
    for (k=0;k<4;k++)
      for (l=0;l<(4 + img->num_blk8x8_uv);l++)
        img->nz_coeff[i][k][l]=-1;  // CAVLC

  if(active_pps->constrained_intra_pred_flag)
  {
    for (i=0; i<(int)img->PicSizeInMbs; i++)
    {
      img->intra_block[i] = 1;
    }
  }

  // Set the slice_nr member of each MB to -1, to ensure correct when packet loss occurs
  // TO set Macroblock Map (mark all MBs as 'have to be concealed')
  for(i=0; i<(int)img->PicSizeInMbs; i++)
  {
    img->mb_data[i].slice_nr = -1; 
    img->mb_data[i].ei_flag = 1;
  }

  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->pix_c_x = 0; // define horizontal positions

  dec_picture->slice_type = img->type;
  dec_picture->used_for_reference = (img->nal_reference_idc != 0);
  dec_picture->idr_flag = img->idr_flag;
  dec_picture->no_output_of_prior_pics_flag = img->no_output_of_prior_pics_flag;
  dec_picture->long_term_reference_flag = img->long_term_reference_flag;
  dec_picture->adaptive_ref_pic_buffering_flag = img->adaptive_ref_pic_buffering_flag;

  dec_picture->dec_ref_pic_marking_buffer = img->dec_ref_pic_marking_buffer;
  img->dec_ref_pic_marking_buffer = NULL;

  dec_picture->MbaffFrameFlag = img->MbaffFrameFlag;
  dec_picture->PicWidthInMbs = img->PicWidthInMbs;
  dec_picture->pic_num = img->frame_num;
  dec_picture->frame_num = img->frame_num;
  dec_picture->coded_frame = (img->structure==FRAME);

  dec_picture->frame_mbs_only_flag = active_sps->frame_mbs_only_flag;
  dec_picture->frame_cropping_flag = active_sps->frame_cropping_flag;

  if (dec_picture->frame_cropping_flag)
  {
    dec_picture->frame_cropping_rect_left_offset   = active_sps->frame_cropping_rect_left_offset;
    dec_picture->frame_cropping_rect_right_offset  = active_sps->frame_cropping_rect_right_offset;
    dec_picture->frame_cropping_rect_top_offset    = active_sps->frame_cropping_rect_top_offset;
    dec_picture->frame_cropping_rect_bottom_offset = active_sps->frame_cropping_rect_bottom_offset;
  }

}

/*!
 ************************************************************************
 * \brief
 *    finish decoding of a picture, conceal errors and store it 
 *    into the DPB
 ************************************************************************
 */
void exit_picture()
{
  int ercStartMB;
  int ercSegment;
  frame recfr;
  unsigned int i;
  int structure, frame_poc, slice_type, refpic;
  int tmp_time;                   // time used by decoding the last frame
  char yuvFormat[10];

  // return if the last picture has already been finished
  if (dec_picture==NULL)
  {
    return;
  }

  //deblocking for frame or field
  DeblockPicture( img, dec_picture );

  if (dec_picture->MbaffFrameFlag)
    MbAffPostProc();

  recfr.yptr = &dec_picture->imgY[0][0];
  recfr.uptr = &dec_picture->imgUV[0][0][0];
  recfr.vptr = &dec_picture->imgUV[1][0][0];

  //! this is always true at the beginning of a picture
  ercStartMB = 0;
  ercSegment = 0;

  //! mark the start of the first segment
  if (!dec_picture->MbaffFrameFlag)
  {
    ercStartSegment(0, ercSegment, 0 , erc_errorVar);
    //! generate the segments according to the macroblock map
    for(i = 1; i<dec_picture->PicSizeInMbs; i++)
    {
      if(img->mb_data[i].ei_flag != img->mb_data[i-1].ei_flag)
      {
        ercStopSegment(i-1, ercSegment, 0, erc_errorVar); //! stop current segment
        
        //! mark current segment as lost or OK
        if(img->mb_data[i-1].ei_flag)
          ercMarkCurrSegmentLost(dec_picture->size_x, erc_errorVar);
        else
          ercMarkCurrSegmentOK(dec_picture->size_x, erc_errorVar);
        
        ercSegment++;  //! next segment
        ercStartSegment(i, ercSegment, 0 , erc_errorVar); //! start new segment
        ercStartMB = i;//! save start MB for this segment 
      }
    }
    //! mark end of the last segment
    ercStopSegment(dec_picture->PicSizeInMbs-1, ercSegment, 0, erc_errorVar);
    if(img->mb_data[i-1].ei_flag)
      ercMarkCurrSegmentLost(dec_picture->size_x, erc_errorVar);
    else
      ercMarkCurrSegmentOK(dec_picture->size_x, erc_errorVar);
    
    //! call the right error concealment function depending on the frame type.
    erc_mvperMB /= dec_picture->PicSizeInMbs;
    
    erc_img = img;
    if(dec_picture->slice_type == I_SLICE || dec_picture->slice_type == SI_SLICE) // I-frame
      ercConcealIntraFrame(&recfr, dec_picture->size_x, dec_picture->size_y, erc_errorVar);
    else
      ercConcealInterFrame(&recfr, erc_object_list, dec_picture->size_x, dec_picture->size_y, erc_errorVar);
  }

  if (img->structure == FRAME)         // buffer mgt. for frame mode
    frame_postprocessing(img, input);
  else
    field_postprocessing(img, input);   // reset all interlaced variables

  structure  = dec_picture->structure;
  slice_type = dec_picture->slice_type;
  frame_poc  = dec_picture->frame_poc;
  refpic     = dec_picture->used_for_reference;

  store_picture_in_dpb(dec_picture);
  dec_picture=NULL;

  if (img->last_has_mmco_5)
  {
    img->pre_frame_num = 0;
  }

  if ((structure==FRAME)||structure==BOTTOM_FIELD)
  {
    
#ifdef WIN32
    _ftime (&(img->tstruct_end));             // start time ms
#else
    ftime (&(img->tstruct_end));              // start time ms
#endif
    
    time( &(img->ltime_end));                // start time s

    tmp_time=(img->ltime_end*1000+img->tstruct_end.millitm) - (img->ltime_start*1000+img->tstruct_start.millitm);
    tot_time=tot_time + tmp_time;

  if (img->yuv_format==YUV422)
    sprintf(yuvFormat,"4:2:2");
  else if (img->yuv_format==YUV444)
    sprintf(yuvFormat,"4:4:4");
  else
    sprintf(yuvFormat,"4:2:0");
    
  if(slice_type == I_SLICE) // I picture
    fprintf(stdout,"%3d(I)  %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
        frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);
  else if(slice_type == P_SLICE) // P pictures
    fprintf(stdout,"%3d(P)  %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
    frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);
  else if(slice_type == SP_SLICE) // SP pictures
    fprintf(stdout,"%3d(SP) %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
    frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);
  else if (slice_type == SI_SLICE)
    fprintf(stdout,"%3d(SI) %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
    frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);
  else if(refpic) // stored B pictures
    fprintf(stdout,"%3d(BS) %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
        frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);
  else // B pictures
    fprintf(stdout,"%3d(B)  %3d %5d %7.4f %7.4f %7.4f  %s %5d\n",
        frame_no, frame_poc, img->qp,snr->snr_y,snr->snr_u,snr->snr_v, yuvFormat,tmp_time);

  fflush(stdout);

    if(slice_type == I_SLICE || slice_type == SI_SLICE || slice_type == P_SLICE || refpic)   // I or P pictures
      img->number++;
    else
      Bframe_ctr++;    // B pictures
    
    g_nFrame++;
  }

  img->current_mb_nr = -4712;   // impossible value for debugging, StW
  img->current_slice_nr = 0;

}

/*!
 ************************************************************************
 * \brief
 *    write the encoding mode and motion vectors of current 
 *    MB to the buffer of the error concealment module.
 ************************************************************************
 */

void ercWriteMBMODEandMV(struct img_par *img,struct inp_par *inp)
{
  extern objectBuffer_t *erc_object_list;
  int i, ii, jj, currMBNum = img->current_mb_nr;
  int mbx = xPosMB(currMBNum,dec_picture->size_x), mby = yPosMB(currMBNum,dec_picture->size_x);
  objectBuffer_t *currRegion, *pRegion;
  Macroblock *currMB = &img->mb_data[currMBNum];
  int***  mv;

  currRegion = erc_object_list + (currMBNum<<2);

  if(img->type != B_SLICE) //non-B frame
  {
    for (i=0; i<4; i++)
    {
      pRegion             = currRegion + i;
      pRegion->regionMode = (currMB->mb_type  ==I16MB  ? REGMODE_INTRA      :
                             currMB->b8mode[i]==IBLOCK ? REGMODE_INTRA_8x8  :
                             currMB->b8mode[i]==0      ? REGMODE_INTER_COPY :
                             currMB->b8mode[i]==1      ? REGMODE_INTER_PRED : REGMODE_INTER_PRED_8x8);
      if (currMB->b8mode[i]==0 || currMB->b8mode[i]==IBLOCK)  // INTRA OR COPY
      {
        pRegion->mv[0]    = 0;
        pRegion->mv[1]    = 0;
        pRegion->mv[2]    = 0;
      }
      else
      {
        ii              = 4*mbx + (i%2)*2;// + BLOCK_SIZE;
        jj              = 4*mby + (i/2)*2;
        if (currMB->b8mode[i]>=5 && currMB->b8mode[i]<=7)  // SMALL BLOCKS
        {
          pRegion->mv[0]  = (dec_picture->mv[LIST_0][ii][jj][0] + dec_picture->mv[LIST_0][ii+1][jj][0] + dec_picture->mv[LIST_0][ii][jj+1][0] + dec_picture->mv[LIST_0][ii+1][jj+1][0] + 2)/4;
          pRegion->mv[1]  = (dec_picture->mv[LIST_0][ii][jj][1] + dec_picture->mv[LIST_0][ii+1][jj][1] + dec_picture->mv[LIST_0][ii][jj+1][1] + dec_picture->mv[LIST_0][ii+1][jj+1][1] + 2)/4;
        }
        else // 16x16, 16x8, 8x16, 8x8
        {
          pRegion->mv[0]  = dec_picture->mv[LIST_0][ii][jj][0];
          pRegion->mv[1]  = dec_picture->mv[LIST_0][ii][jj][1];
//          pRegion->mv[0]  = dec_picture->mv[LIST_0][4*mbx+(i%2)*2+BLOCK_SIZE][4*mby+(i/2)*2][0];
//          pRegion->mv[1]  = dec_picture->mv[LIST_0][4*mbx+(i%2)*2+BLOCK_SIZE][4*mby+(i/2)*2][1];
        }
        erc_mvperMB      += mabs(pRegion->mv[0]) + mabs(pRegion->mv[1]);
        pRegion->mv[2]    = dec_picture->ref_idx[LIST_0][ii][jj];
      }
    }
  }
  else  //B-frame
  {
    for (i=0; i<4; i++)
    {
      ii                  = 4*mbx + (i%2)*2;// + BLOCK_SIZE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久国产综合精品女不卡| 亚洲色图制服丝袜| 亚洲一区在线观看免费| 国内精品第一页| 91片黄在线观看| 中文字幕不卡在线播放| 国产不卡视频在线播放| 国产婷婷色一区二区三区四区| 蜜臀av在线播放一区二区三区| 欧美剧情片在线观看| 亚洲无人区一区| 欧美亚洲尤物久久| 亚洲电影第三页| 欧美丝袜第三区| 一区二区三区在线不卡| 欧美日韩精品一区视频| 日韩黄色在线观看| 日韩欧美一区在线| 久久电影网电视剧免费观看| 久久久一区二区三区捆绑**| 国产成人啪免费观看软件| 国产精品美女一区二区| 99热精品一区二区| 亚洲与欧洲av电影| 日韩一区二区三区免费看| 精品无人区卡一卡二卡三乱码免费卡| 欧美tickling网站挠脚心| 国产精品自拍网站| 国产精品天美传媒| 欧美私模裸体表演在线观看| 青青草97国产精品免费观看 | 精品日韩99亚洲| 国产麻豆精品一区二区| 国产精品视频九色porn| 欧美日韩国产天堂| 国产精品一区二区三区乱码| 亚洲三级在线观看| 精品电影一区二区| 不卡一区在线观看| 精品午夜久久福利影院| 中文字幕一区二区视频| 欧美在线视频不卡| 国产一区二区免费视频| 亚洲免费观看在线观看| 3d动漫精品啪啪一区二区竹菊| 国产一区二区三区精品视频| 欧美国产日本视频| 91精品国产综合久久久久久久久久| 国产在线视视频有精品| 亚洲欧洲日韩av| 欧美一区二区人人喊爽| 9i在线看片成人免费| 麻豆精品一区二区av白丝在线| 亚洲精品一区二区三区香蕉| 99精品偷自拍| 日本不卡一二三| 国产欧美综合在线观看第十页 | 国产成人午夜高潮毛片| 亚洲成人久久影院| 中文字幕成人av| 一色屋精品亚洲香蕉网站| 欧美一区午夜视频在线观看| 波多野结衣中文字幕一区| 日本视频中文字幕一区二区三区| 国产精品入口麻豆九色| 精品久久国产老人久久综合| 色域天天综合网| 国产精品伊人色| 日韩精品一级二级 | 国产成人午夜视频| 蜜臀va亚洲va欧美va天堂| 一区二区三区在线免费观看| 国产婷婷色一区二区三区在线| 欧美一区二区三区四区高清| 不卡一区二区在线| 国产成人亚洲综合色影视| 麻豆精品一区二区三区| 五月婷婷激情综合| 亚洲一卡二卡三卡四卡五卡| 成人欧美一区二区三区黑人麻豆 | 久久品道一品道久久精品| 51精品秘密在线观看| 91久久精品一区二区二区| av电影在线观看完整版一区二区 | 乱中年女人伦av一区二区| 亚洲最新在线观看| 亚洲精品videosex极品| 国产精品理伦片| 国产女人aaa级久久久级| 精品国内二区三区| 日韩精品一区二区三区在线观看 | 亚洲柠檬福利资源导航| 国产精品美女www爽爽爽| 国产夜色精品一区二区av| 26uuu久久综合| 精品国产99国产精品| 日韩欧美一区中文| 午夜国产精品影院在线观看| 夜夜嗨av一区二区三区网页| 亚洲欧洲精品一区二区三区| 成人欧美一区二区三区白人| 日韩美女久久久| 亚洲欧美国产高清| 亚洲成人自拍网| 日本特黄久久久高潮| 亚洲第一在线综合网站| 蜜臀av性久久久久蜜臀aⅴ流畅 | 精品亚洲aⅴ乱码一区二区三区| 国模套图日韩精品一区二区 | ●精品国产综合乱码久久久久| 欧美国产乱子伦| 亚洲日本丝袜连裤袜办公室| 中文字幕欧美一| 亚洲福利视频三区| 蜜桃av一区二区三区电影| 另类人妖一区二区av| 国产成人午夜精品影院观看视频 | 欧美二区在线观看| 91精品国产福利| 美女免费视频一区二区| 9久草视频在线视频精品| 在线免费视频一区二区| 精品国偷自产国产一区| 国产精品国产三级国产a| 亚洲伊人色欲综合网| 久久精品国产免费| 9久草视频在线视频精品| 欧美肥大bbwbbw高潮| 国产视频一区二区三区在线观看 | 国产精品久久久久久久久晋中 | 91精品国产综合久久福利| 欧美成人aa大片| 国产精品视频yy9299一区| 国产精品视频一二三| 亚洲欧美一区二区三区久本道91| 成人免费一区二区三区视频| 日韩理论片网站| 日韩精品免费专区| 国产成人精品aa毛片| 成人免费视频视频在线观看免费| 欧美综合欧美视频| 69堂精品视频| 久久久亚洲午夜电影| 国产欧美精品一区二区色综合朱莉| 亚洲精品成人精品456| 另类小说色综合网站| 一本色道久久综合狠狠躁的推荐| 日韩视频123| 艳妇臀荡乳欲伦亚洲一区| 国内久久婷婷综合| 一本色道久久综合狠狠躁的推荐 | 国产精品久久久久久久久晋中| 亚洲免费大片在线观看| 欧美日韩亚洲综合在线| 精品国产一区二区精华| 亚洲欧美区自拍先锋| 日本 国产 欧美色综合| 成人免费观看视频| 日韩女优电影在线观看| 亚洲综合一区二区| 不卡的av网站| 欧美狂野另类xxxxoooo| 国产精品电影一区二区| 男人的天堂亚洲一区| av在线播放一区二区三区| 欧美一区二区三区日韩视频| 国产欧美精品一区| 美女网站在线免费欧美精品| 欧美三电影在线| 亚洲久本草在线中文字幕| 国产成人在线视频免费播放| 欧美成人女星排行榜| 亚洲国产视频一区二区| 91丨九色丨国产丨porny| 欧美激情在线一区二区| 激情图片小说一区| 日韩无一区二区| 日日噜噜夜夜狠狠视频欧美人 | 欧洲一区在线电影| 国产精品天干天干在线综合| 国产不卡在线播放| 国产欧美一区视频| 国产福利一区二区三区在线视频| 午夜在线成人av| 欧美另类高清zo欧美| 日日骚欧美日韩| 欧美日韩精品一区视频| 亚洲一区二区五区| 欧美在线一区二区三区| 亚洲人成小说网站色在线| 91小视频免费看| 国产精品美女久久久久aⅴ国产馆| 从欧美一区二区三区| 欧美激情在线免费观看| 成人黄动漫网站免费app| 中文字幕制服丝袜成人av | 亚洲线精品一区二区三区| 91美女在线观看| 最新国产成人在线观看| 色8久久精品久久久久久蜜|