[FFmpeg-devel] [PATCH] avcodec/libjxl: respect AVCodecContext->bits_per_raw_sample

Leo Izen leo.izen at gmail.com
Mon Jan 30 18:53:58 EET 2023


On 1/27/23 07:18, Leo Izen wrote:
> libjxl only accepts 16-bit buffers with its API, but it can
> accept 9-bit to 15-bit input via a 16-bit buffer, provided the flag
> is set declaring the buffer to be of the respective significant depth.
> 
> Likewise, it can only provide pixel data on decode as a 16-bit buffer
> (if higher than 8) but does provide the metadata tagging the actual bit
> depth.
> 
> This commit causes libjxlenc.c and libjxldec.c to respect this metadata
> and tag/read it accordingly from AVCodecContext->bits_per_raw_sample.
> 
> Signed-off-by: Leo Izen <leo.izen at gmail.com>
> ---
>   libavcodec/libjxldec.c | 17 +++++++++++++----
>   libavcodec/libjxlenc.c | 10 +++++++++-
>   2 files changed, 22 insertions(+), 5 deletions(-)
> 

Will merge soon if there are no objections

- Leo Izen (thebombzen)



More information about the ffmpeg-devel mailing list