Skip to content

Commit

Permalink
version 0.2.5 - better pre_processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rcanut committed Nov 4, 2022
1 parent 7b833eb commit 3296bab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 13 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.4 *
* last update: $ 10232022 nhw exp $ *
* version: 0.2.5 *
* last update: $ 11042022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down Expand Up @@ -837,6 +837,17 @@ void pre_processing(image_buffer *im)
{
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+96) && abs(count)>(sharpness+96))
{
if (res>0 && count>0)
{
if (res>count) im->im_jpeg[scan-1]++;else im->im_jpeg[scan]++;
}
else if (res<0 && count<0)
{
if (res<count) im->im_jpeg[scan-1]--;else im->im_jpeg[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.4 *
* last update: $ 10232022 nhw exp $ *
* version: 0.2.5 *
* last update: $ 11042022 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down

0 comments on commit 3296bab

Please sign in to comment.