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

源代码在线查看: test_sc_im.cpp

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

相关代码

				#include "idb_streamc.hpp"
				#include "test_kc.hpp"
				// this defines the function "testProgram"
				// as a stream program
				STREAMPROG(testProgram);
				// this stream program is a simple example
				// that calls the addAndSum kernel twice
				// all stream programs must have only these arguments
				#include "sc_dispatcher_int.hpp"
				char* __opsData_testProgram[];
				
				
				
				//************************************************************
				void streamLoadBin_8(StreamDispatcherInterface& __dis, void*& __i0_ptr, unsigned int& __i0_len, IdbStreamRaw& __i0_out1c)
				//************************************************************
				{
				
				 // --- BLOCK 8 0x00E430C8 ---
				 // --- succ: 9 ---
				 IdbStreamRaw& out1 = __i0_out1c;
				 __streamLoadBinStart(__i0_len, out1);
				 unsigned __int32* ptr_uint32 = ((unsigned __int32*) __i0_ptr);
				  /*__streamLoadBinCore(ptr_uint32, __i0_len, out1)*/
				 __dis.sendOp(0);
				 __dis.updateAndSendHostReceive(1, ptr_uint32, __i0_len);
				 __dis.waitForCompleteOp(1);
				}
				
				
				//************************************************************
				void streamLoadUCode_2(StreamDispatcherInterface& __dis, char*& __i4_file, unsigned int& __i4_len)
				//************************************************************
				{
				
				 // --- BLOCK 2 0x00D4BEB8 ---
				 // --- succ: -1 ---
				 unsigned __int32* ptr = 0;
				 bool __t409 = __streamLoadUCodeStart(__i4_file, ptr, ((int) __i4_len));
				 bool __t410 = (__t409 != 0);
				
				 if (__t410) {
				  // --- BLOCK 3 0x00E2FBF8 ---
				  // --- succ: -1 ---
				  int __t411 = __dis.getImagine();
				  unsigned int tempImIdx = ((unsigned int) __t411);
				
				  {
				   // --- BLOCK 4 0x00E2EDF0 ---
				   // --- succ: -1 ---
				   int p = 0;
				   int __t412 = __dis.getNumImagines();
				   bool __t413 = (p < __t412);
				
				   {
				    // --- BLOCK 5 0x00E2F500 ---
				    // --- succ: -1 ---
				    //------------------------------------------------------------
				    // peeled first: 0
				    //------------------------------------------------------------
				
				    if (__t413) {
				     // --- BLOCK 6 0x00DA5940 ---
				     // --- succ: -1 ---
				     __dis.setImagine(p);
				     im_stream < im_uint > out1(((int) __i4_len), 0);
				
				     {
				      // --- BLOCK 7 0x00DA5E80 ---
				      // --- succ: -1 ---
				      void* __i0_ptr = ((void*) ptr);
				      unsigned int __i0_len = __i4_len;
				      IdbStreamRaw& __i0_out1c = out1;
				      //------------------------------------------------------------
				      // inlined: streamLoadBin
				      //------------------------------------------------------------
				      streamLoadBin_8(__dis, __i0_ptr, __i0_len, __i0_out1c);
				
				      // --- BLOCK 9 0x00E39E08 ---
				      // --- succ: 10 ---
				     }
				
				     // --- BLOCK 10 0x00E39EF8 ---
				     // --- succ: 11 ---
				     /* call: ~im_stream < im_uint > */;
				     int __t414 = (p+1);
				     (p = __t414);
				     int __t412 = __dis.getNumImagines();
				     (__t413 = (p < __t412));
				    }
				
				    // --- BLOCK 11 0x00E44ED0 ---
				    // --- succ: -1 ---
				
				    // --- BLOCK 17 0x00DD7AC0 ---
				    // --- succ: -1 ---
				
				    // --- BLOCK 23 0x009448C0 ---
				    // --- succ: -1 ---
				
				    // --- BLOCK 29 0x00D62710 ---
				    // --- succ: 30 ---
				   }
				
				   // --- BLOCK 30 0x00D62800 ---
				   // --- succ: 31 ---
				  }
				
				  // --- BLOCK 31 0x00D628C8 ---
				  // --- succ: 32 ---
				  __dis.setImagine(((int) tempImIdx));
				  __streamLoadEnd(ptr);
				 }
				
				 // --- BLOCK 32 0x00E0B4A8 ---
				 // --- succ: 33 ---
				}
				
				
				//************************************************************
				void streamLoadBin_41(StreamDispatcherInterface& __dis, void*& __i5_ptr, unsigned int& __i5_len, IdbStreamRaw& __i5_out1c)
				//************************************************************
				{
				
				 // --- BLOCK 41 0x00C970A8 ---
				 // --- succ: 42 ---
				 IdbStreamRaw& out1 = __i5_out1c;
				 __streamLoadBinStart(__i5_len, out1);
				 unsigned __int32* ptr_uint32 = ((unsigned __int32*) __i5_ptr);
				  /*__streamLoadBinCore(ptr_uint32, __i5_len, out1)*/
				 __dis.sendOp(2);
				 __dis.updateAndSendHostReceive(3, ptr_uint32, __i5_len);
				 __dis.waitForCompleteOp(3);
				}
				
				
				//************************************************************
				void streamSaveBin_45(StreamDispatcherInterface& __dis, void*& __i6_ptr, IdbStreamRaw& __i6_in1c)
				//************************************************************
				{
				
				 // --- BLOCK 45 0x00D86F68 ---
				 // --- succ: 46 ---
				 IdbStreamRaw& in1 = __i6_in1c;
				 unsigned __int32* ptr_uint32 = ((unsigned __int32*) __i6_ptr);
				  /*__streamSaveBinCore(ptr_uint32, in1)*/
				 __dis.updateAndSendHostSend(14, ptr_uint32, in1);
				 __dis.waitForCompleteOp(14);
				}
				
				
				
				void /* streamprog */  testProgram(StreamDispatcherInterface& __dis, String args)
				{
				
				 // --- BLOCK 0 0x00A849F8 ---
				 // --- succ: -1 ---
				 static int __opsIdx = -1;
				 __dis.loadOps(__streamProg_testProgram, 15, __opsData_testProgram, 1, 1);
				
				 {
				  // --- BLOCK 1 0x00E005C8 ---
				  // --- succ: -1 ---
				  char* __i4_file = "test_kc.raw";
				  unsigned int __i4_len = 432;
				  //------------------------------------------------------------
				  // inlined: streamLoadUCode
				  //------------------------------------------------------------
				  streamLoadUCode_2(__dis, __i4_file, __i4_len);
				
				  // --- BLOCK 33 0x00C97520 ---
				  // --- succ: 34 ---
				 }
				
				 // --- BLOCK 34 0x0094D490 ---
				 // --- succ: -1 ---
				 ostream& __t0 = operator				 __t0.operator				 im_stream < im_int > s1(32, 0);
				 im_stream < im_int > s2(32, 0);
				 int data[32] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
				
				 {
				  // --- BLOCK 35 0x00A7C818 ---
				  // --- succ: 36 ---
				  int i = 0;
				  bool __t1 = (i < 32);
				
				  // --- BLOCK 36 0x00DD35A8 ---
				  // --- succ: -1 ---
				
				  while (__t1) 
				  {
				
				   // --- BLOCK 37 0x00A7DC08 ---
				   // --- succ: 36 ---
				   int __t2 = (4*i);
				   ((*((int*)(((char*)data) + __t2))) = i);
				   int __t3 = (i+1);
				   (i = __t3);
				   (__t1 = (i < 32));
				  }
				
				  // --- BLOCK 38 0x00E0B2E8 ---
				  // --- succ: 39 ---
				 }
				
				 // --- BLOCK 39 0x00D91758 ---
				 // --- succ: -1 ---
				
				 {
				  // --- BLOCK 40 0x00E00690 ---
				  // --- succ: -1 ---
				  void* __i5_ptr = ((void*) data);
				  unsigned int __i5_len = 32;
				  IdbStreamRaw& __i5_out1c = s1;
				  //------------------------------------------------------------
				  // inlined: streamLoadBin
				  //------------------------------------------------------------
				  streamLoadBin_41(__dis, __i5_ptr, __i5_len, __i5_out1c);
				
				  // --- BLOCK 42 0x00D91A60 ---
				  // --- succ: 43 ---
				 }
				
				 // --- BLOCK 43 0x00D91910 ---
				 // --- succ: -1 ---
				 im_uc < im_int > uc_sum(0);
				 im_stream < im_int > temp(32, 0);
				  /*addAndSum((s1), (s1), (temp), uc_sum)*/
				 __dis.sendOp(4);
				 __dis.sendOp(5);
				 __dis.sendOp(6);
				 __dis.updateAndSendUCWrite(7, ( (im_uc_raw*)&uc_sum )->uc_val.clust_vals[0]);
				 __dis.sendOp(8);
				 __dis.updateAndSendUCRead(9, (im_uc_raw*)&uc_sum);
				;
				  /*addAndSum((s1), (temp), (s2), uc_sum)*/
				 __dis.sendOp(10);
				 __dis.updateAndSendUCWrite(11, ( (im_uc_raw*)&uc_sum )->uc_val.clust_vals[0]);
				 __dis.sendOp(12);
				 __dis.updateAndSendUCRead(13, (im_uc_raw*)&uc_sum);
				;
				
				 {
				  // --- BLOCK 44 0x00D4BFF8 ---
				  // --- succ: -1 ---
				  void* __i6_ptr = ((void*) data);
				  IdbStreamRaw& __i6_in1c = s2;
				  //------------------------------------------------------------
				  // inlined: streamSaveBin
				  //------------------------------------------------------------
				  streamSaveBin_45(__dis, __i6_ptr, __i6_in1c);
				
				  // --- BLOCK 46 0x00D91E98 ---
				  // --- succ: 47 ---
				 }
				
				 // --- BLOCK 47 0x00D91C58 ---
				 // --- succ: -1 ---
				
				 {
				  // --- BLOCK 48 0x00A81C90 ---
				  // --- succ: 49 ---
				  int i__scp15 = 0;
				  bool __t4 = (i__scp15 < 32);
				
				  // --- BLOCK 49 0x00C97330 ---
				  // --- succ: -1 ---
				
				  while (__t4) 
				  {
				
				   // --- BLOCK 50 0x00A82B98 ---
				   // --- succ: 49 ---
				   int __t5 = (4*i__scp15);
				   ostream& __t6 = (*((ostream*) (&cout))).operator				   __t6.operator				   int __t7 = (i__scp15+1);
				   (i__scp15 = __t7);
				   (__t4 = (i__scp15 < 32));
				  }
				
				  // --- BLOCK 51 0x00C97458 ---
				  // --- succ: 52 ---
				 }
				
				 // --- BLOCK 52 0x00D92038 ---
				 // --- succ: 53 ---
				 (*((ostream*) (&cout))).operator				 ostream& __t8 = (*((ostream*) (&cout))).operator				 int __t9 = ucRead(uc_sum);
				 ostream& __t10 = __t8.operator				 __t10.operator				 /* call: ~im_stream < im_int > */;
				 /* call: ~im_uc < im_int > */;
				 /* call: ~im_stream < im_int > */;
				 /* call: ~im_stream < im_int > */;
				
				 // --- BLOCK 53 0x00D4F838 ---
				 // --- succ: -1 ---
				}
				
				
				char* __opsData_testProgram[] = {
				  "0 1 0 0 0 0 32 0 0 32 1 0 1 10 4294967295 0  1 5 0  0 432 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 0 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 15 addAndSum ucode ",
				  "1 7 1 0 0 1 32 0 0 32 3 0 6 10 4294967295 0  10 4294967295 0  -1 -1 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 1 5 -1 0 -1 -1 0  1 5 1 0 0 1 32 1 32 0 -1 32 0 32 0 32 1 32 0 32 0 32 0 0 432 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 15 addAndSum ucode ",
				  "2 1 2 0 0 0 32 0 0 32 4 0 1 10 4294967295 0  1 1 0  14 32 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 2 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 2 s1 ",
				  "3 7 3 448 0 1 32 0 0 32 12 0 6 10 4294967295 0  10 4294967295 0  -1 -1 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 1 5 -1 0 -1 -1 0  1 1 1 0 0 3 32 4 32 0 -1 32 0 32 0 32 4 32 0 32 0 32 0 0 32 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 2 s1 ",
				  "4 1 4 0 0 0 32 0 0 32 16 0 1 10 4294967295 0  1 4 0  0 432 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 4 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 15 addAndSum ucode ",
				  "5 8 5 0 0 0 32 0 0 32 50 0 4 10 4294967295 0  10 4294967295 0  -1 -1 3 0 0 10 test_kc.uc 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 4 5 -1 0 -1 -1 27 Loading kernel : test_kc.uc 1 4 2 2 0 5 32 18 32 0 -1 32 0 32 0 32 18 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "6 1 6 0 0 0 32 0 0 32 64 0 1 10 4294967295 0  1 2 0  15 32 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 6 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 4 temp ",
				  "7 1 7 0 0 0 32 0 0 32 128 0 1 10 4294967295 0  6 1 0  0 0 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 7 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "8 9 8 0 0 0 32 0 0 32 492 0 4 10 4294967295 0  10 4294967295 0  -1 -1 1 0 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  8 1 2 0 0 1 2 0 0 2 1 0 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 8 32 236 32 0 -1 32 0 32 0 32 236 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "9 2 9 0 0 0 32 0 0 32 896 0 2 6 1 0  8 9 0  -1 -1 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 4 5 -1 0 -1 -1 17 ( reg --> sctrf ) 0 9 32 384 32 0 -1 32 0 32 0 32 384 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "10 1 10 0 0 0 32 0 0 32 1024 0 1 10 4294967295 0  1 3 0  16 32 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 10 32 0 32 0 -1 32 0 32 0 32 0 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 2 s2 ",
				  "11 1 11 0 0 0 32 0 0 32 2944 0 1 10 4294967295 0  6 1 0  0 0 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 4294967295 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  0 11 32 896 32 0 -1 32 0 32 0 32 896 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "12 9 12 0 0 0 32 0 0 32 8172 0 4 10 4294967295 0  10 4294967295 0  -1 -1 1 0 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 4 5 -1 0 -1 -1 0  8 1 2 0 0 2 2 0 0 3 1 0 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 -1 0 2 0 12 32 4076 32 0 -1 32 0 32 0 32 4076 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "13 2 13 0 0 0 32 0 0 32 15232 0 2 6 1 0  8 13 0  -1 -1 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 4 5 -1 0 -1 -1 17 ( reg --> sctrf ) 0 13 32 7040 32 0 -1 32 0 32 0 32 7040 32 0 32 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 9 addAndSum ",
				  "14 6 14 512 0 1 32 0 0 32 21504 0 6 10 4294967295 0  10 4294967295 0  -1 -1 5 -1 0 7 invalid 0 1 6 0 -1 -1 0 0 -1 0 4 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1 1 2 5 -1 0 -1 -1 0  1 3 2 0 0 14 32 5120 32 0 -1 32 0 32 0 32 5120 32 0 32 0 32 0 0 32 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -1 -1 -1 -1 -1 2 s2 "
				};
				
				
							

相关资源