Giter Club home page Giter Club logo

nhwcodec's People

Contributors

rcanut avatar tansy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nhwcodec's Issues

Double for Codec

Can you recommend the some documents of this codec exclude the code. I want to make sure whether there are some ways get the better results than bpg codec. Or have you compare the result at same bpp using other codec, for example bpg(using PSNR、SSIM、MS-SSIM).

Separate CLI from library

I want to suggets some changes in this program.
It shouldd work as a client to the "server", a library, which provides routines to en/decode image/s.
Main CLI (Command Line Interface) would be a simple program that would only deal with reading/writing files and processing arguments and processing images would be done by library, (more or less as it is in nhw-encoder) preferably in memory, and cli-client would only call necessary routines.
Check BALZ source and crush, and libcrush to see what I mean.

First - command line interface: use input and output instaead of automatic naming.

$ nhw-dec <file.nhw> <file.bmp>

You don't know what user wants and don't want to be smarter than them. They know what they do.

decode_image() and parse_file to use string instead od argv**.

decode_image(): instead of decode_image(image_buffer *im,decode_state *os,char *file_name) it should rather go like this: decode_image(decode_state *os, image_buffer *im) and there would be write_image(decode_state *os, image_buffer *im, char* file_name)

Process image in memory, and share state/context structure beteen functions. Have designated functions to read/write from file to/from memory rather than doing hundreds of disk reads/writes (with fread/fwrite). For reference check crush and libcrush linked above.

compile error due to typo

compiling with gcc on Linux, one get the following error:

nhw_encoder.c: In function ‘write_compressed_file’:
nhw_encoder.c:2663:29: warning: passing argument 2 of ‘fwrite’ makes integer from pointer without a cast [-Wint-conversion]
fwrite(enc->nhw_char_res1,enc->nhw_char_res1_len,2,compressed);
^~~
In file included from nhw_encoder.c:46:0:
/usr/include/stdio.h:717:15: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘short unsigned int *’
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
^~~~~~
wavelet_filterbank.c: In function ‘wavelet_synthesis_high_quality_settings’:
wavelet_filterbank.c:617:24: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
enc->nhw_char_res1_len=res;

The fix is easy: nhw_char_res1_len field should be a 'size_t', not 'unsigned short *' at encoder/codec.h:145

Patch attached.

skal/

0001-fix-compilation.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.