Skip to content

Commit

Permalink
index fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oguyon committed Aug 16, 2024
1 parent b713b96 commit bb37932
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/COREMOD_arith/image_multicrop2D.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,21 +438,19 @@ static errno_t compute_function()


uint32_t iimax = *wcropxsize[cropwindow];
if ( iimax + *wcropxstart[cropwindow] > (*outxsize))
if ( iimax + *wcropxpos[cropwindow] > (*outxsize))
{
iimax = (*outxsize) - *wcropxstart[cropwindow];
iimax = (*outxsize) - *wcropxpos[cropwindow];
}

if ( iimax + *wcropxpos[cropwindow] > imgin.md->size[0])
if ( iimax + *wcropxstart[cropwindow] > imgin.md->size[0])
{
iimax = imgin.md->size[0] - *wcropxpos[cropwindow];
iimax = imgin.md->size[0] - *wcropxstart[cropwindow];
}






for(uint32_t jj = 0; jj < jjmax; jj++)
{
uint64_t indjj = jj + (*wcropystart[cropwindow]);
Expand Down

0 comments on commit bb37932

Please sign in to comment.