mpeg4_encoder
所属分类:Linux/Unix编程
开发工具:Unix_Linux
文件大小:41KB
下载次数:80
上传日期:2006-02-23 10:40:13
上 传 者:
arsen_mmx
说明: Linux下的基于intel的ipp库的MPEG4编码程序,嵌入式开发程序,适用PXA270板,工业级别代码
(Linux-based Intel's ipp for MPEG4 coding procedures, embedded developers procedures applicable PXA270 board, industry-level code)
文件列表:
mpeg4_encoder\doc (0, 2006-02-22)
mpeg4_encoder\makefile_sample_mpeg4_enc (9091, 2005-09-29)
mpeg4_encoder\src\arm_linux\include\sampdefs.h (3249, 2005-09-29)
mpeg4_encoder\src\arm_linux\include (0, 2006-02-22)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4eblck.c (20647, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4ebuff.c (9959, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4einit.c (31392, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4emain.c (11492, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4emblk.c (21173, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4esynt.c (14694, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4etble.c (2577, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4eutil.c (9838, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder\mp4evops.c (21759, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\encoder (0, 2006-02-22)
mpeg4_encoder\src\arm_linux\video\mpeg4\_include\sampmp4.h (24221, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\mpeg4\_include (0, 2006-02-22)
mpeg4_encoder\src\arm_linux\video\mpeg4 (0, 2006-02-22)
mpeg4_encoder\src\arm_linux\video\_include\sampvc.h (2416, 2005-09-29)
mpeg4_encoder\src\arm_linux\video\_include (0, 2006-02-22)
mpeg4_encoder\src\arm_linux\video (0, 2006-02-22)
mpeg4_encoder\src\arm_linux (0, 2006-02-22)
mpeg4_encoder\src (0, 2006-02-22)
mpeg4_encoder (0, 2006-02-22)
September 7, 2005
Intel(R) Integrated Performance Primitives Version 5.0
MPEG-4 Video Encoder Sample Code for Linux* on Intel(R)
Personal Internet Client Architecture Processors
================================================================
CONTENTS:
1. Overview
2. Package Contents
3. Directory Structure and File List
4. System Requirements
5. Installation and Build
6. Running the Software
7. Intel IPP Functional Coverage
8. Key Module Descriptions
9. Known Limitations
10. Technical Support and Feedback
11. License Definition
12. Disclaimer and Legal Information
================================================================
1. Overview
The MPEG-4 video encoder sample code supports a subset of
video streams compatible with ISO/IEC 14496-2 (2nd edition
2001-12-01) MPEG-4 simple profile, and does not support Error
Resilience, Short Header and Rate Control. The purpose of MPEG-
4 video encoder sample code is to provide an example showing
how to use Intel(R) Integrated Performance Primitives (Intel(R)
IPP) Video Coding primitives to build up the basic visual tools of
an MPEG-4 video encoder, including I-VOP, P-VOP, AC/DC
prediction, 4-MV and UMV.
Additional information on this software as well as other Intel(R)
software performance products is available at
http://developer.intel.com/software/products/.
================================================================
2. Package Contents
The MPEG-4 video encoder sample code package contains the
following:
* Readme file
* Makefile
* Sample code source files and header files
================================================================
3. Directory Structure and File List
The following files reside in these directories, where ~ is the
directory chosen as the root of this sample code package:
~ Root path of Intel(R) IPP 5.0
sample code package
makefile_sample_mpeg4_enc
Make file for MPEG-4 video encoder
sample code
~/doc
readme_mpeg4_enc.txt Readme file
~/src/arm_linux/video/mpeg4/encoder
MPEG-4 video encoder sample code
source file directory
mp4emain.c Source file for MPEG-4 video encoder
entry function
mp4einit.c Source file for encoder initialization
functions
mp4esynt.c Source file for stream syntax generation
functions
mp4ebuff.c Source file for stream buffer processing
functions
mp4evops.c Source file for VOP or frame encoding
functions
mp4emblk.c Source file for macroblock encoding
functions
mp4eblck.c Source file for block encoding functions
mp4etble.c Source file for constant tables
mp4eutil.c Source file for utility functions
~/src/include General header file directory
sampdefs.h General header file
~/src/arm_linux/video/_include
Video shared header file directory
sampvc.h Video shared header file
~/src/arm_linux/video/mpeg4/_include
MPEG-4 video encoder and decoder
shared header file directory
sampmp4.h MPEG-4 video encoder and decoder
shared header file
================================================================
4. System Requirements
This sample code is targeted for Intel(R) Personal Internet Client
Architecture (PCA) Processors with Intel(R) Wireless MMX(TM)
Technology. It requires:
Hardware requirements:
* Host PC: An Intel(R) Pentium(R) 4 processor 1.5 GHz,
with 512 MB RAM, or greater
* Target platform: platforms that support Intel PCA
Processors with Intel Wireless MMX technology, such
as the Intel(R) PXA27x Processor Development Kit
Software requirements:
* Operating system on host machine: Red Hat* Linux*
Release 7.2, or higher version
* Development tools:
-- iwmmxt_le-gcc 3.3.1 (MontaVista), glibc 2.3.2 and
binutils 2.14 20030612
-- Red Hat* RPM version 4.0.3 or higher version
* Intel IPP 5.0 for Linux* on Intel PCA Processors with Intel
Wireless MMX Technology Image Coding Component Library
================================================================
5. Installation and Build
Extract all files in l_ipp-PCA-MPEG4-encode_*.tgz to a desired
folder. Please make sure to preserve the directory structure. The
files for this sample are in the ./ipp_sample/PCA/MPEG4-encode/
folder.
Follow the steps below to build the MPEG-4 video encoder
application. Before you begin, make sure the Intel IPP 5.0 for
Linux* on Intel PCA Processors with Intel Wireless MMX
Technology has already been installed on the same host machine.
1) Modify makefile_sample_mpeg4_enc to make sure the variable
PATH_IPP_ROOT is the current Intel Integrated Performance
Primitives installation path. The default installation path should
be:
PATH_IPP_ROOT=/opt/intel/ipp/5.0/pca_wmmx
In the given make file, the path is set the same as user root path:
PATH_IPP_ROOT=$(PATH_USR_ROOT)
Modify other toolchain paths if necessary in this make file.
2) Make the application with command:
make -f makefile_sample_mpeg4_enc
================================================================
6. Running the Software
If successfully built, the executable is generated in path
$(PATH_USR_BIN) defined in the make file, with the default
name mpeg4enc. The command line format is:
mpeg4enc inputfile outputfile [-options]
Simply type mpeg4enc to invoke help information.
================================================================
7. Intel IPP Functional Coverage
The MPEG-4 video encoder sample demonstrates how to combine
the I-VOP/P-VOP Encoding, Motion Vector Encoding, Motion
Compensation, DCT and IDCT, Quantization and Inverse
Quantization, VLC Encoding to construct the baseline
MPEG-4 video encoder. Correspondingly, the sample incorporates
the following Intel IPP Video Coding Domain primitives:
Functional Category Primitive Name
DCT ippiDCT8x8Fwd_Video_16s_C1
ippiDCT8x8Fwd_Video_8u16s_C1R
IDCT ippiDCT8x8Inv_Video_16s_C1
ippiDCT8x8Inv_Video_16s8u_C1R
Quantization ippiQuantIntra_MPEG4_16s_I
ippiQuantInter_MPEG4_16s_I
Inverse Quantization ippiQuantInvIntra_MPEG4_16s_I
ippiQuantInvInter_MPEG4_16s_I
VLC Encoding
ippiEncodeVLCZigzag_IntraDCVLC_MPEG4_16s1u
ippiEncodeVLCZigzag_IntraACVLC_MPEG4_16s1u
ippiEncodeVLCZigzag_Inter_MPEG4_16s1u
Motion Compensation ippiMCBlock_RoundOff_8u
ippiMCBlock_RoundOn_8u
Motion Estimation ippiSumNorm_VOP_MPEG4_8u16u
ippiFindMVpred_MPEG4
ippiMotionEstimation_16x16_SEA
ippiComputeTextureErrorBlock_SAD_8u16s
Motion Vector Encoding ippiEncodeMV_MPEG4_8u16s
Frame Expansion ippiExpandFrame_H263_8u
Please refer to the Intel Integrated Performance Primitives on
Intel Personal Internet Client Architecture Processors
Reference Manual (Version 5.0) for the use of these primitives.
================================================================
8. Key Module Descriptions
Structures:
1) mp4_enc_state
Description:
MPEG-4 video encoder general state structure, which contains
parsed configuration options from users, initialized semantic
information on Video Object (VO), Video Object Layer(VOL) and
Video Object Plane(VOP) level as well as working buffers. It is
used to encode all the MPEG-4 frames successively.
2) mp4_enc_vop_infor
Description:
MPEG-4 video encoder high-level state structure, which
contains the generated information on Video Object Plane,
MacroBlock and Block level as well as the working buffer passed
from the encoder general state structure. It is used to encode
all the Blocks of one individual MPEG-4 frame.
Functions:
1) encoder_init_alloc_mpeg4()
Location:
mp4einit.c
Description:
MPEG-4 video encoder initialization function.
(1) Initializes encoder state structure according to the
configuration parameters parsed from the command line and
default settings of a baseline encoder.
(2) Allocates and initializes its working buffer.
Calling Procedure:
It's called from the main function before encoding the first
frame and calls to get_working_buffer_mpeg4() to allocate
encoder working buffer.
2) encode_mpeg4()
Location:
mp4evops.c
Description:
MPEG-4 frame encoding function.
(1) Determines the coding type of current frame or VOP.
(2) Encodes one frame or VOP.
(3) Updates encoder general state structure.
Calling Procedure:
It's called from the main function and calls to
encode_ivop_mpeg4() or encode_pvop_mpeg4() to encode
frame according to the determined vop coding type.
3) encoder_free_mpeg4()
Location:
mp4einit.c
Description:
MPEG-4 video encoder free function. Frees the working buffer
of the encoder general state structure.
Calling Procedure:
It's called from the main function after all the frames have been
encoded and does not call to any lower-level functions.
4) encode_ivop_mpeg4()
Location:
mp4evops.c
Description:
MPEG-4 IVOP encoding function.
(1) Initializes MPEG-4 encoder high-level state structure.
(2) Dumps VOP syntax information to the output bitstream.
(3) Loops to encode each MacroBlock in the IVOP in zigzag
order.
Calling Procedure:
It's called from encode_mpeg4() if the frame is IVOP and calls
to init_vop_enc_infor_mpeg4() to initialize encoder high-level
state and encode_intra_mb_mpeg4() to encode each
MacroBlock in the IVOP.
5) encode_pvop_mpeg4()
Location:
mp4evops.c
Description:
MPEG-4 PVOP encoding function.
(1) Initializes MPEG-4 encoder high-level state structure.
(2) Dumps VOP syntax information to the output bitstream.
(3) Performs motion estimation on the VOP to determine the
motion vectors and coding type of each MacroBlock.
(4) Loops to encode each MacroBlock in the PVOP in zigzag
order.
Calling Procedure:
It's called from encode_mpeg4() if the frame is PVOP and calls
to init_vop_enc_infor_mpeg4() to initialize encoder high-level
state and encode_intra_mb_mpeg4() or
encoder_inter_mb_mpeg4 to encode each MacroBlock in the
PVOP according to its determined coding type. It calls to
ippiSumNorm_VOP_MPEG4_8u16u() to compute the
summation plane based on blocks, calls to
ippiFindMVpred_MPEG4() to find motion vector predictor of
each MacroBlock, calls to ippiMotionEstimation_16x16_SEA()
to perform Successive Elimination Algorithm for motion
estimation.
6) encode_intra_mb_mpeg4()
Location:
mp4emblk.c
Description:
MPEG-4 intra Macroblock encoding function.
(1) Encodes six blocks texture data and decodes their
reconstructed data in the same time, including DCT and
IDCT, Quantization and Inverse Quantization of each block
in the MacroBlock.
(2) Performs AC/DC prediction based on the MacroBlock.
(3) Determines the MacroBlock syntax information and dumps
them out.
(4) VLC encoding of six blocks in the MacroBlock.
Calling Procedure:
It's called from encode_ivop_mpeg4() or from
encode_pvop_mpeg4() if it's an intra MacroBlock. It calls to
encode_block_intra_mpeg4() to encode the texture data of each
block, calls to acdc_prediction_intra_mb_mpeg4() to perform
AC/DC prediction, calls to create_mb_mpeg4() to dump out
MacroBlock syntax information, calls to
ippiEncodeVLCZigzag_IntraDCVLC_MPEG4_16s1u() or
ippiEncodeVLCZigzag_IntraACVLC_MPEG4_16s1u() to
process VLC encoding of each block based on the determined
VLC method for coding of the block intra DC coefficients.
7) encode_inter_mb_mpeg4()
Location:
mp4emblk.c
Description:
MPEG-4 inter MacroBlock encoding function.
(1) Looks up motion vectors for chrominance blocks in the
MacroBlock.
(2) Performs motion compensation to get reference blocks in
forward reconstructed plane.
(3) Computes the texture errors or residuals of each block and its
corresponding reference block.
(4) Encodes the texture residuals of each block, including DCT
and IDCT, Quantization and Inverse Quantization.
(5) Determines the MacroBlock syntax information and dumps
it out. If this MacroBlock is determined not to be coded,
then step (6) and (7) should be skipped.
(6) Encodes the motion vectors of this MacroBlock.
(7) VLC encoding of six blocks in the MacroBlock.
(8) Computes the reconstructed data of current MacroBlock.
Calling Procedure:
It's called from encode_pvop_mpeg4() if it is an inter
MacroBlock. It calls to lookup_uvmv_mpeg4() to loop up
motion vectors for chrominance blocks, calls to
ippiMCBlock_RoundOff_8u() or ippiMCBlock_RoundOn_8u()
to perform motion compensation according to its rounding type,
calls to ippiComputeTextureErrorBlock_SAD_8u16s() to
compute the texture errors of each block, calls to
encode_block_inter_mpeg4() to encode the texture errors, calls
to create_mb_mpeg4() to dump out MacroBlock syntax
information, calls to ippiEncodeMV_MPEG4_8u16s() to encode
the motion vectors into the bitstream, calls to
ippiEncodeVLCZigzag_Inter_MPEG4_16s1u() to process VLC
encoding, calls to ippiCopyBlock_8x8_8u() or
ippiReconBlock_8x8() to reconstruct the texture data of current
MacroBlock.
8) encode_block_inter_mpeg4()
Location:
mp4eblck.c
Description:
MPEG-4 inter block encoding function.
(1) DCT of the inter block residual texture data
(2) Quantization
(3) Inverse Quantization
(4) IDCT
Calling Procedure:
It's called from encode_inter_mb_mpeg4(). It calls to
ippiDCTFwd_8x8_16s() to perform DCT, calls to
ippiQuantInter_MPEG4_16s_I() to perform inter block
quantization, calls to ippiQuantInvInter_MPEG4_16s_I() to
perform inverse quantization, calls to ippiDCTInv_8x8_16s() to
perform IDCT.
9) encode_block_intra_mpeg4()
Location:
mp4eblck.c
Description:
MPEG-4 intra block encoding function.
(1) DCT of the intra block texture data
(2) Quantization
(3) Inverse Quantization
(4) IDCT
Calling Procedure:
It's called from encode_intra_mb_mpeg4(). It calls to
ippiDCTFwd_8x8_8u16s() to perform DCT, calls to
ippiQuantIntra_MPEG4_16s_I() to perform intra block
quantization, calls to ippiQuantInvIntra_MPEG4_16s_I() to
perform inverse quantization, calls to ippiDCTInv_8x8_16s8u()
to perform IDCT.
10)acdc_prediction_intra_mb_mpeg4()
Location:
mp4eblck.c
Description:
MPEG-4 intra MacroBlock AC/DC prediction.
(1) Determines the AC/DC prediction direction of each block.
(2) Calculates the AC prediction coefficients.
(3) AC and DC coefficient buffer update.
(4) DC prediction.
(5) AC prediction if update.
Calling Procedure:
It's called from encode_intra_mb_mpeg4() and does not call to
any lower level functions.
================================================================
9. Known Limitations
This MPEG-4 video encoder sample code is only for
demonstration purpose. Its error handling feature is limited.
================================================================
10. Technical Support and Feedback
To receive support or provide feedback for AAC decoder sample
code, please refer to the "Technical Support and Feedback" section
of the release notes provided in the Intel IPP V5.0 for Linux on
Intel PCA Processors with Intel Wireless MMX Technology
product installation.
================================================================
11. License Definition
By downloading and installing this sample, you hereby agree that
the accompanying Materials are being provided to you under the
terms and conditions of the End User License Agreement for the
Intel IPP product previously accepted by you.
================================================================
12. Disclaimer and Legal Information
The source code contained or described herein and all documents
related to the source code ("Material") are owned by Intel
Corporation or its suppliers or licensors. Title to the Material
remains with Intel Corporation or its suppliers and licensors.
The Material may contain trade secrets and proprietary and
confidential information of Intel Corporation and its suppliers
and licensors, and is protected by worldwide copyright and trade
secret laws and treaty provisions. No part of the Material may be
used, copied, reproduced, modified, published, uploaded, posted,
transmitted, distributed, or disclosed in any way without Intel(R)
prior express written permission.
No license under any patent, copyright, trade secret or other
intellectual property right is granted to or conferred upon you
by disclosure or delivery of the Materials, either expressly,
by implication, inducement, estoppel or otherwise. Any license
under such intellectual property rights must be express and
approved by Intel in writing.
Unless otherwise agreed by Intel in writing, you may not remove
or alter this notice or any other notice embedded in Materials by
Intel or Intel(R) suppliers or licensors in any way.
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R)
PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE
FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL
DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR
USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO
FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT
OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
The information in this document is subject to change without
notice and Intel Corporation assumes no responsibility or liability
for any errors or inaccuracies that may appear in this document or
any software that may be provided in association with this
document. This document and the software described in it are
furnished under l ... ...
近期下载者:
相关文件:
收藏者: