[FFmpeg-devel] [PATCH v4] avformat: add MMTP parser and MMT/TLV demuxer

2023-04-28 Thread SuperFashi
v1 -> v2: Refactor using GetByteContext; Fix compile error. v2 -> v3: Remove debug statement. v3 -> v4: Squash commits (sorry, first time git patch user :( This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in ISO/IEC 23008-1, and an MMT protocol over TLV packets

[FFmpeg-devel] [PATCH v3] avformat: add MMTP parser and MMT/TLV demuxer

2023-04-28 Thread SuperFashi
v0 -> v1: Refactor using GetByteContext; Fix compile error. v1 -> v2: Remove debug statement. This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxer, as defined in ARIB STD-B32. Currently, it supports

[FFmpeg-devel] [PATCH v2] avformat: add MMTP parser and MMT/TLV demuxer

2023-04-28 Thread SuperFashi
v0 -> v1: Refactor using GetByteContext; Fix compile error. This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxer, as defined in ARIB STD-B32. Currently, it supports HEVC, AAC LATM, and ARIB-TTML

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc_ps: use get_{ue, se}_golomb() for some PPS Range extension fields

2023-04-28 Thread Michael Niedermayer
On Thu, Apr 27, 2023 at 04:44:06PM -0300, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/hevc_ps.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) should be ok thx for going over the spec and "optimizing" each [...] -- Michael GnuPG fingerprint:

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: Ensure calculation of buf_size cannot overflow.

2023-04-28 Thread Michael Niedermayer
On Fri, Apr 28, 2023 at 07:42:48AM +0300, etemesica...@gmail.com wrote: > From: caleb > > --- > libavcodec/jpeg2000htdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c > index 51cd96e0f1..d77293ddd8 100644 >

Re: [FFmpeg-devel] [PATCH] avformat: add MMTP parser and MMT/TLV demuxer

2023-04-28 Thread Michael Niedermayer
On Sat, Apr 29, 2023 at 02:31:28AM +0900, SuperFashi wrote: > This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in > ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxer, as > defined in ARIB STD-B32. Currently, it supports hevc, aac (loas), and >

Re: [FFmpeg-devel] [PATCH 16/21] fftools/ffmpeg: rework audio-decode timestamp handling

2023-04-28 Thread Michael Niedermayer
On Fri, Apr 28, 2023 at 03:11:16PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2023-04-28 13:42:17) > > On Thu, Apr 27, 2023 at 04:25:56PM +0200, Anton Khirnov wrote: > > > Stop using InputStream.dts for generating missing timestamps for decoded > > > frames, because it contains

[FFmpeg-devel] [PATCH v2 4/4] decklink_enc: add support for SMPTE 2038 VANC packet output

2023-04-28 Thread Devin Heitmueller
Support decoding and embedding VANC packets delivered via SMPTE 2038 into the SDI output. We leverage an intermediate queue because data packets are announced separately from video but we need to embed the data into the video frame when it is output. Note that this patch has some additional

[FFmpeg-devel] [PATCH v2 3/4] decklink: Convert to using avpriv_packet_list functions

2023-04-28 Thread Devin Heitmueller
The existing DecklinkQueue implementation was using the PacketList structure but wasn't using the standard avpriv_packet_list_get and avpriv_packet_list_put functions. Convert to using them so we eliminate the duplicate logic, per Marton Balint's suggestion. Signed-off-by: Devin Heitmueller ---

[FFmpeg-devel] [PATCH v2 2/4] decklink: rename AVPacketQueue to DecklinkPacketQueue

2023-04-28 Thread Devin Heitmueller
The threadsafe queue used within the decklink module was named "AVPacketQueue" which implies that it is part of the public API, which it is not. Rename the functions and the name of the queue struct to make clear it is used exclusively by decklink, per Marton Balint's suggestion. Signed-off-by:

[FFmpeg-devel] [PATCH v2 1/4] decklink: Move AVPacketQueue into decklink_common

2023-04-28 Thread Devin Heitmueller
Move the AVPacketQueue functionality that is currently only used for the decklink decode module into decklink_common, so it can be shared by the decklink encoder (i.e. for VANC insertion when we receive data packets separate from video). Signed-off-by: Devin Heitmueller ---

[FFmpeg-devel] [PATCH v2 0/4] Implement SMPTE 2038 output support over Decklink SDI

2023-04-28 Thread Devin Heitmueller
This patch series implements output of SMPTE 2038 VANC over SDI, building on the prior patch series which added it in the TS domain. Note that we moved the AVPacketQueue to be common code within libavdevice so it can be shared by both the decklink input and output. This latest revision of the

[FFmpeg-devel] [PATCH] avformat: add MMTP parser and MMT/TLV demuxer

2023-04-28 Thread SuperFashi
This patch adds an MPEG Media Transport Protocol (MMTP) parser, as defined in ISO/IEC 23008-1, and an MMT protocol over TLV packets (MMT/TLV) demuxer, as defined in ARIB STD-B32. Currently, it supports hevc, aac (loas), and arib-ttml demuxing. Since MMTP is designed to transmit over IP, there

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix leak of AVIOContext in read_binary()

2023-04-28 Thread Anton Khirnov
Quoting James Almer (2023-04-28 18:36:39) > It was only being freed on failure. > > Signed-off-by: James Almer > --- > fftools/ffmpeg_filter.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) Looks good, thanks -- Anton Khirnov ___

[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix leak of AVIOContext in read_binary()

2023-04-28 Thread James Almer
It was only being freed on failure. Signed-off-by: James Almer --- fftools/ffmpeg_filter.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index b26160b375..161ea9c866 100644 --- a/fftools/ffmpeg_filter.c +++

[FFmpeg-devel] [PATCH v4 6/6] decklink_enc: add support for playout of 608 captions in MOV files

2023-04-28 Thread Devin Heitmueller
Unlike other cases where the closed captions are embedded in the video stream as MPEG-2 userdata or H.264 SEI data, with MOV files the captions are often found on a separate "e608" subtitle track. Add support for playout of such files, leveraging the new ccfifo mechanism to ensure that they are

[FFmpeg-devel] [PATCH v4 5/6] vf_ccrepack: Add new filter to repack CEA-708 side data

2023-04-28 Thread Devin Heitmueller
THis filter can correct certain issues seen from upstream sources where the cc_count is not properly set or the CEA-608 tuples are not at the start of the payload as expected. Make use of the ccfifo to extract and immediately repack the CEA-708 side data, thereby removing any extra padding and

[FFmpeg-devel] [PATCH v4 4/6] tinterlace: Properly preserve CEA-708 closed captions

2023-04-28 Thread Devin Heitmueller
Because the interlacing filter halves the effective framerate, we need to ensure that no CEA-708 data is lost as frames are merged. Make use of the new ccfifo mechanism to ensure that caption data is properly preserved as frames pass through the filter. Thanks to Thomas Mundt for review and

[FFmpeg-devel] [PATCH v4 3/6] yadif: Properly preserve CEA-708 closed captions

2023-04-28 Thread Devin Heitmueller
Various deinterlacing modes have the effect of doubling the framerate, and we need to ensure that the caption data isn't duplicated (or else you get double captions on-screen). Use the new ccfifo mechanism for yadif (and yadif_cuda and bwdif since they use the same yadif core) so that CEA-708

[FFmpeg-devel] [PATCH v4 2/6] vf_fps: properly preserve CEA-708 captions

2023-04-28 Thread Devin Heitmueller
The existing implementation made an attempt to remove duplicate captions if increasing the framerate, but made no attempt to handle reducing the framerate, nor did it rewrite the caption payloads to have the appropriate cc_count (e.g. the cc_count needs to change from 20 to 10 when going from

[FFmpeg-devel] [PATCH v4 1/6] ccfifo: Properly handle CEA-708 captions through framerate conversion

2023-04-28 Thread Devin Heitmueller
When transcoding video that contains 708 closed captions, the caption data is tied to the frames as side data. Simply dropping or adding frames to change the framerate will result in loss of data, so the caption data needs to be preserved and reformatted. For example, without this patch

[FFmpeg-devel] [PATCH v4 0/6] Add support for Closed Caption FIFO

2023-04-28 Thread Devin Heitmueller
This updated series includes fixes for feedback by Lance Wang, as well as a second set of inject/extract functions that let you pass the raw CC bytes as opposed to an AVFrame. This is used by the last patch in the series to playout e608 packets with the decklink output. Devin Heitmueller (6):

Re: [FFmpeg-devel] [PATCH 08/21] fftools/ffmpeg_filter: add filtergraph private data

2023-04-28 Thread Nicolas George
James Almer (12023-04-28): > The longtime goal of this work is to have completely standalone modules > within the CLI and each of them threaded. So while ffmpeg may not be a > library, clearly defining what fields should be accessed from "the outside" > and which shouldn't would have the same

Re: [FFmpeg-devel] [PATCH 55/97] Vulkan patchset part 2 - hwcontext rewrite and filtering

2023-04-28 Thread Niklas Haas
On Mon, 24 Apr 2023 17:56:38 +0200 Lynne wrote: > This is part two of the vulkan patchset, which contains all the > hwcontext and vulkan.c rewrites, and filtering changes. > > 55 patches attached. The new Vulkan code looks like a clear improvement over the status quo to me. I tested it locally

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add AV1 encoder

2023-04-28 Thread Samuel Raposo Vieira Mira
Thanks for review. From: ffmpeg-devel on behalf of Tomas Härdin Date: Thursday, 27. April 2023 at 15.37 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add AV1 encoder ons 2023-04-26 klockan 14:02 + skrev Samuel Raposo Vieira Mira: >

Re: [FFmpeg-devel] [PATCH 16/21] fftools/ffmpeg: rework audio-decode timestamp handling

2023-04-28 Thread Anton Khirnov
Quoting Michael Niedermayer (2023-04-28 13:42:17) > On Thu, Apr 27, 2023 at 04:25:56PM +0200, Anton Khirnov wrote: > > Stop using InputStream.dts for generating missing timestamps for decoded > > frames, because it contains pre-decoding timestamps and there may be > > arbitrary amount of delay

Re: [FFmpeg-devel] [PATCH 08/21] fftools/ffmpeg_filter: add filtergraph private data

2023-04-28 Thread James Almer
On 4/28/2023 5:45 AM, Nicolas George wrote: Anton Khirnov (12023-04-27): Start by moving OutputStream.filtered_frame to it, which really belongs to the filtergraph rather than the output stream. Then just move them to OutputStream. This is just code noise for no practical benefit, since

Re: [FFmpeg-devel] [PATCH 16/21] fftools/ffmpeg: rework audio-decode timestamp handling

2023-04-28 Thread Michael Niedermayer
On Thu, Apr 27, 2023 at 04:25:56PM +0200, Anton Khirnov wrote: > Stop using InputStream.dts for generating missing timestamps for decoded > frames, because it contains pre-decoding timestamps and there may be > arbitrary amount of delay between input packets and output frames (e.g. > dependent on

Re: [FFmpeg-devel] [PATCH 2/8] lavu: new AVWriter API

2023-04-28 Thread Nicolas George
Rodney Baker (12023-04-28): > I'm not normally a reviewer, but I noticed a few minor grammatical things > that > stood out - hope this is OK. Thanks, it is absolutely useful. > Nit - s/compating/comparing/ Fixed. > > +**Note:** AVWriter is 8-bit clean, the strings it manipulates can be >

[FFmpeg-devel] [PATCH] avcodec/mediacodec: Add VP8 encoder

2023-04-28 Thread Samuel Raposo Vieira Mira
Connected FFmpeg to Mediacodec VP8 encoder. Minor Version bump. --- configure | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/mediacodec_wrapper.c | 4 libavcodec/mediacodecenc.c | 29 +

Re: [FFmpeg-devel] [PATCH 2/8] lavu: new AVWriter API

2023-04-28 Thread Rodney Baker
I'm not normally a reviewer, but I noticed a few minor grammatical things that stood out - hope this is OK. Regards, Rodney. On Friday, 28 April 2023 7:25:02 PM ACST Nicolas George wrote: > Signed-off-by: Nicolas George > --- > doc/avwriter_intro.md | 186 >

Re: [FFmpeg-devel] [PATCH] lavu: header and documentation for AVWriter

2023-04-28 Thread Nicolas George
James Almer (12023-04-25): > I support the addition of a new better API as a replacement for AVBprint, as > long as you take into account the suggestions made by people and their > requests for exemplifications of its usage and usefulness. This also means > potential changes to the header. Of

Re: [FFmpeg-devel] [PATCH] lavu: header and documentation for AVWriter

2023-04-28 Thread Nicolas George
Anton Khirnov (12023-04-26): > This project is developed in the open, private emails, rumors, and > hearsay do not count as arguments. > > This code is unnecessary bloat that adds nothing of value to the > project. Your negative opinion has already been taken into consideration, it is the main

[FFmpeg-devel] [PATCH 8/8] lavf/dump: use av_disposition_write()

2023-04-28 Thread Nicolas George
It changes the output to have underscores instead of spaces. Signed-off-by: Nicolas George --- libavformat/dump.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) Note: I consider the change to backspaces good: now we can copy-paste from dump

[FFmpeg-devel] [PATCH 7/8] lavf/options: add av_disposition_write()

2023-04-28 Thread Nicolas George
TODO APIchanges entry Signed-off-by: Nicolas George --- libavformat/avformat.h | 14 ++ libavformat/options.c | 34 ++ 2 files changed, 48 insertions(+) This and the next patch show the kind of fruits become low-hanging thanks to the platform of

[FFmpeg-devel] [PATCH 6/8] lavu: add JSON writer test (WIP)

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavutil/Makefile | 1 + libavutil/tests/json.c | 139 +++ tests/fate/libavutil.mak | 4 ++ 3 files changed, 144 insertions(+) create mode 100644 libavutil/tests/json.c diff --git a/libavutil/Makefile

[FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavutil/Makefile | 1 + libavutil/json.c | 368 +++ libavutil/json.h | 470 + 3 files changed, 839 insertions(+) create mode 100644 libavutil/json.c create mode 100644

[FFmpeg-devel] [PATCH 4/8] lavf/dump: use a writer

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavformat/avformat.h | 21 +++ libavformat/dump.c | 318 + 2 files changed, 185 insertions(+), 154 deletions(-) This is meant to be an example, I chose a piece of code that does a lot of strings but does not

[FFmpeg-devel] [PATCH 3/8] lavu/writer: add test

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavutil/Makefile | 1 + libavutil/tests/.gitignore | 1 + libavutil/tests/writer.c | 192 + tests/fate/libavutil.mak | 4 + tests/ref/fate/writer | 36 +++ 5 files changed, 234 insertions(+)

[FFmpeg-devel] [PATCH 2/8] lavu: new AVWriter API

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/avwriter_intro.md | 186 libavutil/Makefile| 2 +- libavutil/writer.c| 458 +++ libavutil/writer.h| 488 ++ 4 files changed, 1133 insertions(+), 1

[FFmpeg-devel] [PATCH 1/8] lavu: add macros to help making future-proof structures

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavutil/extendable.h | 59 ++ 1 file changed, 59 insertions(+) create mode 100644 libavutil/extendable.h FFReservedPadding is used by the WIP JSON writer. diff --git a/libavutil/extendable.h b/libavutil/extendable.h

Re: [FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: keep track of filtergraph input timebase

2023-04-28 Thread Nicolas George
Anton Khirnov (12023-04-27): > Will be useful in following commits. > --- > fftools/ffmpeg_filter.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c > index 6b92bc074e..3c6c580093 100644 > ---

Re: [FFmpeg-devel] [PATCH 11/21] fftools/ffmpeg_filter: add InputFilter private data

2023-04-28 Thread Nicolas George
Anton Khirnov (12023-04-27): > Move InputFilter.frame_queue to it, which is not accessed outside of > ffmpeg_filter. > --- > fftools/ffmpeg.h| 2 -- > fftools/ffmpeg_filter.c | 33 - > 2 files changed, 24 insertions(+), 11 deletions(-) Same as

Re: [FFmpeg-devel] [PATCH 09/21] fftools/ffmpeg_filter: make graph_desc private

2023-04-28 Thread Nicolas George
Anton Khirnov (12023-04-27): > It is not used outside of ffmpeg_filter. > --- > fftools/ffmpeg.h| 1 - > fftools/ffmpeg_filter.c | 22 ++ > 2 files changed, 14 insertions(+), 9 deletions(-) Completely useless change. -- Nicolas George signature.asc Description:

Re: [FFmpeg-devel] [PATCH 08/21] fftools/ffmpeg_filter: add filtergraph private data

2023-04-28 Thread Nicolas George
Anton Khirnov (12023-04-27): > Start by moving OutputStream.filtered_frame to it, which really belongs > to the filtergraph rather than the output stream. Then just move them to OutputStream. This is just code noise for no practical benefit, since ffmpeg is not a library and does not have to deal

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: Added ability to set a input burst time before readrate is enforced

2023-04-28 Thread Anton Khirnov
Your email client mangled the patch, so it cannot be applied as is. Quoting Davy Durham (2023-04-07 09:57:54) > Implemented is the -irb flag (i.e. "initial read burst") that > causes ffmpeg to read the specified number of seconds of input before a > given readrate starts to be enforced. All