H.264完整的C语言代码和DCT的代码

源代码在线查看: idxgen_kc.i

软件大小: 4747 K
上传用户: aoaoaoao
关键词: 264 DCT C语言代码 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#line 1 "D:\\working\\im_apps\\h264\\idxgen_kc.cpp"
				#line 1 "D:/working/tools/isim/isimexe/blank_headers\\idb_kernelc.hpp"
				
				
				
				
				
				
				
				
				#line 2 "D:\\working\\im_apps\\h264\\idxgen_kc.cpp"
				#line 1 "D:\\working\\im_apps\\h264\\mpeg.hpp"
				
				
				
				
				#line 1 "D:/working/tools/isim/isimexe/blank_headers\\idb_types.hpp"
				
				
				
				
				
				
				
				
				
				
				
				
				
				#line 6 "D:\\working\\im_apps\\h264\\mpeg.hpp"
				#line 1 "D:/working/tools/isim/isimexe/blank_headers\\idb_deftypes.hpp"
				
				
				
				
				#line 7 "D:\\working\\im_apps\\h264\\mpeg.hpp"
				
				#decl idxGen(ostream   indices,
				              uc&        uc_size,
				              uc&        uc_params);
				;
				
				
				#decl icolor(istream datain,
				              ostream Yout,
				              ostream CrCbout);
				;
				
				
				#decl pcolor(istream datain,
				              ostream Yout,
				              ostream CrCbout);
				;
				
				
				#decl dct(istream datain,
				           istream consts,
				           ostream out,
				           uc& uc_quantizer_scale);
				;
				
				
				#decl idct(istream datain,
				            istream consts,
				            ostream out,
				            uc& uc_quantizer_scale);
				;
				
				
				#decl rle(istream Yin,
				           istream CrCbin,
				           istream indices,
				           cistream motion,
				           costream out,
				           uc& pframe,
				           uc& quant_scale);
				;
				
				
				#decl difference(istream curryblks,
				                  istream currcblks,
				                  istream refyblks,
				                  istream refcblks,
				                  ostream diffyblks,
				                  ostream diffcblks);
				;
				
				
				#decl correlate(istream diffyblks,
				                 istream diffcblks,
				                 istream refyblks,
				                 istream refcblks,
				                 ostream newrefyblks,
				                 ostream newrefcblks,
				                 uc& uc_pframe);
				;
				
				
				#decl MV2idx(cistream motion,      
				              ostream   yindices,    
				              ostream   crcbindices, 
				              uc&        uc_offsets,  
				              uc&        uc_mblks,    
				              uc&        uc_mb_width);
				;
				
				
				#decl blocksearch(istream row0,
				                   istream row1,
				                   istream row2,
				                   istream mblocks,
				                   costream motions,
				                   uc& location);
				;
				
				
				#decl mb_encode(istream datain,
				                 istream consts,
				                 ostream color_out,
				                 ostream dct_out,
				                 costream out);
				;
				
				
				
				#line 1 "D:/working/tools/isim/isimexe/blank_headers\\idb_undeftypes.hpp"
				
				
				
				
				#line 97 "D:\\working\\im_apps\\h264\\mpeg.hpp"
				
				#line 99 "D:\\working\\im_apps\\h264\\mpeg.hpp"
				#line 3 "D:\\working\\im_apps\\h264\\idxgen_kc.cpp"
				#line 1 "D:/working/tools/isim/isimexe/blank_headers\\idb_kernelc2.hpp"
				
				
				
				
				
				
				#line 4 "D:\\working\\im_apps\\h264\\idxgen_kc.cpp"
				
				;
				
				
				
				
				
				kernel idxGen(ostream   indices,    
				              uc&        uc_size,    
				                                          
				              uc&        uc_params)  
				                                          
				                                          
				                                          
				                                          
				{
				  
				  byte4 unpack = 0x88883120;
				  int size = commclperm(ucid(), 0, uc_size);
				  double size2 = shuffled(size, unpack);
				  int width = lo(size2);
				  int height = hi(size2);
				  int parms = commclperm(ucid(), 0, uc_params);
				  double params2 = shuffled(parms, unpack);
				  int cnt = lo(params2);
				  int type = hi(params2);
				  uc uc_cnt;
				  int dummy = commclperm(ucid(), cnt, uc_cnt, 0, uc_cnt);
				
				  
				  int base_loc = 0;
				  int right_side = ((type == 1) | (type == 3));
				  int right_margin = (width & 0xf);
				  right_margin = select(itocc((right_margin>0) & right_side), right_margin,16);
				  right_margin = right_margin - 1;
				  int cid8 = cid() + 8;
				  expand x(2);
				  x[0] = select(itocc(cid() 				  x[1] = select(itocc(cid8 				
				  
				  int bottom_row = ((type == 2) | (type == 3));
				  int bottom_margin = (height & 0xf);
				  bottom_margin = select(itocc((bottom_margin>0)&bottom_row),bottom_margin,16);
				  expand y(15);
				  y[0]  = select(itocc(1 < bottom_margin), width, 0);
				  y[1]  = select(itocc(2 < bottom_margin), width, 0);
				  y[2]  = select(itocc(3 < bottom_margin), width, 0);
				  y[3]  = select(itocc(4 < bottom_margin), width, 0);
				  y[4]  = select(itocc(5 < bottom_margin), width, 0);
				  y[5]  = select(itocc(6 < bottom_margin), width, 0);
				  y[6]  = select(itocc(7 < bottom_margin), width, 0);
				  y[7]  = select(itocc(8 < bottom_margin), width, 0);
				  y[8]  = select(itocc(9 < bottom_margin), width, 0);
				  y[9]  = select(itocc(10 < bottom_margin), width, 0);
				  y[10]  = select(itocc(11 < bottom_margin), width, 0);
				  y[11]  = select(itocc(12 < bottom_margin), width, 0);
				  y[12]  = select(itocc(13 < bottom_margin), width, 0);
				  y[13]  = select(itocc(14 < bottom_margin), width, 0);
				  y[14]  = select(itocc(15 < bottom_margin), width, 0);
				
				  loop_count(uc_cnt) {
				    
				    cc last_iter = itocc(cnt == 1);
				    int first = select(last_iter, x[0], cid());
				    int second = select(last_iter, x[1], cid8);
				
				    
				    int loc = base_loc;
				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				    indices 				
				    
				    cnt = cnt - 1;
				    base_loc = base_loc + 16;
				  }
				}
							

相关资源