From 6cc61971779f4456aee6617c538e0f544b2a3f53 Mon Sep 17 00:00:00 2001 From: Raphael Canut Date: Wed, 24 Jan 2024 20:36:52 +0100 Subject: [PATCH] version 0.3.0-rc10 Continue to fine-tune the nhw_kernel weights and pre_processing --- encoder/image_processing.c | 15 +++++++++++---- encoder/nhw_encoder_cli.c | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/encoder/image_processing.c b/encoder/image_processing.c index 3ae4375..5f4d1ec 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-rc9 * -* last update: $ 01192024 nhw exp $ * +* version: 0.3.0-rc10 * +* last update: $ 01242024 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,count,e=0,f=0,a=0,sharpness=0,sharpn2=0,n1,t,t1,t2,t3,t4,t5; + int i,j,scan,res,res2,res3,count,e=0,f=0,a=0,sharpness=0,sharpn2=0,n1,t,t1,t2,t3,t4,t5,t6; short *nhw_process, *nhw_kernel; char lower_quality_setting_on, *nhw_sharp_on; @@ -597,7 +597,7 @@ void pre_processing(image_buffer *im) else if (im->setup->quality_setting==LOW19) n1=60; - for (i=(2*IM_DIM),res3=0,a=0,t1=0,t2=0,t3=0,t4=0,t5=0;i<((4*IM_SIZE)-(2*IM_DIM));i+=(2*IM_DIM)) + for (i=(2*IM_DIM),res3=0,a=0,t1=0,t2=0,t3=0,t4=0,t5=0,t6=0;i<((4*IM_SIZE)-(2*IM_DIM));i+=(2*IM_DIM)) { for (scan=i+1,j=1;j<((2*IM_DIM)-1);j++,scan++) { @@ -726,6 +726,13 @@ void pre_processing(image_buffer *im) } } } + else if (res2==(sharpn2+21) && im->setup->quality_setting<=LOW4) + { + if (!t6) nhw_kernel[scan] = 7000; + else nhw_kernel[scan] = res2; + + t6++; + } else nhw_kernel[scan] = res2; } else nhw_kernel[scan]=0; diff --git a/encoder/nhw_encoder_cli.c b/encoder/nhw_encoder_cli.c index e67b151..9f65fb0 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-rc9 * -* last update: $ 01192024 nhw exp $ * +* version: 0.3.0-rc10 * +* last update: $ 01242024 nhw exp $ * * * **************************************************************************** **************************************************************************** @@ -50,7 +50,7 @@ #include "codec.h" #define PROGRAM "nhw-enc" -#define VERSION "0.3.0-rc9" +#define VERSION "0.3.0-rc10" #define NHW_QUALITY_MIN LOW20 #define NHW_QUALITY_MAX HIGH3