Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossless image compression #59

Open
birdie-github opened this issue Apr 27, 2021 · 8 comments
Open

Lossless image compression #59

birdie-github opened this issue Apr 27, 2021 · 8 comments
Labels
enhancement New feature or request library Concerns the VVenC library wontfix This will not be worked on

Comments

@birdie-github
Copy link

I've no idea how to make vvcenc losslessly compress images since I want to preserve the entire color space (RGB888). Any clues?

I'd love to use something like YUV444_10 which at least minimizes color space loss but even this format is not available:

Error parsing option "format,c" with argument "yuv444_10".
@adamjw24
Copy link
Member

For now vvenc does not support either lossless compression nor other chroma subsampling than 420. The support is not planned in the near future.

@adamjw24 adamjw24 added enhancement New feature or request wontfix This will not be worked on library Concerns the VVenC library labels May 24, 2022
@jungleboynx
Copy link

jungleboynx commented Sep 14, 2024

True lossless is usually Intra frames only (no P or B frames) at a low quantization in 4:2:2 or 4:4:4 and possibly 10bit as well.
Obviously non of this is possible with VVenC at present and is unlikely to be in future except for the 4:2:2 and 4:4:4.
The next best thing is to use a low quantizer like QP 10 - this should give an average I-SLICE quantizer of about zero.
If you want proper lossless then use x264 with 'I' frames only or 'I' and 'P' only (no 'B') and a very low CRF quantizer.

@ValeZAA
Copy link

ValeZAA commented Sep 14, 2024

True lossless is usually Intra frames only (no P or B frames)

That is false.

@birdie-github
Copy link
Author

True lossless is usually Intra frames only (no P or B frames)

x265 has got a "true" (why do you call it "true"? It's either lossless or lossy, there's nothing in between) lossless mode and I've used it on several occasions.

@ValeZAA
Copy link

ValeZAA commented Sep 14, 2024

True lossless is usually Intra frames only (no P or B frames)

x265 has got a "true" (why do you call it "true"? It's either lossless or lossy, there's nothing in between) lossless mode and I've used it on several occasions.

VP9, AV1 (only aom), x265, and best of them x264 all have many different compression ratio true mathemtically lossless mode. AVIF too, you can spend more time encoding avif and it will be smaller AVIF that is same md5 of 420 plane.

@jungleboynx
Copy link

jungleboynx commented Sep 24, 2024

Having a ib-ratio parameter (similar to ip-ratio and pb-ratio in x264/5) would be useful to reduce the difference between B frame and I-SLICE quantizers. This would allow the ratio to be reduced to say 1.0:1

When --tune film or --tune grain is used in x264/5 then ip-ratio and pb-ratio are reduced along with aq-step to lower the difference in quantizer between frames but it also increases bitrate.

@adamjw24
Copy link
Member

You could try playing with the IntraQPOffset parameter, which is the QP offset of I-frames (default =-3). If you set to closer to 0, the IB-ratio would get smaller.

@jungleboynx
Copy link

Thanks - I'll give it a go sometime when I get some nice grainy/noisy source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request library Concerns the VVenC library wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants
@birdie-github @adamjw24 @ValeZAA @jungleboynx and others