]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/images/jpeg/jpeg.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / images / jpeg / jpeg.factor
index ca3ea8d2b456ca28988641537f1a29309938cd60..ec7a70b656eac61db3567a8e1d06a65126780b64 100644 (file)
@@ -229,8 +229,8 @@ MEMO: dct-matrix-blas ( -- m ) dct-matrix >float-blas-matrix ;
     ] with each^2 ;
 
 : sign-extend ( bits v -- v' )
-    swap [ ] [ 1- 2^ < ] 2bi
-    [ -1 swap shift 1+ + ] [ drop ] if ;
+    swap [ ] [ 1 - 2^ < ] 2bi
+    [ -1 swap shift 1 + + ] [ drop ] if ;
 
 : read1-jpeg-dc ( decoder -- dc )
     [ read1-huff dup ] [ bs>> bs:read ] bi sign-extend ;
@@ -245,7 +245,7 @@ MEMO: dct-matrix-blas ( -- m ) dct-matrix >float-blas-matrix ;
     0 :> k!
     [
         color ac-huff-table>> read1-jpeg-ac
-        [ first 1+ k + k! ] [ second k coefs set-nth ] [ ] tri
+        [ first 1 + k + k! ] [ second k coefs set-nth ] [ ] tri
         { 0 0 } = not
         k 63 < and
     ] loop