diff --git a/encoder/image_processing.c b/encoder/image_processing.c index 78288d5..4864bb0 100644 --- a/encoder/image_processing.c +++ b/encoder/image_processing.c @@ -2,8 +2,8 @@ **************************************************************************** * NHW Image Codec * * file: image_processing.c * -* version: 0.3.0-rc20 * -* last update: $ 09082024 nhw exp $ * +* version: 0.3.0-rc21 * +* last update: $ 09132024 nhw exp $ * * * **************************************************************************** **************************************************************************** @@ -557,7 +557,7 @@ void im_recons_wavelet_band(image_buffer *im) void pre_processing(image_buffer *im) { - int i,j,scan,res,res2,res3,res4,count,e=0,f=0,a=0,sharpness=0,sharpn2=0,n1,t,t1,t2,t3,t4,t5,t6,t7; + int i,j,scan,res,res2,res3,res4,count,e=0,f=0,a=0,sharpness=0,sharpn2=0,n1,t,t1,t2,t3,t4,t5,t6,t7,t8; int nps,w1,w2,w3,w4,w5,w6,w7,w8; short *nhw_process, *nhw_kernel; char lower_quality_setting_on, *nhw_sharp_on; @@ -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,t2=0,t3=0,t4=0,t5=0,t6=8,t7=0;i<((4*IM_SIZE)-(2*IM_DIM));i+=(2*IM_DIM)) + for (i=(2*IM_DIM),t1=0,t2=0,t3=0,t4=0,t5=0,t6=8,t7=0,t8=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++) { @@ -930,12 +930,30 @@ void pre_processing(image_buffer *im) } t4 = 0; + + t8 = 0; } + else if (t1>=15) + { + if (!t4) t8++; + else t8 = 0; + + t1++; + } else t1++; - if (t1>15) + if (t8>6 && !t4 && t1>1 && t1<15) + { + t1 = 0; + + //t8 = 0; + } + + if (t1>15) { - t1 = 0;t4 = 0; + t1 = 0; + + t4 = 0; } } diff --git a/encoder/nhw_encoder_cli.c b/encoder/nhw_encoder_cli.c index d998085..1d5fbb2 100644 --- a/encoder/nhw_encoder_cli.c +++ b/encoder/nhw_encoder_cli.c @@ -2,8 +2,8 @@ **************************************************************************** * NHW Image Codec * * file: nhw_encoder_cli.c * -* version: 0.3.0-rc20 * -* last update: $ 09082024 nhw exp $ * +* version: 0.3.0-rc21 * +* last update: $ 09132024 nhw exp $ * * * **************************************************************************** **************************************************************************** @@ -50,7 +50,7 @@ #include "codec.h" #define PROGRAM "nhw-enc" -#define VERSION "0.3.0-rc20" +#define VERSION "0.3.0-rc21" #define NHW_QUALITY_MIN LOW20 #define NHW_QUALITY_MAX HIGH3