From: Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "Cosmin Stejerean" <cosmin@cosmin.at>
Subject: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode
Date: Tue, 21 May 2024 01:17:33 +0000
Message-ID: <0101018f98b9a2c9-01b87943-0e31-4780-a2a7-d2f58757741e-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <20240521011728.29347-1-cosmin@cosmin.at>
From: Cosmin Stejerean <cosmin@cosmin.at>
Co-authored-by: Amir Naghdinezhad <amir.naghdinezhad@intel.com>
Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
---
libavcodec/libsvtav1.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 3b41f5a39e..1eda63200c 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -539,6 +539,14 @@ static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
if (svt_ret == EB_NoErrorEmptyQueue)
return AVERROR(EAGAIN);
+#if SVT_AV1_CHECK_VERSION(2, 0, 0)
+ if (headerPtr->flags & EB_BUFFERFLAG_EOS) {
+ svt_enc->eos_flag = EOS_RECEIVED;
+ svt_av1_enc_release_out_buffer(&headerPtr);
+ return AVERROR_EOF;
+ }
+#endif
+
ref = get_output_ref(avctx, svt_enc, headerPtr->n_filled_len);
if (!ref) {
av_log(avctx, AV_LOG_ERROR, "Failed to allocate output packet.\n");
@@ -573,8 +581,10 @@ static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
if (headerPtr->pic_type == EB_AV1_NON_REF_PICTURE)
pkt->flags |= AV_PKT_FLAG_DISPOSABLE;
+#if !(SVT_AV1_CHECK_VERSION(2, 0, 0))
if (headerPtr->flags & EB_BUFFERFLAG_EOS)
svt_enc->eos_flag = EOS_RECEIVED;
+#endif
ff_side_data_set_encoder_stats(pkt, headerPtr->qp * FF_QP2LAMBDA, NULL, 0, pict_type);
--
2.42.1
_______________________________________________
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:[~2024-05-21 1:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240521011728.29347-1-cosmin@cosmin.at>
2024-05-21 1:17 ` [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec - correctly read el_bit_depth_minus8 when ext_mapping_idc is non-zero Cosmin Stejerean via ffmpeg-devel
2024-05-21 5:56 ` Andreas Rheinhardt
2024-05-21 10:21 ` Niklas Haas
[not found] ` <DE3EBDBF-57F4-466B-8881-1FCD4A750852@cosmin.at>
2024-05-21 15:23 ` Cosmin Stejerean via ffmpeg-devel
[not found] ` <20240521011728.29347-2-cosmin@cosmin.at>
2024-05-21 1:17 ` Cosmin Stejerean via ffmpeg-devel [this message]
[not found] ` <A69148C5-81DD-495E-926C-62D0D6F81862@cosmin.at>
2024-05-21 3:38 ` [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode Cosmin Stejerean via ffmpeg-devel
[not found] <20240223232136.49044-1-cosmin@cosmin.at>
2024-02-23 23:21 ` Cosmin Stejerean via ffmpeg-devel
2024-02-27 21:19 ` James Almer
[not found] ` <6998C5B5-9E87-4E92-81C4-E22AC2956821@cosmin.at>
2024-02-27 21:36 ` Cosmin Stejerean via ffmpeg-devel
2024-02-27 21:49 ` James Almer
[not found] ` <95514F26-31A6-4A83-9FC9-D61323040FED@cosmin.at>
2024-02-27 22:22 ` Cosmin Stejerean via ffmpeg-devel
2024-02-27 22:36 ` James Almer
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=0101018f98b9a2c9-01b87943-0e31-4780-a2a7-d2f58757741e-000000@us-west-2.amazonses.com \
--to=ffmpeg-devel@ffmpeg.org \
--cc=cosmin@cosmin.at \
/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