Ignore int16 overflows.
This commit is contained in:
parent
bc635bc3da
commit
d1780825e3
1 changed files with 2 additions and 2 deletions
|
@ -770,8 +770,6 @@ proc idctBlock(component: var Component, offset: int, data: array[64, int16]) =
|
||||||
component.channel.data[outPos + 3] = clampByte((x3 + t0) shr 17)
|
component.channel.data[outPos + 3] = clampByte((x3 + t0) shr 17)
|
||||||
component.channel.data[outPos + 4] = clampByte((x3 - t0) shr 17)
|
component.channel.data[outPos + 4] = clampByte((x3 - t0) shr 17)
|
||||||
|
|
||||||
{.pop.}
|
|
||||||
|
|
||||||
proc decodeBlock(state: var DecoderState, comp, row, column: int) =
|
proc decodeBlock(state: var DecoderState, comp, row, column: int) =
|
||||||
## Decodes a block.
|
## Decodes a block.
|
||||||
var data = state.components[comp].blocks[row][column]
|
var data = state.components[comp].blocks[row][column]
|
||||||
|
@ -908,6 +906,8 @@ proc magnifyYBy2(mask: Mask): Mask =
|
||||||
result[x, y * 2 + 0] = mask[x, y] div 2 + mask[x, y-1] div 2
|
result[x, y * 2 + 0] = mask[x, y] div 2 + mask[x, y-1] div 2
|
||||||
result[x, y * 2 + 1] = mask[x, y] div 2 + mask[x, y+1] div 2
|
result[x, y * 2 + 1] = mask[x, y] div 2 + mask[x, y+1] div 2
|
||||||
|
|
||||||
|
{.pop.}
|
||||||
|
|
||||||
proc buildImage(state: var DecoderState): Image =
|
proc buildImage(state: var DecoderState): Image =
|
||||||
## Takes a jpeg image object and builds a pixie Image from it.
|
## Takes a jpeg image object and builds a pixie Image from it.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue