jpeg(arm)
所属分类:其他
开发工具:Unix_Linux
文件大小:24KB
下载次数:321
上传日期:2006-05-29 16:14:26
上 传 者:
789632145
说明: bmp图像转换成jpeg图像的一个linux的小程序
(bmp image is converted into a jpeg image of the small programs linux)
文件列表:
jpeg\doc (0, 2006-05-29)
jpeg\makefile_sample_jpeg (6040, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\decoder\jpgdec.c (10403, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\decoder (0, 2006-05-29)
jpeg\src\arm_linux\image\jpeg\encoder\jpgenc.c (15282, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\encoder (0, 2006-05-29)
jpeg\src\arm_linux\image\jpeg\general\jpgmain.c (11711, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\general\jpgmisc.c (18186, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\general\jpgtab.c (5986, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\general (0, 2006-05-29)
jpeg\src\arm_linux\image\jpeg\_include\sampjpeg.h (7494, 2005-09-29)
jpeg\src\arm_linux\image\jpeg\_include (0, 2006-05-29)
jpeg\src\arm_linux\image\jpeg (0, 2006-05-29)
jpeg\src\arm_linux\image (0, 2006-05-29)
jpeg\src\arm_linux\include\sampdefs.h (3249, 2005-09-29)
jpeg\src\arm_linux\include (0, 2006-05-29)
jpeg\src\arm_linux (0, 2006-05-29)
jpeg\src (0, 2006-05-29)
jpeg (0, 2006-05-29)
September 7, 2005
Intel(R) Integrated Performance Primitives Version 5.0
JPEG 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 JPEG encoder/decoder sample code supports encoding and
decoding JPEG pictures compatible with CCITT T.81 subsets,
which only includes baseline interleave encoding and decoding.
The purpose of JPEG encoder/decoder sample code is to provide
an example showing how to use Intel(R) Integrated Performance
Primitives (Intel(R) IPP) JPEG primitives to build up the basic
tools of a JPEG encoder/decoder, such as DCT/IDCT,
quantization/dequantization and huffman encoding/decoding
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 JPEG encoder/decoder 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_jpeg Make file for the JPEG encoder/decoder
sample code
~/doc
readme_jpeg.txt Readme file
~/src/arm_linux/image/jpeg/
JPEG sample code source file directory
./general/jpgmain.c Source file for JPEG main entry function
./general/jpgtab.c Source file for tables
./general/jpgmisc.c Source file for mixed functions, such as
format parsing functions
./encoder/jpgenc.c Source file for JPEG encoder and
encoder initialization/free functions
./decoder/jpgdec.c Source file for JPEG decoder and
decoder initialization/free functions
./_include/sampjpeg.h JPEG encoder/decoder header file
~/src/include General header file directory
sampdefs.h General 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-JPEG_*.tgz to a desired folder.
Please make sure to preserve the directory structure. The files for
this sample are in the ./ipp_sample/PCA/JPEG/ folder.
Follow the steps below to build JPEG encoder/decoder 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_jpeg to make sure the variable
PATH_IPP_ROOT is the current Intel Integrated Performance
Primitives installation path. With default settings, the variable
should be:
PATH_IPP_ROOT=/opt/intel/ipp/5.0/pca_wmmx
Modify other toolchain paths if necessary in this make file.
2) Make the application with the command:
make -f makefile_sample_jpeg.
Unzip the package with the command: unzip jpegsample.zip.
This step should already be done.
Follow the steps below to build the JPEG encoder/decoder
application. Before you begin the build, make sure the Intel
Integrated Performance Primitives for the Intel(R) PXA25x and
PXA26x Processors Version 5.0 (Linux) has already been installed
on the same host machine.
1) Modify makefile_sample_jpeg to make sure the variable
PATH_IPP_ROOT is the current Intel Integrated Performance
Primitives installation path. With the default settings, the
variable should be:
PATH_IPP_ROOT=/opt/intel/ipp/5.0/pca_wmmx
Modify other toolchain paths if necessary in this make file.
2) Make the application with the command:
make -f makefile_sample_jpeg
================================================================
6. Running the Software
If successfully built, the executable is generated in the path
$(PATH_USR_BIN) defined in the make file, with the default
name jpeg. The command line format is:
Encoder with high quality:
jpeg -enc inputfile outputfile -h
Encoder with low quality:
jpeg -enc inputfile outputfile -l
Decoder:
jpeg -dec inputfile outputfile
Simply type "jpeg -help" to invoke help information.
================================================================
7. Intel IPP Functional Coverage
The JPEG encoder/decoder sample demonstrates how to combine
the DCT-quantization, huffman encoding, huffman decoding,
dequantization-IDCT to construct the baseline JPEG
encoder/decoder. Correspondingly, the sample incorporates the
following Intel IPP JPEG coding domain primitives:
Functional Category Primitive Name
Initialization ippiDCTQuantFwdTableInit_JPEG_8u16u
ippiDCTQuantInvTableInit_JPEG_8u16u
ippiEncodeHuffmanSpecInit_JPEG_8u
ippiDecodeHuffmanSpecInit_JPEG_8u
DCT-Quantization ippiDCTQuantFwd_JPEG_16s
Dequantization-IDCT ippiDCTQuantInv_JPEG_16s
Huffman Encoding
ippiEncodeHuffman8x8_Direct_JPEG_16s1u_C1
Huffman Decoding
ippiDecodeHuffman8x8_Direct_JPEG_1u16s_C1
Color Conversion
ippiBGRToYCbCr411LS_MCU_8u16s_C3P3R
ippiYCbCr411ToBGRLS_MCU_16s8u_P3C3R
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.
Note: The Intel IPP functions used in Intel IPP 5.0 sample code is
different from that used for the Intel IPP 3.0 sample code,
please see section 8 for details.
================================================================
8. Key Module Descriptions
Structures:
1) jpeg_enc_state
Description:
jpeg encoder state structure, which contains picture attributes,
including picture size and color format, tables for quantization
and huffman encoding. It also contains the quality requirement
indicator and DC prediction state values.
2) jpeg_dec_state
Description:
jpeg decoder state structure, which contains picture attributes,
including picture size and color format, tables for
dequantization and huffman decoding. It also contains DC
prediction state values.
Functions:
1) encoder_init_alloc_jpeg()
Location:
jpgenc.c
Description:
JPEG encoder initialization function.
(1) Parses BMP file header.
(2) Converts input data from BGR to YUV format.
(3) Loads and initializes tables for quantization and huffman
encoding.
(4) Allocates memories for input, output, and working buffer.
Calling Procedure:
It's called by the main function. It calls read_bmp_file to parse
BMP file header. It calls
ippiDCTQuantFwdTableInit_JPEG_16u and
ippiEncodeHuffmanTableInit_JPEG_8u to process the
quantization and huffman encoding tables. It calls
ippiBGRToYCbCr411LS_MCU_8u16s_C3P3
to convert color format from BGR to YUV411.
2) encode_jpeg()
Location:
jpgenc.c
Description:
JPEG encoder function. It encodes the input raw YUV data of a
picture into a JPEG file.
(1) Writes JPEG header.
(2) Does the DCT-quantization.
(3) Does the huffman encoding.
Calling Procedure:
It's called by the main function. It calls write_head_information
to write the JPEG header. It calls write_sos_information to
write JPEG SOS marker. It calls ippiDCTQuantFwd_JPEG_16s
to do the integrated DCT-quantization. It calls
ippiEncodeHuffman_Direct_JPEG_16s1u to do the huffman
encoding.
3) encoder_free_jpeg()
Location:
jpgenc.c
Description:
JPEG encoder free function.
(1) Frees the working buffer of the encoder state structure.
(2) Frees the input, output buffer.
Calling Procedure:
It's called by the main function after the JPEG encoder
completes successfully.
4) decoder_init_alloc_jpeg()
Location:
jpgdec.c
Description:
JPEG decoder initialization function.
(1) Parses JPEG header.
(2) Loads and initializes tables for dequantization and huffman
decoding.
(3) Allocates memories for working buffer and input, output
buffer.
Calling Procedure:
It's called by the main function. It calls read_jpeg_header to
parse the JPEG file header. It calls
ippiDCTQuantInvTableInit_JPEG_16u32s and
ippiDecodeHuffmanTableInit_JPEG_8u to initialize the
quantization and huffman decoding table.
5) decode_jpeg
Location:
jpgdec.c
Description:
JPEG decoder function. It decodes the JPEG format stream into
BGR raw data.
(1) Decodes huffman encoded coefficients.
(2) Does the dequantization and IDCT transform.
(3) Does color conversion from YUV to BGR.
Calling Procedure:
It's called by the main function. It calls
ippiDecodeHuffman_Direct_JPEG_1u16s
to decode the huffman encoded coefficient. It calls
ippiDCTQuantInv_JPEG_16s to do the dequantization-IDCT.
It calls ippiYCbCr411ToBGRLS_MCU_16s8u_P3C3
to convert YUV data into BGR data.
6) decoder_free_jpeg
Location:
jpgdec.c
Description:
JPEG decoder free function.
(1) Frees the working buffer of the decoder state structure.
(2) Frees the input, output buffer.
Calling Procedure:
It's called by the main function after the JPEG decoder
completes successfully.
7) read_bmp_file()
Location:
jpgmisc.c
Description:
BMP parsing function. Parses the JPEG header information.
Calling Procedure:
It's called by encoder_init_alloc_jpeg() to parse the BMP
header.
8) write_head_information()
Location:
jpgmisc.c
Description:
JPEG header packing function. Writes and packs the
information to the JPEG file header.
Calling Procedure:
It's called by function encode_jpeg() to pack the JPEG file
header.
9) write_sos_information()
Location:
jpgmisc.c
Description:
JPEG SOS information packing function. Writes and packs the
information to the JPEG SOS segment.
Calling Procedure:
It's called by function encode_jpeg() to pack the JPEG SOS
segment.
10) read_jpeg_header
Location:
jpgmisc.c
Description:
JPEG header parsing function. Reads and parses JPEG header
from the JPEG file
Calling Procedure:
It's called by function decoder_init_alloc_jpeg to parse the JPEG
File header information.
11) read_sos
Location:
jpgmisc.c
Description:
JPEG SOS information parsing function. Parses the SOS
information from the JPEG SOS segment.
Calling Procedure:
It's called by function decoder_init_alloc_jpeg to parse the JPEG
SOS segment information.
================================================================
9. Known Limitations
None known at the time of this document release.
================================================================
11. 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 license and may only be used or copied in
accordance with the terms of the license. No license, express or
implied, by estoppel or otherwise, to any intellectual property
rights is granted by this document. The information in this
document is provided in connection with Intel products and should
not be construed as a commitment by Intel Corporation.
Intel products are not intended for use in medical, life saving,
life sustaining, critical control or safety systems, or in nuclear
facility applications.
Designers must not rely on the absence or characteristics of any
features or instructions marked "reserved" or "undefined." Intel
reserves these for future definition and shall have no responsibility
whatsoever for conflicts or incompatibilities arising from future
changes to them.
Intel Corporation may have patents or pending patent applications,
trademarks, copyrights, or other intellectual property rights that
relate to the presented subject matter. The furnishing of documents
and other materials and information does not provide any license,
express or implied, by estoppel or otherwise, to any such patents,
trademarks, copyrights, or other intellectual property rights.
Intel may make changes to dates, specifications, product
descriptions, and plans referenced in this document at any time,
without notice.
Intel products may contain design defects or errors known as
errata which may cause the product to deviate from published
specifications. Current characterized errata are available on
request.
Contact your local Intel sales office or your distributor to obtain
the latest specifications and before placing your product order.
Copies of documents which have an ordering number and are referenced
in this document, or other Intel literature may be obtained by
calling 1-800-548-4725 or by visiting Intel's Web site at
http://www.intel.com.
Intel, MMX, Pentium, and Wireless MMX are trademarks or registered
trademarks of Intel Corporation or its subsidiaries in the United
States and other countries.
INTEL CONFIDENTIAL
Copyright(C) 2003-2005, Intel Corporation. All rights reserved.
近期下载者:
相关文件:
收藏者: