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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? structure.doc

?? JPEG source code converts the image into compressed format
?? DOC
?? 第 1 頁 / 共 4 頁
字號(hào):

In a successive-approximation AC refinement scan, the progressive Huffman
decoder has to be able to undo assignments of newly nonzero coefficients if it
suspends before the MCU is complete, since decoding requires distinguishing
previously-zero and previously-nonzero coefficients.  This is a bit tedious
but probably won't have much effect on performance.  Other variants of Huffman
decoding need not worry about this, since they will just store the same values
again if forced to repeat the MCU.

This approach would probably not work for an arithmetic codec, since its
modifiable state is quite large and couldn't be copied cheaply.  Instead it
would have to suspend and resume exactly at the point of the buffer end.

The JPEG marker reader is designed to cope with suspension at an arbitrary
point.  It does so by backing up to the start of the marker parameter segment,
so the data buffer must be big enough to hold the largest marker of interest.
Again, a couple KB should be adequate.  (A special "skip" convention is used
to bypass COM and APPn markers, so these can be larger than the buffer size
without causing problems; otherwise a 64K buffer would be needed in the worst
case.)

The JPEG marker writer currently does *not* cope with suspension.  I feel that
this is not necessary; it is much easier simply to require the application to
ensure there is enough buffer space before starting.  (An empty 2K buffer is
more than sufficient for the header markers; and ensuring there are a dozen or
two bytes available before calling jpeg_finish_compress() will suffice for the
trailer.)  This would not work for writing multi-scan JPEG files, but
we simply do not intend to support that capability with suspension.


*** Memory manager services ***

The JPEG library's memory manager controls allocation and deallocation of
memory, and it manages large "virtual" data arrays on machines where the
operating system does not provide virtual memory.  Note that the same
memory manager serves both compression and decompression operations.

In all cases, allocated objects are tied to a particular compression or
decompression master record, and they will be released when that master
record is destroyed.

The memory manager does not provide explicit deallocation of objects.
Instead, objects are created in "pools" of free storage, and a whole pool
can be freed at once.  This approach helps prevent storage-leak bugs, and
it speeds up operations whenever malloc/free are slow (as they often are).
The pools can be regarded as lifetime identifiers for objects.  Two
pools/lifetimes are defined:
  * JPOOL_PERMANENT	lasts until master record is destroyed
  * JPOOL_IMAGE		lasts until done with image (JPEG datastream)
Permanent lifetime is used for parameters and tables that should be carried
across from one datastream to another; this includes all application-visible
parameters.  Image lifetime is used for everything else.  (A third lifetime,
JPOOL_PASS = one processing pass, was originally planned.  However it was
dropped as not being worthwhile.  The actual usage patterns are such that the
peak memory usage would be about the same anyway; and having per-pass storage
substantially complicates the virtual memory allocation rules --- see below.)

The memory manager deals with three kinds of object:
1. "Small" objects.  Typically these require no more than 10K-20K total.
2. "Large" objects.  These may require tens to hundreds of K depending on
   image size.  Semantically they behave the same as small objects, but we
   distinguish them for two reasons:
     * On MS-DOS machines, large objects are referenced by FAR pointers,
       small objects by NEAR pointers.
     * Pool allocation heuristics may differ for large and small objects.
   Note that individual "large" objects cannot exceed the size allowed by
   type size_t, which may be 64K or less on some machines.
3. "Virtual" objects.  These are large 2-D arrays of JSAMPLEs or JBLOCKs
   (typically large enough for the entire image being processed).  The
   memory manager provides stripwise access to these arrays.  On machines
   without virtual memory, the rest of the array may be swapped out to a
   temporary file.

(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large
objects for the data proper and small objects for the row pointers.  For
convenience and speed, the memory manager provides single routines to create
these structures.  Similarly, virtual arrays include a small control block
and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.)

In the present implementation, virtual arrays are only permitted to have image
lifespan.  (Permanent lifespan would not be reasonable, and pass lifespan is
not very useful since a virtual array's raison d'etre is to store data for
multiple passes through the image.)  We also expect that only "small" objects
will be given permanent lifespan, though this restriction is not required by
the memory manager.

In a non-virtual-memory machine, some performance benefit can be gained by
making the in-memory buffers for virtual arrays be as large as possible.
(For small images, the buffers might fit entirely in memory, so blind
swapping would be very wasteful.)  The memory manager will adjust the height
of the buffers to fit within a prespecified maximum memory usage.  In order
to do this in a reasonably optimal fashion, the manager needs to allocate all
of the virtual arrays at once.  Therefore, there isn't a one-step allocation
routine for virtual arrays; instead, there is a "request" routine that simply
allocates the control block, and a "realize" routine (called just once) that
determines space allocation and creates all of the actual buffers.  The
realize routine must allow for space occupied by non-virtual large objects.
(We don't bother to factor in the space needed for small objects, on the
grounds that it isn't worth the trouble.)

To support all this, we establish the following protocol for doing business
with the memory manager:
  1. Modules must request virtual arrays (which may have only image lifespan)
     during the initial setup phase, i.e., in their jinit_xxx routines.
  2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
     allocated during initial setup.
  3. realize_virt_arrays will be called at the completion of initial setup.
     The above conventions ensure that sufficient information is available
     for it to choose a good size for virtual array buffers.
Small objects of any lifespan may be allocated at any time.  We expect that
the total space used for small objects will be small enough to be negligible
in the realize_virt_arrays computation.

In a virtual-memory machine, we simply pretend that the available space is
infinite, thus causing realize_virt_arrays to decide that it can allocate all
the virtual arrays as full-size in-memory buffers.  The overhead of the
virtual-array access protocol is very small when no swapping occurs.

A virtual array can be specified to be "pre-zeroed"; when this flag is set,
never-yet-written sections of the array are set to zero before being made
available to the caller.  If this flag is not set, never-written sections
of the array contain garbage.  (This feature exists primarily because the
equivalent logic would otherwise be needed in jdcoefct.c for progressive
JPEG mode; we may as well make it available for possible other uses.)

The first write pass on a virtual array is required to occur in top-to-bottom
order; read passes, as well as any write passes after the first one, may
access the array in any order.  This restriction exists partly to simplify
the virtual array control logic, and partly because some file systems may not
support seeking beyond the current end-of-file in a temporary file.  The main
implication of this restriction is that rearrangement of rows (such as
converting top-to-bottom data order to bottom-to-top) must be handled while
reading data out of the virtual array, not while putting it in.


*** Memory manager internal structure ***

To isolate system dependencies as much as possible, we have broken the
memory manager into two parts.  There is a reasonably system-independent
"front end" (jmemmgr.c) and a "back end" that contains only the code
likely to change across systems.  All of the memory management methods
outlined above are implemented by the front end.  The back end provides
the following routines for use by the front end (none of these routines
are known to the rest of the JPEG code):

jpeg_mem_init, jpeg_mem_term	system-dependent initialization/shutdown

jpeg_get_small, jpeg_free_small	interface to malloc and free library routines
				(or their equivalents)

jpeg_get_large, jpeg_free_large	interface to FAR malloc/free in MSDOS machines;
				else usually the same as
				jpeg_get_small/jpeg_free_small

jpeg_mem_available		estimate available memory

jpeg_open_backing_store		create a backing-store object

read_backing_store,		manipulate a backing-store object
write_backing_store,
close_backing_store

On some systems there will be more than one type of backing-store object
(specifically, in MS-DOS a backing store file might be an area of extended
memory as well as a disk file).  jpeg_open_backing_store is responsible for
choosing how to implement a given object.  The read/write/close routines
are method pointers in the structure that describes a given object; this
lets them be different for different object types.

It may be necessary to ensure that backing store objects are explicitly
released upon abnormal program termination.  For example, MS-DOS won't free
extended memory by itself.  To support this, we will expect the main program
or surrounding application to arrange to call self_destruct (typically via
jpeg_destroy) upon abnormal termination.  This may require a SIGINT signal
handler or equivalent.  We don't want to have the back end module install its
own signal handler, because that would pre-empt the surrounding application's
ability to control signal handling.

The IJG distribution includes several memory manager back end implementations.
Usually the same back end should be suitable for all applications on a given
system, but it is possible for an application to supply its own back end at
need.


*** Implications of DNL marker ***

Some JPEG files may use a DNL marker to postpone definition of the image
height (this would be useful for a fax-like scanner's output, for instance).
In these files the SOF marker claims the image height is 0, and you only
find out the true image height at the end of the first scan.

We could read these files as follows:
1. Upon seeing zero image height, replace it by 65535 (the maximum allowed).
2. When the DNL is found, update the image height in the global image
   descriptor.
This implies that control modules must avoid making copies of the image
height, and must re-test for termination after each MCU row.  This would
be easy enough to do.

In cases where image-size data structures are allocated, this approach will
result in very inefficient use of virtual memory or much-larger-than-necessary
temporary files.  This seems acceptable for something that probably won't be a
mainstream usage.  People might have to forgo use of memory-hogging options
(such as two-pass color quantization or noninterleaved JPEG files) if they
want efficient conversion of such files.  (One could improve efficiency by
demanding a user-supplied upper bound for the height, less than 65536; in most
cases it could be much less.)

The standard also permits the SOF marker to overestimate the image height,
with a DNL to give the true, smaller height at the end of the first scan.
This would solve the space problems if the overestimate wasn't too great.
However, it implies that you don't even know whether DNL will be used.

This leads to a couple of very serious objections:
1. Testing for a DNL marker must occur in the inner loop of the decompressor's
   Huffman decoder; this implies a speed penalty whether the feature is used
   or not.
2. There is no way to hide the last-minute change in image height from an
   application using the decoder.  Thus *every* application using the IJG
   library would suffer a complexity penalty whether it cared about DNL or
   not.
We currently do not support DNL because of these problems.

A different approach is to insist that DNL-using files be preprocessed by a
separate program that reads ahead to the DNL, then goes back and fixes the SOF
marker.  This is a much simpler solution and is probably far more efficient.
Even if one wants piped input, buffering the first scan of the JPEG file needs
a lot smaller temp file than is implied by the maximum-height method.  For
this approach we'd simply treat DNL as a no-op in the decompressor (at most,
check that it matches the SOF image height).

We will not worry about making the compressor capable of outputting DNL.
Something similar to the first scheme above could be applied if anyone ever
wants to make that work.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩亚洲国产综合| 欧美色窝79yyyycom| 国产精品久久久久影院亚瑟| 91视频一区二区三区| 天天色 色综合| 日韩欧美视频一区| 久久超级碰视频| 中文字幕一区二区在线播放| 欧美日韩一区二区电影| 国产剧情一区二区三区| 亚洲午夜一区二区| 精品av久久707| 欧美在线一二三四区| 国产一区二区三区国产| 一片黄亚洲嫩模| 久久精品综合网| 91精品国产综合久久精品图片| 国产露脸91国语对白| 亚洲福中文字幕伊人影院| 国产日韩欧美不卡在线| 666欧美在线视频| 国产原创一区二区| 亚洲一二三区不卡| 久久久精品免费网站| 欧美日韩国产首页在线观看| 成人免费av在线| 欧美亚日韩国产aⅴ精品中极品| 国产成人啪午夜精品网站男同| 亚洲成人一区二区| 欧美激情艳妇裸体舞| 欧美mv日韩mv| 欧美日韩国产中文| 一本色道亚洲精品aⅴ| 国产69精品一区二区亚洲孕妇| 午夜精品在线视频一区| 亚洲精品福利视频网站| 中文字幕亚洲区| 国产性天天综合网| 久久亚洲二区三区| 91精品国产综合久久久久久久久久 | 久久99国产精品久久99| 亚洲sss视频在线视频| 一区二区三区在线观看国产 | 久久久久久久久久美女| 91精品婷婷国产综合久久性色 | 欧美一区二区久久| 欧美色老头old∨ideo| 色天天综合色天天久久| av不卡免费在线观看| jizzjizzjizz欧美| 不卡视频一二三| 成人美女在线观看| 精品一区二区三区蜜桃| 亚洲va国产天堂va久久en| 亚洲一区二区三区四区不卡| 亚洲伊人色欲综合网| 亚洲综合免费观看高清完整版| 亚洲精品视频在线看| 亚洲精品久久久蜜桃| 国产精品传媒视频| 一区二区三区成人| 亚洲国产成人91porn| 丝袜美腿亚洲综合| 久久99国产精品免费网站| 国内一区二区视频| 另类小说色综合网站| 久久精品久久综合| 亚洲6080在线| 亚洲久本草在线中文字幕| 亚洲一二三四区| 天堂av在线一区| 激情五月播播久久久精品| 精品三级在线看| 欧美日韩国产免费| 日韩视频国产视频| 欧美一区二区三区免费大片| 日韩午夜中文字幕| 久久久一区二区三区捆绑**| 日本一二三四高清不卡| 亚洲乱码一区二区三区在线观看| 亚洲免费在线电影| 日韩高清一区在线| 国产呦萝稀缺另类资源| 成人av免费在线观看| 在线观看精品一区| 日韩一级在线观看| 日本一区二区视频在线观看| 亚洲日本一区二区三区| 亚洲大片精品永久免费| 毛片一区二区三区| 不卡的av中国片| 555夜色666亚洲国产免| 久久午夜羞羞影院免费观看| 日韩一区在线播放| 捆绑紧缚一区二区三区视频| 国产精品一卡二卡| 欧美图区在线视频| 久久久久久电影| 亚洲一区免费在线观看| 国产一区二区免费视频| 色综合色综合色综合| 精品久久久久久无| 一区二区三区中文在线观看| 久久99国产精品久久99| 91国产成人在线| 久久久久久久久岛国免费| 一区二区激情小说| 国产黄色91视频| 56国语精品自产拍在线观看| 1区2区3区精品视频| 奇米影视一区二区三区小说| av电影天堂一区二区在线观看| 欧美一区二区黄| 亚洲美女精品一区| 日韩 欧美一区二区三区| 国产福利91精品一区二区三区| 91麻豆精东视频| 国产亚洲欧洲一区高清在线观看| 亚洲地区一二三色| 91在线观看下载| 国产亚洲综合在线| 日本sm残虐另类| 欧美日韩免费高清一区色橹橹 | 久草热8精品视频在线观看| 日本韩国精品在线| 中文无字幕一区二区三区| 人人精品人人爱| 亚洲一区二区精品久久av| 成人高清在线视频| 久久精品一二三| 国模冰冰炮一区二区| 91麻豆精品国产| 亚洲综合在线第一页| 国产aⅴ综合色| 日韩视频一区二区三区 | heyzo一本久久综合| 久久久亚洲欧洲日产国码αv| 日韩经典中文字幕一区| 欧美视频自拍偷拍| 一区二区三区成人| 91一区在线观看| 亚洲人成网站色在线观看 | 色综合久久88色综合天天| 国产精品欧美极品| 精品一区二区三区的国产在线播放| 在线视频欧美精品| 国产精品久久久久一区二区三区共| 国产一区二区伦理| 久久噜噜亚洲综合| 国产精品综合网| 久久久久97国产精华液好用吗| 国产一区二区按摩在线观看| 久久亚洲欧美国产精品乐播| 精品一区二区三区免费视频| 欧美mv日韩mv国产| 国产伦精品一区二区三区免费迷| 欧美mv日韩mv国产网站app| 精品一区二区三区免费毛片爱| 在线播放国产精品二区一二区四区| 亚洲男人天堂av网| 欧美三级中文字幕| 日本不卡一区二区三区高清视频| 欧美卡1卡2卡| 麻豆成人在线观看| 久久九九国产精品| 99视频精品全部免费在线| 亚洲欧美日韩一区二区三区在线观看| 99久久精品国产一区| 一区二区三区国产精品| 91精品欧美一区二区三区综合在| 国产精品一级片在线观看| 亚洲永久免费av| 精品国一区二区三区| av电影天堂一区二区在线观看| 丝袜美腿亚洲综合| 国产精品伦一区| 欧美一区二区在线看| 成人精品在线视频观看| 三级一区在线视频先锋| 国产三级欧美三级日产三级99| 91激情五月电影| 国产麻豆精品一区二区| 亚洲一区二区三区中文字幕 | 欧美一区午夜精品| 91亚洲国产成人精品一区二三| 日本强好片久久久久久aaa| 国产精品二三区| 欧美va亚洲va香蕉在线| 亚洲区小说区图片区qvod| 91精品国产91久久综合桃花| 91欧美激情一区二区三区成人| 狠狠色丁香久久婷婷综| 一区二区在线免费观看| 国产农村妇女毛片精品久久麻豆| 欧美精品视频www在线观看| caoporn国产一区二区| 九色|91porny| 日本免费新一区视频| 一二三区精品福利视频| 国产精品成人一区二区三区夜夜夜|