【Codecs系列】MPEG-2官方参考代码MPEG2_reference_software

本文介绍了MPEG-2官方参考软件的源码下载、编译与运行,包括在Linux和ARM平台的编译,以及Windows平台的VS工程配置。针对mpeg2enc编码器和mpeg2dec解码器,添加了时间统计功能,便于性能分析。详细步骤和源码可在指定链接获取。
摘要由CSDN通过智能技术生成
Date: 2018.10.22

1、介绍和源码下载
  • 开发组织以及开发组:MPEG, MPEG Software Simulation Group
  • 源码下载地址:
    https://mpeg.chiariglione.org/standards/mpeg-2/software-simulation (已经不可用)
    可以使用并增加功能: https://download.csdn.net/download/soaringlee_fighting/10748537
    ftp获取: ftp://ftp.mpeg.org/pub/mpeg/mssg/
  • 开源协议:不确定, 推测为BSD协议
  • mpeg2enc介绍:
    doc/mpeg2enc.doc
  • mpeg2dec介绍:
    doc/mpeg2dec.doc
  • 优化说明:只有C代码实现,没有任何架构的优化。
2、linux平台和ARM平台下编译和运行

编译:

makefile中增加arm32和arm64平台的编译:

C
mpeg2encode / mpeg2decode<br> =========================<br> MPEG-2 Encoder / Decoder, Version 1.2, July 19, 1996<br><br> Copyright (c) 1996 <br> MPEG Software Simulation Group<br><br> E-mail: mssg@mpeg.org (author contact)<br> Web: http://www.mpeg.org/MSSG/<br> FTP: ftp://ftp.mpeg.org/pub/mpeg/mssg/<br><br><br>Contents:<br>1. Overview<br>2. Introduction<br>3. Contacting the MPEG Software Simulation Group<br>4. Availability <br>5. Installation<br>6. Acknowledgements<br>7. History of the technical report<br><br><br>1. Overview<br>===========<br><br>This directory contains our implementation of an ISO/IEC DIS 13818-2<br>codec. It converts uncompressed video frames into MPEG-1 and MPEG-2<br>video coded bitstream sequences, and vice versa.<br><br>The files mpeg2enc.doc and mpeg2dec.doc in the doc/ directory contain<br>further information about the codec. The directory verify/ contains<br>a small set of verification pictures, a small bitstream, and Unix <br>shell script to automatically test the output of the encoder and decoder.<br><br>A precompiled version of the programs for Win32s (Windows NT/95) will<br>be made available later date, although it is trivial to make a console<br>application from the encoder and decoder with most Win32s compilers<br>(such as Microsoft Visual C++).<br><br>Subdirectories src/mpeg2enc and src/mpeg2dec contain the source code<br>for the encoder and decoder, subdirectory par/ contains a couple of<br>example encoder parameter files for 25 and 30 frames/sec MPEG-2 and<br>MPEG-1 video.<br><br>Summary of changes since July 4, 1994 release:<br><br>This is only the second official release of our MPEG-2 video software.<br>Only minor bug corrections have been added to the encoder. We still do<br>not implement scalable encoding, as this is mostly useful only for<br>academic research.<br><br>The decoder has been updated to meet the final MPEG specification,<br>although the old decoder will still reconstruct Main Profile and MPEG-1<br>bitstreams just fine. The current decoder implements the most<br>important case of Spatial scalability, as well as SNR and Data<br>Partitioning. Temporal scalability is not implemented.<br><br>2. Introduction<br>===============<br><br>MPEG-2 Video is a generic method for compressed representation of video<br>sequences using a common coding syntax defined in the document ISO/IEC<br>13818 Part 2 by the International Organization for Standardization<br>(ISO) and the International Electrotechnical Commission (IEC), in<br>collaboration with the International Telecommunications Union (ITU) as<br>Recommendation H.262. The MPEG-2 concept is similar to MPEG-1, but<br>includes extensions to cover a wider range of applications.<br><br>The primary application targeted during the MPEG-2 definition process<br>was the all-digital transmission of interlaced broadcast TV quality<br>video at coded bitrates between 4 and 9 Mbit/sec. However, the MPEG-2<br>syntax has been found to be efficient for other applications such as<br>those at higher bit rates and sample rates (e.g. HDTV). <br><br>The most significant enhancement over MPEG-1 is the addition of syntax<br>for efficient coding of interlaced video (e.g. 16x8 block sizes for<br>motion compensation, field dct organization, Dual Prime prediction, et<br>al). Several other more subtle enhancements (e.g. 10-bit DCT DC<br>precision, non-linear macroblock scale quantizer, intra VLC tables,<br>improved IDCT mismatch control) were adopted which have a moderate <br>improvement in coding efficiency.... even for progressive video sequences.<br><br>Other key features of MPEG-2 are the scalable extensions which permit<br>the division of a continuous video signal into two or more coded bitstreams <br>representing the video at different resolutions (spatial scalability), <br>picture quality (SNR scalability and data partioning), or frame <br>rates (temporal scalability).<br><br>The MPEG Software Simulation Group is currently developing MPEG<br>software with the purpose of providing aid in understanding the various<br>algorithms which comprise an encoder and decoder, and giving a sample<br>implementation based on advanced encoding models. The MPEG-2 software<br>project is an on-going development. Since the current version of the<br>encoder already employs a reasonable (and the most popular) subset of<br>the MPEG-2 signal coding toolkit (MPEG-1 and MPEG-2 Main Profile), and <br>there appears to be sufficient public interest, we have decided to make <br>a public release of the code.<br><br>The encoder can also be used for generating good quality constant<br>bitrate MPEG-1 sequences and is (to our knowledge) the first publicly<br>available encoder based on the relatively sophisticated TM5 coding model.<br><br><br>3. Contacting the MPEG Software Simulation Group<br>================================================<br><br>We welcome any project-specific questions, comments, suggestions, bug<br>reports etc. They should be sent to the Internet E-mail address: <br><br> mssg@mpeg.org<br><br>which automatically forwards to the software authors.<br><br>4. Availability<br>===============<br><br>The most recent version of the codec source code is available by anonymous<br>ftp from:<br><br> ftp://ftp.mpeg.org/pub/mpeg/mssg/<br><br>The directory contains the following files:<br><br> mpeg2vidcodec_v12.tar.gz codec source code and documentation<br> mpeg2v12.zip source code and Win32s executables<br> <br>You need gunzip (GNU zip/unzip) to uncompress the .gz and .zip archives.<br><br>5. Installation<br>===============<br><br>mpeg2decode and mpeg2encode have been compiled and tested on the following<br>platforms:<br><br> - SUN SPARCstation 10, SunOS 4.1.3, (gcc compiler)<br> - '386-PC, MSDOS 5.0, djgpp v1.11, gcc v2.5.7 and MS Visual C++ 4.0<br><br>The source code should compile without major modifications on other 32<br>bit systems with ANSI C compliant compilers. Systems with 16 bit 'int'<br>variables or segmented memory models are not supported.<br><br>Please report any modifications you had to apply in order to install the<br>programs on your system to the address mssg@mpeg.org <br><br>The encoder and decoder are kept in separate sub-directories,<br>src/mpeg2dec contains the decoder, while src/mpeg2enc contains the<br>encoder sources. The following installation procedure applies to both<br>the encoder and the decoder:<br><br><br>Step 1: edit Makefile<br>---------------------<br><br>You may have to set CC to your C compiler and CFLAGS to the flags required<br>by the compiler. It is sufficient to set these variables in the top directory<br>Makefile. They are propagated to the individual Makefiles of the encoder<br>and decoder. Any other changes have to be applied to the individual Makefiles,<br>however.<br><br>You can compile the decoder with or without X11 output. Please follow the<br>instructions in the top-level Makefile to activate X Window System support.<br><br>Step 2: edit src/mpeg2dec/config.h<br>----------------------------------<br><br>In most cases, no modification should be required. If your C library<br>doesn't accept "rb" / "wb" parameters in fopen() (required to disable<br>LF <-> CR/LF conversion on MSDOS systems), change the #defines RB and WB<br>to "r" and "w".<br><br><br>Step 3: make<br>------------<br><br>Type 'make' from the top directory (mpeg2). On a PC with DJGPP installed you<br>have to enter 'make pc' in the individual source directories to produce<br>.exe files.<br><br><br>Step 4: verification<br>--------------------<br><br>In the mpeg/verify directory, you can verify correct compilation of the<br>codec by typing 'make test'. No differences should be reported. The<br>only comparison which is allowed to fail is between test.m2v and<br>new.m2v, caused by floating point accuracy dependencies in the forward<br>DCT.<br><br><br>6. Acknowledgements<br>===================<br>Authors of the current release are:<br><br> Stefan Eckart <stefan@chromatic.com><br> Chad Fogg <cfogg@chromatic.com><br><br>420to422, 422to444 scaling filters:<br> Cheung Auyeung <auyeung@mot.com><br><br>Windows 32s port:<br> Sorin Papuc <sop@compcore.com><br><br>Special thanks are due to<br><br> - J. Steurer, M. Oepen, IRT (Institut fuer Rundfunktechnik, Muenchen):<br> for contributing motion estimation speed improvements (distance<br> computation short-circuit in conjunction with spiral search, cf.<br> dist1(), fullsearch())<br><br> - Tristan Savatier <tristan@mpeg.org> for his help on numerous <br> improvements, suggestions, and features.<br><br> Numerous users:<br> for providing bug reports and Makefiles<br><br>7. History of Technical Report Project<br>======================================<br><br>The Technical Report, a document which primarily consists of<br>a C source code program, was initiated by the MPEG committee to: <br><br> - Provide an example of MPEG video syntax being intelligently employed <br> to generate good quality video bitstreams.<br> - A reference tool for implementors<br> - Aid in understanding the MPEG specification <br> - decoder which employs full arithmetic accuracy.<br><br>----<br>End of Readme file<br>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞翔的鲲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值