[FFmpeg-devel] [PATCH v3] avutil/csp: create public API for colorspace structs

2022-05-21 Thread Leo Izen
This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. It also converts those structs from double values to AVRational to make regression testing easier and more consistent. --- libavfi

[FFmpeg-devel] [PATCH v2 1/1] avutil/csp: create public API for colorspace structs

2022-05-21 Thread Leo Izen
This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. It also converts those structs from double values to AVRational to make regression testing easier and more consistent. --- libavfi

[FFmpeg-devel] [PATCH v2 0/1] [WIP] avutil/csp changes

2022-05-21 Thread Leo Izen
Changes in v2: - increase precision for AVR() macro to 100k, at haasn's request - add #define AVUTIL_CSP_DENOM 10 - add 0.5 to the AVR macro definition to get exact values from truncation This patch is a work in progress example for swapping these structs from doubles to AVRationals. There's

[FFmpeg-devel] [PATCH v5] avcodec/mfenc: Dynamically load MFPlat.DLL

2022-05-21 Thread Trystan Mata
Changes since the v4: - Avoid having two mf_init function declared (missing #if !HAVE_UWP) - Better commit message about linking with UWP Changes since the v3: - Library handle and function pointer are no longer in MFContext. - If UWP is enabled, avcodec will be linked directly against MFPl

[FFmpeg-devel] [PATCH v3 1/3] lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
This patch add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/libaribcaption Unlike libaribb24, it supports 3 types of subtitle outputs: * text: plain text * ass: ASS formatted text * bitmap: bitmap image Default subtitle type is ass as same as libaribb

[FFmpeg-devel] [PATCH v3 3/3] lavf/mpegts.c: set some properties for ARIB caption

2022-05-21 Thread TADANO Tokumei
Some additional properties are set for ARIB caption. * need_parsing = 0 ARIB caption doesn't require any parser. This avoids "parser not found" warning message. * need_context_update = 1 When any profiles are changed, set this flag to notify. * codecpar->width / codecpar->height Find best v

[FFmpeg-devel] [PATCH v3 0/3] add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
v3: combine former 1/4 and 2/4 due to the patchwork shows build error. v2: combine former 1/5 and 2/5 due to the patchwork shows build error. fix help option content which incorrectly separated to 2 lines in 2/4. amend commit message of 4/4. This patch set add another ARIB caption deco

[FFmpeg-devel] [PATCH v3 2/3] lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property

2022-05-21 Thread TADANO Tokumei
To support bitmap type of subtitles, remove AV_CODEC_PROP_TEXT_SUB property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION. It is similar way to `libavcodec/libzvbi-teletextdec.c` (AV_CODEC_ID_DVB_TELETEXT). Instead, each subtitle decoder has to specify subtitile format. `libavcodec/libaribb24

[FFmpeg-devel] [PATCH v2 1/4] lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
This patch add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/libaribcaption Unlike libaribb24, it supports 3 types of subtitle outputs: * text: plain text * ass: ASS formatted text * bitmap: bitmap image Default subtitle type is ass as same as libaribb

[FFmpeg-devel] [PATCH v2 2/4] configure + lavc/Makefile: define build infrastructure for libaribcaption

2022-05-21 Thread TADANO Tokumei
To compile with this feature: * libaribcaption external library has to be pre-installed. https://github.com/xqq/libaribcaption * configure with `--enable-libaribcaption` option. `--enable-libaribb24` and `--enable-libaribcaption` options are not exclusive. If both enabled, libaribcaption precede

[FFmpeg-devel] [PATCH v2 0/4] add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
v2: combine former 1/5 and 2/5 due to the patchwork shows compile error. fix help option content which incorrectly separated to 2 lines in 2/4. amend commit message of 4/4. This patch set add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/lib

[FFmpeg-devel] [PATCH v2 3/4] lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property

2022-05-21 Thread TADANO Tokumei
To support bitmap type of subtitles, remove AV_CODEC_PROP_TEXT_SUB property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION. It is similar way to `libavcodec/libzvbi-teletextdec.c` (AV_CODEC_ID_DVB_TELETEXT). Instead, each subtitle decoder has to specify subtitile format. `libavcodec/libaribb24

[FFmpeg-devel] [PATCH v2 4/4] lavf/mpegts.c: set some properties for ARIB caption

2022-05-21 Thread TADANO Tokumei
Some additional properties are set for ARIB caption. * need_parsing = 0 ARIB caption doesn't require any parser. This avoids "parser not found" warning message. * need_context_update = 1 When any profiles are changed, set this flag to notify. * codecpar->width / codecpar->height Find best v

[FFmpeg-devel] [PATCH v4] avcodec/mfenc: Dynamically load MFPlat.DLL

2022-05-21 Thread Trystan Mata
Changes since the v3: - Library handle and function pointer are no longer in MFContext. - If UWP is enabled, avcodec will be linked directly against MFPlat.DLL. - MediaFoundation functions are now called like MFTEnumEx, like Martin Storsjö suggested in his review of the v3. I forgot to ment

[FFmpeg-devel] [PATCH v2 4/4] avfilter/hwmap, hwupload: use new av_hwdevice_ctx_get_or_create_derived method

2022-05-21 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/vf_hwmap.c| 4 ++-- libavfilter/vf_hwupload.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 2e03dfc1fe..b79cf6732c 100644 --- a/libavfilter/vf_hwmap.c +++

[FFmpeg-devel] [PATCH v2 3/4] lavu: bump minor version and add doc/APIchanges entry for av_hwdevice_ctx_get_or_create_derived()

2022-05-21 Thread softworkz
From: softworkz Signed-off-by: softworkz --- doc/APIchanges | 6 ++ libavutil/version.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 1a9f0a303e..92b6d70ac0 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,12

[FFmpeg-devel] [PATCH v2 2/4] avutils/hwcontext: add derive-device function which searches for existing devices in both directions

2022-05-21 Thread softworkz
From: softworkz The test /libavutil/tests/hwdevice checks that when deriving a device from a source device and then deriving back to the type of the source device, the result is matching the original source device, i.e. the derivation mechanism doesn't create a new device in this case. Previousl

[FFmpeg-devel] [PATCH v2 1/4] avutil/buffer: add av_ref_from_buffer() function

2022-05-21 Thread softworkz
From: softworkz This allows to create AVBufferRef from AVBuffer directly. Signed-off-by: softworkz --- libavutil/buffer.c | 16 libavutil/buffer.h | 8 2 files changed, 24 insertions(+) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 54590be566..f9df0ad6e

[FFmpeg-devel] [PATCH v2 0/4] Add derive-device function which searches for existing devices in both directions

2022-05-21 Thread ffmpegagent
This is an updated version of: [PATCH v4 1/1] avutils/hwcontext: When deriving a hwdevice, search for existing device in both directions There has been an objection that the earlier patchset would change API behavior, and that this change should be limited to ffmpeg cli. To achieve this, the API

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: Don't update the first thread ctx before freeing

2022-05-21 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Currently, ff_frame_thread_free() uses the last worker thread > to updates the first worker thread via update_context_from_thread() > immediately before freeing all these worker threads. This is > a remnant of the time in which the first worker was special. > (E.g. the first w

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-21 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of nil- > admir...@mailo.com > Sent: Saturday, May 21, 2022 1:08 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, > file_open: Support long file names on Windows > > > I thought the

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/wchar_filename, file_open: Support long file names on Windows

2022-05-21 Thread nil-admirari
> I thought the purpose of all those re-mappings would be that plain > Posix functions can still be used..? > It's already the Posix declaration where the function name > is the same as the structure name (stat). Not possible for stat precisely because of function and struct sharing a name. That'

Re: [FFmpeg-devel] [PATCH 5/5] lavf/mpegts.c: set some properties for ARIB caption

2022-05-21 Thread TADANO Tokumei
Sorry, a commit message is wrong. On 2022/05/21 19:37, TADANO Tokumei wrote: * need_parsing = 0 ARIB caption doesn't require any decoder. ARIB caption doesn't require any parser. This avoids "parser not found" warning message. ___ ffmpe

[FFmpeg-devel] [PATCH 1/5] lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
This patch add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/libaribcaption The library decodes subtitles of ISDB-based TV broadcasting. It is not only for Japanese ARIB STD-B24 caption, but also for Brazilian ABNT NBR 15606-1 and Philippines version of

[FFmpeg-devel] [PATCH 3/5] configure + lavc/Makefile: define build infrastructure for libaribcaption

2022-05-21 Thread TADANO Tokumei
To compile with this feature: * libaribcaption external library has to be pre-installed. https://github.com/xqq/libaribcaption * configure with `--enable-libaribcaption` option. `--enable-libaribb24` and `--enable-libaribcaption` options are not exclusive. If both enabled, libaribcaption precede

[FFmpeg-devel] [PATCH 4/5] lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property

2022-05-21 Thread TADANO Tokumei
To support bitmap type of subtitles, remove AV_CODEC_PROP_TEXT_SUB property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION. It is similar way to `libavcodec/libzvbi-teletextdec.c` (AV_CODEC_ID_DVB_TELETEXT). Instead, each subtitle decoder has to specify subtitile format. `libavcodec/libaribb24

[FFmpeg-devel] [PATCH 5/5] lavf/mpegts.c: set some properties for ARIB caption

2022-05-21 Thread TADANO Tokumei
Some additional properties are set for ARIB caption. * need_parsing = 0 ARIB caption doesn't require any decoder. This avoids "parser not found" warning message. * need_context_update = 1 When any profiles are changed, set this flag to notify. * codecpar->width / codecpar->height Find best

[FFmpeg-devel] [PATCH 2/5] lavc/allcodecs.c: add aribcaption_decoder

2022-05-21 Thread TADANO Tokumei
Signed-off-by: TADANO Tokumei --- libavcodec/allcodecs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index c47133aa18..acd83fe762 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -737,6 +737,7 @@ extern const FFCodec ff_pc

[FFmpeg-devel] [PATCH 0/5] add ARIB caption decoder using libaribcaption

2022-05-21 Thread TADANO Tokumei
This patch set add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/libaribcaption The library decodes subtitles of ISDB-based TV broadcasting. It is not only for Japanese ARIB STD-B24 caption, but also for Brazilian ABNT NBR 15606-1 and Philippines version

[FFmpeg-devel] AVBufferRef from AVBuffer

2022-05-21 Thread Soft Works
Hi, I have a question. I wonder whether it would be acceptable to add the following function to buffer.c? --- AVBufferRef *av_buffer_ref(AVBuffer *buf) { AVBufferRef *ref = av_mallocz(sizeof(*ref)); if (!ref) re