osamu620 / jpegenc Goto Github PK
View Code? Open in Web Editor NEWAn implementation of JPEG-1 Encoder in C++ with SIMD optimization
License: MIT License
An implementation of JPEG-1 Encoder in C++ with SIMD optimization
License: MIT License
Hello again @osamu620, it is great to see your nice SIMD code :)
We'd be happy to link to your project from the Highway readme.
Some thoughts on the code, in the hope that they are useful:
In quantization.cc and block_coding.cpp maybe we could HWY_DYNAMIC_DISPATCH
only once because it is an indirect function call, which is relatively expensive. We could move the for(;;) loop inside quantize_fwd?
In dct.cpp, ZipLower(s32, ..)
is the same as BitCast(s32, InterleaveLower(s16, ..))
and it could shorten the code a bit.
In color.cpp, it looks like coeffs is 8 int16 constants, and then copied into each 128-bit block.
We can shrink the array to 8 elements if we use hn::LoadDup128
to load it. And Broadcast<>
could be used instead of BroadcastLane<>
: it is a bit cheaper on AVX2 because it is allowed to assume that all 128-bit blocks are equal, which is true here.
I'm also curious whether you see anything we can improve or better document in the Highway library?
Currently, there is a restriction to the size of input images; width and height shall be multiple of 16.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.