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

How to use libheif correctly? #1410

Closed
Jamaika1 opened this issue Nov 24, 2024 · 7 comments
Closed

How to use libheif correctly? #1410

Jamaika1 opened this issue Nov 24, 2024 · 7 comments

Comments

@Jamaika1
Copy link
Contributor

I admit that I haven't used the new 10bit codecs from libheif for a long time?

I don't know what the h264 decoder is supposed to be used for.

heifenc_08bit_avx.exe image_48bit.png --verbose -q 100 -e kvazaar --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_kvazaar_08bit.heic
--- construct_pipeline
from: colorspace=RGB chroma=RGB bpp(R)=8 alpha=no
to: colorspace=YCbCr chroma=420 bpp(R)=8 alpha=no matrix-coefficients=6 colour-primaries=1 transfer-characteristics=13 full-range=no

libheif can't be with functions matrix_coefficients=0, full_range_flag=1. He should have information and disabled functions

heifenc_10bit_avx.exe image_48bit.png --verbose -q 100 -e kvazaar --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_kvazaar_10bit.heic
--- construct_pipeline
from: colorspace=RGB chroma=RRGGBBB_LE bpp(R)=10 alpha=no
to: colorspace=YCbCr chroma=420 bpp(R)=10 alpha=no matrix-coefficients=6 colour-primaries=1 transfer-characteristics=13 full-range=no
It's still bad for 10bit
https://imgur.com/0xDDiaN
Libheif errors:
heifenc_10bit_avx.exe image_48bit.png --verbose -q 100 --vvc -e vvenc --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_10bit.vvic
--- construct_pipeline
from: colorspace=RGB chroma=RRGGBBB_LE bpp(R)=10 alpha=no
to: colorspace=YCbCr chroma=420 bpp(R)=10 alpha=no matrix-coefficients=6 colour-primaries=1 transfer-characteristics=13 full-range=no
final pipeline has 3 steps:

27Op_RRGGBBaa_swap_endianness
25Op_RRGGBBaa_BE_to_RGB_HDR
15Op_RGB_to_YCbCrItE
input spec: colorspace=RGB chroma=RRGGBBB_LE bpp(interleaved)=10
input spec: colorspace=RGB chroma=RRGGBB_BE bpp(interleaved)=10
input spec: colorspace=RGB chroma=444 bpp(R)=10
Could not encode HEIF/AVIF file: Encoder plugin generated an error: Unsupported image type: Bit depth not supported by vvenc <-- Why?

heifenc_10bit_avx.exe image_24bit.png --verbose -q 100 --vvc -e vvenc --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_10bit.vvic
--- construct_pipeline
from: colorspace=RGB chroma=RGB bpp(R)=8 alpha=no
to: colorspace=YCbCr chroma=420 bpp(R)=8 alpha=no matrix-coefficients=6 colour-primaries=1 transfer-characteristics=13 full-range=no <--Why?

image4>heifenc_08bit_avx.exe image_24bit.png --verbose -q 100 --vvc -e vvenc -
-no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_8bit.vvic
--- construct_pipeline
from: colorspace=RGB chroma=RGB bpp(R)=8 alpha=no
to: colorspace=YCbCr chroma=420 bpp(R)=8 alpha=no matrix-coefficients=6 colour-primaries=1 transfer-characteristics=13 full-range=no <--Why? VVenc doesn't have 8bit output
https://www.sendspace.com/file/5xv4ho

ffplay_avx2.exe image_kvazaar08.heic
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002129285c000] error reading header
image_kvazaar08.heic: Invalid data found when processing input
https://www.sendspace.com/file/m5vk82

I understand that the letter is a draft and is being refined. (only yuv420p8/10)

@silverbacknet
Copy link

Can you clarify exactly what the issues you need resolved are, such as what you expected to happen that didn't, and make unrelated issues into their own separate threads? It's rather unclear the way this is written and formatted what you're asking for.

I don't know what the h264 decoder is supposed to be used for.

For h.264 encoded HEIF files, of course. They're rare but entirely legal. (And nearly patent-free these days.)

@Jamaika1
Copy link
Contributor Author

Jamaika1 commented Nov 24, 2024

I'm skipping VVC and EVC because they're new and it's unclear how to approach them.
Questions for HEVC. How to create HEIF 10bit correctly with kvazaar?
Second question, is heif correct?
https://www.sendspace.com/file/m5vk82
Third question. Why can I not generate a photo in kvazaar if I can in uvg266 10bit?
heifenc_10bit_avx.exe image_24bit.png --verbose -q 100 -e kvazaar --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_kvazaar10.heic <-- error
heifenc_10bit_avx.exe image_24bit.png --verbose -q 100 --vvc -e uvg266 --no-alpha --matrix_coefficients=6 --full_range_flag=0 -o image_uvg26610.vvic

@bradh
Copy link
Contributor

bradh commented Nov 25, 2024

EVC doesn't have any plugin support yet, so you can safely ignore that.

@kmilos
Copy link
Contributor

kmilos commented Nov 25, 2024

How to create HEIF 10bit correctly with kvazaar?

You have to have kvazaar built for 10b support explicitly (it is set to 8b by default, and it can't support both at the same time...)

@Jamaika1
Copy link
Contributor Author

Jamaika1 commented Nov 25, 2024

You have to have kvazaar built for 10b support explicitly

Yes. I am interested in yuv420p10le
The result doesn`t satisfy me.
https://imgur.com/0xDDiaN

@silverbacknet
Copy link

What is the result you expect?

@Jamaika1
Copy link
Contributor Author

Jamaika1 commented Nov 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants