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

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

?? jcmarker.pas

?? DELPHI版的JPEG文件解碼源程序
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
    if (cinfo^.progressive_mode) then
    begin
      { Progressive mode: only DC or only AC tables are used in one scan;
        furthermore, Huffman coding of DC refinement uses no table at all.
        We emit 0 for unused field(s); this is recommended by the P&M text
        but does not seem to be specified in the standard. }

      if (cinfo^.Ss = 0) then
      begin
	ta := 0;                { DC scan }
	if (cinfo^.Ah <> 0) and not cinfo^.arith_code then
	  td := 0;              { no DC table either }
      end
      else
      begin
	td := 0;			{ AC scan }
      end;
    end;
    emit_byte(cinfo, (td shl 4) + ta);
  end;

  emit_byte(cinfo, cinfo^.Ss);
  emit_byte(cinfo, cinfo^.Se);
  emit_byte(cinfo, (cinfo^.Ah shl 4) + cinfo^.Al);
end;


{LOCAL}
procedure emit_jfif_app0 (cinfo : j_compress_ptr);
{ Emit a JFIF-compliant APP0 marker }
{
 Length of APP0 block	(2 bytes)
 Block ID			(4 bytes - ASCII "JFIF")
 Zero byte			(1 byte to terminate the ID string)
 Version Major, Minor   (2 bytes - major first)
 Units			(1 byte - $00 = none, $01 = inch, $02 = cm)
 Xdpu			(2 bytes - dots per unit horizontal)
 Ydpu			(2 bytes - dots per unit vertical)
 Thumbnail X size		(1 byte)
 Thumbnail Y size		(1 byte)
}
begin
  emit_marker(cinfo, M_APP0);

  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); { length }

  emit_byte(cinfo, $4A);	{ Identifier: ASCII "JFIF" }
  emit_byte(cinfo, $46);
  emit_byte(cinfo, $49);
  emit_byte(cinfo, $46);
  emit_byte(cinfo, 0);
  emit_byte(cinfo, cinfo^.JFIF_major_version); { Version fields }
  emit_byte(cinfo, cinfo^.JFIF_minor_version);
  emit_byte(cinfo, cinfo^.density_unit); { Pixel size information }
  emit_2bytes(cinfo, int(cinfo^.X_density));
  emit_2bytes(cinfo, int(cinfo^.Y_density));
  emit_byte(cinfo, 0);		{ No thumbnail image }
  emit_byte(cinfo, 0);
end;


{LOCAL}
procedure emit_adobe_app14 (cinfo : j_compress_ptr);
{ Emit an Adobe APP14 marker }
{
  Length of APP14 block	(2 bytes)
  Block ID			(5 bytes - ASCII "Adobe")
  Version Number		(2 bytes - currently 100)
  Flags0			(2 bytes - currently 0)
  Flags1			(2 bytes - currently 0)
  Color transform		(1 byte)

  Although Adobe TN 5116 mentions Version = 101, all the Adobe files
  now in circulation seem to use Version = 100, so that's what we write.

  We write the color transform byte as 1 if the JPEG color space is
  YCbCr, 2 if it's YCCK, 0 otherwise.  Adobe's definition has to do with
  whether the encoder performed a transformation, which is pretty useless.
}
begin
  emit_marker(cinfo, M_APP14);

  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); { length }

  emit_byte(cinfo, $41);	{ Identifier: ASCII "Adobe" }
  emit_byte(cinfo, $64);
  emit_byte(cinfo, $6F);
  emit_byte(cinfo, $62);
  emit_byte(cinfo, $65);
  emit_2bytes(cinfo, 100);	{ Version }
  emit_2bytes(cinfo, 0);	{ Flags0 }
  emit_2bytes(cinfo, 0);	{ Flags1 }
  case (cinfo^.jpeg_color_space) of
  JCS_YCbCr:
    emit_byte(cinfo, 1);	{ Color transform = 1 }
  JCS_YCCK:
    emit_byte(cinfo, 2);	{ Color transform = 2 }
  else
    emit_byte(cinfo, 0);	{ Color transform = 0 }
  end;
end;


{ These routines allow writing an arbitrary marker with parameters.
  The only intended use is to emit COM or APPn markers after calling
  write_file_header and before calling write_frame_header.
  Other uses are not guaranteed to produce desirable results.
  Counting the parameter bytes properly is the caller's responsibility. }

{METHODDEF}
procedure write_marker_header (cinfo : j_compress_ptr;
                               marker : int;
                               datalen : uint); far;
{ Emit an arbitrary marker header }
begin
  if (datalen > uint(65533)) then  { safety check }
    ERREXIT(j_common_ptr(cinfo), JERR_BAD_LENGTH);

  emit_marker(cinfo, JPEG_MARKER(marker));

  emit_2bytes(cinfo, int(datalen + 2));	{ total length }
end;

{METHODDEF}
procedure write_marker_byte (cinfo : j_compress_ptr; val : int); far;
{ Emit one byte of marker parameters following write_marker_header }
begin
  emit_byte(cinfo, val);
end;

{ Write datastream header.
  This consists of an SOI and optional APPn markers.
  We recommend use of the JFIF marker, but not the Adobe marker,
  when using YCbCr or grayscale data.  The JFIF marker should NOT
  be used for any other JPEG colorspace.  The Adobe marker is helpful
  to distinguish RGB, CMYK, and YCCK colorspaces.
  Note that an application can write additional header markers after
  jpeg_start_compress returns. }


{METHODDEF}
procedure write_file_header (cinfo : j_compress_ptr); far;
var
  marker : my_marker_ptr;
begin
  marker := my_marker_ptr(cinfo^.marker);

  emit_marker(cinfo, M_SOI);	 { first the SOI }

  { SOI is defined to reset restart interval to 0 }
  marker^.last_restart_interval := 0;

  if (cinfo^.write_JFIF_header)	then { next an optional JFIF APP0 }
    emit_jfif_app0(cinfo);
  if (cinfo^.write_Adobe_marker) then { next an optional Adobe APP14 }
    emit_adobe_app14(cinfo);
end;


{ Write frame header.
  This consists of DQT and SOFn markers.
  Note that we do not emit the SOF until we have emitted the DQT(s).
  This avoids compatibility problems with incorrect implementations that
  try to error-check the quant table numbers as soon as they see the SOF. }


{METHODDEF}
procedure write_frame_header (cinfo : j_compress_ptr); far;
var
  ci, prec : int;
  is_baseline : boolean;
  compptr : jpeg_component_info_ptr;
begin
  { Emit DQT for each quantization table.
    Note that emit_dqt() suppresses any duplicate tables. }

  prec := 0;
  compptr := jpeg_component_info_ptr(cinfo^.comp_info);
  for ci := 0 to Pred(cinfo^.num_components) do
  begin
    prec := prec + emit_dqt(cinfo, compptr^.quant_tbl_no);
    Inc(compptr);
  end;
  { now prec is nonzero iff there are any 16-bit quant tables. }

  { Check for a non-baseline specification.
    Note we assume that Huffman table numbers won't be changed later. }

  if (cinfo^.arith_code) or (cinfo^.progressive_mode)
   or (cinfo^.data_precision <> 8) then
  begin
    is_baseline := FALSE;
  end
  else
  begin
    is_baseline := TRUE;
    compptr := jpeg_component_info_ptr(cinfo^.comp_info);
    for ci := 0 to Pred(cinfo^.num_components) do
    begin
      if (compptr^.dc_tbl_no > 1) or (compptr^.ac_tbl_no > 1) then
	is_baseline := FALSE;
      Inc(compptr);
    end;
    if (prec <> 0) and (is_baseline) then
    begin
      is_baseline := FALSE;
      { If it's baseline except for quantizer size, warn the user }
      {$IFDEF DEBUG}
      TRACEMS(j_common_ptr(cinfo), 0, JTRC_16BIT_TABLES);
      {$ENDIF}
    end;
  end;

  { Emit the proper SOF marker }
  if (cinfo^.arith_code) then
  begin
    emit_sof(cinfo, M_SOF9);	{ SOF code for arithmetic coding }
  end
  else
  begin
    if (cinfo^.progressive_mode) then
      emit_sof(cinfo, M_SOF2)	{ SOF code for progressive Huffman }
    else if (is_baseline) then
      emit_sof(cinfo, M_SOF0)	{ SOF code for baseline implementation }
    else
      emit_sof(cinfo, M_SOF1);	{ SOF code for non-baseline Huffman file }
  end;
end;


{ Write scan header.
  This consists of DHT or DAC markers, optional DRI, and SOS.
  Compressed data will be written following the SOS. }

{METHODDEF}
procedure write_scan_header (cinfo : j_compress_ptr); far;
var
  marker : my_marker_ptr;
  i : int;
  compptr : jpeg_component_info_ptr;
begin
  marker := my_marker_ptr(cinfo^.marker);
  if (cinfo^.arith_code) then
  begin
    { Emit arith conditioning info.  We may have some duplication
      if the file has multiple scans, but it's so small it's hardly
      worth worrying about. }
    emit_dac(cinfo);
  end
  else
  begin
    { Emit Huffman tables.
      Note that emit_dht() suppresses any duplicate tables. }
    for i := 0 to Pred(cinfo^.comps_in_scan) do
    begin
      compptr := cinfo^.cur_comp_info[i];
      if (cinfo^.progressive_mode) then
      begin
	{ Progressive mode: only DC or only AC tables are used in one scan }
	if (cinfo^.Ss = 0) then
        begin
	  if (cinfo^.Ah = 0) then  { DC needs no table for refinement scan }
	    emit_dht(cinfo, compptr^.dc_tbl_no, FALSE);
	end
        else
        begin
	  emit_dht(cinfo, compptr^.ac_tbl_no, TRUE);
	end;
      end
      else
      begin
	{ Sequential mode: need both DC and AC tables }
	emit_dht(cinfo, compptr^.dc_tbl_no, FALSE);
	emit_dht(cinfo, compptr^.ac_tbl_no, TRUE);
      end;
    end;
  end;

  { Emit DRI if required --- note that DRI value could change for each scan.
    We avoid wasting space with unnecessary DRIs, however. }

  if (cinfo^.restart_interval <> marker^.last_restart_interval) then
  begin
    emit_dri(cinfo);
    marker^.last_restart_interval := cinfo^.restart_interval;
  end;

  emit_sos(cinfo);
end;



{ Write datastream trailer. }


{METHODDEF}
procedure write_file_trailer (cinfo : j_compress_ptr); far;
begin
  emit_marker(cinfo, M_EOI);
end;


{ Write an abbreviated table-specification datastream.
  This consists of SOI, DQT and DHT tables, and EOI.
  Any table that is defined and not marked sent_table = TRUE will be
  emitted.  Note that all tables will be marked sent_table = TRUE at exit. }


{METHODDEF}
procedure write_tables_only (cinfo : j_compress_ptr); far;
var
  i : int;
begin
  emit_marker(cinfo, M_SOI);

  for i := 0 to Pred(NUM_QUANT_TBLS) do
  begin
    if (cinfo^.quant_tbl_ptrs[i] <> NIL) then
      emit_dqt(cinfo, i);  { dummy := ... }
  end;

  if (not cinfo^.arith_code) then
  begin
    for i := 0 to Pred(NUM_HUFF_TBLS) do
    begin
      if (cinfo^.dc_huff_tbl_ptrs[i] <> NIL) then
	emit_dht(cinfo, i, FALSE);
      if (cinfo^.ac_huff_tbl_ptrs[i] <> NIL) then
	emit_dht(cinfo, i, TRUE);
    end;
  end;

  emit_marker(cinfo, M_EOI);
end;


{ Initialize the marker writer module. }

{GLOBAL}
procedure jinit_marker_writer (cinfo : j_compress_ptr);
var
  marker : my_marker_ptr;
begin
  { Create the subobject }
  marker := my_marker_ptr(
    cinfo^.mem^.alloc_small (j_common_ptr(cinfo), JPOOL_IMAGE,
				SIZEOF(my_marker_writer)) );
  cinfo^.marker := jpeg_marker_writer_ptr(marker);
  { Initialize method pointers }
  marker^.pub.write_file_header := write_file_header;
  marker^.pub.write_frame_header := write_frame_header;
  marker^.pub.write_scan_header := write_scan_header;
  marker^.pub.write_file_trailer := write_file_trailer;
  marker^.pub.write_tables_only := write_tables_only;
  marker^.pub.write_marker_header := write_marker_header;
  marker^.pub.write_marker_byte := write_marker_byte;
  { Initialize private state }
  marker^.last_restart_interval := 0;
end;


end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久蜜臀粉嫩| 日韩在线一区二区三区| 国产91在线|亚洲| 中文字幕精品—区二区四季| k8久久久一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 欧美综合天天夜夜久久| 午夜伊人狠狠久久| 日韩欧美国产综合| 成人激情动漫在线观看| 一区二区三区在线观看国产 | 国产.精品.日韩.另类.中文.在线.播放| 精品国产不卡一区二区三区| 国产成人欧美日韩在线电影| 综合电影一区二区三区| 欧美久久久久久蜜桃| 国产真实乱对白精彩久久| 自拍av一区二区三区| 555夜色666亚洲国产免| 懂色av中文字幕一区二区三区 | 日韩 欧美一区二区三区| 2023国产精品自拍| av在线一区二区三区| 日韩专区在线视频| 国产欧美精品一区二区三区四区| 色妹子一区二区| 精品一区二区三区免费视频| 亚洲天堂成人在线观看| 欧美sm美女调教| 色婷婷av久久久久久久| 精品一区二区久久| 一区二区三区欧美视频| 久久―日本道色综合久久| 91黄色免费版| 国产二区国产一区在线观看| 亚洲1区2区3区4区| 国产精品美女久久久久久久| 91精品欧美一区二区三区综合在| 9i在线看片成人免费| 蜜桃久久av一区| 一区二区三区视频在线看| 久久精品在线免费观看| 91超碰这里只有精品国产| 成人av在线播放网址| 久久精品久久99精品久久| 一区二区三区在线观看欧美| 国产欧美精品一区二区色综合 | 国产精品456| 免费看日韩精品| 亚洲国产精品麻豆| 亚洲视频资源在线| 国产欧美日本一区视频| 欧美电影免费观看高清完整版 | 不卡一区二区三区四区| 九九精品一区二区| 视频一区免费在线观看| 亚洲日本va在线观看| 国产欧美综合在线观看第十页| 日韩视频在线一区二区| 欧美精品久久天天躁| 欧美色图在线观看| 在线观看网站黄不卡| 一本色道久久综合精品竹菊| 粉嫩在线一区二区三区视频| 国产在线麻豆精品观看| 久久成人免费网| 久久国产夜色精品鲁鲁99| 美美哒免费高清在线观看视频一区二区| 一区二区在线观看免费| 亚洲欧洲日韩女同| 成人欧美一区二区三区1314| 一色屋精品亚洲香蕉网站| 国产欧美日韩综合| 国产欧美日韩不卡| 国产精品美女久久福利网站| 国产精品女上位| 国产精品久久久久久久久果冻传媒 | 成人手机在线视频| 丁香婷婷综合激情五月色| 国产精品一区免费视频| 丁香天五香天堂综合| 不卡区在线中文字幕| 99国内精品久久| 91久久精品一区二区| 欧美色区777第一页| 欧美日韩高清一区二区| 欧美一级高清片| 久久久影院官网| 国产精品欧美精品| 国产精品久久久久久久久免费丝袜| 久久久www免费人成精品| 欧美精品丝袜中出| 欧美va天堂va视频va在线| 中文字幕在线不卡视频| 亚洲va欧美va人人爽午夜| 亚洲欧美日韩中文播放| 国产精品二三区| 一区二区在线观看免费 | 久久亚洲一级片| 国产视频一区二区在线观看| 中文字幕不卡一区| 一区二区在线观看视频| 日本vs亚洲vs韩国一区三区二区| 久久99精品久久久久久国产越南 | 国产精品18久久久久久久久久久久| 国产高清在线精品| 色爱区综合激月婷婷| 亚洲人精品一区| 日韩高清不卡一区二区三区| 亚洲高清久久久| 日韩精品久久理论片| 狠狠色狠狠色综合| eeuss鲁片一区二区三区在线看| 在线观看亚洲专区| 欧美精品一区二区三区很污很色的| 久久一区二区三区四区| 亚洲激情自拍视频| 狠狠色综合日日| 欧美亚洲一区二区在线观看| 久久一区二区视频| 亚洲激情欧美激情| 国产一区二区不卡| 欧美日韩一区二区三区四区五区| 久久尤物电影视频在线观看| 亚洲一区二区av在线| 国产精品一品视频| 欧美日韩美女一区二区| 欧美高清在线一区| 蜜臀av一区二区在线观看 | 国产成人免费视频网站高清观看视频| 色先锋aa成人| 久久久精品国产99久久精品芒果| 亚洲成人先锋电影| 99久久99久久精品免费看蜜桃| 欧美xingq一区二区| 亚洲风情在线资源站| 不卡电影一区二区三区| 精品欧美乱码久久久久久1区2区| 一区二区三区高清在线| 成人久久18免费网站麻豆| 欧美tickling网站挠脚心| 午夜一区二区三区视频| 91在线观看免费视频| 亚洲国产成人午夜在线一区| 精一区二区三区| 日韩一区二区不卡| 亚洲二区视频在线| 91最新地址在线播放| 久久久久久久电影| 国产一区 二区 三区一级| 欧美一级黄色录像| 亚洲成人黄色影院| 欧美在线三级电影| 亚洲精品高清视频在线观看| 99久久精品国产导航| 日本一区二区三区免费乱视频| 黄页视频在线91| 欧美岛国在线观看| 麻豆精品国产传媒mv男同| 在线电影欧美成精品| 亚洲高清在线视频| 欧美午夜寂寞影院| 亚洲一区二区美女| 欧美日韩1区2区| 亚洲电影欧美电影有声小说| 在线看国产一区二区| 国产成人av在线影院| 久久久国产精华| 懂色一区二区三区免费观看| 欧美国产欧美亚州国产日韩mv天天看完整 | 激情综合网最新| 欧美成人福利视频| 国产一区二区三区四区五区入口| 精品久久久久久亚洲综合网| 激情成人综合网| 国产三区在线成人av| 成人午夜激情视频| 亚洲视频一二区| 欧洲一区在线观看| 午夜精品一区在线观看| 日韩一区二区不卡| 国产成人精品综合在线观看 | 日韩欧美中文字幕精品| 蜜桃一区二区三区在线观看| 精品国产成人系列| 成人午夜看片网址| 亚洲主播在线观看| 91精品国产一区二区三区香蕉| 精品一区二区三区的国产在线播放| 精品久久久久久久久久久久久久久久久| 国产精品99久久久| 亚洲天堂精品在线观看| 欧美日韩黄色影视| 狠狠色狠狠色综合| 亚洲精品高清在线| 日韩一区二区免费视频| 国产成都精品91一区二区三| 亚洲免费成人av| 日韩免费视频线观看| av亚洲精华国产精华|