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

10bit libkvazaar #399

Open
sven-pke opened this issue Mar 5, 2024 · 2 comments
Open

10bit libkvazaar #399

sven-pke opened this issue Mar 5, 2024 · 2 comments

Comments

@sven-pke
Copy link

sven-pke commented Mar 5, 2024

Hello everyone,

As I was not able to get an 10bit encode with kvazaar and ffmpeg to work I guess that libkvazaar is 8bit only.
Is there a way to get ffmpeg with 10bit kvazaar?
Would be nice to test that on some hdr reference clips.

Greetings

@Jovasa
Copy link
Member

Jovasa commented Mar 6, 2024

The implementation of libkvazaar in FFmpeg is hardcoded to use 8bit encoding, however if you compile and install Kvazaar with changing this

#define KVZ_BIT_DEPTH 8
to #define KVZ_BIT_DEPTH 10 and apply the patch linked below to FFmpeg version 6.1 and compile FFmpeg, the resulting FFmpeg is hard coded to use 10 bit input for libkvazaar. It's not really an optimal solutions but should work if you just want to test 10 bit encoding. One thing to note is that our AVX2 optimizations are currently designed only for 8 bit encoding, so the 10bit encoding can be a lot slower than the 8 bit encoding.
0001-Hard-code-to-use-10bit-input.patch

@farindk
Copy link
Contributor

farindk commented Nov 25, 2024

We probably need two things:

  • there should be an API to query the supported bit depths. Checking KVZ_BIT_DEPTH in a client application is no good idea because the version of kvazaar installed by the end user might use a different bit depth than the kvazaar used during compilation. In the simplest case, this would be a kvz_api_get(bit_depth) returning NULL when the bit_depth differs from the compiled bit depth.
  • it should be possible to install 8bit and 10bit kvazaar at the same time and use kvz_api_get() to switch between both.

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

3 participants