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

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

?? structure.doc

?? JPEG source code converts the image into compressed format
?? 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在线播放| 69久久夜色精品国产69蝌蚪网| 成熟亚洲日本毛茸茸凸凹| 日本欧美韩国一区三区| 亚洲精品国产成人久久av盗摄 | 成人的网站免费观看| 免费看黄色91| 丝瓜av网站精品一区二区| 亚洲欧美日韩一区二区| 国产精品视频你懂的| 精品国产区一区| 在线播放中文一区| 色婷婷综合视频在线观看| 国产成人在线色| 狠狠色丁香婷综合久久| 午夜不卡av在线| 亚洲国产日韩综合久久精品| 国产精品久久久久久久久免费桃花| 精品国产一区a| 制服丝袜国产精品| 91精品国产综合久久精品| 91成人在线免费观看| 白白色亚洲国产精品| 成人激情小说网站| 高清视频一区二区| 国产精品一区一区三区| 精品午夜久久福利影院| 久久99久久99精品免视看婷婷| 午夜久久久久久电影| 一区二区三区高清| 亚洲黄色性网站| 亚洲最新视频在线观看| 亚洲综合一区二区| 一区二区三区国产| 国产精品毛片a∨一区二区三区| 欧美激情一二三区| 国产偷国产偷亚洲高清人白洁| 欧美精品一区二区三区在线播放 | 国产亚洲精品福利| 337p粉嫩大胆噜噜噜噜噜91av| 日韩欧美综合一区| 欧美va在线播放| 久久久久久亚洲综合影院红桃| 精品久久久久久最新网址| 久久久av毛片精品| 国产午夜精品久久| 亚洲日本青草视频在线怡红院| 国产精品天干天干在线综合| 中文字幕一区二区三区在线不卡| 亚洲手机成人高清视频| 亚洲精品精品亚洲| 三级在线观看一区二区| 久久精品国内一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 国产成人亚洲综合a∨婷婷图片 | 国产一区免费电影| 国产高清久久久久| 色视频成人在线观看免| 欧美精品成人一区二区三区四区| 日韩欧美美女一区二区三区| 国产无人区一区二区三区| 亚洲色图色小说| 五月婷婷综合激情| 国产一区二区网址| av在线一区二区| 91精品在线免费| 久久久精品国产99久久精品芒果 | 国产精品另类一区| 一区二区三区四区五区视频在线观看| 91丨九色porny丨蝌蚪| 在线观看欧美日本| 日韩欧美成人一区二区| 国产精品久久777777| 亚洲色图欧洲色图| 免费不卡在线视频| 成人理论电影网| 欧美私模裸体表演在线观看| 日韩精品一区二区三区视频播放 | 欧美精品三级日韩久久| 国产无遮挡一区二区三区毛片日本| 一区精品在线播放| 久久精品国产精品亚洲精品| 成人免费电影视频| 91精品国产综合久久香蕉麻豆| 国产欧美日韩中文久久| 亚洲成人动漫在线免费观看| 国产宾馆实践打屁股91| 欧美女孩性生活视频| 国产欧美一区二区三区在线老狼| 亚洲免费av观看| 国产精品一区二区视频| 欧美亚洲禁片免费| 国产精品少妇自拍| 日本不卡中文字幕| 色综合欧美在线视频区| 国产亚洲精品福利| 蜜桃传媒麻豆第一区在线观看| 一本大道av一区二区在线播放| 精品国内二区三区| 五月天久久比比资源色| 99久久综合国产精品| 久久久久久久av麻豆果冻| 亚洲成人午夜电影| 91麻豆视频网站| 欧美激情中文字幕一区二区| 久久精品国产网站| 7777精品伊人久久久大香线蕉完整版| 18欧美乱大交hd1984| 国产一二精品视频| 日韩一级高清毛片| 天天综合天天做天天综合| 91美女蜜桃在线| 国产精品久久网站| 高潮精品一区videoshd| 2021国产精品久久精品| 欧美aⅴ一区二区三区视频| 欧美伊人精品成人久久综合97| 亚洲天堂2014| www.久久精品| 中文字幕一区二区三区不卡 | 91视频www| 国产三级精品视频| 国产福利91精品| 久久色视频免费观看| 男男视频亚洲欧美| 欧美一级搡bbbb搡bbbb| 日韩黄色免费电影| 欧美日韩国产首页| 亚洲r级在线视频| 欧美日韩精品欧美日韩精品一综合| 亚洲在线视频网站| 欧美主播一区二区三区| 亚洲精品国产第一综合99久久| 91久久精品一区二区二区| 亚洲精品你懂的| 色婷婷亚洲综合| 亚洲精品久久久久久国产精华液 | 久久免费电影网| 国产成人在线免费观看| 欧美激情一区在线观看| 国产99久久精品| 亚洲图片欧美激情| 91福利视频久久久久| 亚洲h在线观看| 日韩美女主播在线视频一区二区三区 | 中文字幕亚洲一区二区va在线| 北条麻妃一区二区三区| 亚洲精品少妇30p| 欧美日韩国产另类一区| 热久久国产精品| 久久免费精品国产久精品久久久久| 国产成人免费视频网站| 亚洲欧洲色图综合| 欧美综合久久久| 久久成人av少妇免费| 国产欧美日韩在线观看| 91国偷自产一区二区开放时间 | 捆绑调教美女网站视频一区| 精品国产乱码久久久久久久久| 国产99精品国产| 亚洲精品网站在线观看| 91精品国产综合久久精品| 韩国av一区二区三区在线观看| 亚洲国产成人一区二区三区| 91国产福利在线| 蜜桃视频在线一区| 中文欧美字幕免费| 欧美日韩一区三区| 韩国一区二区在线观看| 最新欧美精品一区二区三区| 欧美精品日韩一区| 国产99久久久国产精品潘金| 亚洲综合色成人| 久久综合九色综合97_久久久| 91在线一区二区| 老司机免费视频一区二区三区| 国产精品网友自拍| 9191国产精品| av激情综合网| 久久精品国内一区二区三区 | 国产黄色91视频| 夜夜精品视频一区二区| 久久这里只有精品6| 欧美亚洲国产一区二区三区va| 韩国v欧美v日本v亚洲v| 亚洲综合一区二区| 日本一区二区三区高清不卡| 欧美美女一区二区| www.久久久久久久久| 久久99精品网久久| 亚洲1区2区3区4区| 亚洲人吸女人奶水| 久久久精品天堂| 欧美成人官网二区| 欧美三级在线视频|