strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.77k stars 306 forks source link

How to use libheif correctly? #1410

Open Jamaika1 opened 1 day ago

Jamaika1 commented 1 day ago

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 commented 1 day ago

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 commented 1 day ago

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 commented 19 hours ago

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

kmilos commented 18 hours ago

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 commented 18 hours ago

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 commented 18 hours ago

What is the result you expect?

Jamaika1 commented 18 hours ago

This is just my curiosity. I may be making a mistake somewhere. Maybe gnu 11.5.0 in c++23 is making a mistake(no mabs). There has been a lot of interest in libheif(mabs) on the forum lately and there are some strange questions. https://github.com/strukturag/libheif/pull/1411 https://www.sendspace.com/file/oiyj2m