什么是MPEG压缩技术

 MPEG是数字音频压缩技术。最新的MPEG-4是下一代全球多媒体标准。从蜂窝式电话到宽带以及到其它更高端的应用,MPEG-4能够在各种带宽范围内提供专业质量的音频和视频流服务。

  MPEG-4是由运动图像专家组(Moving Picture Experts Group, MPEG)定义的。该工作组隶属于国际标准化组织(ISO),曾经制定过两项被业界广泛采纳的标准:MPEG-1 和MPEG-2,并因此赢得艾美奖。MPEG-4于1998年设计完成,来自全世界的、数以百计的科研人员为此作出了贡献。该规范于2000年正式成为一项国际标准。

  与MPEG-1和MPEG-2相比,MPEG-4更适于交互AV服务以及远程监控,它的设计目标使其具有更广的适应性和可扩展性;MPEG-4传输速率在4800-6400bps之间,分辨率为176×144,可以利用很窄的带宽通过帧重建技术压缩和传输数据,从而能以最少的数据获得最佳的图像质量。因此,它将在数字电视、动态图像、互联网、实时多媒体监控、移动多媒体通信、Internet/intranet上的视频流与可视游戏、DVD上的交互多媒体应用等方面大显身手。

  当然,对于普通用户来说,MPEG-4在目前来说最有吸引力的地方还在于它能在普通CD-ROM上基本实现DVD的质量;用MPEG-4压缩算法的ASF(Advanced Streaming format,高级格式流)可以将120分钟的电影压缩为300MB左右的视频流;采用MPEG-4压缩算法的DIVX视频编码技术可以将120分钟的电影压缩600MB左右,也可以将一部DVD影片压缩到2张CD-ROM上!也就是说,有了MPEG-4,你不需要购买DVD-ROM就可以享受到和它差不多的视频质量!播放这种编码的影片对机器的要求并不高:只要你的电脑有300MHz以上(无论是哪种型号)的CPU、64MB内存、8MB的显卡就可以流畅地播放。
 

mpeg4编码库源代码,C++完整源代码,有需要饿同学尽管拿去。 // This is the header file describing // the entrance function of the encoder core // or the encore ... #ifdef __cplusplus extern "C" { #endif typedef struct _ENC_PARAM_ { int x_dim; // the x dimension of the frames to be encoded int y_dim; // the y dimension of the frames to be encoded float framerate;// the frame rate of the sequence to be encoded long bitrate; // the bitrate of the target encoded stream long rc_period; // the intended rate control averaging period long rc_reaction_period; // the reation period for rate control long rc_reaction_ratio; // the ratio for down/up rate control long max_key_interval; // the maximum interval between key frames int max_quantizer; // the upper limit of the quantizer int min_quantizer; // the lower limit of the quantizer int search_range; // the forward search range for motion estimation } ENC_PARAM; typedef struct _ENC_FRAME_ { void *image; // the image frame to be encoded void *bitstream;// the buffer for encoded bitstream long length; // the length of the encoded bitstream } ENC_FRAME; typedef struct _ENC_RESULT_ { int isKeyFrame; // the current frame is encoded as a key frame } ENC_RESULT; // the prototype of the encore() - main encode engine entrance int encore( unsigned long handle, // handle - the handle of the calling entity, must be unique unsigned long enc_opt, // enc_opt - the option for encoding, see below void *param1, // param1 - the parameter 1 (its actually meaning depends on enc_opt void *param2); // param2 - the parameter 2 (its actually meaning depends on enc_opt // encore options (the enc_opt parameter of encore()) #define ENC_OPT_WRITE 1024 // write the reconstruct image to files (for debuging) #define ENC_OPT_INIT 32768 // initialize the encoder for an handle #define ENC_OPT_RELEASE 65536 // release all the resource associated with the handle // return code of encore() #define ENC_OK 0 #define ENC_MEMORY 1 #define ENC_BA
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值