From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v14 3/4] avcodec/libjxl: add Jpeg XL encoding via libjxl
Date: Fri, 15 Apr 2022 12:39:14 +0200
Message-ID: <165001915499.24258.15911732369228283522@lain.red.khirnov.net> (raw)
In-Reply-To: <9b4c385d-6d26-ef40-de65-0896e4f3b38a@gmail.com>
Quoting Leo Izen (2022-04-15 03:37:20)
>
> 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
So the end of the loop should be unreachable, as you always break,
continue or return before. I would put return AVERROR_EXTERNAL there
just in case.
Beyond that I have no more comments on the set.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-04-15 10:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 5:53 [FFmpeg-devel] [PATCH v14 0/4] Jpeg XL Patch Set Leo Izen
2022-04-12 5:53 ` [FFmpeg-devel] [PATCH v14 1/4] avcodec/jpegxl: add Jpeg XL image codec Leo Izen
2022-04-12 5:53 ` [FFmpeg-devel] [PATCH v14 2/4] avcodec/libjxl: add Jpeg XL decoding via libjxl Leo Izen
2022-04-15 11:08 ` Andreas Rheinhardt
2022-04-15 19:31 ` Leo Izen
2022-04-12 5:53 ` [FFmpeg-devel] [PATCH v14 3/4] avcodec/libjxl: add Jpeg XL encoding " Leo Izen
2022-04-14 17:49 ` Anton Khirnov
2022-04-15 1:37 ` Leo Izen
2022-04-15 10:39 ` Anton Khirnov [this message]
2022-04-15 19:32 ` Leo Izen
2022-04-12 5:53 ` [FFmpeg-devel] [PATCH v14 4/4] avformat/image2: add Jpeg XL as image2 format Leo Izen
2022-04-15 11:34 ` Andreas Rheinhardt
2022-04-15 19:38 ` Leo Izen
2022-04-15 19:41 ` Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165001915499.24258.15911732369228283522@lain.red.khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git