jpeg plugin problems

Mark Guzdial guzdial at cc.gatech.edu
Thu Jun 8 18:29:59 UTC 2000


Eric is a GaTech Squeaker trying to speed up JPEG performance with a 
plugin, but he's having trouble creating his plugin.  Can any of the 
plugin experts on the list give him a hand, please?

Thanks!
  Mark

>Date: Thu, 8 Jun 2000 14:04:34 -0400 (EDT)
>From: Eric Joseph Hudson <eric138 at cc.gatech.edu>
>To: squeakers at cc.gatech.edu
>Subject: [squeakers] more jpeg plugin problems
>Sender: owner-squeakers at cc.gatech.edu
>Reply-To: squeakers at cc.gatech.edu
>
>i'm having problems writing my plugin for the JPEGReadWriter. I'm currently
>writting the plugin for the color mapping, and when it tries to calculate
>the first 8 bit block in the jpeg's table it immediately crashes. Each jpeg
>has a quantization table which is an array of arrays of integers. And for
>each block it accesses one of those arrays and stores into another array
>of what it mapped for that color. So for the plugin i'm writting, the
>variables used are:
>
>passed in values:
>anArray (array of integers) and aColorComponent (has the stuff
>for the color)
>
>and the temp variables in the method are:
>qt - an array. One of the arrays in the jpegs quantization table.
>ws - an array for the size of the 8 bit block (8x8 = 64) to store into.
>and a lot of temp variables (all SmallIntegers) used to calculate the
>color mapping.
>
>Here's the method that crashes:
>primJPEGReadWriterIdctBlockIntcomponent": anArray component: aColorComponent"
>
>| qt, ws, "bunch of local integers" |
>
>"declarations of non small integer types"
> self var: #rcvr declareC: 'int *rcvr'.
> self var: #qTable declareC: 'int **qTable'.
> self var: #ws declareC: 'int *ws'.
> self var: #qt declareC: 'int *qt'.
> self var: #anArray declareC: 'int *anArray'.
>
>"the qTable is the instance variable of the JPEG and ws and qt are local
>to this method"
>
> rcvrOop := interpreterProxy stackObjectValue: 2.
> aColorComponent := interpreterProxy stackObjectValue: 0.
> anArrayObj := interpreterProxy stackObjectValue: 1.
> anArray := self cCoerce: (interpreterProxy
>			arrayValueOf: anArrayObj) to: 'int *'.
> rcvr := self cCoerce: (interpreterProxy
>			firstIndexableField: rcvrOop) to: 'int *'.
>
> qTable := self fetchArray: 4 ofObject: rcvr.
>
>"where qTable is the fourth (0 index based) instance variable of the JPEG."
>
>then it goes on calculating all the stuff.
>
>
>in JPEGReadWriter>>idctBlockInt:component:
>
>< primitive: 'primJPEGReadWriterIdctBlockIntcomponent'
>module: 'JPEGReadWriterPlugin'>
>^JPEGReadWriterPlugin
>doPrimitive: 'primJPEGReadWriterIdctBlockIntcomponent'
>
>which calls the above plugin but then crashes. Am i declaring the
>arrays or any other variable in the plugin wrong?
>here's a link to the website i have all the code for the plugin:
>http://www.prism.gatech.edu/~gte092h/cs3901/primitives.html
>
>thanks in advance for any help.
>
>-eric joseph hudson <eric138 at cc.gatech.edu>

--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
Associate Professor - Learning Sciences & Technologies.
Collaborative Software Lab - http://coweb.cc.gatech.edu/csl/
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list