亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美国产激情一区二区三区蜜月| 日韩中文欧美在线| 亚洲综合久久久久| 国内精品在线播放| 色噜噜狠狠成人中文综合| 精品三级在线看| 一区二区三区免费在线观看| 国产一区二区视频在线播放| 欧美专区亚洲专区| 中文字幕一区二区三区不卡| 久久99精品一区二区三区三区| 99久久亚洲一区二区三区青草| 日韩三级在线观看| 亚洲影视资源网| 成人综合在线观看| 精品国产髙清在线看国产毛片 | 色婷婷狠狠综合| 欧美精品一区二区三区蜜臀| 丝袜脚交一区二区| 欧美日韩在线播放| 夜夜精品浪潮av一区二区三区| 高清beeg欧美| 久久久国产精品不卡| 精品一区二区三区在线播放| 宅男在线国产精品| 日本欧美一区二区三区乱码| 制服丝袜国产精品| 日日夜夜精品视频免费| 欧美日韩国产片| 午夜日韩在线电影| 欧美午夜一区二区三区免费大片| 亚洲精品ww久久久久久p站| 99视频在线观看一区三区| 欧美激情一区二区三区四区| 国产精品911| 国产清纯白嫩初高生在线观看91| 国产一区啦啦啦在线观看| 欧美精品一区二区三区一线天视频| 免费在线观看一区| 日韩欧美国产小视频| 久草中文综合在线| 久久久午夜精品| 成人国产免费视频| 亚洲欧美综合在线精品| 精品日韩在线观看| 久久66热偷产精品| 国产精品天干天干在观线| 成人精品一区二区三区中文字幕| 1区2区3区国产精品| 99re热这里只有精品免费视频| 综合激情网...| 欧美性大战久久久久久久| 天天操天天综合网| 日韩精品一区二区三区三区免费| 韩国欧美国产1区| 国产精品日韩精品欧美在线| 91在线观看地址| 丝袜美腿一区二区三区| 精品国产露脸精彩对白| 99精品欧美一区| 亚洲午夜一二三区视频| 欧美成人福利视频| 不卡在线视频中文字幕| 亚洲综合丁香婷婷六月香| 91精品国产入口| 成人黄色在线看| 亚洲一区二区三区四区不卡| 欧美精品一区二区三区蜜臀| 成人h精品动漫一区二区三区| 一区二区三区电影在线播| 欧美一卡2卡三卡4卡5免费| 国产a级毛片一区| 亚洲国产日韩av| 欧美极品少妇xxxxⅹ高跟鞋 | 蜜臀av性久久久久蜜臀av麻豆| 精品理论电影在线观看| 91在线播放网址| 久久精品国产精品亚洲精品| 国产精品伦理在线| 日韩一区二区三区av| 99精品桃花视频在线观看| 日本不卡中文字幕| 日韩美女视频一区| 精品久久久久久久一区二区蜜臀| 一本一道久久a久久精品综合蜜臀| 精品亚洲porn| 亚洲午夜视频在线观看| 久久精品日韩一区二区三区| 欧美日韩国产大片| 99riav久久精品riav| 国产美女视频一区| 热久久久久久久| 亚洲成a人片综合在线| 日本一区二区动态图| 日韩欧美国产三级电影视频| 欧美亚洲另类激情小说| 成人在线综合网| 麻豆91精品91久久久的内涵| 亚洲激情图片qvod| 国产精品麻豆久久久| 国产色产综合产在线视频| 日韩欧美一区在线| 欧美日韩免费高清一区色橹橹 | 欧美在线观看一区| 91在线高清观看| 91一区在线观看| 成+人+亚洲+综合天堂| 在线综合+亚洲+欧美中文字幕| av网站一区二区三区| 国产精品一品二品| 国产成人欧美日韩在线电影| 国内精品久久久久影院薰衣草| 美女诱惑一区二区| 久久精品国产亚洲高清剧情介绍| 日韩精品色哟哟| 奇米888四色在线精品| 日韩在线a电影| 日韩国产欧美一区二区三区| 日韩制服丝袜先锋影音| 婷婷中文字幕综合| 免费一级欧美片在线观看| 免费观看成人av| 激情五月播播久久久精品| 久久99精品一区二区三区| 国模娜娜一区二区三区| 国产91富婆露脸刺激对白| 福利91精品一区二区三区| av在线不卡免费看| 欧美色综合天天久久综合精品| 欧美影院一区二区| 欧美日韩国产一区二区三区地区| 欧美电影在线免费观看| 欧美一区二区三区婷婷月色| 日韩欧美一级特黄在线播放| 久久无码av三级| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲图片你懂的| 亚洲一区二区三区自拍| 老汉av免费一区二区三区| 国产精品99久久久久久宅男| 99这里只有精品| 欧洲视频一区二区| 日韩欧美成人午夜| 国产精品久久国产精麻豆99网站| 亚洲欧美精品午睡沙发| 午夜激情久久久| 韩国精品在线观看| 91亚洲国产成人精品一区二区三| 欧美日韩在线播放一区| 久久综合狠狠综合久久激情| 亚洲欧美综合在线精品| 日韩主播视频在线| 粉嫩蜜臀av国产精品网站| 91免费看视频| 精品捆绑美女sm三区| 国产精品久久久久久久第一福利| 午夜激情久久久| 国产成人亚洲综合a∨猫咪| 欧美日韩久久一区二区| 久久亚洲综合色| 亚洲成人高清在线| 处破女av一区二区| 日韩视频中午一区| 亚洲精品videosex极品| 国产一区二区三区香蕉| 精品视频免费在线| 亚洲国产精品av| 蜜桃精品视频在线观看| 97久久精品人人做人人爽50路 | 欧美色精品在线视频| 久久九九99视频| 亚洲成人第一页| 91亚洲国产成人精品一区二三| 欧美哺乳videos| 丝袜美腿亚洲一区二区图片| 91亚洲午夜精品久久久久久| 久久理论电影网| 日本伊人色综合网| 91视频91自| 国产精品女主播av| 国产黑丝在线一区二区三区| 日韩欧美一级在线播放| 午夜久久久久久| 欧美午夜影院一区| 亚洲精品乱码久久久久| 成人免费看视频| 久久久不卡网国产精品二区| 蜜臀av亚洲一区中文字幕| 国产精品日韩精品欧美在线| 国产自产2019最新不卡| 日韩欧美国产一区二区三区 | 免费精品99久久国产综合精品| 91蝌蚪porny| 中文字幕在线观看不卡视频| 成人免费毛片高清视频| 久久丝袜美腿综合| 国产乱对白刺激视频不卡| 久久久91精品国产一区二区精品| 老汉av免费一区二区三区| 日韩午夜电影在线观看|