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

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

?? image.c

?? 此code含H.264解碼需要的 lib和 src
?? C
?? 第 1 頁 / 共 5 頁
字號:
      if (non_conforming_stream)
        printf("RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'\n");
      else
        error("RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture', invalid bitstream",500);
    }
    // that's a definition
    listXsize[0] = img->num_ref_idx_l0_active;
  }
  if (currSliceType == B_SLICE)
  {
    if (currSlice->ref_pic_list_reordering_flag_l1)
    {
      reorder_ref_pic_list(listX[1], &listXsize[1],
                           img->num_ref_idx_l1_active - 1,
                           currSlice->reordering_of_pic_nums_idc_l1,
                           currSlice->abs_diff_pic_num_minus1_l1,
                           currSlice->long_term_pic_idx_l1);
    }
    if (no_reference_picture == listX[1][img->num_ref_idx_l1_active-1])
    {
      if (non_conforming_stream)
        printf("RefPicList1[ num_ref_idx_l1_active_minus1 ] is equal to 'no reference picture'\n");
      else
        error("RefPicList1[ num_ref_idx_l1_active_minus1 ] is equal to 'no reference picture', invalid bitstream",500);
    }
    // that's a definition
    listXsize[1] = img->num_ref_idx_l1_active;
  }

  free_ref_pic_list_reordering_buffer(currSlice);
}


/*!
 ************************************************************************
 * \brief
 *    initialize ref_pic_num array
 ************************************************************************
 */
//void set_ref_pic_num()
//{
//  int i,j;
//
//  int slice_id=img->current_slice_nr;
//
//  for (i=0;i<listXsize[LIST_0];i++)
//  {
//    dec_picture->ref_pic_num        [slice_id][LIST_0][i]=listX[LIST_0][i]->poc * 2 + ((listX[LIST_0][i]->structure==BOTTOM_FIELD)?1:0) ;
//    dec_picture->frm_ref_pic_num    [slice_id][LIST_0][i]=listX[LIST_0][i]->frame_poc * 2;
//    dec_picture->top_ref_pic_num    [slice_id][LIST_0][i]=listX[LIST_0][i]->top_poc * 2;
//    dec_picture->bottom_ref_pic_num [slice_id][LIST_0][i]=listX[LIST_0][i]->bottom_poc * 2 + 1;
//    //printf("POCS %d %d %d %d ",listX[LIST_0][i]->frame_poc,listX[LIST_0][i]->bottom_poc,listX[LIST_0][i]->top_poc,listX[LIST_0][i]->poc);
//    //printf("refid %d %d %d %d\n",(int) dec_picture->frm_ref_pic_num[LIST_0][i],(int) dec_picture->top_ref_pic_num[LIST_0][i],(int) dec_picture->bottom_ref_pic_num[LIST_0][i],(int) dec_picture->ref_pic_num[LIST_0][i]);
//  }
//
//  for (i=0;i<listXsize[LIST_1];i++)
//  {
//    dec_picture->ref_pic_num        [slice_id][LIST_1][i]=listX[LIST_1][i]->poc  *2 + ((listX[LIST_1][i]->structure==BOTTOM_FIELD)?1:0);
//    dec_picture->frm_ref_pic_num    [slice_id][LIST_1][i]=listX[LIST_1][i]->frame_poc * 2;
//    dec_picture->top_ref_pic_num    [slice_id][LIST_1][i]=listX[LIST_1][i]->top_poc * 2;
//    dec_picture->bottom_ref_pic_num [slice_id][LIST_1][i]=listX[LIST_1][i]->bottom_poc * 2 + 1;
//  }
//
//  if (!active_sps->frame_mbs_only_flag)
//  {
//    if (img->structure==FRAME)
//      for (j=2;j<6;j++)
//        for (i=0;i<listXsize[j];i++)
//        {
//          dec_picture->ref_pic_num        [slice_id][j][i] = listX[j][i]->poc * 2 + ((listX[j][i]->structure==BOTTOM_FIELD)?1:0);
//          dec_picture->frm_ref_pic_num    [slice_id][j][i] = listX[j][i]->frame_poc * 2 ;
//          dec_picture->top_ref_pic_num    [slice_id][j][i] = listX[j][i]->top_poc * 2 ;
//          dec_picture->bottom_ref_pic_num [slice_id][j][i] = listX[j][i]->bottom_poc * 2 + 1;
//        }
//  }
//
//}

/******************************* new functions defined for x900 parser. ***********************************/

/*!
 ************************************************************************
 * \brief
 *    Returns the size of the NALU (bits between start codes in case of
 *    Annex B.  
 *
 * \return
 *     0 if there is nothing any more to read (EOF)
 *    -1 in case of any error
 *
 ************************************************************************
 */
int get_next_nalu(NALU_t *nalu)
{
	int ret;
	
    ret=GetAnnexbNALU (nalu);
	
    //In some cases, zero_byte shall be present. If current NALU is a VCL NALU, we can't tell
    //whether it is the first VCL NALU at this point, so only non-VCL NAL unit is checked here.
    CheckZeroByteNonVCL(nalu, &ret);
	
    NALUtoRBSP(nalu);
	
	return ret;
}

extern FILE *fref_lists;

int parse_current_slice(NALU_t *nalu)
{
	int ret;
	int current_header = 0;
	int BitsUsedByHeader;
	Slice *currSlice = img->currentSlice;
	Bitstream *currStream;

	switch (nalu->nal_unit_type)
	{  
      case NALU_TYPE_SLICE:
      case NALU_TYPE_IDR:       
        if (img->recovery_point || nalu->nal_unit_type == NALU_TYPE_IDR)
        {
          if (img->recovery_point_found == 0)
          {
            if (nalu->nal_unit_type != NALU_TYPE_IDR)
            {
              printf("Warning: Decoding does not start with an IDR picture.\n");
              non_conforming_stream = 1;
            }
            else
              non_conforming_stream = 0;
          }
          img->recovery_point_found = 1;
        }

        if (img->recovery_point_found == 0)
            break;

        img->idr_flag = (nalu->nal_unit_type == NALU_TYPE_IDR);
        img->nal_reference_idc = nalu->nal_reference_idc;
        currSlice->dp_mode = PAR_DP_1;
        currSlice->max_part_nr = 1;
        currSlice->ei_flag = 0;
        currStream = currSlice->partArr[0].bitstream;
        currStream->ei_flag = 0;
        currStream->frame_bitoffset = currStream->read_len = 0;
        memcpy (currStream->streamBuffer, &nalu->buf[1], nalu->len-1);
        currStream->code_len = currStream->bitstream_length = RBSPtoSODB(currStream->streamBuffer, nalu->len-1);

        // Some syntax of the Slice Header depends on the parameter set, which depends on
        // the parameter set ID of the SLice header.  Hence, read the pic_parameter_set_id
        // of the slice header first, then setup the active parameter sets, and then read
        // the rest of the slice header
        BitsUsedByHeader = FirstPartOfSliceHeader();
        UseParameterSet (currSlice->pic_parameter_set_id);
        BitsUsedByHeader+= RestOfSliceHeader ();

//        FmoInit (active_pps, active_sps);

//        AssignQuantParam (active_pps, active_sps);

        // if primary slice is replaced with redundant slice, set the correct image type
//        if(img->redundant_pic_cnt && Is_primary_correct==0 && Is_redundant_correct)
//        {
//          dec_picture->slice_type=img->type;
//        }

        if(is_new_picture())
        {
          init_picture(img, input);

          current_header = SOP;
          //check zero_byte if it is also the first NAL unit in the access unit
          CheckZeroByteVCL(nalu, &ret);
        }
        else
          current_header = SOS;

        init_lists(img->type, img->currentSlice->structure);
        reorder_lists (img->type, img->currentSlice);

        if (img->structure==FRAME)
        {
          init_mbaff_lists();
        }
        // From here on, active_sps, active_pps and the slice header are valid
        if (img->MbaffFrameFlag)
          img->current_mb_nr = currSlice->start_mb_nr << 1;
        else
          img->current_mb_nr = currSlice->start_mb_nr;

        img->recovery_point = 0;
        break;
      case NALU_TYPE_SEI:
		//fprintf(img->fpinfo, "SEI:\n");
		
//        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);
    }

	return current_header;
}

void config_slice(unsigned char *nalu_start, unsigned int phy, unsigned int nalu_size)
{
	int field_pic_flag;
	int bottom_field_flag;
	int count;
	int data;
    int j;
	StorablePicture *ref_picture, *col_picture;

	// set dec_picture->PastlistX0.
	dec_picture->PastlistXsize0 = listXsize[0]; 
	if (listXsize[0] > 0) 
	{
		for(j=0; j<listXsize[0]; j++)
		{
			ref_picture = listX[0][j];

			if (ref_picture->structure == FRAME) 
			{
				dec_picture->PastlistX0[j].poc_bottom_field = ref_picture->bottom_poc * 2 + 1;
				dec_picture->PastlistX0[j].poc_top_field    = ref_picture->top_poc * 2;
			}
			else
			{
				if (ref_picture->structure == TOP_FIELD) 
					data = ref_picture->top_poc * 2;
				else if (ref_picture->structure == BOTTOM_FIELD)
					data = ref_picture->bottom_poc * 2 + 1;	

				dec_picture->PastlistX0[j].poc_bottom_field = data;
				dec_picture->PastlistX0[j].poc_top_field    = data;
			}
	        
			field_pic_flag = !(ref_picture->coded_frame);
			bottom_field_flag = (ref_picture->structure == BOTTOM_FIELD);

			data = (ref_picture->pic_num         & 0xffff)      | 
				   ((ref_picture->MbaffFrameFlag & 0x01) << 16) | 
				   (bottom_field_flag << 17) |
				   (field_pic_flag << 18) |
				   ((ref_picture->is_long_term   & 0x01) << 19);
			
            dec_picture->PastlistX0[j].ref_pic_parameter = data;
		}
	}

	// set dec_picture->PastlistX1.
	dec_picture->PastlistXsize1 = listXsize[1]; 
	if (listXsize[1] > 0) 
	{
		for(j=0; j<listXsize[1]; j++)
		{
			ref_picture = listX[1][j];
			
			if (ref_picture->structure == FRAME) 
			{
				dec_picture->PastlistX1[j].poc_bottom_field = ref_picture->bottom_poc * 2 + 1;
				dec_picture->PastlistX1[j].poc_top_field    = ref_picture->top_poc * 2;
			}
			else
			{
				if (ref_picture->structure == TOP_FIELD) 
					data = ref_picture->top_poc * 2;
				else if (ref_picture->structure == BOTTOM_FIELD)
					data = ref_picture->bottom_poc * 2 + 1;	
				
				dec_picture->PastlistX1[j].poc_bottom_field = data;
				dec_picture->PastlistX1[j].poc_top_field    = data;
			}
			
			field_pic_flag = !(ref_picture->coded_frame);
			bottom_field_flag = (ref_picture->structure == BOTTOM_FIELD);
			
			data = (ref_picture->pic_num         & 0xffff)      | 
				   ((ref_picture->MbaffFrameFlag & 0x01) << 16) | 
				   (bottom_field_flag << 17) |
				   (field_pic_flag << 18) |
				   ((ref_picture->is_long_term   & 0x01) << 19);

            dec_picture->PastlistX1[j].ref_pic_parameter = data;
		}
	}
	
	/******************* source bitstream *******************/
	// bs_source_addr    
	write_reg(0x20, (int) phy);
	
	// num_words
    write_reg(0x44, nalu_size / 4);
	
	
	/******************* memory address for current slice ********************/	
	// decoded_pic_luma_addr	
	data = dec_picture->pic_mem_idx; 		// top and bottom field use the same frame memory address.
	write_reg(0x24|0x01, data|0x010000);
	
	// decoded_pic_chroma_addr
	data = dec_picture->pic_mem_idx;      // chroma have a offset to the frame memory address.
	write_reg(0x28|0x01, data|0x020000);
	
	// mv_addr
	data = dec_picture->pic_mem_idx;
	write_reg(0x40|0x01, data|0x030000);
	
	// ff_addr
	data = dec_picture->pic_mem_idx;
	write_reg(0xf0|0x01, data|0x040000);
	
	
	/******************* ref_list0 *******************/
    if (listXsize[0] > 0) 
	{
		// ref_list_refresh_0
		write_reg(0xc0, 0x1);
		write_reg(0xc0, 0x0);
        
		for(j=0; j<listXsize[0]; j++)			
		{
			ref_picture = listX[0][j];
			
			// poc_bottom_field_0, poc_top_field_0
			switch(ref_picture->structure) 
			{
			case FRAME:
				// why top_poc and bottom_poc treated as such?
				data = ref_picture->bottom_poc * 2 + 1;
				write_reg(0xc4, data);

				data = ref_picture->top_poc * 2;
				write_reg(0xc8, data);
				break;
			case TOP_FIELD:
				data = ref_picture->top_poc * 2;
				write_reg(0xc4, data);
				write_reg(0xc8, data);
				break;
			default:
				data = ref_picture->bottom_poc * 2 + 1;
				write_reg(0xc4, data);
				write_reg(0xc8, data);
				break;
			}
			
			// ref_pic_parameter_0
			field_pic_flag = !(ref_picture->coded_frame);
			bottom_field_flag = (ref_picture->structure == BOTTOM_FIELD);
			
			data = (ref_picture->pic_num         & 0xffff)      | 
				   ((ref_picture->MbaffFrameFlag & 0x01) << 16) | 
				   (bottom_field_flag << 17) |
				   (field_pic_flag << 18) |
				   ((ref_picture->is_long_term   & 0x01) << 19);
			write_reg(0xcc, data);
			
			// ref_pic_luma_addr_0
			if (ref_picture->pic_mem_idx >= 0)
			{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中国色在线观看另类| 男男视频亚洲欧美| 青娱乐精品视频| 成人国产精品视频| 精品乱人伦小说| 亚洲成人你懂的| 99免费精品在线| 精品国产乱码久久久久久夜甘婷婷| 亚洲欧美一区二区三区孕妇| 国产精品一区二区在线播放| 7777女厕盗摄久久久| 亚洲男人都懂的| 一本一本大道香蕉久在线精品 | 久久久久久久久久久久久久久99 | 国产精品国产馆在线真实露脸| 日韩电影免费在线观看网站| 色综合久久天天| 亚洲国产电影在线观看| 麻豆成人综合网| 91精品国产综合久久久久| 依依成人综合视频| 成人中文字幕合集| 久久免费的精品国产v∧| 久久精品国产精品亚洲综合| 欧美日韩一级片在线观看| 亚洲精品中文字幕乱码三区| 成人黄色a**站在线观看| 国产视频亚洲色图| 国产成人精品一区二| 精品sm在线观看| 国内欧美视频一区二区| 精品国产一区二区三区忘忧草| 免费成人av资源网| 欧美一级精品大片| 裸体歌舞表演一区二区| 精品国产乱码久久久久久久久| 久久精品久久99精品久久| 日韩美女在线视频| 韩国一区二区三区| 国产拍揄自揄精品视频麻豆| 丁香婷婷综合色啪| 亚洲欧洲一区二区三区| 91黄色小视频| 午夜精品福利一区二区蜜股av | 亚洲精品视频在线观看网站| 91香蕉视频mp4| 亚洲最快最全在线视频| 欧美久久一二区| 国产自产高清不卡| 国产精品夫妻自拍| 欧美最猛性xxxxx直播| 五月天欧美精品| 欧美va亚洲va国产综合| 国产成人综合网| 亚洲欧美日韩人成在线播放| 欧美sm美女调教| 国产精品一区在线观看你懂的| 中文字幕欧美激情| 欧美亚洲动漫精品| 狂野欧美性猛交blacked| 欧美高清在线一区| 欧美亚洲高清一区| 国产高清久久久久| 一区av在线播放| 久久综合色天天久久综合图片| 成人一区二区三区中文字幕| 亚洲一区二区三区美女| 欧美成人猛片aaaaaaa| 99久久777色| 青青青伊人色综合久久| 最好看的中文字幕久久| 日韩欧美国产一区二区在线播放| 波多野结衣中文字幕一区| 午夜精品在线看| 中文字幕精品一区二区三区精品| 欧美日韩国产a| 成人毛片在线观看| 美女国产一区二区三区| 日韩理论在线观看| 久久久蜜臀国产一区二区| 色婷婷av一区二区三区gif | 精品国产乱码久久久久久闺蜜| 成人精品一区二区三区四区 | 美腿丝袜一区二区三区| 中文字幕中文字幕在线一区 | 激情小说欧美图片| 亚洲成人自拍偷拍| 国产欧美日韩激情| 日韩欧美不卡在线观看视频| 欧美亚洲国产怡红院影院| 成人精品鲁一区一区二区| 蜜桃av一区二区| 亚洲va韩国va欧美va| 亚洲品质自拍视频| 国产精品久久久久影视| 久久综合久久综合久久| 日韩一区二区三区三四区视频在线观看| 91视频一区二区| 成人午夜精品一区二区三区| 国产精品香蕉一区二区三区| 欧美aaa在线| 青青草一区二区三区| 五月婷婷激情综合网| 亚洲国产精品一区二区尤物区| 日韩一区中文字幕| 中文字幕一区免费在线观看 | 日韩美女视频在线| 宅男噜噜噜66一区二区66| 欧洲av一区二区嗯嗯嗯啊| 精品久久久久久久久久久久久久久| 在线视频一区二区三| 99国内精品久久| 色综合久久久久综合体| 一本高清dvd不卡在线观看| 91在线小视频| 色婷婷综合激情| 一本色道综合亚洲| 97久久超碰精品国产| 91视频在线观看| 欧美亚洲一区二区三区四区| 欧美三级日本三级少妇99| 欧美日韩亚洲高清一区二区| 欧美色老头old∨ideo| 欧美日本高清视频在线观看| 欧美日韩黄视频| 欧美一区二区私人影院日本| 欧美一级精品大片| 久久久九九九九| 欧美国产一区二区在线观看| 成人免费在线播放视频| 亚洲综合精品久久| 日本午夜一区二区| 国产精品资源网| 91免费国产在线| 欧美日韩三级视频| 欧美成人女星排行榜| 久久午夜色播影院免费高清| 国产精品夫妻自拍| 亚洲国产乱码最新视频| 九九热在线视频观看这里只有精品| 狠狠色综合日日| bt欧美亚洲午夜电影天堂| 欧美性生活影院| 精品久久久久99| 中文字幕亚洲一区二区va在线| 亚洲一区av在线| 韩国毛片一区二区三区| 99re热这里只有精品视频| 在线免费一区三区| 亚洲精品一区在线观看| 亚洲人成网站在线| 免费精品视频最新在线| 成人ar影院免费观看视频| 欧美日韩亚洲另类| 日本一二三四高清不卡| 婷婷开心久久网| 成人妖精视频yjsp地址| 欧美精品久久99久久在免费线 | 亚洲午夜在线视频| 国产美女久久久久| 色诱视频网站一区| 久久综合色之久久综合| 亚洲综合自拍偷拍| 成人性生交大片免费看中文| 欧美美女一区二区在线观看| 国产精品国产馆在线真实露脸 | 精品久久久久av影院| 一区二区三区欧美亚洲| 国产成人免费在线观看不卡| 欧美日韩在线三级| 日韩伦理av电影| 国产精品1区2区3区| 欧美福利视频一区| 一区二区久久久久久| 成人性生交大片免费看视频在线 | 青青草原综合久久大伊人精品 | 一区二区三区中文在线观看| 国产综合一区二区| 欧美浪妇xxxx高跟鞋交| 中文字幕在线播放不卡一区| 国产原创一区二区| 91精品国产91久久久久久一区二区| 亚洲精品免费一二三区| 成人免费精品视频| 久久久久久久久久看片| 精品一区二区影视| 日韩一级黄色片| 免费观看在线综合色| 欧美久久一区二区| 三级久久三级久久久| 欧美日韩精品一区二区| 亚洲国产精品一区二区www| 91丝袜美女网| 亚洲免费av高清| 92精品国产成人观看免费| 亚洲欧洲精品一区二区三区不卡| 成人免费高清在线观看| 国产精品免费人成网站| www.欧美日韩国产在线| 国产精品超碰97尤物18|