Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data
@ 2023-07-03 19:32 Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 01/10] lavc: add a header for internal generic-layer APIs Anton Khirnov
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

* using IS_EMPTY() as suggested by James;
* use a different pattern for allocating private data, as suggested by
  Andreas
* rebased against master


_______________________________________________
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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 01/10] lavc: add a header for internal generic-layer APIs
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 02/10] lavc/avcodec: split flushing into decode- and encode-specific functions Anton Khirnov
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

The goal is to distinguish between APIs provided by the generic layer to
individual codecs and APIs internal to the generic layer.

Start by moving ff_{decode,encode}_receive_frame() and
ff_{decode,encode}_preinit() into this new header, as those functions
are called from generic code and should not be visible to individual
codecs.
---
 libavcodec/avcodec.c          |  1 +
 libavcodec/avcodec_internal.h | 53 +++++++++++++++++++++++++++++++++++
 libavcodec/decode.c           |  1 +
 libavcodec/decode.h           | 11 --------
 libavcodec/encode.c           |  1 +
 libavcodec/encode.h           | 11 --------
 6 files changed, 56 insertions(+), 22 deletions(-)
 create mode 100644 libavcodec/avcodec_internal.h

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index db8226f9b3..638cb55146 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -34,6 +34,7 @@
 #include "libavutil/opt.h"
 #include "libavutil/thread.h"
 #include "avcodec.h"
+#include "avcodec_internal.h"
 #include "bsf.h"
 #include "codec_internal.h"
 #include "decode.h"
diff --git a/libavcodec/avcodec_internal.h b/libavcodec/avcodec_internal.h
new file mode 100644
index 0000000000..be60a36644
--- /dev/null
+++ b/libavcodec/avcodec_internal.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * APIs internal to the generic codec layer.
+ *
+ * MUST NOT be included by individual encoders or decoders.
+ */
+
+#ifndef AVCODEC_AVCODEC_INTERNAL_H
+#define AVCODEC_AVCODEC_INTERNAL_H
+
+struct AVCodecContext;
+struct AVFrame;
+
+/**
+ * avcodec_receive_frame() implementation for decoders.
+ */
+int ff_decode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame);
+
+/**
+ * avcodec_receive_frame() implementation for encoders.
+ */
+int ff_encode_receive_frame(struct AVCodecContext *avctx, struct AVFrame *frame);
+
+/*
+ * Perform encoder initialization and validation.
+ * Called when opening the encoder, before the FFCodec.init() call.
+ */
+int ff_encode_preinit(struct AVCodecContext *avctx);
+
+/**
+ * Perform decoder initialization and validation.
+ * Called when opening the decoder, before the FFCodec.init() call.
+ */
+int ff_decode_preinit(struct AVCodecContext *avctx);
+
+#endif // AVCODEC_AVCODEC_INTERNAL_H
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 6ee2c85a75..336635f772 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -41,6 +41,7 @@
 #include "libavutil/opt.h"
 
 #include "avcodec.h"
+#include "avcodec_internal.h"
 #include "bytestream.h"
 #include "bsf.h"
 #include "codec_internal.h"
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index aaa29bc7f5..2b9fe59907 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -53,11 +53,6 @@ typedef struct FrameDecodeData {
     void (*hwaccel_priv_free)(void *priv);
 } FrameDecodeData;
 
-/**
- * avcodec_receive_frame() implementation for decoders.
- */
-int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame);
-
 /**
  * Called by decoders to get the next packet for decoding.
  *
@@ -99,12 +94,6 @@ int ff_attach_decode_data(AVFrame *frame);
  */
 int ff_copy_palette(void *dst, const AVPacket *src, void *logctx);
 
-/**
- * Perform decoder initialization and validation.
- * Called when opening the decoder, before the FFCodec.init() call.
- */
-int ff_decode_preinit(AVCodecContext *avctx);
-
 /**
  * Check that the provided frame dimensions are valid and set them on the codec
  * context.
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index ab5f889615..3a016b14c1 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -27,6 +27,7 @@
 #include "libavutil/samplefmt.h"
 
 #include "avcodec.h"
+#include "avcodec_internal.h"
 #include "codec_internal.h"
 #include "encode.h"
 #include "frame_thread_encoder.h"
diff --git a/libavcodec/encode.h b/libavcodec/encode.h
index 26a3304045..dfaab7c976 100644
--- a/libavcodec/encode.h
+++ b/libavcodec/encode.h
@@ -26,11 +26,6 @@
 #include "avcodec.h"
 #include "packet.h"
 
-/**
- * avcodec_receive_frame() implementation for encoders.
- */
-int ff_encode_receive_frame(AVCodecContext *avctx, AVFrame *frame);
-
 /**
  * Called by encoders to get the next frame for encoding.
  *
@@ -75,12 +70,6 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size);
 int ff_encode_reordered_opaque(AVCodecContext *avctx,
                                AVPacket *pkt, const AVFrame *frame);
 
-/*
- * Perform encoder initialization and validation.
- * Called when opening the encoder, before the FFCodec.init() call.
- */
-int ff_encode_preinit(AVCodecContext *avctx);
-
 int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt,
                         AVFrame *frame, int *got_packet);
 
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 02/10] lavc/avcodec: split flushing into decode- and encode-specific functions
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 01/10] lavc: add a header for internal generic-layer APIs Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 03/10] lavc: reindent after previous commit Anton Khirnov
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

Will allow making some state private to encoding/decoding in the future.
---
 libavcodec/avcodec.c          | 17 +++--------------
 libavcodec/avcodec_internal.h |  3 +++
 libavcodec/decode.c           | 15 +++++++++++++++
 libavcodec/encode.c           | 10 ++++++++++
 4 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 638cb55146..c01dac2049 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -383,23 +383,12 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
                    "that doesn't support it\n");
             return;
         }
-        if (avci->in_frame)
-            av_frame_unref(avci->in_frame);
-        if (avci->recon_frame)
-            av_frame_unref(avci->recon_frame);
-    } else {
-        av_packet_unref(avci->last_pkt_props);
-        av_packet_unref(avci->in_pkt);
-
-        avctx->pts_correction_last_pts =
-        avctx->pts_correction_last_dts = INT64_MIN;
-
-        av_bsf_flush(avci->bsf);
-    }
+        ff_encode_flush_buffers(avctx);
+    } else
+        ff_decode_flush_buffers(avctx);
 
     avci->draining      = 0;
     avci->draining_done = 0;
-    avci->nb_draining_errors = 0;
     av_frame_unref(avci->buffer_frame);
     av_packet_unref(avci->buffer_pkt);
 
diff --git a/libavcodec/avcodec_internal.h b/libavcodec/avcodec_internal.h
index be60a36644..6ffe575c3e 100644
--- a/libavcodec/avcodec_internal.h
+++ b/libavcodec/avcodec_internal.h
@@ -50,4 +50,7 @@ int ff_encode_preinit(struct AVCodecContext *avctx);
  */
 int ff_decode_preinit(struct AVCodecContext *avctx);
 
+void ff_decode_flush_buffers(struct AVCodecContext *avctx);
+void ff_encode_flush_buffers(struct AVCodecContext *avctx);
+
 #endif // AVCODEC_AVCODEC_INTERNAL_H
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 336635f772..01ac35bf34 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1740,3 +1740,18 @@ AVBufferRef *ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx,
 
     return ref;
 }
+
+void ff_decode_flush_buffers(AVCodecContext *avctx)
+{
+    AVCodecInternal *avci = avctx->internal;
+
+        av_packet_unref(avci->last_pkt_props);
+        av_packet_unref(avci->in_pkt);
+
+        avctx->pts_correction_last_pts =
+        avctx->pts_correction_last_dts = INT64_MIN;
+
+        av_bsf_flush(avci->bsf);
+
+    avci->nb_draining_errors = 0;
+}
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 3a016b14c1..0b1947c781 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -785,3 +785,13 @@ int ff_encode_receive_frame(AVCodecContext *avctx, AVFrame *frame)
     av_frame_move_ref(frame, avci->recon_frame);
     return 0;
 }
+
+void ff_encode_flush_buffers(AVCodecContext *avctx)
+{
+    AVCodecInternal *avci = avctx->internal;
+
+        if (avci->in_frame)
+            av_frame_unref(avci->in_frame);
+        if (avci->recon_frame)
+            av_frame_unref(avci->recon_frame);
+}
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 03/10] lavc: reindent after previous commit
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 01/10] lavc: add a header for internal generic-layer APIs Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 02/10] lavc/avcodec: split flushing into decode- and encode-specific functions Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 04/10] lavc: add generic-decode-layer private data Anton Khirnov
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

---
 libavcodec/decode.c | 10 +++++-----
 libavcodec/encode.c |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 01ac35bf34..3115282923 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1745,13 +1745,13 @@ void ff_decode_flush_buffers(AVCodecContext *avctx)
 {
     AVCodecInternal *avci = avctx->internal;
 
-        av_packet_unref(avci->last_pkt_props);
-        av_packet_unref(avci->in_pkt);
+    av_packet_unref(avci->last_pkt_props);
+    av_packet_unref(avci->in_pkt);
 
-        avctx->pts_correction_last_pts =
-        avctx->pts_correction_last_dts = INT64_MIN;
+    avctx->pts_correction_last_pts =
+    avctx->pts_correction_last_dts = INT64_MIN;
 
-        av_bsf_flush(avci->bsf);
+    av_bsf_flush(avci->bsf);
 
     avci->nb_draining_errors = 0;
 }
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 0b1947c781..2620810476 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -790,8 +790,8 @@ void ff_encode_flush_buffers(AVCodecContext *avctx)
 {
     AVCodecInternal *avci = avctx->internal;
 
-        if (avci->in_frame)
-            av_frame_unref(avci->in_frame);
-        if (avci->recon_frame)
-            av_frame_unref(avci->recon_frame);
+    if (avci->in_frame)
+        av_frame_unref(avci->in_frame);
+    if (avci->recon_frame)
+        av_frame_unref(avci->recon_frame);
 }
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 04/10] lavc: add generic-decode-layer private data
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (2 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 03/10] lavc: reindent after previous commit Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 05/10] lavc: add generic-encode-layer " Anton Khirnov
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

Move AVCodecInternal.nb_draining_errors to it, should should not be
visible outside of decode.c.
---
 libavcodec/avcodec.c          |  4 +++-
 libavcodec/avcodec_internal.h |  2 ++
 libavcodec/decode.c           | 21 +++++++++++++++++++--
 libavcodec/internal.h         |  3 ---
 libavcodec/pthread_frame.c    |  3 ++-
 5 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index c01dac2049..aef2edce32 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -150,7 +150,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
     if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE)
         return AVERROR(EINVAL);
 
-    avci = av_mallocz(sizeof(*avci));
+    avci = av_codec_is_decoder(codec) ?
+        ff_decode_internal_alloc()    :
+        av_mallocz(sizeof(AVCodecInternal));
     if (!avci) {
         ret = AVERROR(ENOMEM);
         goto end;
diff --git a/libavcodec/avcodec_internal.h b/libavcodec/avcodec_internal.h
index 6ffe575c3e..f52f91e07c 100644
--- a/libavcodec/avcodec_internal.h
+++ b/libavcodec/avcodec_internal.h
@@ -53,4 +53,6 @@ int ff_decode_preinit(struct AVCodecContext *avctx);
 void ff_decode_flush_buffers(struct AVCodecContext *avctx);
 void ff_encode_flush_buffers(struct AVCodecContext *avctx);
 
+struct AVCodecInternal *ff_decode_internal_alloc(void);
+
 #endif // AVCODEC_AVCODEC_INTERNAL_H
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 3115282923..acec9860a5 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -50,6 +50,18 @@
 #include "internal.h"
 #include "thread.h"
 
+typedef struct DecodeContext {
+    AVCodecInternal avci;
+
+    /* to prevent infinite loop on errors when draining */
+    int nb_draining_errors;
+} DecodeContext;
+
+static DecodeContext *decode_ctx(AVCodecInternal *avci)
+{
+    return (DecodeContext *)avci;
+}
+
 static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt)
 {
     int ret;
@@ -439,7 +451,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
             int nb_errors_max = 20 + (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME ?
                                 avctx->thread_count : 1);
 
-            if (avci->nb_draining_errors++ >= nb_errors_max) {
+            if (decode_ctx(avci)->nb_draining_errors++ >= nb_errors_max) {
                 av_log(avctx, AV_LOG_ERROR, "Too many errors when draining, this is a bug. "
                        "Stop draining and force EOF.\n");
                 avci->draining_done = 1;
@@ -1753,5 +1765,10 @@ void ff_decode_flush_buffers(AVCodecContext *avctx)
 
     av_bsf_flush(avci->bsf);
 
-    avci->nb_draining_errors = 0;
+    decode_ctx(avci)->nb_draining_errors = 0;
+}
+
+AVCodecInternal *ff_decode_internal_alloc(void)
+{
+    return av_mallocz(sizeof(DecodeContext));
 }
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index dceae182c0..0c1f0b82ea 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -148,9 +148,6 @@ typedef struct AVCodecInternal {
     AVFrame *buffer_frame;
     int draining_done;
 
-    /* to prevent infinite loop on errors when draining */
-    int nb_draining_errors;
-
     /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */
     int changed_frames_dropped;
     int initial_format;
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 008f3da43b..bc305f561f 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -28,6 +28,7 @@
 #include <stdint.h>
 
 #include "avcodec.h"
+#include "avcodec_internal.h"
 #include "codec_internal.h"
 #include "decode.h"
 #include "hwconfig.h"
@@ -815,7 +816,7 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free,
     p->parent = fctx;
     p->avctx  = copy;
 
-    copy->internal = av_mallocz(sizeof(*copy->internal));
+    copy->internal = ff_decode_internal_alloc();
     if (!copy->internal)
         return AVERROR(ENOMEM);
     copy->internal->thread_ctx = p;
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 05/10] lavc: add generic-encode-layer private data
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (3 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 04/10] lavc: add generic-decode-layer private data Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 06/10] lavc: move AVCodecInternal.last_audio_frame to EncodeContext Anton Khirnov
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

Move AVCodecInternal.intra_only_flag to it, should should not be visible
outside of encode.c.
---
 libavcodec/avcodec.c          |  2 +-
 libavcodec/avcodec_internal.h |  1 +
 libavcodec/encode.c           | 26 ++++++++++++++++++++++++--
 libavcodec/internal.h         |  7 -------
 4 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index aef2edce32..8ccc610227 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -152,7 +152,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
 
     avci = av_codec_is_decoder(codec) ?
         ff_decode_internal_alloc()    :
-        av_mallocz(sizeof(AVCodecInternal));
+        ff_encode_internal_alloc();
     if (!avci) {
         ret = AVERROR(ENOMEM);
         goto end;
diff --git a/libavcodec/avcodec_internal.h b/libavcodec/avcodec_internal.h
index f52f91e07c..9b93ff3d81 100644
--- a/libavcodec/avcodec_internal.h
+++ b/libavcodec/avcodec_internal.h
@@ -54,5 +54,6 @@ void ff_decode_flush_buffers(struct AVCodecContext *avctx);
 void ff_encode_flush_buffers(struct AVCodecContext *avctx);
 
 struct AVCodecInternal *ff_decode_internal_alloc(void);
+struct AVCodecInternal *ff_encode_internal_alloc(void);
 
 #endif // AVCODEC_AVCODEC_INTERNAL_H
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 2620810476..6da5d86ea0 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -33,6 +33,22 @@
 #include "frame_thread_encoder.h"
 #include "internal.h"
 
+typedef struct EncodeContext {
+    AVCodecInternal avci;
+
+    /**
+     * This is set to AV_PKT_FLAG_KEY for encoders that encode intra-only
+     * formats (i.e. whose codec descriptor has AV_CODEC_PROP_INTRA_ONLY set).
+     * This is used to set said flag generically for said encoders.
+     */
+    int intra_only_flag;
+} EncodeContext;
+
+static EncodeContext *encode_ctx(AVCodecInternal *avci)
+{
+    return (EncodeContext*)avci;
+}
+
 int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
 {
     if (size < 0 || size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
@@ -372,7 +388,7 @@ static int encode_receive_packet_internal(AVCodecContext *avctx, AVPacket *avpkt
     } else
         ret = encode_simple_receive_packet(avctx, avpkt);
     if (ret >= 0)
-        avpkt->flags |= avci->intra_only_flag;
+        avpkt->flags |= encode_ctx(avci)->intra_only_flag;
 
     if (ret == AVERROR_EOF)
         avci->draining_done = 1;
@@ -680,6 +696,7 @@ static int encode_preinit_audio(AVCodecContext *avctx)
 int ff_encode_preinit(AVCodecContext *avctx)
 {
     AVCodecInternal *avci = avctx->internal;
+    EncodeContext     *ec = encode_ctx(avci);
     int ret = 0;
 
     if (avctx->time_base.num <= 0 || avctx->time_base.den <= 0) {
@@ -710,7 +727,7 @@ int ff_encode_preinit(AVCodecContext *avctx)
         avctx->rc_initial_buffer_occupancy = avctx->rc_buffer_size * 3LL / 4;
 
     if (avctx->codec_descriptor->props & AV_CODEC_PROP_INTRA_ONLY)
-        avctx->internal->intra_only_flag = AV_PKT_FLAG_KEY;
+        ec->intra_only_flag = AV_PKT_FLAG_KEY;
 
     if (ffcodec(avctx->codec)->cb_type == FF_CODEC_CB_TYPE_ENCODE) {
         avci->in_frame = av_frame_alloc();
@@ -795,3 +812,8 @@ void ff_encode_flush_buffers(AVCodecContext *avctx)
     if (avci->recon_frame)
         av_frame_unref(avci->recon_frame);
 }
+
+AVCodecInternal *ff_encode_internal_alloc(void)
+{
+    return av_mallocz(sizeof(EncodeContext));
+}
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 0c1f0b82ea..497cd77f23 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -95,13 +95,6 @@ typedef struct AVCodecInternal {
     uint8_t *byte_buffer;
     unsigned int byte_buffer_size;
 
-    /**
-     * This is set to AV_PKT_FLAG_KEY for encoders that encode intra-only
-     * formats (i.e. whose codec descriptor has AV_CODEC_PROP_INTRA_ONLY set).
-     * This is used to set said flag generically for said encoders.
-     */
-    int intra_only_flag;
-
     void *frame_thread_encoder;
 
     /**
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 06/10] lavc: move AVCodecInternal.last_audio_frame to EncodeContext
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (4 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 05/10] lavc: add generic-encode-layer " Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 07/10] lavc/decode: track whether the caller started draining with a separate flag Anton Khirnov
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

It does not need to be visible outside of encode.c.
---
 libavcodec/encode.c   | 13 ++++++++++---
 libavcodec/internal.h |  6 ------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 6da5d86ea0..58eab5b001 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -42,6 +42,12 @@ typedef struct EncodeContext {
      * This is used to set said flag generically for said encoders.
      */
     int intra_only_flag;
+
+    /**
+     * An audio frame with less than required samples has been submitted (and
+     * potentially padded with silence). Reject all subsequent frames.
+     */
+    int last_audio_frame;
 } EncodeContext;
 
 static EncodeContext *encode_ctx(AVCodecInternal *avci)
@@ -174,7 +180,7 @@ static int pad_last_frame(AVCodecContext *s, AVFrame *frame, const AVFrame *src,
 
 fail:
     av_frame_unref(frame);
-    s->internal->last_audio_frame = 0;
+    encode_ctx(s->internal)->last_audio_frame = 0;
     return ret;
 }
 
@@ -446,6 +452,7 @@ static int encode_generate_icc_profile(av_unused AVCodecContext *c, av_unused AV
 static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
 {
     AVCodecInternal *avci = avctx->internal;
+    EncodeContext     *ec = encode_ctx(avci);
     AVFrame *dst = avci->buffer_frame;
     int ret;
 
@@ -458,7 +465,7 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
         /* check for valid frame size */
         if (!(avctx->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)) {
             /* if we already got an undersized frame, that must have been the last */
-            if (avctx->internal->last_audio_frame) {
+            if (ec->last_audio_frame) {
                 av_log(avctx, AV_LOG_ERROR, "frame_size (%d) was not respected for a non-last frame\n", avctx->frame_size);
                 return AVERROR(EINVAL);
             }
@@ -467,7 +474,7 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
                 return AVERROR(EINVAL);
             }
             if (src->nb_samples < avctx->frame_size) {
-                avctx->internal->last_audio_frame = 1;
+                ec->last_audio_frame = 1;
                 if (!(avctx->codec->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME)) {
                     int pad_samples = avci->pad_samples ? avci->pad_samples : avctx->frame_size;
                     int out_samples = (src->nb_samples + pad_samples - 1) / pad_samples * pad_samples;
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 497cd77f23..868dd46b48 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -56,12 +56,6 @@ typedef struct AVCodecInternal {
      */
     int is_copy;
 
-    /**
-     * An audio frame with less than required samples has been submitted (and
-     * potentially padded with silence). Reject all subsequent frames.
-     */
-    int last_audio_frame;
-
     /**
      * Audio encoders can set this flag during init to indicate that they
      * want the small last frame to be padded to a multiple of pad_samples.
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 07/10] lavc/decode: track whether the caller started draining with a separate flag
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (5 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 06/10] lavc: move AVCodecInternal.last_audio_frame to EncodeContext Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 08/10] lavc/bsf: move IS_EMPTY() to packet_internal() Anton Khirnov
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

Decoding pipeline has multiple stages, some of which may have their own
delay (e.g. bitstream filters). The code currently uses
AVCodecInternal.draining to track all of them, but they do not have to
all be in sync.
---
 libavcodec/decode.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index acec9860a5..47714a9393 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -55,6 +55,11 @@ typedef struct DecodeContext {
 
     /* to prevent infinite loop on errors when draining */
     int nb_draining_errors;
+
+    /**
+     * The caller has submitted a NULL packet on input.
+     */
+    int draining_started;
 } DecodeContext;
 
 static DecodeContext *decode_ctx(AVCodecInternal *avci)
@@ -626,12 +631,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
 int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
 {
     AVCodecInternal *avci = avctx->internal;
+    DecodeContext     *dc = decode_ctx(avci);
     int ret;
 
     if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec))
         return AVERROR(EINVAL);
 
-    if (avctx->internal->draining)
+    if (dc->draining_started)
         return AVERROR_EOF;
 
     if (avpkt && !avpkt->size && avpkt->data)
@@ -642,7 +648,8 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke
         ret = av_packet_ref(avci->buffer_pkt, avpkt);
         if (ret < 0)
             return ret;
-    }
+    } else
+        dc->draining_started = 1;
 
     ret = av_bsf_send_packet(avci->bsf, avci->buffer_pkt);
     if (ret < 0) {
@@ -1756,6 +1763,7 @@ AVBufferRef *ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx,
 void ff_decode_flush_buffers(AVCodecContext *avctx)
 {
     AVCodecInternal *avci = avctx->internal;
+    DecodeContext     *dc = decode_ctx(avci);
 
     av_packet_unref(avci->last_pkt_props);
     av_packet_unref(avci->in_pkt);
@@ -1765,7 +1773,8 @@ void ff_decode_flush_buffers(AVCodecContext *avctx)
 
     av_bsf_flush(avci->bsf);
 
-    decode_ctx(avci)->nb_draining_errors = 0;
+    dc->nb_draining_errors = 0;
+    dc->draining_started   = 0;
 }
 
 AVCodecInternal *ff_decode_internal_alloc(void)
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 08/10] lavc/bsf: move IS_EMPTY() to packet_internal()
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (6 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 07/10] lavc/decode: track whether the caller started draining with a separate flag Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 09/10] lavc/decode: move submitting input packets to bitstream filters Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 10/10] lavc/decode: do not perform decoding when sending draining packets Anton Khirnov
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

It will be useful in other places.
---
 libavcodec/bsf.c             | 11 +++++------
 libavcodec/packet_internal.h |  2 ++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
index 42cc1b5ab0..1e710f7d4a 100644
--- a/libavcodec/bsf.c
+++ b/libavcodec/bsf.c
@@ -31,8 +31,7 @@
 #include "bsf_internal.h"
 #include "codec_desc.h"
 #include "codec_par.h"
-
-#define IS_EMPTY(pkt) (!(pkt)->data && !(pkt)->side_data_elems)
+#include "packet_internal.h"
 
 static av_always_inline const FFBitStreamFilter *ff_bsf(const AVBitStreamFilter *bsf)
 {
@@ -205,7 +204,7 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
     FFBSFContext *const bsfi = ffbsfcontext(ctx);
     int ret;
 
-    if (!pkt || IS_EMPTY(pkt)) {
+    if (!pkt || AVPACKET_IS_EMPTY(pkt)) {
         if (pkt)
             av_packet_unref(pkt);
         bsfi->eof = 1;
@@ -217,7 +216,7 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
         return AVERROR(EINVAL);
     }
 
-    if (!IS_EMPTY(bsfi->buffer_pkt))
+    if (!AVPACKET_IS_EMPTY(bsfi->buffer_pkt))
         return AVERROR(EAGAIN);
 
     ret = av_packet_make_refcounted(pkt);
@@ -241,7 +240,7 @@ int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt)
     if (bsfi->eof)
         return AVERROR_EOF;
 
-    if (IS_EMPTY(bsfi->buffer_pkt))
+    if (AVPACKET_IS_EMPTY(bsfi->buffer_pkt))
         return AVERROR(EAGAIN);
 
     tmp_pkt = av_packet_alloc();
@@ -261,7 +260,7 @@ int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
     if (bsfi->eof)
         return AVERROR_EOF;
 
-    if (IS_EMPTY(bsfi->buffer_pkt))
+    if (AVPACKET_IS_EMPTY(bsfi->buffer_pkt))
         return AVERROR(EAGAIN);
 
     av_packet_move_ref(pkt, bsfi->buffer_pkt);
diff --git a/libavcodec/packet_internal.h b/libavcodec/packet_internal.h
index 92a0d4e6d5..52fa6d9be9 100644
--- a/libavcodec/packet_internal.h
+++ b/libavcodec/packet_internal.h
@@ -23,6 +23,8 @@
 
 #include "packet.h"
 
+#define AVPACKET_IS_EMPTY(pkt) (!(pkt)->data && !(pkt)->side_data_elems)
+
 typedef struct PacketListEntry {
     struct PacketListEntry *next;
     AVPacket pkt;
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 09/10] lavc/decode: move submitting input packets to bitstream filters
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (7 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 08/10] lavc/bsf: move IS_EMPTY() to packet_internal() Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 10/10] lavc/decode: do not perform decoding when sending draining packets Anton Khirnov
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

Do it from ff_decode_get_packet() rather than from
avcodec_send_packet(). This way all nontrivial stages of the decoding
pipeline (i.e. other than just placing a packet at its entrance) are
pull-based rather than a mix of push an pull.
---
 libavcodec/decode.c | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 47714a9393..89c3c2a48d 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -48,6 +48,7 @@
 #include "decode.h"
 #include "hwconfig.h"
 #include "internal.h"
+#include "packet_internal.h"
 #include "thread.h"
 
 typedef struct DecodeContext {
@@ -200,14 +201,11 @@ fail:
     return ret;
 }
 
-int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
+static int decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
 {
     AVCodecInternal *avci = avctx->internal;
     int ret;
 
-    if (avci->draining)
-        return AVERROR_EOF;
-
     ret = av_bsf_receive_packet(avci->bsf, pkt);
     if (ret == AVERROR_EOF)
         avci->draining = 1;
@@ -230,6 +228,31 @@ finish:
     return ret;
 }
 
+int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
+{
+    AVCodecInternal *avci = avctx->internal;
+    DecodeContext     *dc = decode_ctx(avci);
+
+    if (avci->draining)
+        return AVERROR_EOF;
+
+    while (1) {
+        int ret = decode_get_packet(avctx, pkt);
+        if (ret == AVERROR(EAGAIN) &&
+            (!AVPACKET_IS_EMPTY(avci->buffer_pkt) || dc->draining_started)) {
+            ret = av_bsf_send_packet(avci->bsf, avci->buffer_pkt);
+            if (ret < 0) {
+                av_packet_unref(avci->buffer_pkt);
+                return ret;
+            }
+
+            continue;
+        }
+
+        return ret;
+    }
+}
+
 /**
  * Attempt to guess proper monotonic timestamps for decoded video frames
  * which might have incorrect times. Input timestamps may wrap around, in
@@ -651,12 +674,6 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke
     } else
         dc->draining_started = 1;
 
-    ret = av_bsf_send_packet(avci->bsf, avci->buffer_pkt);
-    if (ret < 0) {
-        av_packet_unref(avci->buffer_pkt);
-        return ret;
-    }
-
     if (!avci->buffer_frame->buf[0]) {
         ret = decode_receive_frame_internal(avctx, avci->buffer_frame);
         if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [FFmpeg-devel] [PATCH v2 10/10] lavc/decode: do not perform decoding when sending draining packets
  2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
                   ` (8 preceding siblings ...)
  2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 09/10] lavc/decode: move submitting input packets to bitstream filters Anton Khirnov
@ 2023-07-03 19:32 ` Anton Khirnov
  9 siblings, 0 replies; 11+ messages in thread
From: Anton Khirnov @ 2023-07-03 19:32 UTC (permalink / raw)
  To: ffmpeg-devel

This way decoding errors will not be returned when the user starts
draining the decoder, avoiding confusion over whether draining did or
did not start.

Fixes failures of fate-h264-attachment-631 for certain numbers of frame
threads (e.g. 5).
---
 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 89c3c2a48d..269633ce10 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -674,7 +674,7 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke
     } else
         dc->draining_started = 1;
 
-    if (!avci->buffer_frame->buf[0]) {
+    if (!avci->buffer_frame->buf[0] && !dc->draining_started) {
         ret = decode_receive_frame_internal(avctx, avci->buffer_frame);
         if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
             return ret;
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-07-03 19:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 19:32 [FFmpeg-devel] [PATCH v2 00/10] lavc generic-layer private data Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 01/10] lavc: add a header for internal generic-layer APIs Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 02/10] lavc/avcodec: split flushing into decode- and encode-specific functions Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 03/10] lavc: reindent after previous commit Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 04/10] lavc: add generic-decode-layer private data Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 05/10] lavc: add generic-encode-layer " Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 06/10] lavc: move AVCodecInternal.last_audio_frame to EncodeContext Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 07/10] lavc/decode: track whether the caller started draining with a separate flag Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 08/10] lavc/bsf: move IS_EMPTY() to packet_internal() Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 09/10] lavc/decode: move submitting input packets to bitstream filters Anton Khirnov
2023-07-03 19:32 ` [FFmpeg-devel] [PATCH v2 10/10] lavc/decode: do not perform decoding when sending draining packets Anton Khirnov

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