[FFmpeg-cvslog] avutil/hwcontext_qsv: Allocate public and priv device hwctx together
ffmpeg | branch: master | Andreas Rheinhardt | Sun Feb 11 16:45:08 2024 +0100| [028907b08ad9f327cbb405cff2df2b19d0e358e5] | committer: Andreas Rheinhardt avutil/hwcontext_qsv: Allocate public and priv device hwctx together This is possible because the lifetime of both coincide. Besides reducing the number of allocations this also simplifies access to QSVDeviceContext as one no longer has to go through AVHWDeviceInternal. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=028907b08ad9f327cbb405cff2df2b19d0e358e5 --- libavutil/hwcontext_qsv.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index a67552b5ac..99d974f25f 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -70,6 +70,11 @@ typedef struct QSVDevicePriv { } QSVDevicePriv; typedef struct QSVDeviceContext { +/** + * The public AVQSVDeviceContext. See hwcontext_qsv.h for it. + */ +AVQSVDeviceContext p; + mfxHDL handle; mfxHandleType handle_type; mfxVersion ver; @@ -268,8 +273,8 @@ static int qsv_fill_border(AVFrame *dst, const AVFrame *src) static int qsv_device_init(AVHWDeviceContext *ctx) { -AVQSVDeviceContext *hwctx = ctx->hwctx; -QSVDeviceContext *s = ctx->internal->priv; +QSVDeviceContext *s = ctx->hwctx; +AVQSVDeviceContext *hwctx = &s->p; int hw_handle_supported = 0; mfxHandleType handle_type; enum AVHWDeviceType device_type; @@ -378,7 +383,7 @@ static int qsv_init_child_ctx(AVHWFramesContext *ctx) { AVQSVFramesContext *hwctx = ctx->hwctx; QSVFramesContext *s = ctx->internal->priv; -QSVDeviceContext *device_priv = ctx->device_ctx->internal->priv; +QSVDeviceContext *device_priv = ctx->device_ctx->hwctx; AVBufferRef *child_device_ref = NULL; AVBufferRef *child_frames_ref = NULL; @@ -1108,7 +1113,8 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx, mfxSession *session, int upload) { AVQSVFramesContext *frames_hwctx = ctx->hwctx; -QSVDeviceContext *device_priv = ctx->device_ctx->internal->priv; +QSVDeviceContext *device_priv = ctx->device_ctx->hwctx; +AVQSVDeviceContext *hwctx= &device_priv->p; int opaque = 0; mfxFrameAllocator frame_allocator = { @@ -1123,7 +1129,6 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx, mfxVideoParam par; mfxStatus err; int ret = AVERROR_UNKNOWN; -AVQSVDeviceContext *hwctx = ctx->device_ctx->hwctx; /* hwctx->loader is non-NULL for oneVPL user and NULL for non-oneVPL user */ void **loader = &hwctx->loader; @@ -2246,8 +2251,7 @@ const HWContextType ff_hwcontext_type_qsv = { .type = AV_HWDEVICE_TYPE_QSV, .name = "QSV", -.device_hwctx_size = sizeof(AVQSVDeviceContext), -.device_priv_size = sizeof(QSVDeviceContext), +.device_hwctx_size = sizeof(QSVDeviceContext), .frames_hwctx_size = sizeof(AVQSVFramesContext), .frames_priv_size = sizeof(QSVFramesContext), ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avutil/hwcontext_qsv: Allocate pub and priv frames hwctx together
ffmpeg | branch: master | Andreas Rheinhardt | Sun Feb 11 19:42:08 2024 +0100| [91745ac2334f1a5c0d4a874de5373ab27551ebfb] | committer: Andreas Rheinhardt avutil/hwcontext_qsv: Allocate pub and priv frames hwctx together This is possible because the lifetime of both coincide. Besides reducing the number of allocations this also simplifies access to QSVFramesContext as one no longer has to go through AVHWFramesInternal. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91745ac2334f1a5c0d4a874de5373ab27551ebfb --- libavutil/hwcontext_qsv.c | 46 +- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 99d974f25f..f524a663b1 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -85,6 +85,11 @@ typedef struct QSVDeviceContext { } QSVDeviceContext; typedef struct QSVFramesContext { +/** + * The public AVQSVFramesContext. See hwcontext_qsv.h for it. + */ +AVQSVFramesContext p; + mfxSession session_download; atomic_int session_download_init; mfxSession session_upload; @@ -329,7 +334,7 @@ static int qsv_device_init(AVHWDeviceContext *ctx) static void qsv_frames_uninit(AVHWFramesContext *ctx) { -QSVFramesContext *s = ctx->internal->priv; +QSVFramesContext *s = ctx->hwctx; if (s->session_download) { MFXVideoVPP_Close(s->session_download); @@ -367,8 +372,8 @@ static void qsv_pool_release_dummy(void *opaque, uint8_t *data) static AVBufferRef *qsv_pool_alloc(void *opaque, size_t size) { AVHWFramesContext*ctx = (AVHWFramesContext*)opaque; -QSVFramesContext *s = ctx->internal->priv; -AVQSVFramesContext *hwctx = ctx->hwctx; +QSVFramesContext *s = ctx->hwctx; +AVQSVFramesContext *hwctx = &s->p; if (s->nb_surfaces_used < hwctx->nb_surfaces) { s->nb_surfaces_used++; @@ -381,9 +386,9 @@ static AVBufferRef *qsv_pool_alloc(void *opaque, size_t size) static int qsv_init_child_ctx(AVHWFramesContext *ctx) { -AVQSVFramesContext *hwctx = ctx->hwctx; -QSVFramesContext *s = ctx->internal->priv; QSVDeviceContext *device_priv = ctx->device_ctx->hwctx; +QSVFramesContext *s = ctx->hwctx; +AVQSVFramesContext *hwctx = &s->p; AVBufferRef *child_device_ref = NULL; AVBufferRef *child_frames_ref = NULL; @@ -562,8 +567,8 @@ static int qsv_init_surface(AVHWFramesContext *ctx, mfxFrameSurface1 *surf) static int qsv_init_pool(AVHWFramesContext *ctx, uint32_t fourcc) { -QSVFramesContext *s = ctx->internal->priv; -AVQSVFramesContext *frames_hwctx = ctx->hwctx; +QSVFramesContext *s = ctx->hwctx; +AVQSVFramesContext *frames_hwctx = &s->p; int i, ret = 0; @@ -615,8 +620,8 @@ static mfxStatus frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req, mfxFrameAllocResponse *resp) { AVHWFramesContext*ctx = pthis; -QSVFramesContext *s = ctx->internal->priv; -AVQSVFramesContext *hwctx = ctx->hwctx; +QSVFramesContext *s = ctx->hwctx; +AVQSVFramesContext *hwctx = &s->p; mfxFrameInfo *i = &req->Info; mfxFrameInfo *i1 = &hwctx->surfaces[0].Info; @@ -1133,7 +1138,7 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx, void **loader = &hwctx->loader; #if QSV_HAVE_OPAQUE -QSVFramesContext *s = ctx->internal->priv; +QSVFramesContext *s = ctx->hwctx; opaque = !!(frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME); #endif @@ -1210,8 +1215,8 @@ fail: static int qsv_frames_init(AVHWFramesContext *ctx) { -QSVFramesContext *s = ctx->internal->priv; -AVQSVFramesContext *frames_hwctx = ctx->hwctx; +QSVFramesContext *s = ctx->hwctx; +AVQSVFramesContext *frames_hwctx = &s->p; int opaque = 0; @@ -1387,7 +1392,7 @@ static int qsv_frames_derive_from(AVHWFramesContext *dst_ctx, static int qsv_map_from(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags) { -QSVFramesContext *s = ctx->internal->priv; +QSVFramesContext *s = ctx->hwctx; mfxFrameSurface1 *surf = (mfxFrameSurface1*)src->data[3]; AVHWFramesContext *child_frames_ctx; const AVPixFmtDescriptor *desc; @@ -1490,7 +1495,7 @@ fail: static int qsv_transfer_data_child(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src) { -QSVFramesContext *s = ctx->internal->priv; +QSVFramesContext *s = ctx->hwctx; AVHWFramesContext *child_frames_ctx = (AVHWFramesContext*)s->child_frames_ref->data; int download = !!src->hw_frames_ctx; mfxFrameSurface1 *surf = (mfxFrameSurface1*)(download ? src->data[3] : dst->data[3]); @@ -1592,7 +1597,7 @@ static int map_frame_to_surface(const AVFrame *fram
[FFmpeg-cvslog] avformat/aviobuf: Move code specific to URLContexts to avio.c
ffmpeg | branch: master | Andreas Rheinhardt | Sat Mar 2 18:46:03 2024 +0100| [f0abb44fbf263626a4b1a489ace451c230ee9fd0] | committer: Andreas Rheinhardt avformat/aviobuf: Move code specific to URLContexts to avio.c This separates the URL-layer adjacent parts of the code from the parts that are also usable with custom IO. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0abb44fbf263626a4b1a489ace451c230ee9fd0 --- libavformat/avio.c| 191 +- libavformat/aviobuf.c | 186 libavformat/url.h | 2 - 3 files changed, 189 insertions(+), 190 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index b793a7546c..794ebd4bd8 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -24,6 +24,7 @@ #include "libavutil/opt.h" #include "libavutil/time.h" #include "libavutil/avassert.h" +#include "avio_internal.h" #include "os_support.h" #include "internal.h" #if CONFIG_NETWORK @@ -31,6 +32,8 @@ #endif #include "url.h" +#define IO_BUFFER_SIZE 32768 + /** @name Logging context. */ /*@{*/ static const char *urlcontext_to_name(void *ptr) @@ -60,7 +63,7 @@ static const AVOption options[] = { { NULL } }; -const AVClass ffurl_context_class = { +static const AVClass url_context_class = { .class_name = "URLContext", .item_name= urlcontext_to_name, .option = options, @@ -70,6 +73,47 @@ const AVClass ffurl_context_class = { }; /*@}*/ +static void *avio_child_next(void *obj, void *prev) +{ +AVIOContext *s = obj; +return prev ? NULL : s->opaque; +} + +static const AVClass *child_class_iterate(void **iter) +{ +const AVClass *c = *iter ? NULL : &url_context_class; +*iter = (void*)(uintptr_t)c; +return c; +} + +#define AVIOOFFSET(x) offsetof(AVIOContext,x) +#define E AV_OPT_FLAG_ENCODING_PARAM +#define D AV_OPT_FLAG_DECODING_PARAM +static const AVOption avio_options[] = { +{"protocol_whitelist", "List of protocols that are allowed to be used", AVIOOFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, +{ NULL }, +}; + +const AVClass ff_avio_class = { +.class_name = "AVIOContext", +.item_name = av_default_item_name, +.version= LIBAVUTIL_VERSION_INT, +.option = avio_options, +.child_next = avio_child_next, +.child_class_iterate = child_class_iterate, +}; + +URLContext *ffio_geturlcontext(AVIOContext *s) +{ +if (!s) +return NULL; + +if (s->opaque && s->read_packet == ffurl_read2) +return s->opaque; +else +return NULL; +} + static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, const char *filename, int flags, const AVIOInterruptCB *int_cb) @@ -96,7 +140,7 @@ static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, err = AVERROR(ENOMEM); goto fail; } -uc->av_class = &ffurl_context_class; +uc->av_class = &url_context_class; uc->filename = (char *)&uc[1]; strcpy(uc->filename, filename); uc->prot= up; @@ -225,6 +269,17 @@ int ffurl_accept(URLContext *s, URLContext **c) return AVERROR(EBADF); } +int avio_accept(AVIOContext *s, AVIOContext **c) +{ +int ret; +URLContext *sc = s->opaque; +URLContext *cc = NULL; +ret = ffurl_accept(sc, &cc); +if (ret < 0) +return ret; +return ffio_fdopen(c, cc); +} + int ffurl_handshake(URLContext *c) { int ret; @@ -237,6 +292,12 @@ int ffurl_handshake(URLContext *c) return 0; } +int avio_handshake(AVIOContext *c) +{ +URLContext *cc = c->opaque; +return ffurl_handshake(cc); +} + #define URL_SCHEME_CHARS\ "abcdefghijklmnopqrstuvwxyz"\ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"\ @@ -347,6 +408,92 @@ fail: return ret; } +int ffio_fdopen(AVIOContext **s, URLContext *h) +{ +uint8_t *buffer = NULL; +int buffer_size, max_packet_size; + +max_packet_size = h->max_packet_size; +if (max_packet_size) { +buffer_size = max_packet_size; /* no need to bufferize more than one packet */ +} else { +buffer_size = IO_BUFFER_SIZE; +} +if (!(h->flags & AVIO_FLAG_WRITE) && h->is_streamed) { +if (buffer_size > INT_MAX/2) +return AVERROR(EINVAL); +buffer_size *= 2; +} +buffer = av_malloc(buffer_size); +if (!buffer) +return AVERROR(ENOMEM); + +*s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, +ffurl_read2, ffurl_write2, ffurl_seek2); +if (!*s) { +av_freep(&buffer); +return AVERROR(ENOMEM); +} +(*s)->protocol_whitelist = av_strdup(h->protocol_whitelist); +if (!(*s)->protocol_whitelist && h->protocol_whitelist) { +
[FFmpeg-cvslog] avformat/avio: Avoid function pointer casts
ffmpeg | branch: master | Andreas Rheinhardt | Sat Mar 2 19:29:27 2024 +0100| [57e20dd6b6ee47576e83a26c6215d99211421003] | committer: Andreas Rheinhardt avformat/avio: Avoid function pointer casts It is undefined behaviour to use a different type for a call than the actual type of the function. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57e20dd6b6ee47576e83a26c6215d99211421003 --- libavformat/avio.c | 5 ++--- libavformat/librtmp.c | 6 -- libavformat/mmsh.c | 3 ++- libavformat/rtmpproto.c | 6 -- libavformat/url.h | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 794ebd4bd8..1622a03d7f 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -450,9 +450,8 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) (*s)->max_packet_size = max_packet_size; (*s)->min_packet_size = h->min_packet_size; if(h->prot) { -(*s)->read_pause = (int (*)(void *, int))h->prot->url_read_pause; -(*s)->read_seek = -(int64_t (*)(void *, int, int64_t, int))h->prot->url_read_seek; +(*s)->read_pause = h->prot->url_read_pause; +(*s)->read_seek = h->prot->url_read_seek; if (h->prot->url_read_seek) (*s)->seekable |= AVIO_SEEKABLE_TIME; diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c index 5fa788fac8..bdd82ce15f 100644 --- a/libavformat/librtmp.c +++ b/libavformat/librtmp.c @@ -220,8 +220,9 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size) return ret; } -static int rtmp_read_pause(URLContext *s, int pause) +static int rtmp_read_pause(void *opaque, int pause) { +URLContext *s = opaque; LibRTMPContext *ctx = s->priv_data; RTMP *r = &ctx->rtmp; @@ -230,9 +231,10 @@ static int rtmp_read_pause(URLContext *s, int pause) return 0; } -static int64_t rtmp_read_seek(URLContext *s, int stream_index, +static int64_t rtmp_read_seek(void *opaque, int stream_index, int64_t timestamp, int flags) { +URLContext *s = opaque; LibRTMPContext *ctx = s->priv_data; RTMP *r = &ctx->rtmp; diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c index 672f4b3788..60113d61d2 100644 --- a/libavformat/mmsh.c +++ b/libavformat/mmsh.c @@ -371,9 +371,10 @@ static int mmsh_read(URLContext *h, uint8_t *buf, int size) return res; } -static int64_t mmsh_read_seek(URLContext *h, int stream_index, +static int64_t mmsh_read_seek(void *opaque, int stream_index, int64_t timestamp, int flags) { +URLContext *h = opaque; MMSHContext *mmsh_old = h->priv_data; MMSHContext *mmsh = av_mallocz(sizeof(*mmsh)); int ret; diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 817c27b7ef..4b01b67d28 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2952,9 +2952,10 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size) return orig_size; } -static int64_t rtmp_seek(URLContext *s, int stream_index, int64_t timestamp, +static int64_t rtmp_seek(void *opaque, int stream_index, int64_t timestamp, int flags) { +URLContext *s = opaque; RTMPContext *rt = s->priv_data; int ret; av_log(s, AV_LOG_DEBUG, @@ -2972,8 +2973,9 @@ static int64_t rtmp_seek(URLContext *s, int stream_index, int64_t timestamp, return timestamp; } -static int rtmp_pause(URLContext *s, int pause) +static int rtmp_pause(void *opaque, int pause) { +URLContext *s = opaque; RTMPContext *rt = s->priv_data; int ret; av_log(s, AV_LOG_DEBUG, "Pause at timestamp %d\n", diff --git a/libavformat/url.h b/libavformat/url.h index 4f3bfb6d57..f62afedb78 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -76,8 +76,8 @@ typedef struct URLProtocol { int (*url_write)(URLContext *h, const unsigned char *buf, int size); int64_t (*url_seek)( URLContext *h, int64_t pos, int whence); int (*url_close)(URLContext *h); -int (*url_read_pause)(URLContext *h, int pause); -int64_t (*url_read_seek)(URLContext *h, int stream_index, +int (*url_read_pause)(void *urlcontext, int pause); +int64_t (*url_read_seek)(void *urlcontext, int stream_index, int64_t timestamp, int flags); int (*url_get_file_handle)(URLContext *h); int (*url_get_multi_file_handle)(URLContext *h, int **handles, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/avio: Avoid indirection in ffio_fdopen()
ffmpeg | branch: master | Andreas Rheinhardt | Sat Mar 2 19:56:37 2024 +0100| [c856e4c5469761390d278e4c5953d86df1d64a21] | committer: Andreas Rheinhardt avformat/avio: Avoid indirection in ffio_fdopen() Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c856e4c5469761390d278e4c5953d86df1d64a21 --- libavformat/avio.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 1622a03d7f..f3d10fac39 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -408,8 +408,9 @@ fail: return ret; } -int ffio_fdopen(AVIOContext **s, URLContext *h) +int ffio_fdopen(AVIOContext **sp, URLContext *h) { +AVIOContext *s; uint8_t *buffer = NULL; int buffer_size, max_packet_size; @@ -428,36 +429,37 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if (!buffer) return AVERROR(ENOMEM); -*s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, -ffurl_read2, ffurl_write2, ffurl_seek2); -if (!*s) { +*sp = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, + ffurl_read2, ffurl_write2, ffurl_seek2); +if (!*sp) { av_freep(&buffer); return AVERROR(ENOMEM); } -(*s)->protocol_whitelist = av_strdup(h->protocol_whitelist); -if (!(*s)->protocol_whitelist && h->protocol_whitelist) { -avio_closep(s); +s = *sp; +s->protocol_whitelist = av_strdup(h->protocol_whitelist); +if (!s->protocol_whitelist && h->protocol_whitelist) { +avio_closep(sp); return AVERROR(ENOMEM); } -(*s)->protocol_blacklist = av_strdup(h->protocol_blacklist); -if (!(*s)->protocol_blacklist && h->protocol_blacklist) { -avio_closep(s); +s->protocol_blacklist = av_strdup(h->protocol_blacklist); +if (!s->protocol_blacklist && h->protocol_blacklist) { +avio_closep(sp); return AVERROR(ENOMEM); } -(*s)->direct = h->flags & AVIO_FLAG_DIRECT; +s->direct = h->flags & AVIO_FLAG_DIRECT; -(*s)->seekable = h->is_streamed ? 0 : AVIO_SEEKABLE_NORMAL; -(*s)->max_packet_size = max_packet_size; -(*s)->min_packet_size = h->min_packet_size; +s->seekable = h->is_streamed ? 0 : AVIO_SEEKABLE_NORMAL; +s->max_packet_size = max_packet_size; +s->min_packet_size = h->min_packet_size; if(h->prot) { -(*s)->read_pause = h->prot->url_read_pause; -(*s)->read_seek = h->prot->url_read_seek; +s->read_pause = h->prot->url_read_pause; +s->read_seek = h->prot->url_read_seek; if (h->prot->url_read_seek) -(*s)->seekable |= AVIO_SEEKABLE_TIME; +s->seekable |= AVIO_SEEKABLE_TIME; } -((FFIOContext*)(*s))->short_seek_get = ffurl_get_short_seek; -(*s)->av_class = &ff_avio_class; +((FFIOContext*)s)->short_seek_get = ffurl_get_short_seek; +s->av_class = &ff_avio_class; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/avio: Avoid av_strdup(NULL)
ffmpeg | branch: master | Andreas Rheinhardt | Sat Mar 2 19:59:09 2024 +0100| [fed46d77062755a8488144071239aaf00fc5a8b9] | committer: Andreas Rheinhardt avformat/avio: Avoid av_strdup(NULL) Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fed46d77062755a8488144071239aaf00fc5a8b9 --- libavformat/avio.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index f3d10fac39..5186c2b464 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -436,15 +436,19 @@ int ffio_fdopen(AVIOContext **sp, URLContext *h) return AVERROR(ENOMEM); } s = *sp; -s->protocol_whitelist = av_strdup(h->protocol_whitelist); -if (!s->protocol_whitelist && h->protocol_whitelist) { -avio_closep(sp); -return AVERROR(ENOMEM); +if (h->protocol_whitelist) { +s->protocol_whitelist = av_strdup(h->protocol_whitelist); +if (!s->protocol_whitelist) { +avio_closep(sp); +return AVERROR(ENOMEM); +} } -s->protocol_blacklist = av_strdup(h->protocol_blacklist); -if (!s->protocol_blacklist && h->protocol_blacklist) { -avio_closep(sp); -return AVERROR(ENOMEM); +if (h->protocol_blacklist) { +s->protocol_blacklist = av_strdup(h->protocol_blacklist); +if (!s->protocol_blacklist) { +avio_closep(sp); +return AVERROR(ENOMEM); +} } s->direct = h->flags & AVIO_FLAG_DIRECT; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
ffmpeg | branch: master | Zhao Zhili | Mon Mar 4 11:37:58 2024 +0800| [b0e17e0f959b09fb228665a7eb7323af9b6ffeac] | committer: Zhao Zhili avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt Signed-off-by: Zhao Zhili > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0e17e0f959b09fb228665a7eb7323af9b6ffeac --- libavcodec/mediacodecenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 086b545590..984014f1b1 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -319,6 +319,9 @@ static av_cold int mediacodec_init(AVCodecContext *avctx) ret = ff_AMediaCodec_configure(s->codec, format, s->window, NULL, ret); if (ret) { av_log(avctx, AV_LOG_ERROR, "MediaCodec configure failed, %s\n", av_err2str(ret)); +if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) +av_log(avctx, AV_LOG_ERROR, "Please try -pix_fmt nv12, some devices don't " +"support yuv420p as encoder input format.\n"); goto bailout; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hlsenc: Redo checking for strftime %s support to avoid warnings
ffmpeg | branch: master | Andreas Rheinhardt | Tue Mar 5 10:19:25 2024 +0100| [d085f341d66ebfe5b29d67773e89c253f4eb99a8] | committer: Andreas Rheinhardt avformat/hlsenc: Redo checking for strftime %s support to avoid warnings This is intended to avoid -Wformat= warnings on systems where %s might not be supported (and also generally emitted by GCC with -pedantic). Reviewed-by: Liu Steven Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d085f341d66ebfe5b29d67773e89c253f4eb99a8 --- libavformat/hlsenc.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index a19b9bb3d1..d5cd627e59 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1878,18 +1878,23 @@ fail: static const char * get_default_pattern_localtime_fmt(AVFormatContext *s) { +HLSContext *hls = s->priv_data; +#if HAVE_LIBC_MSVCRT +// no %s support on MSVC, which invokes the invalid parameter handler +// on unsupported format strings, instead of returning an error +int strftime_s_supported = 0; +#else char b[21]; time_t t = time(NULL); -struct tm *p, tmbuf; -HLSContext *hls = s->priv_data; - -p = localtime_r(&t, &tmbuf); +struct tm tmbuf, *p = localtime_r(&t, &tmbuf); // no %s support when strftime returned error or left format string unchanged -// also no %s support on MSVC, which invokes the invalid parameter handler on unsupported format strings, instead of returning an error +int strftime_s_supported = strftime(b, sizeof(b), "%s", p) && strcmp(b, "%s"); +#endif + if (hls->segment_type == SEGMENT_TYPE_FMP4) { -return (HAVE_LIBC_MSVCRT || !strftime(b, sizeof(b), "%s", p) || !strcmp(b, "%s")) ? "-%Y%m%d%H%M%S.m4s" : "-%s.m4s"; +return strftime_s_supported ? "-%s.m4s" : "-%Y%m%d%H%M%S.m4s"; } -return (HAVE_LIBC_MSVCRT || !strftime(b, sizeof(b), "%s", p) || !strcmp(b, "%s")) ? "-%Y%m%d%H%M%S.ts" : "-%s.ts"; +return strftime_s_supported ? "-%s.ts" : "-%Y%m%d%H%M%S.ts"; } static int append_postfix(char *name, int name_buf_len, int i) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/dashenc, hlsenc: Return 0 on succes from write_header
ffmpeg | branch: master | Andreas Rheinhardt | Tue Mar 5 11:15:36 2024 +0100| [440f8186ef9baf3f581fc463f318014d3176c4cd] | committer: Andreas Rheinhardt avformat/dashenc, hlsenc: Return 0 on succes from write_header Do not propagate the return value of avformat_write_header(), as it contains the information whether the output had already been initialized in avformat_init_output(), but this is set generically; the return value of FFOutputFormat.write_header is not documented at all (and is currently ignored if >= 0), but it is more future-proof to simply return 0 on success. Reviewed-by: Liu Steven Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=440f8186ef9baf3f581fc463f318014d3176c4cd --- libavformat/dashenc.c | 2 +- libavformat/hlsenc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 435a5e8afe..5e31b09486 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1747,7 +1747,7 @@ static int dash_write_header(AVFormatContext *s) (ret = flush_init_segment(s, os)) < 0) return ret; } -return ret; +return 0; } static int add_segment(OutputStream *os, const char *file, diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d5cd627e59..e560aa6a20 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2372,7 +2372,7 @@ static int hls_write_header(AVFormatContext *s) } } -return ret; +return 0; } static int hls_init_file_resend(AVFormatContext *s, VariantStream *vs) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_writer: clear extradata_size on extradata allocation failure
ffmpeg | branch: master | James Almer | Tue Mar 5 11:23:41 2024 -0300| [988e3a061a917408785d824ecad35967bc9d4bbd] | committer: James Almer avformat/iamf_writer: clear extradata_size on extradata allocation failure Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=988e3a061a917408785d824ecad35967bc9d4bbd --- libavformat/iamf_writer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c index 402cb7f230..8a903a0397 100644 --- a/libavformat/iamf_writer.c +++ b/libavformat/iamf_writer.c @@ -1060,8 +1060,10 @@ int ff_iamf_write_audio_frame(const IAMFContext *iamf, AVIOContext *pb, av_free(codec_config->extradata); codec_config->extradata = av_memdup(new_extradata, new_extradata_size); -if (!codec_config->extradata) +if (!codec_config->extradata) { +codec_config->extradata_size = 0; return AVERROR(ENOMEM); +} codec_config->extradata_size = new_extradata_size; return update_extradata(codec_config); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_writer: constify some variables
ffmpeg | branch: master | James Almer | Tue Mar 5 11:39:17 2024 -0300| [79c6ba900792fcf01a6e29bc7e924da222be2dab] | committer: James Almer avformat/iamf_writer: constify some variables Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79c6ba900792fcf01a6e29bc7e924da222be2dab --- libavformat/iamf_writer.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c index 8a903a0397..37ec8e732a 100644 --- a/libavformat/iamf_writer.c +++ b/libavformat/iamf_writer.c @@ -277,7 +277,7 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void if (iamf_audio_element->demixing_info) { AVIAMFParamDefinition *param = iamf_audio_element->demixing_info; -IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); +const IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); if (param->nb_subblocks != 1) { av_log(log_ctx, AV_LOG_ERROR, "nb_subblocks in demixing_info for stream group %u is not 1\n", stg->index); @@ -293,7 +293,7 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void } if (iamf_audio_element->recon_gain_info) { AVIAMFParamDefinition *param = iamf_audio_element->recon_gain_info; -IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); +const IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); if (param->nb_subblocks != 1) { av_log(log_ctx, AV_LOG_ERROR, "nb_subblocks in recon_gain_info for stream group %u is not 1\n", stg->index); @@ -495,7 +495,7 @@ static int scalable_channel_layout_config(const IAMFAudioElement *audio_element, flush_put_bits(&pb); avio_write(dyn_bc, header, put_bytes_count(&pb, 1)); for (int i = 0; i < element->nb_layers; i++) { -AVIAMFLayer *layer = element->layers[i]; +const AVIAMFLayer *layer = element->layers[i]; int layout; for (layout = 0; layout < FF_ARRAY_ELEMS(ff_iamf_scalable_ch_layouts); layout++) { if (!av_channel_layout_compare(&layer->ch_layout, &ff_iamf_scalable_ch_layouts[layout])) @@ -524,7 +524,7 @@ static int ambisonics_config(const IAMFAudioElement *audio_element, AVIOContext *dyn_bc) { const AVIAMFAudioElement *element = audio_element->celement; -AVIAMFLayer *layer = element->layers[0]; +const AVIAMFLayer *layer = element->layers[0]; ffio_write_leb(dyn_bc, 0); // ambisonics_mode ffio_write_leb(dyn_bc, layer->ch_layout.nb_channels); // output_channel_count @@ -857,7 +857,7 @@ static int write_parameter_block(const IAMFContext *iamf, AVIOContext *pb, const AVIAMFParamDefinition *param, void *log_ctx) { uint8_t header[MAX_IAMF_OBU_HEADER_SIZE]; -IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); +const IAMFParamDefinition *param_definition = ff_iamf_get_param_definition(iamf, param->parameter_id); PutBitContext pbc; AVIOContext *dyn_bc; uint8_t *dyn_buf = NULL; @@ -1034,7 +1034,8 @@ int ff_iamf_write_audio_frame(const IAMFContext *iamf, AVIOContext *pb, uint8_t header[MAX_IAMF_OBU_HEADER_SIZE]; PutBitContext pbc; AVIOContext *dyn_bc; -uint8_t *side_data, *dyn_buf = NULL; +const uint8_t *side_data; +uint8_t *dyn_buf = NULL; unsigned int skip_samples = 0, discard_padding = 0; size_t side_data_size; int dyn_size, type = audio_substream_id <= 17 ? @@ -1042,12 +1043,12 @@ int ff_iamf_write_audio_frame(const IAMFContext *iamf, AVIOContext *pb, int ret; if (!pkt->size) { -IAMFAudioElement *audio_element; +const IAMFAudioElement *audio_element; IAMFCodecConfig *codec_config; size_t new_extradata_size; -uint8_t *new_extradata = av_packet_get_side_data(pkt, - AV_PKT_DATA_NEW_EXTRADATA, - &new_extradata_size); +const uint8_t *new_extradata = av_packet_get_side_data(pkt, + AV_PKT_DATA_NEW_EXTRADATA, + &new_extradata_size); if (!new_extradata) return AVERROR_INVALIDDATA; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/avformat: add a function to return the name of stream groups
ffmpeg | branch: master | James Almer | Mon Mar 4 16:22:22 2024 -0300| [ab15c04dee5a607e4cedeff852839f96d8bc9129] | committer: James Almer avformat/avformat: add a function to return the name of stream groups Reviewed-by: Stefano Sabatini Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab15c04dee5a607e4cedeff852839f96d8bc9129 --- doc/APIchanges | 3 +++ libavformat/avformat.c | 10 ++ libavformat/avformat.h | 5 + libavformat/version.h | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 7d46ebb006..523945e511 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2024-03-05 - xx - lavf 60.24.100 - avformat.h + Add avformat_stream_group_name(). + 2024-02-28 - xx - swr 4.14.100 - swresample.h swr_convert() now accepts arrays of const pointers (to input and output). diff --git a/libavformat/avformat.c b/libavformat/avformat.c index eb898223d2..98dfac2f89 100644 --- a/libavformat/avformat.c +++ b/libavformat/avformat.c @@ -321,6 +321,16 @@ AVStream *ff_stream_clone(AVFormatContext *dst_ctx, const AVStream *src) return st; } +const char *avformat_stream_group_name(enum AVStreamGroupParamsType type) +{ +switch(type) { +case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT:return "IAMF Audio Element"; +case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION: return "IAMF Mix Presentation"; +case AV_STREAM_GROUP_PARAMS_TILE_GRID: return "Tile Grid"; +} +return NULL; +} + AVProgram *av_new_program(AVFormatContext *ac, int id) { AVProgram *program = NULL; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f4506f4cf1..3a584993dd 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2120,6 +2120,11 @@ const AVClass *av_stream_get_class(void); */ const AVClass *av_stream_group_get_class(void); +/** + * @return a string identifying the stream group type, or NULL if unknown + */ +const char *avformat_stream_group_name(enum AVStreamGroupParamsType type); + /** * Add a new empty stream group to a media file. * diff --git a/libavformat/version.h b/libavformat/version.h index a8385d1a7b..6c2776460b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 23 +#define LIBAVFORMAT_VERSION_MINOR 24 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/ffprobe: fix printing side data components and pieces
ffmpeg | branch: master | James Almer | Mon Mar 4 15:37:35 2024 -0300| [3769968afdae4b0530eef438cb6cccd243258532] | committer: James Almer fftools/ffprobe: fix printing side data components and pieces Components and pieces are side data specific fields and there's a variable amount of them. They also need to be identified in some form, so print a type too. Reviewed-by: Stefano Sabatini Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3769968afdae4b0530eef438cb6cccd243258532 --- fftools/ffprobe.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ac6b92f5d6..8390377159 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -244,6 +244,11 @@ static const char *get_frame_side_data_type(const void *data) return av_x_if_null(av_frame_side_data_name(sd->type), "unknown"); } +static const char *get_raw_string_type(const void *data) +{ +return data; +} + static struct section sections[] = { [SECTION_ID_CHAPTERS] = { SECTION_ID_CHAPTERS, "chapters", SECTION_FLAG_IS_ARRAY, { SECTION_ID_CHAPTER, -1 } }, [SECTION_ID_CHAPTER] ={ SECTION_ID_CHAPTER, "chapter", 0, { SECTION_ID_CHAPTER_TAGS, -1 } }, @@ -258,10 +263,10 @@ static struct section sections[] = { [SECTION_ID_FRAME_SIDE_DATA] = { SECTION_ID_FRAME_SIDE_DATA, "side_data", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, -1 }, .unique_name = "frame_side_data", .element_name = "side_datum", .get_type = get_frame_side_data_type }, [SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, "timecodes", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_TIMECODE, -1 } }, [SECTION_ID_FRAME_SIDE_DATA_TIMECODE] = { SECTION_ID_FRAME_SIDE_DATA_TIMECODE, "timecode", 0, { -1 } }, -[SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, "components", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, -1 } }, -[SECTION_ID_FRAME_SIDE_DATA_COMPONENT] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, "component", 0, { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, -1 } }, -[SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, "pieces", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_PIECE, -1 } }, -[SECTION_ID_FRAME_SIDE_DATA_PIECE] ={ SECTION_ID_FRAME_SIDE_DATA_PIECE, "piece", 0, { -1 } }, +[SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, "components", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, -1 }, .element_name = "component", .unique_name = "frame_side_data_components" }, +[SECTION_ID_FRAME_SIDE_DATA_COMPONENT] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, "component", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, -1 }, .unique_name = "frame_side_data_component", .element_name = "component_entry", .get_type = get_raw_string_type }, +[SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, "pieces", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_PIECE, -1 }, .element_name = "piece" }, +[SECTION_ID_FRAME_SIDE_DATA_PIECE] ={ SECTION_ID_FRAME_SIDE_DATA_PIECE, "piece", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { -1 }, .element_name = "piece_entry", .get_type = get_raw_string_type }, [SECTION_ID_FRAME_LOGS] = { SECTION_ID_FRAME_LOGS, "logs", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_LOG, -1 } }, [SECTION_ID_FRAME_LOG] = { SECTION_ID_FRAME_LOG, "log", 0, { -1 }, }, [SECTION_ID_LIBRARY_VERSIONS] = { SECTION_ID_LIBRARY_VERSIONS, "library_versions", SECTION_FLAG_IS_ARRAY, { SECTION_ID_LIBRARY_VERSION, -1 } }, @@ -2063,14 +2068,29 @@ static void print_dovi_metadata(WriterContext *w, const AVDOVIMetadata *dovi) for (int c = 0; c < 3; c++) { const AVDOVIReshapingCurve *curve = &mapping->curves[c]; -writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT); +writer_print_section_header(w, "Reshaping curve", SECTION_ID_FRAME_SIDE_DATA_COMPONENT); print_list_fmt("pivots", "%"PRIu16, curve->num_pivots, 1, curve->pivots[idx]); writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST); for (int i = 0; i < curve->num_pivots - 1; i++) { +AVBPrint piece_buf; + +av_bprint_init(&piece_buf, 0, AV_BPRINT_SIZE_AUTOMATIC); +switch (curve->mapping_idc[i]) { +case AV_DOVI_MAPPING_POLYNOMIAL: +av_bprintf(&piece_buf, "Polynomial"); +break; +case AV_DOVI_MAPPING_MMR: +
[FFmpeg-cvslog] fftools/ffprobe: add support for Stream Groups
ffmpeg | branch: master | James Almer | Sat Mar 2 16:03:20 2024 -0300| [7e4334e16aaf2cac7e21a6178295fe675f35dca8] | committer: James Almer fftools/ffprobe: add support for Stream Groups Reviewed-by: Stefano Sabatini Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e4334e16aaf2cac7e21a6178295fe675f35dca8 --- Changelog | 1 + doc/ffprobe.texi| 16 ++- doc/ffprobe.xsd | 1 + fftools/ffprobe.c | 146 ++-- tests/ref/fate/cavs-demux | 2 +- tests/ref/fate/ffprobe_compact | 2 +- tests/ref/fate/ffprobe_csv | 2 +- tests/ref/fate/ffprobe_default | 1 + tests/ref/fate/ffprobe_flat | 1 + tests/ref/fate/ffprobe_ini | 1 + tests/ref/fate/ffprobe_json | 1 + tests/ref/fate/ffprobe_xml | 2 +- tests/ref/fate/ffprobe_xsd | 2 +- tests/ref/fate/flv-demux| 2 +- tests/ref/fate/gapless-mp3-side-data| 2 +- tests/ref/fate/mov-mp4-disposition-mpegts-remux | 3 + tests/ref/fate/mov-mp4-ttml-dfxp| 3 + tests/ref/fate/mov-mp4-ttml-stpp| 3 + tests/ref/fate/oggopus-demux| 2 +- tests/ref/fate/ts-demux | 2 +- tests/ref/fate/ts-opus-demux| 2 +- tests/ref/fate/ts-small-demux | 2 +- tests/ref/fate/ts-timed-id3-demux | 2 +- 23 files changed, 174 insertions(+), 27 deletions(-) diff --git a/Changelog b/Changelog index f388d41b02..0ba3a77c08 100644 --- a/Changelog +++ b/Changelog @@ -30,6 +30,7 @@ version : - Change the default bitrate control method from VBR to CQP for QSV encoders. - removed deprecated ffmpeg CLI options -psnr and -map_channel - DVD-Video demuxer, powered by libdvdnav and libdvdread +- ffprobe -show_stream_groups option version 6.1: diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index b74ff650ac..6333249a6e 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -48,8 +48,8 @@ name (which may be shared by other sections), and an unique name. See the output of @option{sections}. Metadata tags stored in the container or in the streams are recognized -and printed in the corresponding "FORMAT", "STREAM" or "PROGRAM_STREAM" -section. +and printed in the corresponding "FORMAT", "STREAM", "STREAM_GROUP_STREAM" +or "PROGRAM_STREAM" section. @c man end @@ -232,6 +232,13 @@ multimedia stream. Each media stream information is printed within a dedicated section with name "PROGRAM_STREAM". +@item -show_stream_groups +Show information about stream groups and their streams contained in the +input multimedia stream. + +Each media stream information is printed within a dedicated section +with name "STREAM_GROUP_STREAM". + @item -show_chapters Show information about chapters stored in the format. @@ -415,8 +422,9 @@ keyN=valN [/SECTION] @end example -Metadata tags are printed as a line in the corresponding FORMAT, STREAM or -PROGRAM_STREAM section, and are prefixed by the string "TAG:". +Metadata tags are printed as a line in the corresponding FORMAT, STREAM, +STREAM_GROUP_STREAM or PROGRAM_STREAM section, and are prefixed by the +string "TAG:". A description of the accepted options follows. diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 9490a20ce8..dc04ce7142 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -337,6 +337,7 @@ + diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8390377159..4d4a85b5b0 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -112,8 +112,10 @@ static int do_show_format = 0; static int do_show_frames = 0; static int do_show_packets = 0; static int do_show_programs = 0; +static int do_show_stream_groups = 0; static int do_show_streams = 0; static int do_show_stream_disposition = 0; +static int do_show_stream_group_disposition = 0; static int do_show_data= 0; static int do_show_program_version = 0; static int do_show_library_versions = 0; @@ -126,6 +128,7 @@ static int do_show_chapter_tags = 0; static int do_show_format_tags = 0; static int do_show_frame_tags = 0; static int do_show_program_tags = 0; +static int do_show_stream_group_tags = 0; static int do_show_stream_tags = 0; static int do_show_packet_tags = 0; @@ -159,7 +162,7 @@ static int find_stream_info = 1; /* section structure definition */ -#define SECTION_MAX_NB_CHILDREN 10 +#define SECTION_MAX_NB_CHILDREN 11 typedef enum { SECTION_ID_NONE = -1, @@ -203,6 +206,14 @@ typedef enum { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_VERSION, SECTION_ID_PROGRAMS, +SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, +SECTION_ID_STREAM_
[FFmpeg-cvslog] fate/iamf: print stream group information
ffmpeg | branch: master | James Almer | Sun Mar 3 13:08:49 2024 -0300| [e3671e6441ae42bbca955d301b8a5066ff184f37] | committer: James Almer fate/iamf: print stream group information Reviewed-by: Stefano Sabatini Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3671e6441ae42bbca955d301b8a5066ff184f37 --- tests/fate/iamf.mak | 10 +++--- tests/ref/fate/iamf-5_1_4 | 60 tests/ref/fate/iamf-7_1_4 | 68 + tests/ref/fate/iamf-ambisonic_1 | 44 ++ tests/ref/fate/iamf-stereo | 20 5 files changed, 197 insertions(+), 5 deletions(-) diff --git a/tests/fate/iamf.mak b/tests/fate/iamf.mak index 8b0de7f4b2..f1292a3572 100644 --- a/tests/fate/iamf.mak +++ b/tests/fate/iamf.mak @@ -4,7 +4,7 @@ fate-iamf-stereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-iamf-stereo: CMD = transcode wav $(SRC) iamf " \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-stereo \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-stereo \ - -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" FATE_IAMF += fate-iamf-5_1_4 fate-iamf-5_1_4: tests/data/asynth-44100-10.wav tests/data/filtergraphs/iamf_5_1_4 tests/data/streamgroups/audio_element-5_1_4 tests/data/streamgroups/mix_presentation-5_1_4 @@ -13,7 +13,7 @@ fate-iamf-5_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-5_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" FATE_IAMF += fate-iamf-7_1_4 fate-iamf-7_1_4: tests/data/asynth-44100-12.wav tests/data/filtergraphs/iamf_7_1_4 tests/data/streamgroups/audio_element-7_1_4 tests/data/streamgroups/mix_presentation-7_1_4 @@ -22,7 +22,7 @@ fate-iamf-7_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-7_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" FATE_IAMF += fate-iamf-ambisonic_1 fate-iamf-ambisonic_1: tests/data/asynth-44100-4.wav tests/data/filtergraphs/iamf_ambisonic_1 tests/data/streamgroups/audio_element-ambisonic_1 tests/data/streamgroups/mix_presentation-ambisonic_1 @@ -31,10 +31,10 @@ fate-iamf-ambisonic_1: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_ambisonic_1 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-ambisonic_1 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-ambisonic_1 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map [MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map [MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" FATE_IAMF-$(call TRANSCODE, FLAC, IAMF, WAV_DEMUXER PCM_S16LE_DECODER) += $(FATE_IAMF) -FATE_FFMPEG += $(FATE_IAMF-yes) +FATE_FFMPEG_FFPROBE += $(FATE_IAMF-yes) fate-iamf: $(FATE_IAMF-yes) diff --git a/tests/ref/fate/iamf-5_1_4 b/tests/ref/fate/iamf-5_1_4 index 030765ecee..65542e0991 100644 --- a/tests/ref/fate/iamf-5_1_4 +++ b/tests/ref/fate/iamf-5_1_4 @@ -96,3 +96,63 @@ 3, 41472, 41472, 4608, 923, 0xa7225edf 4, 41472, 41472, 4608, 926, 0xc26a5eae 5, 41472, 41472, 4608,
[FFmpeg-cvslog] fate/mov: print stream group information for iamf tests
ffmpeg | branch: master | James Almer | Sun Mar 3 13:38:44 2024 -0300| [3635c1ee97faeb2fb0757a0b158e7de959dfa298] | committer: James Almer fate/mov: print stream group information for iamf tests Reviewed-by: Stefano Sabatini Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3635c1ee97faeb2fb0757a0b158e7de959dfa298 --- tests/fate/mov.mak | 23 +- tests/ref/fate/mov-mp4-iamf-5_1_4 | 318 tests/ref/fate/mov-mp4-iamf-7_1_4 | 362 tests/ref/fate/mov-mp4-iamf-ambisonic_1 | 230 tests/ref/fate/mov-mp4-iamf-stereo | 98 + 5 files changed, 1022 insertions(+), 9 deletions(-) diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 535647c474..fc98a29cb6 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -205,41 +205,46 @@ fate-mov-pcm-remux: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -m fate-mov-pcm-remux: CMP = oneline fate-mov-pcm-remux: REF = e76115bc392d702da38f523216bba165 -FATE_MOV_FFMPEG-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-stereo +FATE_MOV_FFMPEG_FFPROBE-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-stereo fate-mov-mp4-iamf-stereo: tests/data/asynth-44100-2.wav tests/data/streamgroups/audio_element-stereo tests/data/streamgroups/mix_presentation-stereo fate-mov-mp4-iamf-stereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-mov-mp4-iamf-stereo: CMD = transcode wav $(SRC) mp4 " \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-stereo \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-stereo \ - -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" -FATE_MOV_FFMPEG-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-5_1_4 +FATE_MOV_FFMPEG_FFPROBE-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-5_1_4 fate-mov-mp4-iamf-5_1_4: tests/data/asynth-44100-10.wav tests/data/filtergraphs/iamf_5_1_4 tests/data/streamgroups/audio_element-5_1_4 tests/data/streamgroups/mix_presentation-5_1_4 fate-mov-mp4-iamf-5_1_4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-10.wav fate-mov-mp4-iamf-5_1_4: CMD = transcode wav $(SRC) mp4 "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-5_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" -FATE_MOV_FFMPEG-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-7_1_4 +FATE_MOV_FFMPEG_FFPROBE-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-7_1_4 fate-mov-mp4-iamf-7_1_4: tests/data/asynth-44100-12.wav tests/data/filtergraphs/iamf_7_1_4 tests/data/streamgroups/audio_element-7_1_4 tests/data/streamgroups/mix_presentation-7_1_4 fate-mov-mp4-iamf-7_1_4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-12.wav fate-mov-mp4-iamf-7_1_4: CMD = transcode wav $(SRC) mp4 "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-7_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" -FATE_MOV_FFMPEG-$(call TRANSCODE, FLAC, MOV, WAV_DEMUXER PCM_S16LE_DECODER) += fate-mov-mp4-iamf-ambisonic_1 +FATE_MOV_FFMPEG_FFPROBE-$(call TRAN
[FFmpeg-cvslog] avformat/mov: fix setting dependent disposition on ambisonic IAMF streams
ffmpeg | branch: master | James Almer | Tue Mar 5 13:23:52 2024 -0300| [1a34eb3ffc3236d555b03dd60522545783f10fb7] | committer: James Almer avformat/mov: fix setting dependent disposition on ambisonic IAMF streams Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a34eb3ffc3236d555b03dd60522545783f10fb7 --- libavformat/mov.c | 5 - tests/ref/fate/mov-mp4-iamf-ambisonic_1 | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 023892611a..42a50dd2f8 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -926,6 +926,7 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom) for (int i = 0; i < iamf->nb_audio_elements; i++) { IAMFAudioElement *audio_element = iamf->audio_elements[i]; +const AVIAMFAudioElement *element; AVStreamGroup *stg = avformat_stream_group_create(c->fc, AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT, NULL); @@ -937,7 +938,7 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_iamf_audio_element_free(&stg->params.iamf_audio_element); stg->id = audio_element->audio_element_id; /* Transfer ownership */ -stg->params.iamf_audio_element = audio_element->element; +element = stg->params.iamf_audio_element = audio_element->element; audio_element->element = NULL; for (int j = 0; j < audio_element->nb_substreams; j++) { @@ -964,6 +965,8 @@ static int mov_read_iacb(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->refcount++; } +if (element->audio_element_type == AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE) +stream->disposition |= AV_DISPOSITION_DEPENDENT; if (i || j) { stream->disposition |= AV_DISPOSITION_DEPENDENT; if (audio_element->layers[0].substream_count == 1) diff --git a/tests/ref/fate/mov-mp4-iamf-ambisonic_1 b/tests/ref/fate/mov-mp4-iamf-ambisonic_1 index 40c0ee3078..fd2cf82c4d 100644 --- a/tests/ref/fate/mov-mp4-iamf-ambisonic_1 +++ b/tests/ref/fate/mov-mp4-iamf-ambisonic_1 @@ -109,7 +109,7 @@ DISPOSITION:non_diegetic=0 DISPOSITION:captions=0 DISPOSITION:descriptions=0 DISPOSITION:metadata=0 -DISPOSITION:dependent=0 +DISPOSITION:dependent=1 DISPOSITION:still_image=0 [/STREAM] [STREAM] @@ -224,7 +224,7 @@ DISPOSITION:non_diegetic=0 DISPOSITION:captions=0 DISPOSITION:descriptions=0 DISPOSITION:metadata=0 -DISPOSITION:dependent=0 +DISPOSITION:dependent=1 DISPOSITION:still_image=0 [/STREAM] [STREAM] ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avutil/hwcontext_videotoolbox: Allocate pub and priv frames hwctx together
ffmpeg | branch: master | Andreas Rheinhardt | Sun Feb 11 19:27:09 2024 +0100| [68f48d5c3021bb31f44cf99f52593b44c553db53] | committer: Andreas Rheinhardt avutil/hwcontext_videotoolbox: Allocate pub and priv frames hwctx together This is possible because the lifetime of both coincide. Besides reducing the number of allocations this also simplifies access to VTFramesContext as one no longer has to go through AVHWFramesInternal. Tested-by: Jan Ekström Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68f48d5c3021bb31f44cf99f52593b44c553db53 --- libavutil/hwcontext_videotoolbox.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c index fe469dc161..823cf9a8ee 100644 --- a/libavutil/hwcontext_videotoolbox.c +++ b/libavutil/hwcontext_videotoolbox.c @@ -34,6 +34,10 @@ #include "pixdesc.h" typedef struct VTFramesContext { +/** + * The public AVVTFramesContext. See hwcontext_videotoolbox.h for it. + */ +AVVTFramesContext p; CVPixelBufferPoolRef pool; } VTFramesContext; @@ -176,12 +180,12 @@ uint32_t av_map_videotoolbox_format_from_pixfmt2(enum AVPixelFormat pix_fmt, boo static int vt_pool_alloc(AVHWFramesContext *ctx) { -VTFramesContext *fctx = ctx->internal->priv; +VTFramesContext *fctx = ctx->hwctx; +AVVTFramesContext *hw_ctx = &fctx->p; CVReturn err; CFNumberRef w, h, pixfmt; uint32_t cv_pixfmt; CFMutableDictionaryRef attributes, iosurface_properties; -AVVTFramesContext *hw_ctx = ctx->hwctx; attributes = CFDictionaryCreateMutable( NULL, @@ -237,7 +241,7 @@ static AVBufferRef *vt_pool_alloc_buffer(void *opaque, size_t size) AVBufferRef *buf; CVReturn err; AVHWFramesContext *ctx = opaque; -VTFramesContext *fctx = ctx->internal->priv; +VTFramesContext *fctx = ctx->hwctx; err = CVPixelBufferPoolCreatePixelBuffer( NULL, @@ -260,7 +264,7 @@ static AVBufferRef *vt_pool_alloc_buffer(void *opaque, size_t size) static void vt_frames_uninit(AVHWFramesContext *ctx) { -VTFramesContext *fctx = ctx->internal->priv; +VTFramesContext *fctx = ctx->hwctx; if (fctx->pool) { CVPixelBufferPoolRelease(fctx->pool); fctx->pool = NULL; @@ -763,10 +767,9 @@ const HWContextType ff_hwcontext_type_videotoolbox = { .type = AV_HWDEVICE_TYPE_VIDEOTOOLBOX, .name = "videotoolbox", -.frames_priv_size = sizeof(VTFramesContext), +.frames_hwctx_size= sizeof(VTFramesContext), .device_create= vt_device_create, -.frames_hwctx_size= sizeof(AVVTFramesContext), .frames_init = vt_frames_init, .frames_get_buffer= vt_get_buffer, .frames_get_constraints = vt_frames_get_constraints, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fate/mov: use framecrc for the remaining avif/heic tests
ffmpeg | branch: master | James Almer | Sun Mar 3 14:16:55 2024 -0300| [708175616c5e41e9cae8264e6552d8339d2735ca] | committer: James Almer fate/mov: use framecrc for the remaining avif/heic tests Put them in sync with the other tests. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=708175616c5e41e9cae8264e6552d8339d2735ca --- tests/fate/mov.mak | 21 +++-- tests/ref/fate/mov-avif-demux-still-image-1-item| 8 ++-- .../fate/mov-avif-demux-still-image-multiple-items | 8 ++-- tests/ref/fate/mov-heic-demux-still-image-1-item| 8 ++-- .../fate/mov-heic-demux-still-image-multiple-items | 12 5 files changed, 21 insertions(+), 36 deletions(-) diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index b443f1418c..062575453d 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -143,23 +143,24 @@ fate-mov-mp4-ttml-stpp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capabil fate-mov-mp4-ttml-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000 -tag:s dfxp -strict unofficial" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" # avif demuxing - still image with 1 item. -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, AV1, AV1_PARSER) \ +FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, AV1, AV1_PARSER) \ += fate-mov-avif-demux-still-image-1-item -fate-mov-avif-demux-still-image-1-item: CMD = framemd5 -c:v av1 -i $(TARGET_SAMPLES)/avif/still_image.avif -c:v copy +fate-mov-avif-demux-still-image-1-item: CMD = framecrc -c:v av1 -i $(TARGET_SAMPLES)/avif/still_image.avif -c:v copy -# avif demuxing - still image with multiple items. only the primary item will be -# parsed. -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, AV1, AV1_PARSER) \ +# avif demuxing - still image with multiple items. +FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, AV1, AV1_PARSER) \ += fate-mov-avif-demux-still-image-multiple-items -fate-mov-avif-demux-still-image-multiple-items: CMD = framemd5 -c:v av1 -i $(TARGET_SAMPLES)/avif/still_image_exif.avif -c:v copy +fate-mov-avif-demux-still-image-multiple-items: CMD = framecrc -c:v av1 -i $(TARGET_SAMPLES)/avif/still_image_exif.avif -c:v copy -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, HEVC, HEVC_PARSER) \ +# heic demuxing - still image with 1 item. +FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, HEVC, HEVC_PARSER) \ += fate-mov-heic-demux-still-image-1-item -fate-mov-heic-demux-still-image-1-item: CMD = framemd5 -i $(TARGET_SAMPLES)/heif-conformance/C002.heic -c:v copy +fate-mov-heic-demux-still-image-1-item: CMD = framecrc -i $(TARGET_SAMPLES)/heif-conformance/C002.heic -c:v copy -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, HEVC, HEVC_PARSER) \ +# heic demuxing - still image with multiple items. +FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, HEVC, HEVC_PARSER) \ += fate-mov-heic-demux-still-image-multiple-items -fate-mov-heic-demux-still-image-multiple-items: CMD = framemd5 -i $(TARGET_SAMPLES)/heif-conformance/C003.heic -c:v copy -map 0 +fate-mov-heic-demux-still-image-multiple-items: CMD = framecrc -i $(TARGET_SAMPLES)/heif-conformance/C003.heic -c:v copy -map 0 # heic demuxing - still image with multiple items in a grid. FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call DEMMUX, MOV, FRAMECRC, HEVC_DECODER HEVC_PARSER) \ diff --git a/tests/ref/fate/mov-avif-demux-still-image-1-item b/tests/ref/fate/mov-avif-demux-still-image-1-item index 1ead593caa..0108877d10 100644 --- a/tests/ref/fate/mov-avif-demux-still-image-1-item +++ b/tests/ref/fate/mov-avif-demux-still-image-1-item @@ -1,11 +1,7 @@ -#format: frame checksums -#version: 2 -#hash: MD5 -#extradata 0, 4, b24b71499a8480fa4469bcbcba2140aa +#extradata 0:4, 0x021c008d #tb 0: 1/1 #media_type 0: video #codec_id 0: av1 #dimensions 0: 352x288 #sar 0: 0/1 -#stream#, dts,pts, duration, size, hash -0, 0, 0,1,36265, 235b0c6e389c4084845981e08d60db04 +0, 0, 0,1,36265, 0x6c8c9941 diff --git a/tests/ref/fate/mov-avif-demux-still-image-multiple-items b/tests/ref/fate/mov-avif-demux-still-image-multiple-items index 1ead593caa..0108877d10 100644 --- a/tests/ref/fate/mov-avif-demux-still-image-multiple-items +++ b/tests/ref/fate/mov-avif-demux-still-image-multiple-items @@ -1,11 +1,7 @@ -#format: frame checksums -#version: 2 -#hash: MD5 -#extradata 0, 4, b24b71499a8480fa4469bcbcba2140aa +#extradata 0:4, 0x021c008d #tb 0: 1/1 #media_type 0: video #codec_id 0: av1 #dimensions 0: 352x288 #sar 0: 0/1 -#stream#, dts,pts, duration,
[FFmpeg-cvslog] fate/mov: add a heic test with a derived image using a single item twice
ffmpeg | branch: master | James Almer | Sun Mar 3 23:45:50 2024 -0300| [924c7cd74576f9f9a4fa1f9f61610cb8bcdd8e2a] | committer: James Almer fate/mov: add a heic test with a derived image using a single item twice Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=924c7cd74576f9f9a4fa1f9f61610cb8bcdd8e2a --- tests/fate/mov.mak | 6 +++ tests/ref/fate/mov-heic-demux-still-image-iovl-2 | 54 2 files changed, 60 insertions(+) diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 062575453d..49077ecfb3 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -174,6 +174,12 @@ FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call DEMMUX, MOV, FRAMECRC, HEVC_DECODER HEVC_ fate-mov-heic-demux-still-image-iovl: CMD = stream_demux mov $(TARGET_SAMPLES)/heif-conformance/C015.heic "" "-c:v copy -map 0:g:0" \ "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" +# heic demuxing - still image where one image item is placed twice on an overlay canvas. +FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call DEMMUX, MOV, FRAMECRC, HEVC_DECODER HEVC_PARSER) \ + += fate-mov-heic-demux-still-image-iovl-2 +fate-mov-heic-demux-still-image-iovl-2: CMD = stream_demux mov $(TARGET_SAMPLES)/heif-conformance/C021.heic "" "-c:v copy -map 0:g:0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" + # Resulting remux should have: # 1. first audio stream with AV_DISPOSITION_HEARING_IMPAIRED # 2. second audio stream with AV_DISPOSITION_VISUAL_IMPAIRED | DESCRIPTIONS diff --git a/tests/ref/fate/mov-heic-demux-still-image-iovl-2 b/tests/ref/fate/mov-heic-demux-still-image-iovl-2 new file mode 100644 index 00..8ee3543e43 --- /dev/null +++ b/tests/ref/fate/mov-heic-demux-still-image-iovl-2 @@ -0,0 +1,54 @@ +#extradata 0: 100, 0xee3e15e9 +#tb 0: 1/1 +#media_type 0: video +#codec_id 0: hevc +#dimensions 0: 1280x720 +#sar 0: 0/1 +0, 0, 0,1, 111554, 0xa0679859 +[STREAM_GROUP] +index=0 +id=0x3eb +nb_streams=1 +type=Tile Grid +DISPOSITION:default=0 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +DISPOSITION:non_diegetic=0 +DISPOSITION:captions=0 +DISPOSITION:descriptions=0 +DISPOSITION:metadata=0 +DISPOSITION:dependent=0 +DISPOSITION:still_image=0 +TAG:title=Derived image +[STREAM] +index=0 +id=0x3ea +DISPOSITION:default=1 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +DISPOSITION:non_diegetic=0 +DISPOSITION:captions=0 +DISPOSITION:descriptions=0 +DISPOSITION:metadata=0 +DISPOSITION:dependent=0 +DISPOSITION:still_image=0 +[/STREAM] +[/STREAM_GROUP] ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fate/mov: print stream group information for avif/heic tests
ffmpeg | branch: master | James Almer | Sun Mar 3 14:10:22 2024 -0300| [1f73b52850b5224a2503e8d5c96100a310585621] | committer: James Almer fate/mov: print stream group information for avif/heic tests Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f73b52850b5224a2503e8d5c96100a310585621 --- tests/fate-run.sh | 13 +++ tests/fate/mov.mak | 12 ++- tests/ref/fate/mov-heic-demux-still-image-grid | 133 ++--- tests/ref/fate/mov-heic-demux-still-image-iovl | 81 +-- 4 files changed, 215 insertions(+), 24 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 7a7344e645..2de560354f 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -272,6 +272,19 @@ transcode(){ run ffprobe${PROGSUF}${EXECSUF} -bitexact $ffprobe_opts $tencfile || return } +stream_demux(){ +src_fmt=$1 +srcfile=$2 +src_opts=$3 +enc_opts=$4 +ffprobe_opts=$5 +tsrcfile=$(target_path $srcfile) +ffmpeg $DEC_OPTS -f $src_fmt $src_opts -i $tsrcfile $ENC_OPTS $FLAGS $enc_opts \ +-f framecrc - || return +test -z "$ffprobe_opts" || \ +run ffprobe${PROGSUF}${EXECSUF} -bitexact $ffprobe_opts $tsrcfile || return +} + stream_remux(){ src_fmt=$1 srcfile=$2 diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index fc98a29cb6..b443f1418c 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -161,13 +161,17 @@ FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, HEVC, HEVC_PARSER) \ += fate-mov-heic-demux-still-image-multiple-items fate-mov-heic-demux-still-image-multiple-items: CMD = framemd5 -i $(TARGET_SAMPLES)/heif-conformance/C003.heic -c:v copy -map 0 -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, HEVC, HEVC_PARSER) \ +# heic demuxing - still image with multiple items in a grid. +FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call DEMMUX, MOV, FRAMECRC, HEVC_DECODER HEVC_PARSER) \ += fate-mov-heic-demux-still-image-grid -fate-mov-heic-demux-still-image-grid: CMD = framemd5 -i $(TARGET_SAMPLES)/heif-conformance/C007.heic -c:v copy -map 0:g:0 +fate-mov-heic-demux-still-image-grid: CMD = stream_demux mov $(TARGET_SAMPLES)/heif-conformance/C007.heic "" "-c:v copy -map 0:g:0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" -FATE_MOV_FFMPEG_SAMPLES-$(call FRAMEMD5, MOV, HEVC, HEVC_PARSER) \ +# heic demuxing - still image with multiple items in an overlay canvas. +FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call DEMMUX, MOV, FRAMECRC, HEVC_DECODER HEVC_PARSER) \ += fate-mov-heic-demux-still-image-iovl -fate-mov-heic-demux-still-image-iovl: CMD = framemd5 -i $(TARGET_SAMPLES)/heif-conformance/C015.heic -c:v copy -map 0:g:0 +fate-mov-heic-demux-still-image-iovl: CMD = stream_demux mov $(TARGET_SAMPLES)/heif-conformance/C015.heic "" "-c:v copy -map 0:g:0" \ + "-show_entries stream_group=index,id,nb_streams,type:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition" # Resulting remux should have: # 1. first audio stream with AV_DISPOSITION_HEARING_IMPAIRED diff --git a/tests/ref/fate/mov-heic-demux-still-image-grid b/tests/ref/fate/mov-heic-demux-still-image-grid index 6fde8fff28..b15ce91e1a 100644 --- a/tests/ref/fate/mov-heic-demux-still-image-grid +++ b/tests/ref/fate/mov-heic-demux-still-image-grid @@ -1,10 +1,7 @@ -#format: frame checksums -#version: 2 -#hash: MD5 -#extradata 0, 100, 5444bf01e03182c73ae957179d560f4d -#extradata 1, 100, 5444bf01e03182c73ae957179d560f4d -#extradata 2, 100, 5444bf01e03182c73ae957179d560f4d -#extradata 3, 100, 5444bf01e03182c73ae957179d560f4d +#extradata 0: 100, 0xee3e15e9 +#extradata 1: 100, 0xee3e15e9 +#extradata 2: 100, 0xee3e15e9 +#extradata 3: 100, 0xee3e15e9 #tb 0: 1/1 #media_type 0: video #codec_id 0: hevc @@ -25,8 +22,120 @@ #codec_id 3: hevc #dimensions 3: 1280x720 #sar 3: 0/1 -#stream#, dts,pts, duration, size, hash -0, 0, 0,1, 111554, 03ceabfab39afd2e2e796b9362111f32 -1, 0, 0,1, 111481, e5db978adbe4de7ee50fe73abc39fcfa -2, 0, 0,1, 111451, 08700213113cadbb6628ecb8253c1c2a -3, 0, 0,1, 111353, 5de942e14c848e5e22fad5d88fb13776 +0, 0, 0,1, 111554, 0xa0679859 +1, 0, 0,1, 111481, 0xc5386eaf +2, 0, 0,1, 111451, 0xdbde88de +3, 0, 0,1, 111353, 0x26435c8c +[STREAM_GROUP] +index=0 +id=0x3f1 +nb_streams=4 +type=Tile Grid +DISPOSITION:default=1 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSIT
[FFmpeg-cvslog] fate/iamf: print stream disposition
ffmpeg | branch: master | James Almer | Tue Mar 5 18:07:25 2024 -0300| [d34e9a81b1d202bb80edf42caf76c01f573a3bc5] | committer: James Almer fate/iamf: print stream disposition Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d34e9a81b1d202bb80edf42caf76c01f573a3bc5 --- tests/fate/iamf.mak | 8 +- tests/ref/fate/iamf-5_1_4 | 216 ++ tests/ref/fate/iamf-7_1_4 | 252 tests/ref/fate/iamf-ambisonic_1 | 144 +++ tests/ref/fate/iamf-stereo | 36 ++ 5 files changed, 652 insertions(+), 4 deletions(-) diff --git a/tests/fate/iamf.mak b/tests/fate/iamf.mak index f1292a3572..46d4f41c5f 100644 --- a/tests/fate/iamf.mak +++ b/tests/fate/iamf.mak @@ -4,7 +4,7 @@ fate-iamf-stereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-iamf-stereo: CMD = transcode wav $(SRC) iamf " \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-stereo \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-stereo \ - -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" + -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id:stream_group_stream_disposition" FATE_IAMF += fate-iamf-5_1_4 fate-iamf-5_1_4: tests/data/asynth-44100-10.wav tests/data/filtergraphs/iamf_5_1_4 tests/data/streamgroups/audio_element-5_1_4 tests/data/streamgroups/mix_presentation-5_1_4 @@ -13,7 +13,7 @@ fate-iamf-5_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-5_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-5_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id:stream_group_stream_disposition" FATE_IAMF += fate-iamf-7_1_4 fate-iamf-7_1_4: tests/data/asynth-44100-12.wav tests/data/filtergraphs/iamf_7_1_4 tests/data/streamgroups/audio_element-7_1_4 tests/data/streamgroups/mix_presentation-7_1_4 @@ -22,7 +22,7 @@ fate-iamf-7_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-7_1_4 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-7_1_4 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id:stream_group_stream_disposition" FATE_IAMF += fate-iamf-ambisonic_1 fate-iamf-ambisonic_1: tests/data/asynth-44100-4.wav tests/data/filtergraphs/iamf_ambisonic_1 tests/data/streamgroups/audio_element-ambisonic_1 tests/data/streamgroups/mix_presentation-ambisonic_1 @@ -31,7 +31,7 @@ fate-iamf-ambisonic_1: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters -/filter_complex $(TARGET_PATH)/tests/data/filtergraphs/iamf_ambisonic_1 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-ambisonic_1 \ -/stream_group $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-ambisonic_1 \ - -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map [MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id" + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map [MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" "-show_entries stream_group=index,id,nb_streams,type:stream_group_stream=index,id:stream_group_stream_disposition" FATE_IAMF-$(call TRANSCODE, FLAC, IAMF, WAV_DEMUXER PCM_S16LE_DECODER) += $(FATE_IAMF) diff --git a/tests/ref/fate/iamf-
[FFmpeg-cvslog] avcodec/decode: remove HDR10+ from the global side data array
ffmpeg | branch: master | James Almer | Tue Mar 5 11:46:32 2024 -0300| [d65908c3d416e331e075c3a5ffe7bc670112a018] | committer: James Almer avcodec/decode: remove HDR10+ from the global side data array It's a per packet/frame side data type. Reviewed-by: Derek Buitenhuis Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d65908c3d416e331e075c3a5ffe7bc670112a018 --- libavcodec/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 7c67b18bc4..cd483528c5 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1433,7 +1433,6 @@ static const struct { { AV_PKT_DATA_MASTERING_DISPLAY_METADATA, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA }, { AV_PKT_DATA_CONTENT_LIGHT_LEVEL, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL }, { AV_PKT_DATA_ICC_PROFILE,AV_FRAME_DATA_ICC_PROFILE }, -{ AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, { AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT }, }; @@ -1446,6 +1445,7 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx, } sd[] = { { AV_PKT_DATA_A53_CC, AV_FRAME_DATA_A53_CC }, { AV_PKT_DATA_AFD,AV_FRAME_DATA_AFD }, +{ AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, { AV_PKT_DATA_S12M_TIMECODE, AV_FRAME_DATA_S12M_TIMECODE }, { AV_PKT_DATA_SKIP_SAMPLES, AV_FRAME_DATA_SKIP_SAMPLES }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".