Skip to content

Commit

Permalink
version 0.3.0-rc17
Browse files Browse the repository at this point in the history
Continue to fine-tune the nhw_kernel weights
  • Loading branch information
rcanut committed Aug 18, 2024
1 parent 0fa58fc commit 701d82a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 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.3.0-rc16 *
* last update: $ 08152024 nhw exp $ *
* version: 0.3.0-rc17 *
* last update: $ 08182024 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down Expand Up @@ -767,7 +767,7 @@ void pre_processing(image_buffer *im)

if (im->setup->quality_setting<=LOW4) nhw_sharp_on=(char*)calloc(4*IM_SIZE,sizeof(char));

for (i=(2*IM_DIM),t1=0;i<((4*IM_SIZE)-(2*IM_DIM));i+=(2*IM_DIM))
for (i=(2*IM_DIM),t1=0,t2=0;i<((4*IM_SIZE)-(2*IM_DIM));i+=(2*IM_DIM))
{
for (scan=i+1,j=1;j<((2*IM_DIM)-2);j++,scan++)
{
Expand Down Expand Up @@ -854,18 +854,21 @@ void pre_processing(image_buffer *im)
}

t1 = 1;

}
else
{
if (abs(res)>sharpness)
{
if (res>0) im->im_jpeg[scan-1]++;else im->im_jpeg[scan-1]--;

t1++;
}

if (abs(count)>sharpness)
{
if (count>0) im->im_jpeg[scan]++;else im->im_jpeg[scan]--;

t1++;
}

if (t1==1) t1 = 2;
Expand All @@ -876,6 +879,12 @@ void pre_processing(image_buffer *im)
else if (t1==6) t1 = 7;
else if (t1==7) t1 = 8;
else if (t1==8) t1 = 9;
else if (t1==9) t1 = 10;
else if (t1==10) t1 = 11;
else if (t1==11) t1 = 12;
else if (t1==12) t1 = 13;
else if (t1==13) t1 = 14;
else if (t1==14) t1 = 15;
else t1 = 0;
}

Expand Down
6 changes: 3 additions & 3 deletions encoder/nhw_encoder_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
****************************************************************************
* NHW Image Codec *
* file: nhw_encoder_cli.c *
* version: 0.3.0-rc16 *
* last update: $ 08152024 nhw exp $ *
* version: 0.3.0-rc17 *
* last update: $ 08182024 nhw exp $ *
* *
****************************************************************************
****************************************************************************
Expand Down Expand Up @@ -50,7 +50,7 @@
#include "codec.h"

#define PROGRAM "nhw-enc"
#define VERSION "0.3.0-rc16"
#define VERSION "0.3.0-rc17"

#define NHW_QUALITY_MIN LOW20
#define NHW_QUALITY_MAX HIGH3
Expand Down

0 comments on commit 701d82a

Please sign in to comment.