cl-jpeg-cvs
Threads by month
- ----- 2026 -----
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 8 discussions
Update of /project/cl-jpeg/cvsroot/cljl
In directory cl-net:/tmp/cvs-serv2323
Modified Files:
cl-jpeg.asd
Log Message:
1.026: version should be a string, not a float.
--- /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2011/03/14 22:49:00 1.4
+++ /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2011/04/22 22:51:17 1.5
@@ -2,7 +2,7 @@
(asdf:defsystem :cl-jpeg
:name "cl-jpeg"
- :version 1.025
+ :version "1.026"
:licence "BSD"
:components ((:file "jpeg")))
1
0
Update of /project/cl-jpeg/cvsroot/cljl
In directory cl-net:/tmp/cvs-serv19139
Modified Files:
cl-jpeg.asd jpeg.lisp
Log Message:
put reader conditionals in minus macro instead of at call site and make abcl use - instead of fixnum'ized -
--- /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2011/03/14 21:44:58 1.3
+++ /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2011/03/14 22:49:00 1.4
@@ -2,7 +2,7 @@
(asdf:defsystem :cl-jpeg
:name "cl-jpeg"
- :version 1.024
+ :version 1.025
:licence "BSD"
:components ((:file "jpeg")))
--- /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2011/03/14 21:44:58 1.5
+++ /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2011/03/14 22:49:00 1.6
@@ -1,6 +1,6 @@
;; -*- Mode: LISP; Package: (JPEG :use (common-lisp)) -*-
;;; Generic Common Lisp JPEG encoder/decoder implementation
-;;; $Id: jpeg.lisp,v 1.5 2011/03/14 21:44:58 charmon Exp $
+;;; $Id: jpeg.lisp,v 1.6 2011/03/14 22:49:00 charmon Exp $
;;; Version 1.023, May 2008
;;; Written by Eugene Zaikonnikov [viking(a)funcall.org]
;;; Copyright [c] 1999, Eugene Zaikonnikov <viking(a)funcall.org>
@@ -85,6 +85,9 @@
`(the fixnum (+ (the fixnum ,a) (the fixnum ,b))))
(defmacro minus (a b)
+ #+(or clisp abcl)
+ `(- ,a ,b)
+ #-(or clisp abcl)
`(the fixnum (- (the fixnum ,a) (the fixnum ,b))))
(defmacro mul (a b)
@@ -268,7 +271,7 @@
(loop for row across *q-luminance* do
(loop for q-coef fixnum across row
maximize (round (random 128) q-coef))))
- (#+clisp - #-clisp minus (get-internal-run-time) time1))
+ (minus (get-internal-run-time) time1))
(let ((time1 (get-internal-run-time)))
(loop for i fixnum from 1 to 3000 do
(loop for q-row across *q-luminance* do
@@ -292,7 +295,7 @@
2)))
(t
(round val qc))))))
- (#+clisp - #-clisp minus (get-internal-run-time) time1))))
+ (minus (get-internal-run-time) time1))))
(format t "Done.~%")
(finish-output)
)
1
0
Update of /project/cl-jpeg/cvsroot/cljl
In directory cl-net:/tmp/cvs-serv30853
Modified Files:
cl-jpeg.asd jpeg.lisp
Log Message:
rename constants as +foo+ instead of *foo* (or foo).
--- /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2008/05/10 05:53:19 1.2
+++ /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2011/03/14 21:44:58 1.3
@@ -2,7 +2,7 @@
(asdf:defsystem :cl-jpeg
:name "cl-jpeg"
- :version 1.023
+ :version 1.024
:licence "BSD"
:components ((:file "jpeg")))
--- /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2008/12/03 04:30:38 1.4
+++ /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2011/03/14 21:44:58 1.5
@@ -1,6 +1,6 @@
;; -*- Mode: LISP; Package: (JPEG :use (common-lisp)) -*-
;;; Generic Common Lisp JPEG encoder/decoder implementation
-;;; $Id: jpeg.lisp,v 1.4 2008/12/03 04:30:38 charmon Exp $
+;;; $Id: jpeg.lisp,v 1.5 2011/03/14 21:44:58 charmon Exp $
;;; Version 1.023, May 2008
;;; Written by Eugene Zaikonnikov [viking(a)funcall.org]
;;; Copyright [c] 1999, Eugene Zaikonnikov <viking(a)funcall.org>
@@ -106,25 +106,25 @@
(eval-when (:compile-toplevel :load-toplevel)
;;; Source huffman tables for the encoder
-(define-constant *luminance-dc-bits*
+(define-constant +luminance-dc-bits+
#(#x00 #x01 #x05 #x01 #x01 #x01 #x01 #x01
#x01 #x00 #x00 #x00 #x00 #x00 #x00 #x00))
-(define-constant *luminance-dc-values*
+(define-constant +luminance-dc-values+
#(#x00 #x01 #x02 #x03 #x04 #x05 #x06 #x07 #x08 #x09 #x0a #x0b))
-(define-constant *chrominance-dc-bits*
+(define-constant +chrominance-dc-bits+
#(#x00 #x03 #x01 #x01 #x01 #x01 #x01 #x01
#x01 #x01 #x01 #x00 #x00 #x00 #x00 #x00))
-(define-constant *chrominance-dc-values*
+(define-constant +chrominance-dc-values+
#(#x00 #x01 #x02 #x03 #x04 #x05 #x06 #x07 #x08 #x09 #x0a #x0b))
-(define-constant *luminance-ac-bits*
+(define-constant +luminance-ac-bits+
#(#x00 #x02 #x01 #x03 #x03 #x02 #x04 #x03
#x05 #x05 #x04 #x04 #x00 #x00 #x01 #x7d))
-(define-constant *luminance-ac-values*
+(define-constant +luminance-ac-values+
#(#x01 #x02 #x03 #x00 #x04 #x11 #x05 #x12
#x21 #x31 #x41 #x06 #x13 #x51 #x61 #x07
#x22 #x71 #x14 #x32 #x81 #x91 #xa1 #x08
@@ -147,11 +147,11 @@
#xf1 #xf2 #xf3 #xf4 #xf5 #xf6 #xf7 #xf8
#xf9 #xfa))
-(define-constant *chrominance-ac-bits*
+(define-constant +chrominance-ac-bits+
#(#x00 #x02 #x01 #x02 #x04 #x04 #x03 #x04
#x07 #x05 #x04 #x04 #x00 #x01 #x02 #x77))
-(define-constant *chrominance-ac-values*
+(define-constant +chrominance-ac-values+
#(#x00 #x01 #x02 #x03 #x11 #x04 #x05 #x21
#x31 #x06 #x12 #x41 #x51 #x07 #x61 #x71
#x13 #x22 #x32 #x81 #x08 #x14 #x42 #x91
@@ -175,7 +175,7 @@
#xf9 #xfa))
;;;Zigzag encoding matrix
-(define-constant *zigzag-index*
+(define-constant +zigzag-index+
#(#(0 1 5 6 14 15 27 28)
#(2 4 7 13 16 26 29 42)
#(3 8 12 17 25 30 41 43)
@@ -188,7 +188,7 @@
;;; Temporary buffer for zigzag encoding and decoding
(defvar *zz-result* (make-array 64 :element-type 'unsigned-byte))
-(define-constant *zzbuf*
+(define-constant +zzbuf+
#(#(0 0 0 0 0 0 0 0)
#(0 0 0 0 0 0 0 0)
#(0 0 0 0 0 0 0 0)
@@ -199,19 +199,19 @@
#(0 0 0 0 0 0 0 0)))
;;;JPEG file markers
-(defconstant *M_COM* #xfe)
-(defconstant *M_SOF0* #xc0)
-(defconstant *M_DHT* #xc4)
-(defconstant *M_RST0* #xd0)
-(defconstant *M_RST7* #xd7)
-(defconstant *M_SOI* #xd8)
-(defconstant *M_EOI* #xd9)
-(defconstant *M_SOS* #xda)
-(defconstant *M_DQT* #xdb)
-(defconstant *M_DNL* #xdc)
-(defconstant *M_DRI* #xdd)
-(defconstant *M_DAC* #xcc)
-(defconstant *M_APP0* #xe0)
+(defconstant +M_COM+ #xfe)
+(defconstant +M_SOF0+ #xc0)
+(defconstant +M_DHT+ #xc4)
+(defconstant +M_RST0+ #xd0)
+(defconstant +M_RST7+ #xd7)
+(defconstant +M_SOI+ #xd8)
+(defconstant +M_EOI+ #xd9)
+(defconstant +M_SOS+ #xda)
+(defconstant +M_DQT+ #xdb)
+(defconstant +M_DNL+ #xdc)
+(defconstant +M_DRI+ #xdd)
+(defconstant +M_DAC+ #xcc)
+(defconstant +M_APP0+ #xe0)
;;; Default quantization tables
(defvar *q-luminance*
@@ -297,65 +297,65 @@
(finish-output)
)
-(define-constant *q-tables* (vector *q-luminance* *q-chrominance*))
+(define-constant +q-tables+ (vector *q-luminance* *q-chrominance*))
;;; This table is used to map coefficients into SSSS value
-(define-constant *csize* (make-array 2047
+(define-constant +csize+ (make-array 2047
:initial-contents
(loop for i fixnum from 0 to 2046
collecting (integer-length (abs (minus i 1023))))))
;;; Some constants for colorspace mapper
(defconstant shift (1- (integer-length (ash most-positive-fixnum -7))))
-(defconstant *.299* (round (+ (* 0.299 (ash 1 shift)) 0.5)))
-(defconstant *.587* (round (+ (* 0.587 (ash 1 shift)) 0.5)))
-(defconstant *.114* (round (+ (* 0.114 (ash 1 shift)) 0.5)))
-(defconstant *-.1687* (round (+ (* -0.1687 (ash 1 shift)) 0.5)))
-(defconstant *-.3313* (round (+ (* -0.3313 (ash 1 shift)) 0.5)))
-(defconstant *-.4187* (round (+ (* -0.4187 (ash 1 shift)) 0.5)))
-(defconstant *-.0813* (round (+ (* -0.0813 (ash 1 shift)) 0.5)))
-(defconstant *.5* (round (+ (* 0.5 (ash 1 shift)) 0.5)))
-(defconstant uvoffset (ash 128 shift))
-(defconstant onehalf (1- (ash 1 (1- shift))))
-(defconstant r-y-off 0)
-(defconstant g-y-off 256)
-(defconstant b-y-off (* 2 256))
-(defconstant r-u-off (* 3 256))
-(defconstant g-u-off (* 4 256))
-(defconstant b-u-off (* 5 256))
-(defconstant r-v-off b-u-off)
-(defconstant g-v-off (* 6 256))
-(defconstant b-v-off (* 7 256))
+(defconstant +.299+ (round (+ (* 0.299 (ash 1 shift)) 0.5)))
+(defconstant +.587+ (round (+ (* 0.587 (ash 1 shift)) 0.5)))
+(defconstant +.114+ (round (+ (* 0.114 (ash 1 shift)) 0.5)))
+(defconstant +-.1687+ (round (+ (* -0.1687 (ash 1 shift)) 0.5)))
+(defconstant +-.3313+ (round (+ (* -0.3313 (ash 1 shift)) 0.5)))
+(defconstant +-.4187+ (round (+ (* -0.4187 (ash 1 shift)) 0.5)))
+(defconstant +-.0813+ (round (+ (* -0.0813 (ash 1 shift)) 0.5)))
+(defconstant +.5+ (round (+ (* 0.5 (ash 1 shift)) 0.5)))
+(defconstant +uvoffset+ (ash 128 shift))
+(defconstant +one-half+ (1- (ash 1 (1- shift))))
+(defconstant +r-y-off+ 0)
+(defconstant +g-y-off+ 256)
+(defconstant +b-y-off+ (* 2 256))
+(defconstant +r-u-off+ (* 3 256))
+(defconstant +g-u-off+ (* 4 256))
+(defconstant +b-u-off+ (* 5 256))
+(defconstant +r-v-off+ +b-u-off+)
+(defconstant +g-v-off+ (* 6 256))
+(defconstant +b-v-off+ (* 7 256))
;;;Direct color conversion table
(defvar *ctab* (make-array 2048 :initial-element 0))
;;; Filling in the table
(loop for i fixnum from 0 to 255 do
- (setf (svref *ctab* (plus i r-y-off))
- (mul *.299* i))
- (setf (svref *ctab* (plus i g-y-off))
- (mul *.587* i))
- (setf (svref *ctab* (plus i b-y-off))
- (mul *.114* i))
- (setf (svref *ctab* (plus i r-u-off))
- (mul *-.1687* i))
- (setf (svref *ctab* (plus i g-u-off))
- (mul *-.3313* i))
- (setf (svref *ctab* (plus i b-u-off))
- (+ (mul *.5* i) uvoffset onehalf))
- (setf (svref *ctab* (plus i r-v-off))
- (+ (mul *.5* i) uvoffset onehalf))
- (setf (svref *ctab* (plus i g-v-off))
- (mul *-.4187* i))
- (setf (svref *ctab* (plus i b-v-off))
- (mul *-.0813* i)))
+ (setf (svref *ctab* (plus i +r-y-off+))
+ (mul +.299+ i))
+ (setf (svref *ctab* (plus i +g-y-off+))
+ (mul +.587+ i))
+ (setf (svref *ctab* (plus i +b-y-off+))
+ (mul +.114+ i))
+ (setf (svref *ctab* (plus i +r-u-off+))
+ (mul +-.1687+ i))
+ (setf (svref *ctab* (plus i +g-u-off+))
+ (mul +-.3313+ i))
+ (setf (svref *ctab* (plus i +b-u-off+))
+ (+ (mul +.5+ i) +uvoffset+ +one-half+))
+ (setf (svref *ctab* (plus i +r-v-off+))
+ (+ (mul +.5+ i) +uvoffset+ +one-half+))
+ (setf (svref *ctab* (plus i +g-v-off+))
+ (mul +-.4187+ i))
+ (setf (svref *ctab* (plus i +b-v-off+))
+ (mul +-.0813+ i)))
;;; Constantsants for the inverse colorspace conversion
-(defconstant *1.40200* (round (+ (* 1.40200 (ash 1 shift)) 0.5)))
-(defconstant *1.77200* (round (+ (* 1.77200 (ash 1 shift)) 0.5)))
-(defconstant *-0.71414* (round (+ (* -0.71414 (ash 1 shift)) 0.5)))
-(defconstant *-0.34414* (round (+ (* -0.34414 (ash 1 shift)) 0.5)))
+(defconstant +1.40200+ (round (+ (* 1.40200 (ash 1 shift)) 0.5)))
+(defconstant +1.77200+ (round (+ (* 1.77200 (ash 1 shift)) 0.5)))
+(defconstant +-0.71414+ (round (+ (* -0.71414 (ash 1 shift)) 0.5)))
+(defconstant +-0.34414+ (round (+ (* -0.34414 (ash 1 shift)) 0.5)))
;;; Inverse color conversion tables
(defvar *cr-r-tab* (make-array 256))
@@ -366,10 +366,10 @@
;;; Filling up the tables
(loop for i from 0 to 255
for x from -127 do
- (setf (svref *cr-r-tab* i) (ash (plus (mul *1.40200* x) onehalf) (- shift)))
- (setf (svref *cb-b-tab* i) (ash (plus (mul *1.77200* x) onehalf) (- shift)))
- (setf (svref *cr-g-tab* i) (mul *-0.71414* x))
- (setf (svref *cb-g-tab* i) (plus (mul *-0.34414* x) onehalf)))
+ (setf (svref *cr-r-tab* i) (ash (plus (mul +1.40200+ x) +one-half+) (- shift)))
+ (setf (svref *cb-b-tab* i) (ash (plus (mul +1.77200+ x) +one-half+) (- shift)))
+ (setf (svref *cr-g-tab* i) (mul +-0.71414+ x))
+ (setf (svref *cb-g-tab* i) (plus (mul +-0.34414+ x) +one-half+)))
;;; Temporary workspace for IDCT
(defvar *ws* (make-array 8 :initial-contents (loop for i from 0 to 7 collecting (make-array 8))))
@@ -380,21 +380,21 @@
(minus 13 (round (minus 31 (integer-length most-positive-fixnum)) 2))
13))
-(defconstant shift-1 (1- dct-shift))
-(defconstant shift+1 (1+ dct-shift))
-(defconstant shift+4 (+ dct-shift 4))
-(defconstant FIX-0-298631336 (round (+ (* 0.298631336 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-0-390180644 (round (+ (* 0.390180644 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-0-541196100 (round (+ (* 0.541196100 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-0-765366865 (round (+ (* 0.765366865 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-0-899976223 (round (+ (* 0.899976223 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-1-175875602 (round (+ (* 1.175875602 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-1-501321110 (round (+ (* 1.501321110 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-1-847759065 (round (+ (* 1.847759065 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-1-961570560 (round (+ (* 1.961570560 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-2-053119869 (round (+ (* 2.053119869 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-2-562915447 (round (+ (* 2.562915447 (ash 1 dct-shift)) 0.5)))
-(defconstant FIX-3-072711026 (round (+ (* 3.072711026 (ash 1 dct-shift)) 0.5)))
+(defconstant +shift-1+ (1- dct-shift))
+(defconstant +shift+1+ (1+ dct-shift))
+(defconstant +shift+4+ (+ dct-shift 4))
+(defconstant +FIX-0-298631336+ (round (+ (* 0.298631336 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-0-390180644+ (round (+ (* 0.390180644 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-0-541196100+ (round (+ (* 0.541196100 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-0-765366865+ (round (+ (* 0.765366865 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-0-899976223+ (round (+ (* 0.899976223 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-1-175875602+ (round (+ (* 1.175875602 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-1-501321110+ (round (+ (* 1.501321110 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-1-847759065+ (round (+ (* 1.847759065 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-1-961570560+ (round (+ (* 1.961570560 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-2-053119869+ (round (+ (* 2.053119869 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-2-562915447+ (round (+ (* 2.562915447 (ash 1 dct-shift)) 0.5)))
+(defconstant +FIX-3-072711026+ (round (+ (* 3.072711026 (ash 1 dct-shift)) 0.5)))
;;; Post-IDCT limiting array
(defvar *idct-limit-array* (make-array 512 :initial-element 0))
@@ -482,19 +482,19 @@
for b fixnum = (svref rgb pos)
for cx fixnum = (minus xd dx)
for cy fixnum = (minus yd dy) do
- (setf (dbref Y cx cy) (minus (ash (+ (svref *ctab* (plus r r-y-off))
- (svref *ctab* (plus g g-y-off))
- (svref *ctab* (plus b b-y-off)))
+ (setf (dbref Y cx cy) (minus (ash (+ (svref *ctab* (plus r +r-y-off+))
+ (svref *ctab* (plus g +g-y-off+))
+ (svref *ctab* (plus b +b-y-off+)))
(- shift))
128))
- (setf (dbref U cx cy) (minus (ash (+ (svref *ctab* (plus r r-u-off))
- (svref *ctab* (plus g g-u-off))
- (svref *ctab* (plus b b-u-off)))
+ (setf (dbref U cx cy) (minus (ash (+ (svref *ctab* (plus r +r-u-off+))
+ (svref *ctab* (plus g +g-u-off+))
+ (svref *ctab* (plus b +b-u-off+)))
(- shift))
128))
- (setf (dbref V cx cy) (minus (ash (+ (svref *ctab* (plus r r-v-off))
- (svref *ctab* (plus g g-v-off))
- (svref *ctab* (plus b b-v-off)))
+ (setf (dbref V cx cy) (minus (ash (+ (svref *ctab* (plus r +r-v-off+))
+ (svref *ctab* (plus g +g-v-off+))
+ (svref *ctab* (plus b +b-v-off+)))
(- shift))
128))))
(values xend yend)))
@@ -577,28 +577,28 @@
(setf tmp12 (minus tmp1 tmp2))
(setf (svref dptr 0) (ash (plus tmp10 tmp11) 1))
(setf (svref dptr 4) (ash (minus tmp10 tmp11) 1))
- (setf z1 (mul (plus tmp12 tmp13) fix-0-541196100))
- (setf (svref dptr 2) (descale (plus z1 (mul tmp13 fix-0-765366865)) shift-1))
- (setf (svref dptr 6) (descale (plus z1 (mul tmp12 (- fix-1-847759065))) shift-1))
+ (setf z1 (mul (plus tmp12 tmp13) +FIX-0-541196100+))
+ (setf (svref dptr 2) (descale (plus z1 (mul tmp13 +FIX-0-765366865+)) +shift-1+))
+ (setf (svref dptr 6) (descale (plus z1 (mul tmp12 (- +FIX-1-847759065+))) +shift-1+))
(setf z1 (plus tmp4 tmp7))
(setf z2 (plus tmp5 tmp6))
(setf z3 (plus tmp4 tmp6))
(setf z4 (plus tmp5 tmp7))
- (setf z5 (mul (plus z3 z4) fix-1-175875602))
- (setf tmp4 (mul tmp4 fix-0-298631336))
- (setf tmp5 (mul tmp5 fix-2-053119869))
- (setf tmp6 (mul tmp6 fix-3-072711026))
- (setf tmp7 (mul tmp7 fix-1-501321110))
- (setf z1 (mul z1 (- fix-0-899976223)))
- (setf z2 (mul z2 (- fix-2-562915447)))
- (setf z3 (mul z3 (- fix-1-961570560)))
- (setf z4 (mul z4 (- fix-0-390180644)))
+ (setf z5 (mul (plus z3 z4) +FIX-1-175875602+))
+ (setf tmp4 (mul tmp4 +fix-0-298631336+))
+ (setf tmp5 (mul tmp5 +fix-2-053119869+))
+ (setf tmp6 (mul tmp6 +fix-3-072711026+))
+ (setf tmp7 (mul tmp7 +fix-1-501321110+))
+ (setf z1 (mul z1 (- +fix-0-899976223+)))
+ (setf z2 (mul z2 (- +fix-2-562915447+)))
+ (setf z3 (mul z3 (- +fix-1-961570560+)))
+ (setf z4 (mul z4 (- +fix-0-390180644+)))
(incf z3 z5)
(incf z4 z5)
- (setf (svref dptr 7) (descale (plus3 tmp4 z1 z3) shift-1))
- (setf (svref dptr 5) (descale (plus3 tmp5 z2 z4) shift-1))
- (setf (svref dptr 3) (descale (plus3 tmp6 z2 z3) shift-1))
- (setf (svref dptr 1) (descale (plus3 tmp7 z1 z4) shift-1)))
+ (setf (svref dptr 7) (descale (plus3 tmp4 z1 z3) +shift-1+))
+ (setf (svref dptr 5) (descale (plus3 tmp5 z2 z4) +shift-1+))
+ (setf (svref dptr 3) (descale (plus3 tmp6 z2 z3) +shift-1+))
+ (setf (svref dptr 1) (descale (plus3 tmp7 z1 z4) +shift-1+)))
(loop for cnt fixnum from 7 downto 0 do ;second pass: on columns
(setf tmp0 (plus (dbref data cnt 0) (dbref data cnt 7)))
(setf tmp7 (minus (dbref data cnt 0) (dbref data cnt 7)))
@@ -614,28 +614,28 @@
(setf tmp12 (minus tmp1 tmp2))
(setf (dbref data cnt 0) (descale (plus tmp10 tmp11) 1))
(setf (dbref data cnt 4) (descale (minus tmp10 tmp11) 1))
- (setf z1 (mul (plus tmp12 tmp13) fix-0-541196100))
- (setf (dbref data cnt 2) (descale (plus z1 (mul tmp13 fix-0-765366865)) shift+1))
- (setf (dbref data cnt 6) (descale (plus z1 (mul tmp12 (- fix-1-847759065))) shift+1))
+ (setf z1 (mul (plus tmp12 tmp13) +fix-0-541196100+))
+ (setf (dbref data cnt 2) (descale (plus z1 (mul tmp13 +fix-0-765366865+)) +shift+1+))
+ (setf (dbref data cnt 6) (descale (plus z1 (mul tmp12 (- +fix-1-847759065+))) +shift+1+))
(setf z1 (plus tmp4 tmp7))
(setf z2 (plus tmp5 tmp6))
(setf z3 (plus tmp4 tmp6))
(setf z4 (plus tmp5 tmp7))
- (setf z5 (mul (plus z3 z4) fix-1-175875602))
- (setf tmp4 (mul tmp4 fix-0-298631336))
- (setf tmp5 (mul tmp5 fix-2-053119869))
- (setf tmp6 (mul tmp6 fix-3-072711026))
- (setf tmp7 (mul tmp7 fix-1-501321110))
- (setf z1 (mul z1 (- fix-0-899976223)))
- (setf z2 (mul z2 (- fix-2-562915447)))
- (setf z3 (mul z3 (- fix-1-961570560)))
- (setf z4 (mul z4 (- fix-0-390180644)))
+ (setf z5 (mul (plus z3 z4) +fix-1-175875602+))
+ (setf tmp4 (mul tmp4 +fix-0-298631336+))
+ (setf tmp5 (mul tmp5 +fix-2-053119869+))
+ (setf tmp6 (mul tmp6 +fix-3-072711026+))
+ (setf tmp7 (mul tmp7 +fix-1-501321110+))
+ (setf z1 (mul z1 (- +fix-0-899976223+)))
+ (setf z2 (mul z2 (- +fix-2-562915447+)))
+ (setf z3 (mul z3 (- +fix-1-961570560+)))
+ (setf z4 (mul z4 (- +fix-0-390180644+)))
(incf z3 z5)
(incf z4 z5)
- (setf (dbref data cnt 7) (descale (plus3 tmp4 z1 z3) shift+1))
- (setf (dbref data cnt 5) (descale (plus3 tmp5 z2 z4) shift+1))
- (setf (dbref data cnt 3) (descale (plus3 tmp6 z2 z3) shift+1))
- (setf (dbref data cnt 1) (descale (plus3 tmp7 z1 z4) shift+1)))
+ (setf (dbref data cnt 7) (descale (plus3 tmp4 z1 z3) +shift+1+))
+ (setf (dbref data cnt 5) (descale (plus3 tmp5 z2 z4) +shift+1+))
+ (setf (dbref data cnt 3) (descale (plus3 tmp6 z2 z3) +shift+1+))
+ (setf (dbref data cnt 1) (descale (plus3 tmp7 z1 z4) +shift+1+)))
(return)))
;;; Forward DCT and quantization
@@ -659,13 +659,13 @@
;;; Function that maps value into SSSS
(defun csize (n)
(declare #.*optimize* (type fixnum n))
- (svref *csize* (plus n 1023)))
+ (svref +csize+ (plus n 1023)))
;;; zigzag ordering
(defun zigzag (buffer)
(declare #.*optimize* (type (simple-vector 8) buffer))
(loop for row across buffer
- for z-row across *zigzag-index* do
+ for z-row across +zigzag-index+ do
[297 lines skipped]
1
0
[cl-jpeg-cvs] Is Israel a Democracy? -- The problem with intellectually insecure whites -- Should Christians Support Israeli Terrorism in Gaza?
by Lawrence Auster 23 Jan '09
by Lawrence Auster 23 Jan '09
23 Jan '09
The Jewish State of Israel has no constitution, nor does it name its borders. Israel's hidden constitution is Judaism. Israel's undeclared borders range from the Nile to the Euphrates rivers. Israel's desired jurisdiction extends over the entire Earth.
It could not be more clear that the Jewish State follows a foreign policy which obeys Jewish Law as iterated in the Hebrew Bible, the Talmud, Maimonedes, the Cabalah, and the many commentaries and refinements of same. The Jews are genociding the native inhabitants of Palestine, just as their religion advises, and because
their religion teaches them to do so. They treat non-Jews as if non-humans, just as their religion requires them to do. They make perpetual war on every nation on Earth, just as their genocidal Jewish God has instructed.
The Jews of Israel are simply being Jews. Jews are an existential threat to the human race.
Israel contains one third of the Jews of the World. It is not some aberration of the Jewish spirit, but the condensation and concentration of the perverse Jewish mentality, which malady also pervades the remaining two thirds of Jewry, who almost unanimously support the Jewish State, and who certainly do unanimously support
the Jewish People and its consistent and constant crimes against the human race. Israel is Jewry and the danger of Israel is the danger of the Jewish People to all others, as the Jews have demonstrated each and every day of their existence.
The Jews, the entire Jewish People of 15 million, will not relent until they have wiped out all non-Jews in "Greater Israel". They will not stop destroying all other cultures, nations, religions, ethnicities, races, competition, etc. until they are either stopped, or succeed in their ancient quest to destroy the human race.
What Israel is doing is not some reaction to outside forces, nor was the formation of Israel a response to the Holocaust. Israel is simply following the plan laid out in the Jews' religious texts. The Jews have openly planned to take Palestine and genocide the native population of Palestine for some 2,500 years before the
Holocaust. The Jews have openly complained that "anti-Semitism" is a threat that gives them the right to genocide the Palestinians, not merely since the advent of Nazism, but for some 2,500 years.
The Jewish religion is the Constitution of the Jewish State of Israel, and, to a greater or lesser extent, the constitution of the nature of every Jew alive. The borders of Israel are the range the Jew roams over the entire World. The perverse Jewish mentality is inbred by a Jew's exposure to his parents and to his community. Judaism
passes in the spit and slobber of Jewish mother telling her Jewish child that he is a "Jew", as much as Judaism passes in the poison and pain of a Talmudic tractate. The secular Jews did not suddenly come to life after the Enlightenment and the Jewish Reformation a body of vampires that appeared ex nihilo, in vacuo, mostly
atheistical and undetached from formally practiced Judaism. Judaism is the Jew. It is a mindset that transcends and supercedes religion. It is a belief set, a way of life, a perception of one's self and one's relation to the World that makes a Jew, a Jew, and a danger to all of humanity.
In fact, the religious shell of Judaism is like the stretched and infected skin of a lycanthropic pustule. When you lance it to cure the infection, the virus only becomes more contagious and spills directly on the non-Jew.
The secular Jew is a deliberate product of the hyper-religious Jew, a monster created out of the hewed corpses of the fanatically religious Jew, a Golem which is conjured up to enter the World of the non-Jew and poison its blood, and boil its brain with a rabid lunacy that bites and spreads, until the infected community feeds on
itself and fills the fields with rotting bloating bodies, where once human beings tilled the soil and tended to their families. The religious Jew created the secular Jew as an army of Esthers who seduce with open thighs, broad smiles, and a Siren call that lures in the non-Jew to cast his skull upon the jagged rocks and color the seas
with his blood, sickened and blinded by the venereal disease of Judaism in secular form.
Israel is not a secular democracy. It is a religious mockery. It is a rabid bat flying to the ends of the Earth, to end the Earth. No one will be free nor safe until the disease is quarantined and dies out.
Source: http://www.ziopedia.org/articles/israel/how_can_israel_claim_to_be_a_%27dem…
--------------------
The problem with intellectually insecure whites
By Kevin MacDonald
January 19, 2009
America will soon have a white minority. This is a much desired state of affairs for the hostile elites who hold political power and shape public opinion. But it certainly creates some management issues � at least in the long run. After all, it�s difficult to come up with an historical example of a nation with a solid ethnic majority (90%
white in 1950) that has voluntarily decided to cede political and cultural power. Such transformations are typically accomplished by military invasions, great battles, and untold suffering.
And it�s not as if everyone is doing it. Only Western nations view their own demographic and cultural eclipse as a moral imperative. Indeed, as I have noted previously, it is striking that racial nationalism has triumphed in Israel at the same time that the Jewish intellectual and political movements and the organized Jewish
community have been the most active and effective force for a non-white America. Indeed, a poll in 2008 found that Avigdor Lieberman was the second most popular politician in Israel. Lieberman has advocated expulsion of Arabs from Israel and has declared himself a follower of Vladimir Jabotinsky, the leading pioneer of racial
Zionism. The most popular politician in the poll was Benjamin Netanyahu � another admirer of Jabotinsky. Prime Minister Ehud Olmert and Foreign Minister Tzipi Livni are also Jabotinskyists.
The racial Zionists are now carrying out yet another orgy of mass murder after a starvation-inducing blockade and the usual triggering assault designed to provoke Palestinian retaliation � which then becomes the cover for claims that Israel is merely defending itself against terrorism. This monstrosity was approved by
overwhelming majorities of both Houses of Congress. The craven Bush administration did its part by abstaining from a UN resolution designed by the US Secretary of State as a result of a personal appeal by the Israeli Prime Minister. This is yet another accomplishment of the Israel Lobby, but one they would rather not have
discussed in public. People might get the impression that the Lobby really does dictate US foreign policy in the Mideast. Obviously, such thoughts are only entertained by anti-Semites.
But I digress.
In managing the eclipse of white America, one strategy of the mainstream media is to simply ignore the issue. Christopher Donovan (�For the media, the less whites think about their coming minority status, the better�) has noted that the media, and in particular, the New York Times, are quite uninterested in doing stories that
discuss what white people think about this state of affairs.
It�s not surprising that the New York Times � the Jewish-owned flagship of anti-white, pro-multicultural media � ignores the issue. The issue is also missing from so-called conservative media even though one would think that conservatives would find the eclipse of white America to be an important issue. Certainly, their audiences
would find it interesting.
Now we have an article �The End of White America� written by Hua Hsu, an Assistant Professor of English at Vassar College. The article is a rather depressing display of what passes for intellectual discourse on the most important question confronting white people in America.
Hsu begins by quoting a passage in F. Scott Fitzgerald�s The Great Gatsby in which a character, Tom Buchanan, states: �Have you read The Rise of the Colored Empires by this man Goddard?� � Well, it�s a fine book, and everybody ought to read it. The idea is if we don�t look out the white race will be�will be utterly submerged.
It�s all scientific stuff; it�s been proved.�
Buchanan�s comment is a thinly veiled reference to Lothrop Stoddard�s The Rising Tide of Color which Hsu describes as �rationalized hatred� presented in a scholarly, gentlemanly, and scientific tone. (This wording that will certainly help him when he comes up for tenure.) As Hsu notes, Stoddard had a doctorate from Harvard
and was a member of many academic associations. His book was published by a major publisher. It was therefore �precisely the kind of book that a 1920s man of Buchanan�s profile � wealthy, Ivy League�educated, at once pretentious and intellectually insecure � might have been expected to bring up in casual conversation.�
Let�s ponder that a bit. The simple reality is that in the year 2009 an Ivy League-educated person, "at once pretentious and intellectually insecure," would just as glibly assert the same sort of nonsense as Hsu. To wit:
The coming white minority does not mean that the racial hierarchy of American culture will suddenly become inverted, as in 1995�s White Man�s Burden, an awful thought experiment of a film, starring John Travolta, that envisions an upside-down world in which whites are subjugated to their high-class black oppressors. There will
be dislocations and resentments along the way, but the demographic shifts of the next 40 years are likely to reduce the power of racial hierarchies over everyone�s lives, producing a culture that�s more likely than any before to treat its inhabitants as individuals, rather than members of a caste or identity group.
The fact is that no one can say for certain what multicultural America without a white majority will be like. There is no scientific or historical basis for claims like �the demographic shifts of the next 40 years are likely to reduce the power of racial hierarchies over everyone�s lives, producing a culture that�s more likely than any before
to treat its inhabitants as individuals, rather than members of a caste or identity group.�
Indeed, there is no evidence at all that we are proceeding to a color blind future. The election results continue to show that white people are coalescing in the Republican Party, while the Democrats are increasingly the party of a non-white soon-to-be majority.
Is it so hard to believe that when this coalition achieves a majority that it will further compromise the interests of whites far beyond contemporary concerns such as immigration policy and affirmative action? Hsu anticipates a colorblind world, but affirmative action means that blacks and other minorities are certainly not treated as
individuals. And it means that whites � especially white males � are losing out on opportunities they would have had without these policies and without the massive non-white immigration of the last few decades.
Given the intractability of changing intelligence and other traits required for success in the contemporary economy, it is unlikely that 40 more years of affirmative action will attain the outcomes desired by the minority lobbies. Indeed, in Obama's America, blacks are rioting in Oakland over perceived racial injustices, and from 2002
�2007, black juvenile homicide victims increased 31%, while black juvenile homicide perpetrators increased 43%. Hence, the reasonable outlook is for a continuing need for affirmative action and for racial activism in these groups, even after whites become a minority.
Whites will also lose out because of large-scale importation of relatively talented immigrants from East Asia. Indeed, as I noted over a decade ago, "The United States is well on the road to being dominated by an Asian technocratic elite and a Jewish business, professional, and media elite."
Hsu shows that there already is considerable anxiety among whites about the future. An advertizing executive says, �I think white people feel like they�re under siege right now � like it�s not okay to be white right now, especially if you�re a white male. ... People are stressed out about it. �We used to be in control! We�re losing
control�� Another says, "There�s a lot of fear and a lot of resentment."
It's hard to see why these feelings won't increase in the future.
A huge problem for white people is lack of intellectual and cultural confidence. Hsu quotes Christian (Stuff White People Like) Lander saying, "I get it: as a straight white male, I�m the worst thing on Earth." A professor comments that for his students "to be white is to be culturally broke. The classic thing white students say when
you ask them to talk about who they are is, �I don�t have a culture.� They might be privileged, they might be loaded socioeconomically, but they feel bankrupt when it comes to culture � They feel disadvantaged, and they feel marginalized."
This lack of cultural confidence is no accident. For nearly 100 years whites have been subjected to a culture of critique emanating from the most prestigious academic and media institutions. And, as Hsu points out, the most vibrant and influential aspect of American popular culture is hip-hop�a product of the African American
urban culture.
The only significant group of white people with any cultural confidence centers itself around country music, NASCAR, and the small town values of traditional white America. For this group of whites � and only this group � there is "a racial pride that dares not speak its name, and that defines itself through cultural cues instead�a
suspicion of intellectual elites and city dwellers, a preference for folksiness and plainness of speech (whether real or feigned), and the association of a working-class white minority with 'the real America.'�
This is what I term implicit whiteness � implicit because explicit assertions of white identity have been banned by the anti-white elites that dominate our politics and culture. It is a culture that, as Hsu notes, "cannot speak its name."
But that implies that the submerged white identity of the white working class and the lack of cultural confidence exhibited by the rest of white America are imposed from outside. Although there may well be characteristics of whites that facilitate this process, this suppression of white identity and interests is certainly not the natural
outcome of modernization or any other force internal to whites as a people. In my opinion, it is the result of the successful erection of a culture of critique in the West dominated by Jewish intellectual and political movements.
The result is that educated, intellectually insecure white people these days are far more likely to believe in the utopian future described by Hsu than in hard and cautious thinking about what the future might have in store for them.
It's worth dwelling a bit on the intellectual insecurity of the whites who mindlessly utter the mantras of multiculturalism that they have soaked up from the school system and from the media. Most people do not have much confidence in their intellectual ability and look to elite opinion to shape their beliefs. As I noted elsewhere,
A critical component of the success of the culture of critique is that it achieved control of the most prestigious and influential institutions of the West, and it became a consensus among the elites, Jewish and non-Jewish alike. Once this happened, it is not surprising that this culture became widely accepted among people of very
different levels of education and among people of different social classes.
Most people are quite insecure about their intellectual ability. But they know that the professors at Harvard, and the editorial page of the New York Times and the Washington Post, and even conservative commentators like Rush Limbaugh and Sean Hannity are all on page when it comes to racial and ethnic issues. This is a
formidable array, to the point that you almost have to be a crank to dissent from this consensus.
I think one of the greatest triumphs of the left has been to get people to believe that people who assert white identity and interests or who make unflattering portrayals of organized Jewish movements are morally degenerate, stupid, and perhaps psychiatrically disturbed. Obviously, all of these adjectives designate low status.
The reality is that the multicultural emperor has no clothes and, because of its support for racial Zionism and the racialism of ethnic minorities in America, it is massively hypocritical to boot. The New York Times, the academic left, and the faux conservatives that dominate elite discourse on race and ethnicity are intellectually
bankrupt and can only remain in power by ruthlessly suppressing or ignoring the scientific findings.
This is particularly a problem for college-educated whites. Like Fitzgerald's Tom Buchanan, such people have a strong need to feel that their ideas are respectable and part of the mainstream. But the respectable mainstream gives them absolutely nothing with which to validate themselves except perhaps the idea that the world
will be a better place when people like them no longer have power. Hsu quotes the pathetic Christian Lander: "�Like, I�m aware of all the horrible crimes that my demographic has done in the world. ... And there�s a bunch of white people who are desperate � desperate � to say, �You know what? My skin�s white, but I�m not one
of the white people who�s destroying the world.��
As a zombie leftist during the 1960s and 1970s, I know what that feeling of desperation is like � what it's like to be a self-hating white. We must get to the point where college-educated whites proudly and confidently say they are white and that they do not want to become a minority in America.
This reminds me of the recent docudrama Milk, which depicts the life of gay activist Harvey Milk. Milk is sure be nominated for an Oscar as Best Picture because it lovingly illustrates a triumph of the cultural left. But is has an important message that should resonate with the millions of whites who have been deprived of their
confidence and their culture: Be explicit. Just as Harvey Milk advocated being openly gay even in the face of dire consequences, whites need to tell their family and their friends that they have an identity as a white person and believe that whites have legitimate interests as white people. They must accept the consequences
when they are harassed, fired from their jobs, or put in prison for such beliefs. They must run for political office as openly pro-white.
Milk shows that homosexuals were fired from their jobs and arrested for congregating in public. Now it's the Southern Poverty Law Center and the rest of the leftist intellectual and political establishment that harasses and attempts to get people fired. But it's the same situation with the roles reversed. No revolution was ever
accomplished without some martyrs. The revolution that restores the legitimacy of white identity and the legitimacy of white interests will be no exception.
But it is a revolution that is absolutely necessary. The white majority is foolish indeed to entrust its future to a utopian hope that racial and ethnic identifications will disappear and that they won�t continue to influence public policy in ways that compromise the interests of whites.
It does not take an overactive imagination to see that coalitions of minority groups could compromise the interests of formerly dominant whites. We already see numerous examples in which coalitions of minority groups attempt to influence public policy, including immigration policy, against the interests of the whites. Placing
ourselves in a position of vulnerability would be extremely risky, given the deep sense of historical grievance fostered by many ethnic activists and organized ethnic lobbies.
This is especially the case with Jews. Jewish organisations have been unanimous in condemning Western societies, Western traditions, and Christianity, for past crimes against Jews. Similar sentiments are typical of a great many African Americans and Latinos, and especially among the ethnic activists from these groups. The
�God damn America� sermon by President Obama's pastor comes to mind as a recent notorious example.
The precedent of the early decades of the Soviet Union should give pause to anyone who believes that surrendering ethnic hegemony does not carry risks. The Bolshevik revolution had a pronounced ethnic angle: To a very great extent, Jews and other non-Russians ruled over the Russian people, with disastrous
consequences for the Russians and other ethnic groups that were not able to become part of the power structure. Jews formed a hostile elite within this power structure � as they will in the future white-minority America; Jews were �Stalin�s willing executioners.�
Two passages from my review of Yuri Slezkine's The Jewish Century seem particularly appropriate here. The first passage reminds me of the many American Jews who adopt a veneer of support for leftist versions of social justice and racial tolerance while nevertheless managing to support racial Zionism and the mass murder,
torture, and incarceration of the Palestinian people in one of the largest prison systems the world has ever seen. Such people may be very different when they become a hostile elite in a white-minority America.
Many of the commentators on Jewish Bolsheviks noted the �transformation� of Jews [after the Bolshevik Revolution]. In the words of [a] Jewish commentator, G. A. Landau, �cruelty, sadism, and violence had seemed alien to a nation so far removed from physical activity.� And another Jewish commentator, Ia. A. Bromberg, noted
that:
the formerly oppressed lover of liberty had turned into a tyrant of �unheard-of-despotic arbitrariness��. The convinced and unconditional opponent of the death penalty not just for political crimes but for the most heinous offenses, who could not, as it were, watch a chicken being killed, has been transformed outwardly into a
leather-clad person with a revolver and, in fact, lost all human likeness. ...
After the Revolution, ... there was active suppression of any remnants of the older order and their descendants. ... The mass murder of peasants and nationalists was combined with the systematic exclusion of the previously existing non-Jewish middle class. The wife of a Leningrad University professor noted, �in all the
institutions, only workers and Israelites are admitted; the life of the intelligentsia is very hard� (p. 243). Even at the end of the 1930s, prior to the Russification that accompanied World War II, �the Russian Federation�was still doing penance for its imperial past while also serving as an example of an ethnicity-free society� (p. 276).
While all other nationalities, including Jews, were allowed and encouraged to keep their ethnic identities, the revolution remained an anti-majoritarian movement.
The difference from the Soviet Union may well be that in white-minority America it will not be workers and Israelites who are favored, but non-whites and Israelites. Whites may dream that they are entering the post-racial utopia imagined by their erstwhile intellectual superiors. But it is quite possible that they are entering into a
racial dystopia of unimaginable cruelty in which whites will be systematically excluded in favor of the new elites recruited from the soon-to-be majority. It's happened before.
Kevin MacDonald is a professor of psychology at California State University�Long Beach.
Permanent URL with hyperlinks:
http://www.theoccidentalobserver.net/articles/MacDonald-Hsu.html
-----------
Should Christians Support Israeli Terrorism in Gaza?
A timely discussion between Rev. Ted Pike and Dr. David Duke, one especially important for the Christians in our audience
http://www.davidduke.com/mp3/dukeradio090122DukeandPikeonGaza.mp3
In this vital discussion, Rev. Pike and Dr. Duke explore the Pro-Israel attitude of some Christian evangelical organizations, and why their position not only goes directly against Christian morality and decency, but actually is directly opposite of that expressed by Christian Scriptures. Today, Many Christians are instructed that Jews
and today�s Israel has a special covenant� with God. In fact, the New Testament in the clearest of language states that the Jews �continued not in my covenant, and I considered them not, saith the Lord.� Here�s the quote that Christians aren�t supposed to notice.:
8:10 Not according to the covenant that I made with their fathers, in the day when I took them by the hand out of the land of Egypt; because they continued not in my covenant, and I regarded them not, saith the Lord. (Hebrews 8:10)
They also don�t seem to notice that a 2000 year old Judaic war against Christianity that has been waged since time of Jesus Christ and still goes on today with the most powerful Jewish organizations attempting to destroy European and American traditions, that has even become a war on our Christmas traditions.
Dr. Duke and Ted Pike also speak about how over a hundred thousand Christian Palestinians have suffered with their families from anti-Christian Israel! Christian support of Israel has resulted in the very birthplace of Jesus Christ, go from 90 percent Palestinian Christians to 35 percent today because of Israeli terror and
occupation. They ask, �How could any Christian in good conscience support the anti-Christian state of Israel, bombing the homes, killing and maiming, torturing and oppressing fellow Christian men, women and children?�
This is a vital show for every Christian reader and listener of DavidDuke.com. Next time, you hear someone say, �God tells us that we must support Israel� you will have the clear Christian answer that just the opposite is true!
For documentation on this be sure to read some of the well-footnoted, sample chapters of Jewish Supremacism and My Awakening.
Source :
http://www.davidduke.com/general/should-christians-support-israeli-terroris…
-------------------------------------
You or someone using your email adress is currently subscribed to the Lawrence Auster
Newletter. If you wish to unsubscribe from our mailing list, please let us know by calling to 1 212 865 1284
Thanks,
Lawrence Auster,
238 W 101 St Apt. 3B
New York, NY 10025
Contact: lawrence.auster(a)att.net
-------------------------------------
1
0
Update of /project/cl-jpeg/cvsroot/cljl
In directory cl-net:/tmp/cvs-serv29049
Modified Files:
jpeg.lisp
Log Message:
fix compilation on clisp
* while we're here, bring eval-when conditions into the 90s and
put read-app and read-com under an eval-when so we don't get
a compile time warning about read-com
* use - instead of minus on clisp with get-internal-run-time
since it returns a value that is (generally) larger than a
fixnum
--- /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2008/05/10 05:53:19 1.3
+++ /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2008/12/03 04:30:38 1.4
@@ -1,6 +1,6 @@
;; -*- Mode: LISP; Package: (JPEG :use (common-lisp)) -*-
;;; Generic Common Lisp JPEG encoder/decoder implementation
-;;; $Id: jpeg.lisp,v 1.3 2008/05/10 05:53:19 charmon Exp $
+;;; $Id: jpeg.lisp,v 1.4 2008/12/03 04:30:38 charmon Exp $
;;; Version 1.023, May 2008
;;; Written by Eugene Zaikonnikov [viking(a)funcall.org]
;;; Copyright [c] 1999, Eugene Zaikonnikov <viking(a)funcall.org>
@@ -71,11 +71,11 @@
(declaim (inline csize write-stuffed quantize get-average zigzag encode-block llm-dct descale crunch colorspace-convert subsample
inverse-llm-dct dequantize upsample extend recieve decode-ac decode-dc decode-block izigzag write-bits))
-(eval-when (compile load eval)
+(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *optimize* '(optimize (safety 0) (space 0) (debug 0) (speed 3))))
; '(optimize (safety 1) (space 3) (debug 0) (speed 0))))
-(eval-when (compile load eval)
+(eval-when (:compile-toplevel :load-toplevel :execute)
;;; For ease of reference
(defmacro dbref (data x y)
`(the fixnum (svref (svref ,data ,y) ,x)))
@@ -268,7 +268,7 @@
(loop for row across *q-luminance* do
(loop for q-coef fixnum across row
maximize (round (random 128) q-coef))))
- (minus (get-internal-run-time) time1))
+ (#+clisp - #-clisp minus (get-internal-run-time) time1))
(let ((time1 (get-internal-run-time)))
(loop for i fixnum from 1 to 3000 do
(loop for q-row across *q-luminance* do
@@ -292,7 +292,7 @@
2)))
(t
(round val qc))))))
- (minus (get-internal-run-time) time1))))
+ (#+clisp - #-clisp minus (get-internal-run-time) time1))))
(format t "Done.~%")
(finish-output)
)
@@ -1070,14 +1070,15 @@
(word (logior msb lsb)))
word))
+(eval-when (:compile-toplevel :load-toplevel :execute)
;;; APPn marker reading: just skipping the whole marker
-(defun read-app (s)
- "APPn marker reading: just skipping the whole marker"
- (loop for i fixnum from 0 below (minus (read-word s) 2) do
- (read-byte s)))
-
+ (defun read-app (s)
+ "APPn marker reading: just skipping the whole marker"
+ (loop for i fixnum from 0 below (minus (read-word s) 2) do
+ (read-byte s)))
+
;;; COM marker reading, same as read-app
-(setf (symbol-function 'read-com) #'read-app)
+ (setf (symbol-function 'read-com) #'read-app))
;;; Sets up restart interval
(defun read-dri (image s)
1
0
Update of /project/cl-jpeg/cvsroot/cljl
In directory clnet:/tmp/cvs-serv27759
Modified Files:
cl-jpeg.asd jpeg.lisp
Log Message:
jpeg 1.023
* added :name, :version and :licence to the asdf file
* removed the cl-jpeg-system package from the asdf file
* bumped version and fixed typo in the opening comments
* added a define-constant macro for use where we used to use to
define-constant for things that weren't necessarily eq when
recompiling them, like vectors and lists.
* use define-constant where appropriate
* added an encode-image-stream and call this from encode-image to
do the heavy lifting
--- /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2007/02/23 23:48:36 1.1.1.1
+++ /project/cl-jpeg/cvsroot/cljl/cl-jpeg.asd 2008/05/10 05:53:19 1.2
@@ -1,8 +1,8 @@
;;;; -*- Mode: Lisp; Package: User; -*-
-(defpackage #:cl-jpeg-system (:use #:asdf #:cl))
-(in-package #:cl-jpeg-system)
-
-(defsystem :cl-jpeg
+(asdf:defsystem :cl-jpeg
+ :name "cl-jpeg"
+ :version 1.023
+ :licence "BSD"
:components ((:file "jpeg")))
--- /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2007/02/24 00:00:12 1.2
+++ /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2008/05/10 05:53:19 1.3
@@ -1,14 +1,14 @@
;; -*- Mode: LISP; Package: (JPEG :use (common-lisp)) -*-
;;; Generic Common Lisp JPEG encoder/decoder implementation
-;;; $Id: jpeg.lisp,v 1.2 2007/02/24 00:00:12 ezaikonnikov Exp $
-;;; Version 1.022, June 1999.
+;;; $Id: jpeg.lisp,v 1.3 2008/05/10 05:53:19 charmon Exp $
+;;; Version 1.023, May 2008
;;; Written by Eugene Zaikonnikov [viking(a)funcall.org]
;;; Copyright [c] 1999, Eugene Zaikonnikov <viking(a)funcall.org>
;;; This software is distributed under the terms of BSD-like license
;;; [see LICENSE for details]
-;;; That was qute some time ago - I'd wrote it better now [E.Z., 2001]
+;;; That was quite some time ago - I'd wrote it better now [E.Z., 2001]
-;;; Known to work with Lispworks 4 and Allegro CL 5
+;;; Known to work with Lispworks 4 and Allegro CL 5 and SBCL 1.0.16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Creation of this software was sponsored by Kelly E. Murray
@@ -99,28 +99,32 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Here we define some constants (markers, quantization and huffman tables etc.)
+(defmacro define-constant (name value &optional doc)
+ `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
+ ,@(when doc (list doc))))
+
(eval-when (:compile-toplevel :load-toplevel)
;;; Source huffman tables for the encoder
-(defconstant *luminance-dc-bits*
+(define-constant *luminance-dc-bits*
#(#x00 #x01 #x05 #x01 #x01 #x01 #x01 #x01
#x01 #x00 #x00 #x00 #x00 #x00 #x00 #x00))
-(defconstant *luminance-dc-values*
+(define-constant *luminance-dc-values*
#(#x00 #x01 #x02 #x03 #x04 #x05 #x06 #x07 #x08 #x09 #x0a #x0b))
-(defconstant *chrominance-dc-bits*
+(define-constant *chrominance-dc-bits*
#(#x00 #x03 #x01 #x01 #x01 #x01 #x01 #x01
#x01 #x01 #x01 #x00 #x00 #x00 #x00 #x00))
-(defconstant *chrominance-dc-values*
+(define-constant *chrominance-dc-values*
#(#x00 #x01 #x02 #x03 #x04 #x05 #x06 #x07 #x08 #x09 #x0a #x0b))
-(defconstant *luminance-ac-bits*
+(define-constant *luminance-ac-bits*
#(#x00 #x02 #x01 #x03 #x03 #x02 #x04 #x03
#x05 #x05 #x04 #x04 #x00 #x00 #x01 #x7d))
-(defconstant *luminance-ac-values*
+(define-constant *luminance-ac-values*
#(#x01 #x02 #x03 #x00 #x04 #x11 #x05 #x12
#x21 #x31 #x41 #x06 #x13 #x51 #x61 #x07
#x22 #x71 #x14 #x32 #x81 #x91 #xa1 #x08
@@ -143,11 +147,11 @@
#xf1 #xf2 #xf3 #xf4 #xf5 #xf6 #xf7 #xf8
#xf9 #xfa))
-(defconstant *chrominance-ac-bits*
+(define-constant *chrominance-ac-bits*
#(#x00 #x02 #x01 #x02 #x04 #x04 #x03 #x04
#x07 #x05 #x04 #x04 #x00 #x01 #x02 #x77))
-(defconstant *chrominance-ac-values*
+(define-constant *chrominance-ac-values*
#(#x00 #x01 #x02 #x03 #x11 #x04 #x05 #x21
#x31 #x06 #x12 #x41 #x51 #x07 #x61 #x71
#x13 #x22 #x32 #x81 #x08 #x14 #x42 #x91
@@ -171,7 +175,7 @@
#xf9 #xfa))
;;;Zigzag encoding matrix
-(defconstant *zigzag-index*
+(define-constant *zigzag-index*
#(#(0 1 5 6 14 15 27 28)
#(2 4 7 13 16 26 29 42)
#(3 8 12 17 25 30 41 43)
@@ -184,7 +188,7 @@
;;; Temporary buffer for zigzag encoding and decoding
(defvar *zz-result* (make-array 64 :element-type 'unsigned-byte))
-(defconstant *zzbuf*
+(define-constant *zzbuf*
#(#(0 0 0 0 0 0 0 0)
#(0 0 0 0 0 0 0 0)
#(0 0 0 0 0 0 0 0)
@@ -293,10 +297,10 @@
(finish-output)
)
-(defconstant *q-tables* (vector *q-luminance* *q-chrominance*))
+(define-constant *q-tables* (vector *q-luminance* *q-chrominance*))
;;; This table is used to map coefficients into SSSS value
-(defconstant *csize* (make-array 2047
+(define-constant *csize* (make-array 2047
:initial-contents
(loop for i fixnum from 0 to 2046
collecting (integer-length (abs (minus i 1023))))))
@@ -881,127 +885,131 @@
(list ehufsi ehufco))))
;;; Main encoder function (user interface)
-(defun encode-image (filename image ncomp h w &key (q-tabs *q-tables*) (sampling '((2 2)(1 1)(1 1))) (q-factor 64))
+(defun encode-image-stream (out-stream image ncomp h w &key (q-tabs *q-tables*) (sampling '((2 2)(1 1)(1 1))) (q-factor 64))
(declare #.*optimize*
(type fixnum ncomp h w q-factor)
(type (simple-vector *) image))
+ (when (= ncomp 1)
+ (setq sampling '((1 1))))
+ (let* ((wd (loop for entry in sampling maximize (first entry)))
+ (ht (loop for entry in sampling maximize (second entry)))
+ (isampling (convert-sampling sampling wd ht))
+ (height (ash ht 3))
+ (width (ash wd 3))
+ (YUV (make-array ncomp
+ :initial-contents
+ (loop for i fixnum from 0 below ncomp collecting
+ (make-array height
+ :initial-contents
+ (loop for j fixnum from 0 below height
+ collecting (make-array width))))))
+ (sampled-buf (make-array (mul ht wd)
+ :initial-contents
+ (loop for b fixnum from 0 below (mul ht wd)
+ collecting (make-array 8
+ :initial-contents
+ (loop for i fixnum from 0 to 7
+ collecting (make-array 8))))))
+ (preds (make-array ncomp :initial-element 0))
+ (tqv (case ncomp
+ (3 #(0 1 1)) ;q-tables destinations for various component numbers
+ (1 #(0))
+ (2 #(0 1))
+ (4 #(0 1 2 3))
+ (otherwise (error "Illegal number of components specified")))))
+ (cond ((/= ncomp (length sampling))
+ (error "Wrong sampling list for ~D component(s)" ncomp))
+ ((> (length q-tabs) ncomp)
+ (error "Too many quantization tables specified"))
+ ((zerop q-factor)
+ (error "Q-factor should be nonzero!"))
+ ((> (count-relation sampling) 10)
+ (error "Invalid sampling specification!")))
+ (when (< q-factor 64)
+ (let ((q-tabs2 (make-array (length q-tabs)
+ :initial-contents
+ (loop for k fixnum from 0 below (length q-tabs)
+ collecting (make-array 8 :initial-contents
+ (loop for i fixnum from 0 to 7
+ collecting (make-array 8)))))))
+ (loop for entry across q-tabs
+ for entry2 across q-tabs2 do
+ (loop for x fixnum from 0 to 7 do
+ (loop for y fixnum from 0 to 7 do
+ (setf (dbref entry2 x y) (the fixnum (dbref entry x y))))))
+ (setq q-tabs q-tabs2))
+ (loop for entry across q-tabs do ;scaling all q-tables
+ (q-scale entry q-factor)))
+ (setq *prev-byte* 0)
+ (setq *prev-length* 0)
+ (if (and (/= ncomp 1) (/= ncomp 3))
+ (write-marker *M_SOI* out-stream)
+ (prepare-JFIF-stream out-stream))
+ (write-frame-header w h ncomp q-tabs sampling tqv out-stream) ;frame header
+ ;;writing scan header
+ (write-marker *M_SOS* out-stream)
+ (write-byte 0 out-stream) ;length
+ (write-byte (plus 6 (ash ncomp 1)) out-stream)
+ (write-byte ncomp out-stream) ;number of components in the scan
+ (loop for Cj from 0 below ncomp do
+ (write-byte Cj out-stream) ;component ID
+ (write-byte (if (zerop Cj) 0 17) out-stream)) ;TdTa
+ (write-byte 0 out-stream) ;Ss
+ (write-byte 63 out-stream) ;Se
+ (write-byte 0 out-stream) ;AhAl
+
+ (let ((luminance-tabset (list
+ (build-tables *luminance-dc-bits* *luminance-dc-values*)
+ (build-tables *luminance-ac-bits* *luminance-ac-values*)))
+ (chrominance-tabset (list (build-tables *chrominance-dc-bits* *chrominance-dc-values*)
+ (build-tables *chrominance-ac-bits* *chrominance-ac-values*))))
+ (loop for dy fixnum from 0 below h by height do
+ (loop for dx fixnum from 0 below w by width do
+ (multiple-value-bind (xlim ylim)
+ (if (= ncomp 3)
+ (colorspace-convert image YUV dx dy h w height width)
+ (crop-image image YUV dx dy h w height width ncomp))
+ (declare (type fixnum xlim ylim)
+ (dynamic-extent xlim ylim))
+ (loop for comp across YUV
+ for freq in sampling
+ for ifreq across isampling
+ for iH fixnum = (first ifreq)
+ for iV fixnum = (second ifreq)
+ for cn fixnum from 0
+ for hufftabs = (if (zerop cn)
+ luminance-tabset
+ chrominance-tabset)
+ for q-tab = (svref q-tabs (svref tqv cn)) ;choosing appropriate q-table for a component
+ for H fixnum = (first freq)
+ for V fixnum = (second freq) do
+ (subsample comp sampled-buf H V (minus xlim dx) (minus ylim dy) iH iV)
+ (loop for y fixnum from 0 below V
+ for ypos fixnum = (if (> (plus dy (ash y 3)) ylim)
+ (mul (rem (ash ylim -3) V) H)
+ (mul y H)) do
+ (loop for x fixnum from 0 below H
+ for pos fixnum = (if (> (plus dx (ash x 3)) xlim)
+ (plus (rem (ash xlim -3) H) ypos)
+ (plus x ypos)) do
+ (crunch sampled-buf pos q-tab)
+ (setf (svref preds cn)
+ (encode-block (zigzag (svref sampled-buf pos))
+ hufftabs (svref preds cn) out-stream)))))))))
+ (unless (zerop *prev-length*)
+ (write-stuffed (deposit-field #xff ;byte padding & flushing
+ (byte (minus 8 *prev-length*) 0)
+ (ash *prev-byte* (minus 8 *prev-length*)))
+ out-stream))
+ (write-marker *M_EOI* out-stream)))
+
+(defun encode-image (filename image ncomp h w &rest args)
(with-open-file (out-stream filename
:direction :output
:element-type 'unsigned-byte
:if-exists :supersede)
- (when (= ncomp 1)
- (setq sampling '((1 1))))
- (let* ((wd (loop for entry in sampling maximize (first entry)))
- (ht (loop for entry in sampling maximize (second entry)))
- (isampling (convert-sampling sampling wd ht))
- (height (ash ht 3))
- (width (ash wd 3))
- (YUV (make-array ncomp
- :initial-contents
- (loop for i fixnum from 0 below ncomp collecting
- (make-array height
- :initial-contents
- (loop for j fixnum from 0 below height
- collecting (make-array width))))))
- (sampled-buf (make-array (mul ht wd)
- :initial-contents
- (loop for b fixnum from 0 below (mul ht wd)
- collecting (make-array 8
- :initial-contents
- (loop for i fixnum from 0 to 7
- collecting (make-array 8))))))
- (preds (make-array ncomp :initial-element 0))
- (tqv (case ncomp
- (3 #(0 1 1)) ;q-tables destinations for various component numbers
- (1 #(0))
- (2 #(0 1))
- (4 #(0 1 2 3))
- (otherwise (error "Illegal number of components specified")))))
- (cond ((/= ncomp (length sampling))
- (error "Wrong sampling list for ~D component(s)" ncomp))
- ((> (length q-tabs) ncomp)
- (error "Too many quantization tables specified"))
- ((zerop q-factor)
- (error "Q-factor should be nonzero!"))
- ((> (count-relation sampling) 10)
- (error "Invalid sampling specification!")))
- (when (< q-factor 64)
- (let ((q-tabs2 (make-array (length q-tabs)
- :initial-contents
- (loop for k fixnum from 0 below (length q-tabs)
- collecting (make-array 8 :initial-contents
- (loop for i fixnum from 0 to 7
- collecting (make-array 8)))))))
- (loop for entry across q-tabs
- for entry2 across q-tabs2 do
- (loop for x fixnum from 0 to 7 do
- (loop for y fixnum from 0 to 7 do
- (setf (dbref entry2 x y) (the fixnum (dbref entry x y))))))
- (setq q-tabs q-tabs2))
- (loop for entry across q-tabs do ;scaling all q-tables
- (q-scale entry q-factor)))
- (setq *prev-byte* 0)
- (setq *prev-length* 0)
- (if (and (/= ncomp 1) (/= ncomp 3))
- (write-marker *M_SOI* out-stream)
- (prepare-JFIF-stream out-stream))
- (write-frame-header w h ncomp q-tabs sampling tqv out-stream) ;frame header
- ;;writing scan header
- (write-marker *M_SOS* out-stream)
- (write-byte 0 out-stream) ;length
- (write-byte (plus 6 (ash ncomp 1)) out-stream)
- (write-byte ncomp out-stream) ;number of components in the scan
- (loop for Cj from 0 below ncomp do
- (write-byte Cj out-stream) ;component ID
- (write-byte (if (zerop Cj) 0 17) out-stream)) ;TdTa
- (write-byte 0 out-stream) ;Ss
- (write-byte 63 out-stream) ;Se
- (write-byte 0 out-stream) ;AhAl
-
- (let ((luminance-tabset (list
- (build-tables *luminance-dc-bits* *luminance-dc-values*)
- (build-tables *luminance-ac-bits* *luminance-ac-values*)))
- (chrominance-tabset (list (build-tables *chrominance-dc-bits* *chrominance-dc-values*)
- (build-tables *chrominance-ac-bits* *chrominance-ac-values*))))
- (loop for dy fixnum from 0 below h by height do
- (loop for dx fixnum from 0 below w by width do
- (multiple-value-bind (xlim ylim)
- (if (= ncomp 3)
- (colorspace-convert image YUV dx dy h w height width)
- (crop-image image YUV dx dy h w height width ncomp))
- (declare (type fixnum xlim ylim)
- (dynamic-extent xlim ylim))
- (loop for comp across YUV
- for freq in sampling
- for ifreq across isampling
- for iH fixnum = (first ifreq)
- for iV fixnum = (second ifreq)
- for cn fixnum from 0
- for hufftabs = (if (zerop cn)
- luminance-tabset
- chrominance-tabset)
- for q-tab = (svref q-tabs (svref tqv cn)) ;choosing appropriate q-table for a component
- for H fixnum = (first freq)
- for V fixnum = (second freq) do
- (subsample comp sampled-buf H V (minus xlim dx) (minus ylim dy) iH iV)
- (loop for y fixnum from 0 below V
- for ypos fixnum = (if (> (plus dy (ash y 3)) ylim)
- (mul (rem (ash ylim -3) V) H)
- (mul y H)) do
- (loop for x fixnum from 0 below H
- for pos fixnum = (if (> (plus dx (ash x 3)) xlim)
- (plus (rem (ash xlim -3) H) ypos)
- (plus x ypos)) do
- (crunch sampled-buf pos q-tab)
- (setf (svref preds cn)
- (encode-block (zigzag (svref sampled-buf pos))
- hufftabs (svref preds cn) out-stream)))))))))
- (unless (zerop *prev-length*)
- (write-stuffed (deposit-field #xff ;byte padding & flushing
- (byte (minus 8 *prev-length*) 0)
- (ash *prev-byte* (minus 8 *prev-length*)))
- out-stream))
- (write-marker *M_EOI* out-stream))))
+ (apply #'encode-image-stream out-stream image ncomp h w args)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
0
Update of /project/cl-jpeg/cvsroot/cljl
In directory clnet:/tmp/cvs-serv25374
Modified Files:
jpeg.lisp
Log Message:
pending patch applied
--- /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2007/02/23 23:48:36 1.1.1.1
+++ /project/cl-jpeg/cvsroot/cljl/jpeg.lisp 2007/02/24 00:00:12 1.2
@@ -1,6 +1,6 @@
;; -*- Mode: LISP; Package: (JPEG :use (common-lisp)) -*-
;;; Generic Common Lisp JPEG encoder/decoder implementation
-;;; $Id: jpeg.lisp,v 1.1.1.1 2007/02/23 23:48:36 ezaikonnikov Exp $
+;;; $Id: jpeg.lisp,v 1.2 2007/02/24 00:00:12 ezaikonnikov Exp $
;;; Version 1.022, June 1999.
;;; Written by Eugene Zaikonnikov [viking(a)funcall.org]
;;; Copyright [c] 1999, Eugene Zaikonnikov <viking(a)funcall.org>
@@ -59,11 +59,14 @@
;;; to the Independent JPEG Group - colorspace conversion and DCT algorithms were adopted from their sources;
;;; to Jeff Dalton for his wise paper "Common Lisp Pitfalls".
-(defpackage #:jpeg (:use #:common-lisp))
-(in-package #:jpeg)
+(defpackage #:jpeg
+ (:use #:common-lisp)
+ (:export #:encode-image
+ #:decode-stream
+ #:decode-image
+ #:jpeg-to-bmp))
-(eval-when (compile)
- (export '(encode-image decode-image jpeg-to-bmp)))
+(in-package #:jpeg)
(declaim (inline csize write-stuffed quantize get-average zigzag encode-block llm-dct descale crunch colorspace-convert subsample
inverse-llm-dct dequantize upsample extend recieve decode-ac decode-dc decode-block izigzag write-bits))
@@ -651,7 +654,7 @@
;;; Function that maps value into SSSS
(defun csize (n)
- (declare #.*optimize* (type fixnum n val LSB MSB))
+ (declare #.*optimize* (type fixnum n))
(svref *csize* (plus n 1023)))
;;; zigzag ordering
@@ -731,7 +734,7 @@
;;; Encodes block using specified huffman tables, returns new pred (DC prediction value)
;;; and last code written to stream for padding
(defun encode-block (block tables pred s)
- (declare #.*optimize* (type fixnum pred newpred diff dcpos)
+ (declare #.*optimize* (type fixnum pred)
(type (simple-vector *) block))
(let* ((ehufsi-dc (first (first tables)))
(ehufco-dc (second (first tables)))
@@ -740,7 +743,7 @@
(newpred (svref block 0))
(diff (minus newpred pred))
(dcpos (csize diff)))
- (declare (type fixnum pred newpred diff pos)
+ (declare (type fixnum pred newpred diff dcpos)
(dynamic-extent diff dcpos))
;; writing dc code first
(write-bits (svref ehufco-dc dcpos) (svref ehufsi-dc dcpos) s)
@@ -1589,25 +1592,31 @@
(when (= (descriptor-ncomp image) 3)
(inverse-colorspace-convert image))))
+(defun decode-stream (stream)
+ (unless (= (read-marker stream) *M_SOI*)
+ (error "Unrecognized JPEG format"))
+ (let* ((image (make-descriptor))
+ (marker (interpret-markers image 0 stream)))
+ (cond ((= *M_SOF0* marker) (decode-frame image stream)
+ (values (descriptor-buffer image)
+ (descriptor-height image)
+ (descriptor-width image)
+ (descriptor-ncomp image)))
+ (t (error "Unsupported JPEG format")))))
+
;;; Top level decoder function
(defun decode-image (filename)
- (with-open-file
- (s filename :direction :input :element-type 'unsigned-byte)
- (unless (= (read-marker s) *M_SOI*)
- (error "Unrecognized JPEG format"))
- (let* ((image (make-descriptor))
- (marker (interpret-markers image 0 s)))
- (cond ((= *M_SOF0* marker) (decode-frame image s)
- (values (descriptor-buffer image) (descriptor-height image) (descriptor-width image)))
- (t (error "Unsupported JPEG format"))))))
+ (with-open-file (in filename :direction :input :element-type 'unsigned-byte)
+ (decode-stream in)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Here's some useful routines
+;;; Here are some useful routines
;;; Produces outfile (Windows 24-bit bitmap) from a JPEG infile
(defun jpeg-to-bmp (&key infile outfile)
(with-open-file (o outfile :direction :output :element-type 'unsigned-byte)
- (multiple-value-bind (rgb h w)
+ (multiple-value-bind (rgb h w number-components)
(decode-image infile)
(let* ((compl (rem w 4))
(len (+ 54 (* h w 3) (mul compl h))))
@@ -1644,15 +1653,25 @@
(write-byte 24 o) ;bitcount, 24-bit BMP
(write-byte 0 o)
(write-sequence (make-array 24 :initial-element 0 :element-type 'unsigned-byte) o) ;the rest of header
- (loop for y fixnum from (1- h) downto 0
- for ypos fixnum = (* y 3 w) do
- (loop for x fixnum from ypos to (plus ypos (* (1- w) 3)) by 3 do
- (write-byte (the unsigned-byte (svref rgb x)) o)
- (write-byte (the unsigned-byte (svref rgb (1+ x))) o)
- (write-byte (the unsigned-byte (svref rgb (plus 2 x))) o))
- (loop for i fixnum from 0 below compl do ;adjusting to double-word
- (write-byte 0 o)))))))
-
+ (ecase number-components
+ (1
+ (loop :for y :from (1- h) :downto 0 :do
+ (loop :for x :from (1- w) :downto 0 :do
+ (let ((grey (svref rgb (+ x (* y w)))))
+ (write-byte grey o)
+ (write-byte grey o)
+ (write-byte grey o)))
+ (dotimes (i compl)
+ (write-byte 0 o))))
+ (3
+ (loop for y fixnum from (1- h) downto 0
+ for ypos fixnum = (* y 3 w) do
+ (loop for x fixnum from ypos to (plus ypos (* (1- w) 3)) by 3 do
+ (write-byte (the unsigned-byte (svref rgb x)) o)
+ (write-byte (the unsigned-byte (svref rgb (1+ x))) o)
+ (write-byte (the unsigned-byte (svref rgb (plus 2 x))) o))
+ (loop for i fixnum from 0 below compl do ;adjusting to double-word
+ (write-byte 0 o)))))))))
;;; Provides simple user interface for encoder: quality may vary 1 to 5 (decreasing)
1
0
Update of /project/cl-jpeg/cvsroot/cljl/
In directory clnet:/tmp/cvs-serv23338
Log Message:
Import from SF, ver 1.033
Status:
Vendor Tag: cljl
Release Tags: v1
N cljl//LICENSE
N cljl//cl-jpeg.asd
N cljl//jpeg.lisp
N cljl//debian/README.Debian
N cljl//debian/changelog
N cljl//debian/control
N cljl//debian/copyright
N cljl//debian/postinst
N cljl//debian/prerm
N cljl//debian/rules
No conflicts created by this import
1
0