xvid 数据编码和解码

由于视频开发的需求,封装xvid c调用接口,使之优雅易用
我已经对pc camera视频流(RGB)进行尝试,编码之后传输到远程主机进行解码回放,效果不错
具体的xvid的参数可以进一步优化,这里只是提供简单的范例
1. xvid 解码

 1 
 2 /*
 3     encode.cpp
 4     xvid 编码YUV数据,为进一步传输提供准备
 5 
 6 */
 7 #ifndef _XVID_ENCODE_H
 8 #define _XVID_ENCODE_H
 9 
10 #include <xvid.h>
11 
12 struct DecodeInfo{
13     unsigned short    width;
14     unsigned short  height;        
15     void (*after_decode)(void * data,unsigned int size,int width,int height,void* user);
16     void * user;
17 };
18 
19 
20 class Xvid_Decoder{
21     
22 public:
23     Xvid_Decoder(){ 
24     }
25     bool            Open();
26     void            Close();
27     DecodeInfo &    GetDecodeInfo(){    return _dec_info;}
28     void            decode(void *data,unsigned int size);
29     static    void    xvid_global_init();
30     xvid_dec_create_t&    GetHandle(){    return _xvid_dec_create;}
31 private:
32     int                xvid_dec(unsigned char *bitstream,int bs_size,unsigned char *image);
33 private:
34     DecodeInfo    _dec_info;
35     void*        _dec_handle;
36     char         _image[1024*768*3];
37     xvid_dec_create_t _xvid_dec_create;    
38 };
39 
40 #endif
41 

 

 

 1 
 2 /*
 3     encode.cpp
 4     xvid 编码YUV数据,为进一步传输提供准备
 5 
 6 */
 7 #include "xvid_dec.h"
 8 #include <windows.h>
 9 
10 //
11 
12 
13 void Xvid_Decoder::Close(){
14     int xerr;    
15     /* Destroy the encoder instance */
16     xerr = xvid_decore(_dec_handle, XVID_ENC_DESTROY, NULL, NULL);    
17 }
18 
19 void Xvid_Decoder::xvid_global_init(){
20     /*------------------------------------------------------------------------
21      * XviD core initialization
22      *----------------------------------------------------------------------*/
23     xvid_gbl_init_t xvid_gbl_init;
24     memset(&xvid_gbl_init, 0sizeof(xvid_gbl_init));
25     xvid_gbl_init.version = XVID_VERSION;
26     xvid_gbl_init.cpu_flags = XVID_CPU_FORCE;
27     /* Initialize XviD core -- Should be done once per __process__ */
28     xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL);
29 }
30 
31 bool Xvid_Decoder::Open(){
32     int ret;    
33     
34     /*------------------------------------------------------------------------
35      * XviD encoder initialization
36      *----------------------------------------------------------------------*/
37     int width,height;
38     width = _xvid_dec_create.width ;
39     height = _xvid_dec_create.height;
40     memset(&_xvid_dec_create, 0sizeof(xvid_dec_create_t));
41     _xvid_dec_create.version = XVID_VERSION;
42 
43     /* Width and Height of input frames */
44     _xvid_dec_create.width = width;
45     _xvid_dec_create.height = height;
46 
47     ret = xvid_decore(NULL, XVID_DEC_CREATE, &_xvid_dec_create, NULL);
48     _dec_handle = _xvid_dec_create.handle;
49     return true;
50 }
51 
52 void Xvid_Decoder::decode(void * data,unsigned int size){
53     int ret;
54     ret = xvid_dec((unsigned char*)data,(int)size,(unsigned char *)_image);    
55     if (ret >0)
56         _dec_info.after_decode(_image,(unsigned int)ret,(int)_xvid_dec_create.width,(int)_xvid_dec_create.height,_dec_info.user);
57 }
58 
59 /*
60 raw xvid_encode procedure
61 */
62 int    Xvid_Decoder::xvid_dec(unsigned char *bitstream,int bs_size,unsigned char *image)
63 {
64     int ret;
65     xvid_dec_frame_t xvid_dec_frame;
66 
67     /* Reset all structures */
68     memset(&xvid_dec_frame, 0sizeof(xvid_dec_frame_t));
69     /* Set version */
70     xvid_dec_frame.version = XVID_VERSION;
71 //    xvid_dec_stats->version = XVID_VERSION;
72 
73     /* No general flags to set */
74     xvid_dec_frame.general          = 0;
75 
76     /* Input stream */
77     xvid_dec_frame.bitstream        = bitstream;
78     xvid_dec_frame.length           = bs_size;
79 
80     /* Output frame structure */
81     xvid_dec_frame.output.plane[0]  = image;
82     xvid_dec_frame.output.stride[0= _xvid_dec_create.width  *3;
83     xvid_dec_frame.output.csp = XVID_CSP_BGR;
84 
85     ret = xvid_decore(_dec_handle, XVID_DEC_DECODE, &xvid_dec_frame, NULL);
86     return(ret);    
87 }
88 
89 
90 

2. xvid 编码
 1 
 2 /*
 3     encode.cpp
 4     xvid 编码YUV数据,为进一步传输提供准备
 5 
 6 */
 7 #ifndef _XVID_ENCODE_H
 8 #define _XVID_ENCODE_H
 9 
10 #include <xvid.h>
11 #include <nv.h>
12 
13 
14 
15 struct EncodeInfo{
16     unsigned short    width;
17     unsigned short  height;        
18     void (*after_encode)(void * data,unsigned int size,void* user);
19     void * user;
20 };
21 
22 class Xvid_Encoder:public NVObject{
23 public:
24     Xvid_Encoder(){ _closed = true;
25     }
26     bool            Open();
27     void            Close();
28     EncodeInfo &    GetEncodeInfo(){    return _enc_info;}
29     void            encode(void *data,unsigned int size);
30     static    void    xvid_global_init();
31     int                xvid_enc(unsigned char *image,unsigned char *bitstream);
32 private:
33     EncodeInfo    _enc_info;
34     void*        _enc_handle;
35     char         _bitstream[1024*100];
36     bool        _closed;
37     
38 
39 };
40 
41 #endif
42 
  1 
  2  /*
  3      encode.cpp
  4      xvid 编码YUV数据,为进一步传输提供准备
  5 
  6  */
  7  #include  " encode.h "
  8  #include  < windows.h >
  9 
 10 
 11  static   const   int  motion_presets[]  =  {
 12       /*  quality 0  */
 13       0 ,
 14          
 15           /*  quality 1  */
 16          XVID_ME_ADVANCEDDIAMOND16,
 17          
 18           /*  quality 2  */
 19          XVID_ME_ADVANCEDDIAMOND16  |  XVID_ME_HALFPELREFINE16,
 20          
 21           /*  quality 3  */
 22          XVID_ME_ADVANCEDDIAMOND16  |  XVID_ME_HALFPELREFINE16  |
 23          XVID_ME_ADVANCEDDIAMOND8  |  XVID_ME_HALFPELREFINE8,
 24          
 25           /*  quality 4  */
 26          XVID_ME_ADVANCEDDIAMOND16  |  XVID_ME_HALFPELREFINE16  |
 27          XVID_ME_ADVANCEDDIAMOND8  |  XVID_ME_HALFPELREFINE8  |
 28          XVID_ME_CHROMA_PVOP  |  XVID_ME_CHROMA_BVOP,
 29          
 30           /*  quality 5  */
 31          XVID_ME_ADVANCEDDIAMOND16  |  XVID_ME_HALFPELREFINE16  |
 32          XVID_ME_ADVANCEDDIAMOND8  |  XVID_ME_HALFPELREFINE8  |
 33          XVID_ME_CHROMA_PVOP  |  XVID_ME_CHROMA_BVOP,
 34          
 35           /*  quality 6  */
 36          XVID_ME_ADVANCEDDIAMOND16  |  XVID_ME_HALFPELREFINE16  |  XVID_ME_EXTSEARCH16  |
 37          XVID_ME_ADVANCEDDIAMOND8  |  XVID_ME_HALFPELREFINE8  |  XVID_ME_EXTSEARCH8  |
 38          XVID_ME_CHROMA_PVOP  |  XVID_ME_CHROMA_BVOP,
 39          
 40  };
 41  #define  ME_ELEMENTS (sizeof(motion_presets)/sizeof(motion_presets[0]))
 42 
 43  static   const   int  vop_presets[]  =  {
 44       /*  quality 0  */
 45       0 ,
 46          
 47       /*  quality 1  */
 48       0 ,
 49 
 50       /*  quality 2  */
 51      XVID_VOP_HALFPEL,
 52 
 53       /*  quality 3  */
 54      XVID_VOP_HALFPEL  |  XVID_VOP_INTER4V,
 55 
 56       /*  quality 4  */
 57      XVID_VOP_HALFPEL  |  XVID_VOP_INTER4V,
 58 
 59       /*  quality 5  */
 60      XVID_VOP_HALFPEL  |  XVID_VOP_INTER4V  |
 61      XVID_VOP_TRELLISQUANT,
 62 
 63       /*  quality 6  */
 64      XVID_VOP_HALFPEL  |  XVID_VOP_INTER4V  |
 65      XVID_VOP_TRELLISQUANT  |  XVID_VOP_HQACPRED,
 66 
 67  };
 68  #define  VOP_ELEMENTS (sizeof(vop_presets)/sizeof(vop_presets[0]))
 69 
 70  //
 71  #define  MAX_ZONES   64
 72 
 73  /*  Maximum number of frames to encode  */
 74  #define  ABS_MAXFRAMENR 9999
 75 
 76  static   int  ARG_STATS  =   0 ;
 77  static   int  ARG_DUMP  =   0 ;
 78  static   int  ARG_LUMIMASKING  =   0 ;
 79  static   int  ARG_BITRATE  =   0 ;
 80  static   int  ARG_SINGLE  =   0 ;
 81  static   char   * ARG_PASS1  =   0 ;
 82  static   char   * ARG_PASS2  =   0 ;
 83  static   int  ARG_QUALITY  =  ME_ELEMENTS  -   1 ;
 84  static   float  ARG_FRAMERATE  =   25.00f ;
 85  static   int  ARG_MAXFRAMENR  =  ABS_MAXFRAMENR;
 86  static   int  ARG_MAXKEYINTERVAL  =   0 ;
 87  static   char   * ARG_INPUTFILE  =  NULL;
 88  static   int  ARG_INPUTTYPE  =   0 ;
 89  static   int  ARG_SAVEMPEGSTREAM  =   0 ;
 90  static   int  ARG_SAVEINDIVIDUAL  =   0 ;
 91  static   char   * ARG_OUTPUTFILE  =  NULL;
 92 
 93  static   int  ARG_BQRATIO  =   150 ;
 94  static   int  ARG_BQOFFSET  =   100 ;
 95  static   int  ARG_MAXBFRAMES  =   0 ;
 96  static   int  ARG_PACKED  =   0 ;
 97 
 98  static   int  ARG_VOPDEBUG  =   0 ;
 99  static   int  ARG_GMC  =   0 ;
100  static   int  ARG_INTERLACING  =   0 ;
101  static   int  ARG_QPEL  =   0 ;
102  static   int  ARG_CLOSED_GOP  =   0 ;
103 
104  #ifndef READ_PNM
105  #define  IMAGE_SIZE(x,y) ((x)*(y)*3/2)
106  #else
107  #define  IMAGE_SIZE(x,y) ((x)*(y)*3)
108  #endif
109 
110  #define  MAX(A,B) ( ((A)>(B)) ? (A) : (B) )
111  #define  SMALL_EPS (1e-10)
112 
113  #define  SWAP(a) ( (((a)&0x000000ff)<<24) | (((a)&0x0000ff00)<<8) | \
114  (((a) & 0x00ff0000 ) >> 8 )   |  (((a) & 0xff000000 ) >> 24 ) )
115 
116 
117  //
118 
119 
120  void  Xvid_Encoder::Close(){
121       int  xerr;    
122      NVMutexLock  lock (_lock);
123 
124      _closed  =   true ;
125       /*  Destroy the encoder instance  */
126      xerr  =  xvid_encore(_enc_handle, XVID_ENC_DESTROY, NULL, NULL);    
127 
128  }
129 
130  void  Xvid_Encoder::xvid_global_init(){
131       /* ------------------------------------------------------------------------
132       * XviD core initialization
133       *---------------------------------------------------------------------- */
134      xvid_gbl_init_t xvid_gbl_init;
135      memset( & xvid_gbl_init,  0 sizeof (xvid_gbl_init));
136      xvid_gbl_init.version  =  XVID_VERSION;
137      xvid_gbl_init.cpu_flags  =  XVID_CPU_FORCE;
138       /*  Initialize XviD core -- Should be done once per __process__  */
139      xvid_global(NULL, XVID_GBL_INIT,  & xvid_gbl_init, NULL);
140  }
141 
142  bool  Xvid_Encoder::Open(){
143       int  xerr;        
144      xvid_enc_create_t xvid_enc_create;
145      _closed  =   false ;
146       /* ------------------------------------------------------------------------
147       * XviD encoder initialization
148       *---------------------------------------------------------------------- */
149      memset( & xvid_enc_create,  0 sizeof (xvid_enc_create));
150      xvid_enc_create.version  =  XVID_VERSION;
151 
152       /*  Width and Height of input frames  */
153      xvid_enc_create.width  =  GetEncodeInfo().width;
154      xvid_enc_create.height  =  GetEncodeInfo().height;
155      xvid_enc_create.profile  =  XVID_PROFILE_AS_L4;
156 
157       /*  init plugins   */
158       /*
159      xvid_enc_create.zones = ZONES;
160      xvid_enc_create.num_zones = NUM_ZONES;
161 
162      xvid_enc_create.plugins = plugins;
163      xvid_enc_create.num_plugins = 0;
164       */
165 
166 
167       /*  No fancy thread tests  */
168      xvid_enc_create.num_threads  =   0 ;
169 
170       /*  Frame rate - Do some quick float fps = fincr/fbase hack  */     
171      xvid_enc_create.fincr  =   1 ;
172      xvid_enc_create.fbase  =  ( int 10 ;
173       /*  Maximum key frame interval  */
174      xvid_enc_create.max_key_interval  =  ( int ) - 1 ;     // --default 10s
175       /*  Bframes settings  */
176      xvid_enc_create.max_bframes  =  ARG_MAXBFRAMES;
177      xvid_enc_create.bquant_ratio  =  ARG_BQRATIO;
178      xvid_enc_create.bquant_offset  =  ARG_BQOFFSET;
179 
180       /*  Dropping ratio frame -- we don't need that  */
181      xvid_enc_create.frame_drop_ratio  =   0 ;
182       /*  Global encoder options  */
183      xvid_enc_create.global  =   0 ;
184 
185       if  (ARG_PACKED)
186          xvid_enc_create.global  |=  XVID_GLOBAL_PACKED;
187 
188       if  (ARG_CLOSED_GOP)
189          xvid_enc_create.global  |=  XVID_GLOBAL_CLOSED_GOP;
190 
191       if  (ARG_STATS)
192          xvid_enc_create.global  |=  XVID_GLOBAL_EXTRASTATS_ENABLE;
193 
194       /*  I use a small value here, since will not encode whole movies, but short clips  */
195      xerr  =  xvid_encore(NULL, XVID_ENC_CREATE,  & xvid_enc_create, NULL);
196      _enc_handle  =  xvid_enc_create.handle;
197       return   true ;
198  }
199 
200  void  Xvid_Encoder::encode( void   *  data,unsigned  int  size){
201       int  ret;    
202      _lock.Lock();
203       if ( _closed ){
204          _lock.Unlock();
205           return ;
206      }
207      ret  =  xvid_enc((unsigned  char * )data,(unsigned  char   * )_bitstream);        
208      _lock.Unlock();
209       if  (ret  > 0 )
210          _enc_info.after_encode(_bitstream,(unsigned  int )ret,_enc_info.user);
211      
212  }
213 
214  /*
215  raw xvid_encode procedure
216  */
217  int  Xvid_Encoder::xvid_enc(unsigned  char   * image,unsigned  char   * bitstream)
218  {
219       int  ret;    
220      xvid_enc_frame_t xvid_enc_frame;
221      xvid_enc_stats_t xvid_enc_stats;
222      
223       /*  Version for the frame and the stats  */
224      memset( & xvid_enc_frame,  0 sizeof (xvid_enc_frame));
225      xvid_enc_frame.version  =  XVID_VERSION;
226      
227      memset( & xvid_enc_stats,  0 sizeof (xvid_enc_stats));
228      xvid_enc_stats.version  =  XVID_VERSION;
229      
230       /*  Bind output buffer  */
231      xvid_enc_frame.bitstream  =  bitstream;
232      xvid_enc_frame.length  =   - 1 ;
233      
234       /*  Initialize input image fields  */
235      xvid_enc_frame.input.plane[ 0 =  image;
236      xvid_enc_frame.input.csp  =  XVID_CSP_BGR;
237      xvid_enc_frame.input.stride[ 0 =  _enc_info.width * 3 ;
238 
239      
240       /*  Set up core's general features  */
241      xvid_enc_frame.vol_flags  =   0 ;
242      
243       /*  Set up core's general features  */
244      xvid_enc_frame.vop_flags  =  vop_presets[ARG_QUALITY - 2 ];
245      
246       /*  Frame type -- let core decide for us  */
247      xvid_enc_frame.type  =  XVID_TYPE_AUTO;
248      
249       /*  Force the right quantizer -- It is internally managed by RC plugins  */
250      xvid_enc_frame.quant  =   0 ;
251      
252       /*  Set up motion estimation flags  */
253      xvid_enc_frame.motion  =  motion_presets[ARG_QUALITY - 2 ];
254      
255       /*  We don't use special matrices  */
256      xvid_enc_frame.quant_intra_matrix  =  NULL;
257      xvid_enc_frame.quant_inter_matrix  =  NULL;
258      
259       /*  Encode the frame  */
260      ret  =  xvid_encore(_enc_handle, XVID_ENC_ENCODE,  & xvid_enc_frame,NULL);
261       //     &xvid_enc_stats);
262       // --判别是否是关键帧
263       // *key = (xvid_enc_frame.out_flags & XVID_KEYFRAME);
264       // *stats_type = xvid_enc_stats.type;
265       // *stats_quant = xvid_enc_stats.quant;
266       // *stats_length = xvid_enc_stats.length;
267       // sse[0] = xvid_enc_stats.sse_y;
268       // sse[1] = xvid_enc_stats.sse_u;
269       // sse[2] = xvid_enc_stats.sse_v;
270      
271       return  (ret);
272  }
273 
274 
275

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/254401.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

第一个PowerShell脚本——PowerShell三分钟(九)

前面把基础知识讲了一遍&#xff0c;现在我们开始写一个最初级的脚本写脚本的工具有很多&#xff0c;有文本文档&#xff0c;有PowerShell ISE&#xff0c;PowerShell Studio等&#xff0c;这里选用系统自带的PowerShell ISE这里大家依然要记得以管理员身份运行&#xff0c;否则…

C#精准定时

文章目录简介StopWatch类例子1&#xff0c;用作延时例子2&#xff0c;用作算法耗时评估博主写作不容易&#xff0c;孩子需要您鼓励 万水千山总是情 , 先点个赞行不行 简介 我们在自动化上位机编写过程中&#xff0c;上位机的定时应用在很多地方。对于工业上位机程序设计起…

联合体(union)和结构体(struct)的区别

1. 联合说明和联合变量定义 联合也是一种新的数据类型, 它是一种特殊形式的变量。 联合说明和联合变量定义与结构十分相似。其形式为: union 联合名{ 数据类型 成员名; 数据类型 成员名; ... } 联合变量名; 联合表示几个变量公用一个内存位置, 在不同的时间保存不同…

MVC架构简介及其测试策略

最近在WEB端测试工作中陷入了瓶颈&#xff0c;单纯的手动功能测试在没有成熟的代码规范之前还是很容易坑的&#xff0c;WEB自动化测试一时半会还没有什么进展&#xff0c;所以决定先学习一下网站用的MVC架构&#xff0c;跟着教程写了一个小网站&#xff0c;大概也找到了WEB测试…

prototype与_proto_

1、prototype与_proto_ ①prototype&#xff1a;是函数才有的属性&#xff0c;这个属性是一个指针。当一个构造函数被创建时&#xff0c;该构造函数会自动生成一个prototype指针&#xff0c;该指针指向构造函数的原型。这个原型会有其他实例共享的一些属性和方法。 ②_proto_&a…

Halcon求取矩形顶点坐标

文章目录简介Halcon源码博主写作不容易&#xff0c;孩子需要您鼓励 万水千山总是情 , 先点个赞行不行 简介 我们在使用Halcon画矩形时&#xff0c;并不能得到矩形四角顶点坐标。但是我们可以通过数学计算得到矩形定点坐标的位置。 我们在计算过程中需要知道矩形的长轴与短…

kafka常用的shell命令

kafka常用shell命令&#xff1a; ------------------------------------ 1、创建topic bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test 2、查看创建的topic bin/kafka-topics.sh --list --zookeeper localhost:…

python+pycharm+Django报错

报错&#xff1a; Unhandled exception in thread started by <function wrapper at 0x2d7e410>Traceback (most recent call last):File "/root/virtual_dir/wxwebapp_court_nositepkg/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, i…

C++多线程实例(_beginThreadex创建多线程)

C多线程&#xff08;二&#xff09;(_beginThreadex创建多线程) C/C Runtime 多线程函数一 简单实例&#xff08;来自codeprojct&#xff1a;http://www.codeproject.com/useritems/MultithreadingTutorial.asp&#xff09; 主线程创建2个线程t1和t2&#xff0c;创建时2个线程…

halcon求取区域顶点

文章目录简介Halcon源代码处理效果博主写作不容易&#xff0c;孩子需要您鼓励 万水千山总是情 , 先点个赞行不行 简介 使用halcon求取顶点的方法。 Halcon源代码 read_image (Image1, 1.png)points_foerstner (Image1, 1, 2, 3, 200, 0.3, gauss, false, RowJunctions, …

从excel表中生成批量SQL,将数据录入到数据库中

excel表格中有许多数据&#xff0c;需要将数据导入数据库中&#xff0c;又不能一个一个手工录入&#xff0c;可以生成SQL&#xff0c;来批量操作。1.首先在第二行的H列&#xff0c;插入函数&#xff1a;CONCATENATE("INSERT INTO book (bookid, title, volume, author, u…

HDU-5895 Mathematician QSC

题目大意&#xff1a; 已知f[0] 0, f[1] 1, f[i] f[i-1] * 2 f[i-2]&#xff0c;且g[n] g[n-1] f[n] * f[n]&#xff0c;现在给出n&#xff0c;y&#xff0c;x&#xff0c;s&#xff0c;问你x^(g[n*y]) mod (s 1)的值为多少。 解题思路&#xff1a; 首先可以得到的是g[n…

C#的两种类据类型:值类型和引用类型

目录什么是值类型&#xff0c;什么是引用类型概念&#xff1a;值类型和引用类型区别什么是值类型&#xff0c;什么是引用类型 概念&#xff1a; 值类型直接存储其值&#xff0c;而引用类型存储对其值的引用。部署&#xff1a;托管堆上部署了所有引用类型。 引用类型&#xf…

ring0 ring3 kernel driver

intel cpu的权限访问控制&#xff1a;ring0 ~ ring5. window、linux操作系统都只用了ring0&#xff0c;ring3&#xff0c;对应内核态和用户态. 驱动程序工作在内核态&#xff0c;没有main函数入口&#xff0c;而应用程序工作在用户态。转载于:https://www.cnblogs.com/yiii/p/6…

Linux 的多线程编程的高效开发经验

转自&#xff1a;http://www.chineselinuxuniversity.net/articles/22615.shtml 本文中我们针对 Linux 上多线程编程的主要特性总结出 5 条经验&#xff0c;用以改善 Linux 多线程编程的习惯和避免其中的开发陷阱。在本文中&#xff0c;我们穿插一些 Windows 的编程用例用以对…

Visual C++中error spawning cl.exe解决办法

| 版权声明&#xff1a;本文为博主原创文章&#xff0c;未经博主允许不得转载。 今天安装Vc6.0的时候出现了一个error spawning cl.exe的错误&#xff0c;在网上找了一些资料&#xff0c;才知道这是因为路径设置的问题引起的&#xff0c; “cl.exe”是VC真正的程序编译器&…

C#整数数据类型

文章目录博主写作不容易&#xff0c;孩子需要您鼓励 万水千山总是情 , 先点个赞行不行 数据类型含义取值范围sbyte有符号8位整数-128 ~ 127&#xff08;-2^7 ~ 2^7-1&#xff09;byte无符号8位整数0 ~ 255&#xff08;0 ~ 2^8-1&#xff09;short有符号16位整数-32768 ~ 3…

HEXA机器人荣获CES Asia2018 创新奖

2019独角兽企业重金招聘Python工程师标准>>> 6月13日至15日&#xff0c;亚洲消费电子展CES Asia 2018将在上海新国际博览中心如期举行。在活动到来前&#xff0c;美国消费技术协会&#xff08;CTA&#xff09;于5月24日&#xff0c;提前揭晓了“2018亚洲消费电子展创…

【bzoj3994】[SDOI2015]约数个数和 莫比乌斯反演

题目描述 设d(x)为x的约数个数&#xff0c;给定N、M&#xff0c;求 输入 输入文件包含多组测试数据。 第一行&#xff0c;一个整数T&#xff0c;表示测试数据的组数。接下来的T行&#xff0c;每行两个整数N、M。输出 T行&#xff0c;每行一个整数&#xff0c;表示你所求的答案…

Linux根文件系统结构再认识

Linux根文件系统结构再认识刘建文&#xff08;http://blog.csdn.net/keminlau &#xff09; INTRO 尽管Linux的根文件系统在形式表现上是一体的&#xff08;所有数据目录均为根目录下的子目录&#xff09;&#xff0c;但实际它们是多个不同的【逻辑主体】&#xff08;为了实现…