Well I got five questions 1). what have I missed, too easy so far? 2) does
CL have functions to directly manage the data segment memory? 3). what
functionality would you except from a JPEG reader.....(changing the size of
that sucker might not be fun unless it just involved cropping, changing to
other file formats would be less than fun) 4). does unix or what every ?nix
handle graphic windowing as DOS does? 5). anybody want to port it to CL
when i'm finished?
Kinda makes ya laugh...been here before. Things are going great, looking
like a shoe in......till the shoe drops.
Waiting for the shoe to drop
Rusty
PS It is a lot faster to write directly to memory and handle the areas with
varible names and offsets than it is to build arrays or tables in muLisp.
Of course that is not too lisp like i guess. The biggest scan line i found
coould be handled in an array with no problems, but I haven't look at many
JPEG's yet. The point is I am keeping the memory write functions very
array looking if someone does want to port it to CL and use arrays.
--
Email address is RCCr...@flash.net. Under some situation the "a" and the
"l" in flash are reversed in the header.
Rusty Craine
| PS It is a lot faster to write directly to memory and handle the areas with
| varible names and offsets than it is to build arrays or tables in muLisp.
| Of course that is not too lisp like i guess. The biggest scan line i found
| coould be handled in an array with no problems, but I haven't look at many
| JPEG's yet. The point is I am keeping the memory write functions very
| array looking if someone does want to port it to CL and use arrays.
Before you start micro-optimizing your code too early, I'd suggest doing
the easiest thing for allocation, etc. You will find that you are
spending most of the time in two routines: the IDCT and the colorspace
conversion, and that what you do in other places really doesn't matter
much to the overall runtime.
--
-- Tim Olson
"rusty craine" <rccr...@flash.net> writes:
> handle graphic windowing as DOS does? 5). anybody want to port it to CL
> when i'm finished?
>
> Kinda makes ya laugh...been here before. Things are going great, looking
> like a shoe in......till the shoe drops.
>
> Waiting for the shoe to drop
> Rusty
>
> PS It is a lot faster to write directly to memory and handle the areas with
> varible names and offsets than it is to build arrays or tables in muLisp.
> Of course that is not too lisp like i guess. The biggest scan line i found
> coould be handled in an array with no problems, but I haven't look at many
> JPEG's yet. The point is I am keeping the memory write functions very
> array looking if someone does want to port it to CL and use arrays.
If you were using CL in the first place, you'd have arrays from the
start. :)
Cheers
--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - (0)6 - 68 10 03 17, fax. +39 - (0)6 - 68 80 79 26
http://www.parades.rm.cnr.it
>Before you start micro-optimizing your code too early, I'd suggest doing
>the easiest thing for allocation, etc. You will find that you are
>spending most of the time in two routines: the IDCT and the colorspace
>conversion, and that what you do in other places really doesn't matter
>much to the overall runtime.
> -- Tim Olson
To be honest I wasn't really tring to optimize at this point. Thu I haven't
put at lot of thought into it yet, dealing directly with memory seemed like
the easiest way to deal with a bit-buffer and a look-ahead-bit-reader to
fetch the next Huffman symbol. Since 95% of the Huffman codes are 8 bits or
fewer long and since my memory pointer is going to point to 8 bits at a time
the exception will be easy to handle in a lisp loop. hmmm I guess I could
always put the bit pattern in to a "float" and use mask and shifts to get
the symbol. Sounds like you have dealt with jpeg before and I am open to
suggestions.
Thanks
Rusty
| To be honest I wasn't really tring to optimize at this point. Thu I haven't
| put at lot of thought into it yet, dealing directly with memory seemed like
| the easiest way to deal with a bit-buffer and a look-ahead-bit-reader to
| fetch the next Huffman symbol. Since 95% of the Huffman codes are 8 bits or
| fewer long and since my memory pointer is going to point to 8 bits at a time
| the exception will be easy to handle in a lisp loop. hmmm I guess I could
| always put the bit pattern in to a "float" and use mask and shifts to get
| the symbol.
I wrote an implementation in Smalltalk. The bitBuffer was simply an
integer to which I shifted in 8 bits from the Huffman-encoded byte stream
whenever the available number of bits dropped to 16 or less:
getBits: requestedBits
| value |
requestedBits > bitsInBuffer
ifTrue:
[self fillBuffer.
requestedBits > bitsInBuffer
ifTrue:
[self error: 'not enough bits available to decode']].
value := bitBuffer >> (bitsInBuffer - requestedBits).
bitBuffer := bitBuffer bitAnd: (1 << (bitsInBuffer - requestedBits) -1).
bitsInBuffer := bitsInBuffer - requestedBits.
^ value
fillBuffer
| byte |
[bitsInBuffer <= 16]
whileTrue:
[byte := self next.
(byte = 16rFF and: [(stream peekFor: 16r00) not])
ifTrue:
[stream position: stream position - 1.
^0].
bitBuffer := bitBuffer << 8 bitOr: byte.
bitsInBuffer := bitsInBuffer + 8].
^ bitsInBuffer
--
-- Tim Olson
% Kinda makes ya laugh...been here before. Things are going great, looking
% like a shoe in......till the shoe drops.
%
% Waiting for the shoe to drop
I know of at least two sources for JPEG code. Kodak has an encoder
and decoder written in Java included in the JDK 1.2b4 distribution.
There is C code included in the SuSE 5.3 distribution of Linux for
JPEG and MPEG that is from the source, so to speak.
I just wish the DVD format specification would be made public. There
is also the question of DVD hardware not having a public API so that
DVD software can be written for Linux without shelling out $5000 USD
and signing an NDA.
--
David Steuber (ver 1.31.3a)
http://www.david-steuber.com
To reply by e-mail, replace trashcan with david.
May the source be with you...
I had no idea that were over a dozen different codings. If I'm going to all
this work I want someone to be able to use it besides me. We get our
yearly bonus at work tomorrow; guess I'll get one of the commerical CL's
(personal). I think Franz and Harlequin both make a personal CL for the PC
WIN9?....so which one will it be. got any thoughts. [geeez then maybe I
can play with Marco A. :-)].
BTW that is a thought Marco which lisp do you use? Are you one of those
MacApple guys? Never used a Mac except for McDonalds! "We deserve a break
today at McDon.......". Nah I'll bet your a unix guys or as Dilbert put it
a eunuchs. Gee that is giving up a lot to compute, either way you spell it.
been looking at this screen toooo long
Rusty
% ps the picture is jill ireland in a swimming suit. if you are
% going to work on a pic should be a good one.
Another test pic you might use is this one:
http://www.david-steuber.com/pix/gallery/watersportsgirl.jpg
I'm kind of partial to it as I was the photographer. I haven't
updated my photo gallery yet with other pictures and links.