Comments (4)
Hi, and thank you for your interest in PIK :)
A simple ffmpeg -i image.jpg image.yuv needed to compare with other formats will completely ruin the butteraugli score because rgb24 -> yuv420 conversion.
That is to be expected, as 4:2:0 chroma subsampling is indeed a lossy processing step. https://en.wikipedia.org/wiki/Chroma_subsampling#4:2:0 and https://upload.wikimedia.org/wikipedia/commons/0/06/Colorcomp.jpg are examples of the kind of loss that one can expect.
Is there any way to use yuv420p as input to pik?
That is not recommended if one has access to the full original input. A fair comparison would start from the original for all codecs (if they need to subsample it, that’s “their problem”, so to speak), and would compare the decoded image of each codec with that same original image (be it with Butteraugli, by visual inspection…).
Do you have any better settings for h264/hevc/av1?
I believe that at least x264 and x265 support -pix_fmt yuvj444p
. Does that give better results than yuvj420p
? Chroma subsampling is one way to save space, but it’s not necessarily the best, and it’s possible that x264 and x265 may come up with better techniques.
Also, I noticed that the script produces a JPEG file out of the resizing+cropping. Is that intended?
from pik.
from pik.
If you consider that the original is the yuv420p file, the conversion to rgb24 will double the data size.
It will also embed the specific algorithm used for upscaling (it could be considered noise) and pik will(does it?) strive to preserve this info.
There are a lot of real world cases of yuv422p input data.
If you consider that the complexity to support in pik yuv420/yuv422/yuv444/rgb is not worth the effort I can understand that. At least in theory a yuv420p pik image could be 2x times smaller.
All the other codecs support the yuv444, it's just that they are not optimized to it and the files that are already 2x the size of pik will jump to even more.
My script tries to reproduce the case:
I have a jpeg/heif, what is the smallest space that I can store the images with minimum quality loss?
All the new codecs deserve a benchmark! Pik is already very interesting for jpeg archival.
from pik.
Some people developing video codecs have noted that ffmpeg's color conversions are not high quality and not possible to be used for high-quality photography compression. We wrote our own yuv-rgb-yuv conversion and got better results (IIRC, 0.2-0.3 butteraugli score difference).
It was probably true in the past, but now ffmpeg has a lot of plugins that do high quality colorspace conversion. They are usually vary badly documented. I needed to read the source in order to find the magic command line to have full range -> limited range conversion(with colorspace video plugin).
Swscale has also plenty of high quality chroma transformation options that are hard to find/quantify.
Could you point me to the sources of yuv->rgb->yuv with 0.2 butteraugli? I already have that for rgb -> yuvj444->rgb. Do you have it for rgb->yuv420->rgb?
With my custom code that I find to hackish to share in current shape I got rgb->yuv420->rgb to 0.8~0.9 butteraugli. But i'm not happy yet with the coefficients for transformations, there might be some off values that lose quality.
from pik.
Related Issues (20)
- Build with VS is completely broken HOT 7
- PIK means COCK in Danish and Dutch HOT 1
- compilation with gcc 6.3 on cpu without avx2 /sse4.2 HOT 8
- Status of bitstream HOT 1
- compilation issue with MSYS2 under Windows 10 HOT 18
- I don't know how to compiled version 16102018? HOT 3
- compilation issue with mingw-gcc900-20190108 under Windows 10 {PIK(ver. 10012019)} HOT 1
- Add an .editorconfig file to the pik repo HOT 1
- Daily build? HOT 1
- Plugin for Irfanview/Xnview? HOT 2
- Python binding HOT 1
- Allow SIMD usage outside of pik namespace HOT 11
- memory order argument to atomic operation is invalid HOT 1
- duplicate symbol when build static lib
- Questions regarding Browser support HOT 1
- State of the art entropy coding HOT 1
- Don't let Google hurt mankind
- Rdv shit
- The creation of custom providers could be exemplified in more detail. This should also be possible in independent packages that make use of cocoda-sdk:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pik.