示例#1
0
void L3SupServMessage::write(L3Frame& dest) const
{
	// We override L3Message::write for the transaction identifier.
	size_t l3len = bitsNeeded();
	if (dest.size()!=l3len) dest.resize(l3len);
	size_t wp = 0;
	dest.writeField(wp,mTI,4);
	dest.writeField(wp,PD(),4);
	dest.writeField(wp,MTI(),8);
	writeBody(dest,wp);
}
示例#2
0
void vol_start(void )
{
	const char *tt[]={"Reserved","Simple Object type","Simple scalable object type",
		   "Core object type","Main object type","N bit","Basic 2d","2D mesh",
		   "Simple face","Still text","Adv RT Simple","core scalable",
		   "Adv Coding efficiency","Adv Scalable Text","simple FBA"};

	const char *tar[]={"Forbidden","1:1","12:11","10:11","16:11","40:33","","","","","","","","","","Extended"};
		   
	uint32_t info,verid,pri;
		ONEOPT("Random access vol");	
		parser->read(8,&info);
		printf("\t: %s (%ld)\n",tt[info&15],info);
		info=parser->read1bit(); // is object layer
		if(info)
		{

				printf("\tis_vo_id\n");
				parser->read(4,&verid);
				parser->read(3,&pri);
				printf("\t\tverid: %ld\n",verid);
				printf("\t\tpri  : %ld\n",pri);
		}
		uint32_t ar;
		parser->read(4,&ar);
		printf("\t AR: %s (%ld)\n",tar[ar],ar);
		if(ar==15)
				{
					printf("\t\t %u %% %u\n",parser->readByte(),parser->readByte());

				}
		

		info=parser->read1bit(); // Vol control paramater
		if(info) {
			printf("\t Vol control parameter\n");
			parser->read(2,&info);
			printf("\tChroma %ld (1=yv12)\n",info);
			ONEOPT("Low Delay");
			info=parser->read1bit(); // VBV Stuff 
			if(info) {
					printf("\tVBV \n");
			parser->read(16,&info);
			parser->read(16,&info);
			parser->read(16,&info);
			parser->read(16,&info);
			parser->read(16,&info);
				}

			}
		parser->read(2,&info);
		printf("\tShape: %ld ",info);
		if(!info) printf(" rectangular");
		printf("\n");
		parser->read1bit(); // marker

		uint32_t u1,u2;
		
		//parser->read(16,&time_inc);
		parser->read(8,&u1);
		parser->read(8,&u2);
		time_inc=(u1<<8)+u2;

		printf("\t u1u2 %ld %ld",u1,u2);

		parser->read1bit(); // marker
		printf("\tTime inc:%ld",time_inc);
		
		time_bits=bitsNeeded(time_inc);
		printf("\n warning tims_bits forced to 12\n");
		//time_bits=12;
		
//		printf(" time coded on %u bits \n",time_bits);
		info=parser->read1bit(); // fixed_vop_rate
		if(info)
		{
			printf("\t\tFixed vop rate\n");
			parser->read(time_bits,&info); // time inc
			printf("\tFixed vop time inc:%ld\n",info);
		}
		parser->read1bit(); // marker
		parser->read(13,&info); // width 
		printf("\twidth:%ld\n",info);
		x_width=info;
		parser->read1bit(); // marker
		parser->read(13,&info); // height 
		x_height=info;
		printf("\theight:%ld\n",info);
		parser->read1bit(); // marker
		ONEOPT("Interlaced");	
		NOT_ONEOPT("ODBMC DISABLED");	
		if(verid==1)
		{
			ONEOPT("sprite enable");
		}
		else
		{
			parser->read(2,&info);
			printf("\tsprite enable : %ld\n",info);
		}
		if(parser->read1bit())  // not 8 bits
		{
			parser->read(4,&info);
			printf("\t quant precision :%ld\n",info);
			parser->read(4,&info);
			printf("\t bits per pixel  :%ld\n",info);

		}
		info=parser->read1bit(); // quant type
		printf("\t Quant type :%ld\n",info);
		if(info) 
		{
			printf("\t Extra quant matrix info--> NOT DECODED!!\n");
			info=parser->read1bit(); // load quant matrix
			if(info)
			{
				printf("\t\t Load intra Quant :%ld\n",info);
				while(parser->readByte());
			}
			info=parser->read1bit(); // load quant matrix
			if(info)
			{
				printf("\t\t Load non intra Quant :%ld\n",info);
				while(parser->readByte());
			}

		}
		if(verid!=1)
		{
			ONEOPT("quarter sample");
		}
		ONEOPT("Complexity estimation disable ");
		ONEOPT("Resync marker disable ");
	//	("Data partitionned ");
		info=parser->read1bit(); // quant type
		if(info)
		{
			printf("\tData partitionned :%ld\n",info);
			ONEOPT("Reversible VLC ");
		}
		ONEOPT("Newpred enable ");
		ONEOPT("Reduced resolution enable ");
}