Skip to content

Commit

Permalink
version 0.2.6 - better pre_processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rcanut committed Nov 11, 2022
1 parent 3296bab commit 4e146cc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
20 changes: 17 additions & 3 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.5 *
* last update: $ 11042022 nhw exp $ *
* version: 0.2.6 *
* last update: $ 11112022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down Expand Up @@ -831,7 +831,21 @@ void pre_processing(image_buffer *im)

count= nhw_kernel[scan];

if (abs(res)>(sharpness+56) && abs(count)>(sharpness+56))
if (abs(res)>sharpness && abs(res)<=(sharpness+20) && abs(count)>sharpness && abs(count)<=(sharpness+20) )
{
if (!nhw_sharp_on[scan-1] && !nhw_sharp_on[scan])
{
if (res>0 && count<0)
{
im->im_jpeg[scan-1]++;im->im_jpeg[scan]--;
}
else if (res<0 && count>0)
{
im->im_jpeg[scan-1]--;im->im_jpeg[scan]++;
}
}
}
else if (abs(res)>(sharpness+56) && abs(count)>(sharpness+56))
{
if (!nhw_sharp_on[scan-1] && !nhw_sharp_on[scan])
{
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.5 *
* last update: $ 11042022 nhw exp $ *
* version: 0.2.6 *
* last update: $ 11112022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down

0 comments on commit 4e146cc

Please sign in to comment.