亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? structure.doc

?? 常好且全面的jpeg圖像壓縮算法
?? DOC
?? 第 1 頁 / 共 4 頁
字號:
IJG JPEG LIBRARY:  SYSTEM ARCHITECTURE

Copyright (C) 1991-1995, Thomas G. Lane.
This file is part of the Independent JPEG Group's software.
For conditions of distribution and use, see the accompanying README file.


This file provides an overview of the architecture of the IJG JPEG software;
that is, the functions of the various modules in the system and the interfaces
between modules.  For more precise details about any data structure or calling
convention, see the include files and comments in the source code.

We assume that the reader is already somewhat familiar with the JPEG standard.
The README file includes references for learning about JPEG.  The file
libjpeg.doc describes the library from the viewpoint of an application
programmer using the library; it's best to read that file before this one.
Also, the file coderules.doc describes the coding style conventions we use.

In this document, JPEG-specific terminology follows the JPEG standard:
  A "component" means a color channel, e.g., Red or Luminance.
  A "sample" is a single component value (i.e., one number in the image data).
  A "coefficient" is a frequency coefficient (a DCT transform output number).
  A "block" is an 8x8 group of samples or coefficients.
  An "MCU" (minimum coded unit) is an interleaved set of blocks of size
	determined by the sampling factors, or a single block in a
	noninterleaved scan.
We do not use the terms "pixel" and "sample" interchangeably.  When we say
pixel, we mean an element of the full-size image, while a sample is an element
of the downsampled image.  Thus the number of samples may vary across
components while the number of pixels does not.  (This terminology is not used
rigorously throughout the code, but it is used in places where confusion would
otherwise result.)


*** System features ***

The IJG distribution contains two parts:
  * A subroutine library for JPEG compression and decompression.
  * cjpeg/djpeg, two sample applications that use the library to transform
    JFIF JPEG files to and from several other image formats.
cjpeg/djpeg are of no great intellectual complexity: they merely add a simple
command-line user interface and I/O routines for several uncompressed image
formats.  This document concentrates on the library itself.

We desire the library to be capable of supporting all JPEG baseline, extended
sequential, and progressive DCT processes.  Hierarchical processes are not
supported.

The library does not support the lossless (spatial) JPEG process.  Lossless
JPEG shares little or no code with lossy JPEG, and would normally be used
without the extensive pre- and post-processing provided by this library.
We feel that lossless JPEG is better handled by a separate library.

Within these limits, any set of compression parameters allowed by the JPEG
spec should be readable for decompression.  (We can be more restrictive about
what formats we can generate.)  Although the system design allows for all
parameter values, some uncommon settings are not yet implemented and may
never be; nonintegral sampling ratios are the prime example.  Furthermore,
we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
run-time option, because most machines can store 8-bit pixels much more
compactly than 12-bit.

For legal reasons, JPEG arithmetic coding is not currently supported, but
extending the library to include it would be straightforward.

By itself, the library handles only interchange JPEG datastreams --- in
particular the widely used JFIF file format.  The library can be used by
surrounding code to process interchange or abbreviated JPEG datastreams that
are embedded in more complex file formats.  (For example, libtiff uses this
library to implement JPEG compression within the TIFF file format.)

The library includes a substantial amount of code that is not covered by the
JPEG standard but is necessary for typical applications of JPEG.  These
functions preprocess the image before JPEG compression or postprocess it after
decompression.  They include colorspace conversion, downsampling/upsampling,
and color quantization.  This code can be omitted if not needed.

A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
and even more so in decompression postprocessing.  The decompression library
provides multiple implementations that cover most of the useful tradeoffs,
ranging from very-high-quality down to fast-preview operation.  On the
compression side we have generally not provided low-quality choices, since
compression is normally less time-critical.  It should be understood that the
low-quality modes may not meet the JPEG standard's accuracy requirements;
nonetheless, they are useful for viewers.


*** Portability issues ***

Portability is an essential requirement for the library.  The key portability
issues that show up at the level of system architecture are:

1.  Memory usage.  We want the code to be able to run on PC-class machines
with limited memory.  Images should therefore be processed sequentially (in
strips), to avoid holding the whole image in memory at once.  Where a
full-image buffer is necessary, we should be able to use either virtual memory
or temporary files.

2.  Near/far pointer distinction.  To run efficiently on 80x86 machines, the
code should distinguish "small" objects (kept in near data space) from
"large" ones (kept in far data space).  This is an annoying restriction, but
fortunately it does not impact code quality for less brain-damaged machines,
and the source code clutter turns out to be minimal with sufficient use of
pointer typedefs.

3. Data precision.  We assume that "char" is at least 8 bits, "short" and
"int" at least 16, "long" at least 32.  The code will work fine with larger
data sizes, although memory may be used inefficiently in some cases.  However,
the JPEG compressed datastream must ultimately appear on external storage as a
sequence of 8-bit bytes if it is to conform to the standard.  This may pose a
problem on machines where char is wider than 8 bits.  The library represents
compressed data as an array of values of typedef JOCTET.  If no data type
exactly 8 bits wide is available, custom data source and data destination
modules must be written to unpack and pack the chosen JOCTET datatype into
8-bit external representation.


*** System overview ***

The compressor and decompressor are each divided into two main sections:
the JPEG compressor or decompressor proper, and the preprocessing or
postprocessing functions.  The interface between these two sections is the
image data that the official JPEG spec regards as its input or output: this
data is in the colorspace to be used for compression, and it is downsampled
to the sampling factors to be used.  The preprocessing and postprocessing
steps are responsible for converting a normal image representation to or from
this form.  (Those few applications that want to deal with YCbCr downsampled
data can skip the preprocessing or postprocessing step.)

Looking more closely, the compressor library contains the following main
elements:

  Preprocessing:
    * Color space conversion (e.g., RGB to YCbCr).
    * Edge expansion and downsampling.  Optionally, this step can do simple
      smoothing --- this is often helpful for low-quality source data.
  JPEG proper:
    * MCU assembly, DCT, quantization.
    * Entropy coding (sequential or progressive, Huffman or arithmetic).

In addition to these modules we need overall control, marker generation,
and support code (memory management & error handling).  There is also a
module responsible for physically writing the output data --- typically
this is just an interface to fwrite(), but some applications may need to
do something else with the data.

The decompressor library contains the following main elements:

  JPEG proper:
    * Entropy decoding (sequential or progressive, Huffman or arithmetic).
    * Dequantization, inverse DCT, MCU disassembly.
  Postprocessing:
    * Upsampling.  Optionally, this step may be able to do more general
      rescaling of the image.
    * Color space conversion (e.g., YCbCr to RGB).  This step may also
      provide gamma adjustment [ currently it does not ].
    * Optional color quantization (e.g., reduction to 256 colors).
    * Optional color precision reduction (e.g., 24-bit to 15-bit color).
      [This feature is not currently implemented.]

We also need overall control, marker parsing, and a data source module.
The support code (memory management & error handling) can be shared with
the compression half of the library.

There may be several implementations of each of these elements, particularly
in the decompressor, where a wide range of speed/quality tradeoffs is very
useful.  It must be understood that some of the best speedups involve
merging adjacent steps in the pipeline.  For example, upsampling, color space
conversion, and color quantization might all be done at once when using a
low-quality ordered-dither technique.  The system architecture is designed to
allow such merging where appropriate.


Note: it is convenient to regard edge expansion (padding to block boundaries)
as a preprocessing/postprocessing function, even though the JPEG spec includes
it in compression/decompression.  We do this because downsampling/upsampling
can be simplified a little if they work on padded data: it's not necessary to
have special cases at the right and bottom edges.  Therefore the interface
buffer is always an integral number of blocks wide and high, and we expect
compression preprocessing to pad the source data properly.  Padding will occur
only to the next block (8-sample) boundary.  In an interleaved-scan situation,
additional dummy blocks may be used to fill out MCUs, but the MCU assembly and
disassembly logic will create or discard these blocks internally.  (This is
advantageous for speed reasons, since we avoid DCTing the dummy blocks.
It also permits a small reduction in file size, because the compressor can
choose dummy block contents so as to minimize their size in compressed form.
Finally, it makes the interface buffer specification independent of whether
the file is actually interleaved or not.)  Applications that wish to deal
directly with the downsampled data must provide similar buffering and padding
for odd-sized images.


*** Poor man's object-oriented programming ***

It should be clear by now that we have a lot of quasi-independent processing
steps, many of which have several possible behaviors.  To avoid cluttering the
code with lots of switch statements, we use a simple form of object-style
programming to separate out the different possibilities.

For example, two different color quantization algorithms could be implemented
as two separate modules that present the same external interface; at runtime,
the calling code will access the proper module indirectly through an "object".

We can get the limited features we need while staying within portable C.
The basic tool is a function pointer.  An "object" is just a struct
containing one or more function pointer fields, each of which corresponds to
a method name in real object-oriented languages.  During initialization we
fill in the function pointers with references to whichever module we have
determined we need to use in this run.  Then invocation of the module is done
by indirecting through a function pointer; on most machines this is no more
expensive than a switch statement, which would be the only other way of
making the required run-time choice.  The really significant benefit, of
course, is keeping the source code clean and well structured.

We can also arrange to have private storage that varies between different
implementations of the same kind of object.  We do this by making all the
module-specific object structs be separately allocated entities, which will
be accessed via pointers in the master compression or decompression struct.
The "public" fields or methods for a given kind of object are specified by
a commonly known struct.  But a module's initialization code can allocate
a larger struct that contains the common struct as its first member, plus
additional private fields.  With appropriate pointer casting, the module's
internal functions can access these private fields.  (For a simple example,
see jdatadst.c, which implements the external interface specified by struct
jpeg_destination_mgr, but adds extra fields.)

(Of course this would all be a lot easier if we were using C++, but we are
not yet prepared to assume that everyone has a C++ compiler.)

An important benefit of this scheme is that it is easy to provide multiple
versions of any method, each tuned to a particular case.  While a lot of
precalculation might be done to select an optimal implementation of a method,
the cost per invocation is constant.  For example, the upsampling step might
have a "generic" method, plus one or more "hardwired" methods for the most
popular sampling factors; the hardwired methods would be faster because they'd
use straight-line code instead of for-loops.  The cost to determine which
method to use is paid only once, at startup, and the selection criteria are
hidden from the callers of the method.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲亚洲精品在线| 国产日韩影视精品| 久久久久综合网| 亚洲国产精品视频| 成人av在线资源网站| 精品国产亚洲在线| 亚洲国产精品一区二区尤物区| 国产成人精品www牛牛影视| 日韩一级二级三级精品视频| 亚洲欧洲另类国产综合| 国产一区二区不卡| 欧美一级精品大片| 日韩在线一区二区三区| 在线观看亚洲精品| 亚洲视频香蕉人妖| av电影一区二区| 国产精品美女久久久久高潮| 久久99精品久久久久久国产越南| 欧美日韩黄色影视| 亚洲精品亚洲人成人网在线播放| 丁香婷婷深情五月亚洲| 久久久久亚洲综合| 国产精品一区二区在线观看网站 | 久久精品国产99久久6| 欧美系列一区二区| 亚洲自拍偷拍av| 色网站国产精品| 亚洲欧美另类图片小说| 波多野结衣一区二区三区| 久久午夜羞羞影院免费观看| 精品一区二区在线播放| 精品免费99久久| 久久精品国产99国产| 91精品欧美久久久久久动漫| 爽好久久久欧美精品| 678五月天丁香亚洲综合网| 日韩国产一区二| 91精品国产日韩91久久久久久| 五月婷婷激情综合| 欧美一级xxx| 免费成人性网站| 精品福利一二区| 国产91精品入口| 亚洲精品欧美激情| 欧美日韩免费高清一区色橹橹| 亚洲综合免费观看高清在线观看| 欧美日韩在线三级| 麻豆精品在线看| 国产日韩精品一区二区三区| 国产成人亚洲综合a∨猫咪| 国产精品麻豆久久久| 91蜜桃婷婷狠狠久久综合9色| 夜夜嗨av一区二区三区网页| 欧美日韩国产欧美日美国产精品| 美女一区二区在线观看| 久久久久久久精| 91成人免费电影| 青草国产精品久久久久久| 2024国产精品| 一本一道波多野结衣一区二区| 日韩制服丝袜av| 欧美韩国日本不卡| 欧美视频一区二区| 国产一区二区中文字幕| 一区二区三区在线播| 日韩免费看的电影| 97精品久久久午夜一区二区三区 | 成人av在线资源| 午夜a成v人精品| 中文成人综合网| 91精品国产综合久久久久久久久久 | 久久影院午夜论| 色妹子一区二区| 精品一区二区三区免费观看| 国产精品久久一级| 日韩西西人体444www| 99精品黄色片免费大全| 另类人妖一区二区av| 亚洲私人黄色宅男| 久久综合狠狠综合久久综合88| 91麻豆国产自产在线观看| 久久福利资源站| 亚洲欧美一区二区久久| 精品三级在线看| 欧美日韩一区成人| av在线这里只有精品| 日韩va欧美va亚洲va久久| 亚洲特级片在线| 国产欧美日韩三区| 欧美va亚洲va香蕉在线| 欧美日韩亚洲国产综合| 成a人片亚洲日本久久| 国产一区二区免费视频| 久久精品理论片| 香蕉久久一区二区不卡无毒影院| 国产精品视频第一区| 久久综合久久综合九色| 欧美一区二区三区四区在线观看| 色综合亚洲欧洲| 成人久久18免费网站麻豆 | 亚洲一区二区三区中文字幕| 中文字幕免费一区| 国产亚洲一区二区在线观看| 日韩免费观看高清完整版| 7777精品伊人久久久大香线蕉| 在线国产亚洲欧美| 色婷婷综合五月| 99久久精品费精品国产一区二区| 风间由美性色一区二区三区| 狠狠色狠狠色合久久伊人| 日韩国产高清在线| 五月天国产精品| 日韩精品91亚洲二区在线观看| 亚洲一区二区三区中文字幕| 亚洲自拍偷拍九九九| 一区二区三区中文在线| 亚洲影院在线观看| 亚洲一级二级在线| 午夜精品福利视频网站| 天堂久久一区二区三区| 天堂精品中文字幕在线| 麻豆国产精品一区二区三区 | 国产一区在线观看视频| 国内精品嫩模私拍在线| 国产一区二区不卡| www.亚洲在线| 色综合久久综合网欧美综合网| 91一区二区在线| 欧美日韩高清影院| 日韩天堂在线观看| 久久久久国产精品免费免费搜索| 久久综合九色综合欧美就去吻| 久久久综合激的五月天| 欧美极品xxx| 一区二区不卡在线视频 午夜欧美不卡在| 欧美亚洲综合网| 日韩欧美的一区二区| 久久久久久97三级| 亚洲人成在线观看一区二区| 亚洲国产精品久久久久秋霞影院| 日韩国产在线观看一区| 国产99久久久精品| 欧美羞羞免费网站| 日韩一卡二卡三卡四卡| 国产丝袜美腿一区二区三区| 亚洲免费观看高清完整版在线观看| 亚洲成人一二三| 国产91丝袜在线观看| 在线观看日韩高清av| 91精品国产综合久久小美女| 国产欧美1区2区3区| 亚洲成人1区2区| 国产一区二区三区不卡在线观看 | 国产一区二区三区免费播放| 99国产麻豆精品| 精品精品国产高清a毛片牛牛| 国产精品久久久久久福利一牛影视 | 日韩在线观看一区二区| 福利一区二区在线| 欧美日高清视频| 中文字幕日韩精品一区| 免费xxxx性欧美18vr| 91美女在线观看| 久久久噜噜噜久噜久久综合| 一区二区三区丝袜| 国内精品伊人久久久久av影院 | 欧美老年两性高潮| 国产精品久久久久久久久久久免费看| 亚洲一二三级电影| av亚洲精华国产精华精| 亚洲精品在线免费播放| 亚洲精品成人在线| 成人美女视频在线观看18| 51精品国自产在线| 亚洲乱码国产乱码精品精小说| 国产资源在线一区| 日韩一区二区三免费高清| 一区二区三区在线观看视频| 成人久久久精品乱码一区二区三区| 欧美一区二区三区不卡| 亚洲一二三四久久| 91首页免费视频| 中文字幕不卡在线观看| 国产在线精品一区二区三区不卡| 欧美日韩国产片| 亚洲一区中文在线| 在线看国产一区| 亚洲日本电影在线| 99精品视频在线播放观看| 久久精品一区二区三区不卡牛牛| 免费xxxx性欧美18vr| 日韩网站在线看片你懂的| 视频一区二区欧美| 欧美精品123区| 婷婷综合久久一区二区三区| 欧美三级中文字幕在线观看| 亚洲国产欧美另类丝袜| 欧美日韩视频在线一区二区| 亚洲激情五月婷婷| 欧美日韩三级在线|