[FFmpeg-devel] [PATCH v14 3/4] avcodec/libjxl: add Jpeg XL encoding via libjxl
Leo Izen
leo.izen at gmail.com
Fri Apr 15 04:37:20 EEST 2022
On 4/14/22 13:49, Anton Khirnov wrote:
> Quoting Leo Izen (2022-04-12 07:53:32)
>> +
>> + while (1) {
>> + jret = JxlEncoderProcessOutput(ctx->encoder, &next_out, &available);
>> + if (jret == JXL_ENC_ERROR) {
>> + av_log(avctx, AV_LOG_ERROR, "Unspecified libjxl error occurred\n");
>> + return AVERROR_EXTERNAL;
>> + }
>> + bytes_written = ctx->buffer_size - available;
>> + /* all data passed has been encoded */
>> + if (jret == JXL_ENC_SUCCESS)
>> + break;
>> + if (jret == JXL_ENC_NEED_MORE_OUTPUT) {
> Is it possible for the encoder to return anything other than the three
> codes you're handling? Won't you get into an infinite loop if it does?
>
It's just these three, according to the documentation.
https://libjxl.readthedocs.io/en/latest/api_encoder.html
-Leo Izen (thebombzen)
More information about the ffmpeg-devel
mailing list