[Vm-dev] VM Maker: VMMaker-dtl.292.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Dec 23 01:10:13 UTC 2012
David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.292.mcz
==================== Summary ====================
Name: VMMaker-dtl.292
Author: dtl
Time: 22 December 2012, 8:08:31.613 pm
UUID: 4dfff10c-07cb-457e-89ed-eabf9312a415
Ancestors: VMMaker-eem.291
VMMaker 4.10.6
Fix divideByZero protection in JPEGReaderPlugin (by Nicolas Cellier)
http://lists.squeakfoundation.org/pipermail/vm-dev/2012-December/011671.html
=============== Diff against VMMaker-eem.291 ===============
Item was changed:
----- Method: JPEGReaderPlugin>>nextSampleCb (in category 'decoding') -----
nextSampleCb
| dx dy blockIndex sampleIndex sample curX sx sy |
<inline: true>
dx := curX := cbComponent at: CurrentXIndex.
dy := cbComponent at: CurrentYIndex.
sx := cbComponent at: HScaleIndex.
sy := cbComponent at: VScaleIndex.
+ (sx ~= 0 and: [sy ~= 0]) ifTrue: [
- (sx = 0 and:[sy = 0]) ifFalse:[
dx := dx // sx.
dy := dy // sy.
].
blockIndex := (dy bitShift: -3) * (cbComponent at: BlockWidthIndex) + (dx bitShift: -3).
sampleIndex := ((dy bitAnd: 7) bitShift: 3) + (dx bitAnd: 7).
sample := (cbBlocks at: blockIndex) at: sampleIndex.
curX := curX + 1.
curX < ((cbComponent at: MCUWidthIndex) * 8) ifTrue:[
cbComponent at: CurrentXIndex put: curX.
] ifFalse:[
cbComponent at: CurrentXIndex put: 0.
cbComponent at: CurrentYIndex put: (cbComponent at: CurrentYIndex) + 1.
].
^ sample!
Item was changed:
----- Method: JPEGReaderPlugin>>nextSampleCr (in category 'decoding') -----
nextSampleCr
| dx dy blockIndex sampleIndex sample curX sx sy |
<inline: true>
dx := curX := crComponent at: CurrentXIndex.
dy := crComponent at: CurrentYIndex.
sx := crComponent at: HScaleIndex.
sy := crComponent at: VScaleIndex.
+ (sx ~= 0 and: [sy ~= 0]) ifTrue: [
- (sx = 0 and:[sy = 0]) ifFalse:[
dx := dx // sx.
dy := dy // sy.
].
blockIndex := (dy bitShift: -3) * (crComponent at: BlockWidthIndex) + (dx bitShift: -3).
sampleIndex := ((dy bitAnd: 7) bitShift: 3) + (dx bitAnd: 7).
sample := (crBlocks at: blockIndex) at: sampleIndex.
curX := curX + 1.
curX < ((crComponent at: MCUWidthIndex) * 8) ifTrue:[
crComponent at: CurrentXIndex put: curX.
] ifFalse:[
crComponent at: CurrentXIndex put: 0.
crComponent at: CurrentYIndex put: (crComponent at: CurrentYIndex) + 1.
].
^ sample!
Item was changed:
----- Method: JPEGReaderPlugin>>nextSampleFrom:blocks: (in category 'decoding') -----
nextSampleFrom: aComponent blocks: aBlockArray
| dx dy blockIndex sampleIndex sample curX sx sy |
<var: #aComponent type: 'int *'>
<var: #aBlockArray type: 'int **'>
<inline: true>
dx := curX := aComponent at: CurrentXIndex.
dy := aComponent at: CurrentYIndex.
sx := aComponent at: HScaleIndex.
sy := aComponent at: VScaleIndex.
+ (sx ~= 0 and: [sy ~= 0]) ifTrue: [
- (sx = 0 and:[sy = 0]) ifFalse:[
dx := dx // sx.
dy := dy // sy.
].
blockIndex := (dy bitShift: -3) * (aComponent at: BlockWidthIndex) + (dx bitShift: -3).
sampleIndex := ((dy bitAnd: 7) bitShift: 3) + (dx bitAnd: 7).
sample := (aBlockArray at: blockIndex) at: sampleIndex.
curX := curX + 1.
curX < ((aComponent at: MCUWidthIndex) * 8) ifTrue:[
aComponent at: CurrentXIndex put: curX.
] ifFalse:[
aComponent at: CurrentXIndex put: 0.
aComponent at: CurrentYIndex put: (aComponent at: CurrentYIndex) + 1.
].
^ sample!
Item was changed:
----- Method: JPEGReaderPlugin>>nextSampleY (in category 'decoding') -----
nextSampleY
| dx dy blockIndex sampleIndex sample curX sx sy |
<inline: true>
dx := curX := yComponent at: CurrentXIndex.
dy := yComponent at: CurrentYIndex.
sx := yComponent at: HScaleIndex.
sy := yComponent at: VScaleIndex.
+ (sx ~= 0 and: [sy ~= 0]) ifTrue: [
- (sx = 0 and:[sy = 0]) ifFalse:[
dx := dx // sx.
dy := dy // sy.
].
blockIndex := (dy bitShift: -3) * (yComponent at: BlockWidthIndex) + (dx bitShift: -3).
sampleIndex := ((dy bitAnd: 7) bitShift: 3) + (dx bitAnd: 7).
sample := (yBlocks at: blockIndex) at: sampleIndex.
curX := curX + 1.
curX < ((yComponent at: MCUWidthIndex) * 8) ifTrue:[
yComponent at: CurrentXIndex put: curX.
] ifFalse:[
yComponent at: CurrentXIndex put: 0.
yComponent at: CurrentYIndex put: (yComponent at: CurrentYIndex) + 1.
].
^ sample!
Item was changed:
----- Method: VMMaker class>>versionString (in category 'version testing') -----
versionString
"VMMaker versionString"
+ ^'4.10.6'!
- ^'4.10.5'!
More information about the Vm-dev
mailing list