Skip to content

Commit

Permalink
version 0.2.7 - better pre_processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rcanut committed Nov 15, 2022
1 parent 4e146cc commit 34ac769
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
20 changes: 18 additions & 2 deletions encoder/image_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
****************************************************************************
* NHW Image Codec *
* file: image_processing.c *
* version: 0.2.6 *
* last update: $ 11112022 nhw exp $ *
* version: 0.2.7 *
* last update: $ 11152022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down Expand Up @@ -864,6 +864,22 @@ void pre_processing(image_buffer *im)
}
}
}
else if (abs(res)>(sharpness+160) && abs(count)>sharpn2 && abs(count)<=(sharpn2+20))
{
if (!nhw_sharp_on[scan-1] && !nhw_sharp_on[scan])
{
if (res>0 && count>0) im->im_jpeg[scan]--;
else if (res<0 && count<0) im->im_jpeg[scan]++;
}
}
else if (abs(count)>(sharpness+160) && abs(res)>sharpn2 && abs(res)<=(sharpn2+20))
{
if (!nhw_sharp_on[scan-1] && !nhw_sharp_on[scan])
{
if (res>0 && count>0) im->im_jpeg[scan-1]--;
else if (res<0 && count<0) im->im_jpeg[scan-1]++;
}
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions encoder/nhw_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
****************************************************************************
* NHW Image Codec *
* file: nhw_encoder.c *
* version: 0.2.6 *
* last update: $ 11112022 nhw exp $ *
* version: 0.2.7 *
* last update: $ 11152022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down

0 comments on commit 34ac769

Please sign in to comment.