Re: [FFmpeg-devel] RFC: new packed pixel formats (machine vision)

2024-10-22 Thread Diederick C. Niehorster
Hi Martin, Thanks for writing in! On Tue, Oct 22, 2024 at 11:41 AM martin schitter wrote: > > > > On 22.10.24 08:50, Diederick C. Niehorster wrote: > >> I want to pick up a discussion i started last week > >> (https://ffmpeg.org/pipermail/ffmpeg-devel/2024-October/334585.html) > >> in a new thre

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread Anton Khirnov
Quoting Marton Balint (2024-10-22 20:35:52) > > > On Tue, 22 Oct 2024, Anton Khirnov wrote: > > > Quoting Martin Schitter (2024-10-21 21:57:18) > >> +static int pass_through(AVCodecContext *avctx, AVFrame *frame, const > >> AVPacket *avpkt) > >> +{ > >> +/* there is no need to copy as the d

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread martin schitter
On 22.10.24 20:35, Marton Balint wrote: On Tue, 22 Oct 2024, Anton Khirnov wrote: I said this twice before already - every single format that uses pass_through() should instead be exported by the demuxer as AV_CODEC_ID_RAWVIDEO, because that's what it is. I don't really want the MXF demuxer/

Re: [FFmpeg-devel] RFC: new packed pixel formats (machine vision)

2024-10-22 Thread martin schitter
On 22.10.24 22:33, Diederick C. Niehorster wrote: I am writing about machine vision, not machine learning or computer vision. So there are no uncommon small bit sizes, we're dealing with 8bit, 10bit, 12bit components here. Sorry -- I'm such a sloppy reader/writer -- especially, when I'm hurr

[FFmpeg-devel] [PATCH 2/2] lavc/vaapi_encode_h265: Use surface alignment

2024-10-22 Thread David Rosca
This is needed to correctly set conformance window crop with Mesa AMD. --- libavcodec/vaapi_encode_h265.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 2283bcc0b4..0f97c9188b 100644 --- a/liba

[FFmpeg-devel] [PATCH 1/2] lavc/vaapi_encode: Query surface alignment

2024-10-22 Thread David Rosca
It needs to create temporary config to query surface attribute. --- libavcodec/vaapi_encode.c | 66 +++ libavcodec/vaapi_encode.h | 4 +++ 2 files changed, 70 insertions(+) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 16a9a364f0..c8

Re: [FFmpeg-devel] [PATCH v2] aacenc_pred: prevent UB in ff_aac_adjust_common_pred()

2024-10-22 Thread Sean McGovern
Hi, On Sun, Oct 6, 2024, 15:48 Martin Storsjö wrote: > On Sat, 5 Oct 2024, Sean McGovern wrote: > > > Hi > > > > On Sat, Oct 5, 2024, 19:15 Lynne via ffmpeg-devel < > ffmpeg-devel@ffmpeg.org> > > wrote: > > > >> On 05/10/2024 20:58, Sean McGovern wrote: > >>> --- > >>> libavcodec/aacenc_pred.c

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread Marton Balint
On Tue, 22 Oct 2024, Anton Khirnov wrote: Quoting Martin Schitter (2024-10-21 21:57:18) +static int pass_through(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) +{ +/* there is no need to copy as the data already match + * a known pixel format */ + +frame->buf[0] =

[FFmpeg-devel] [PATCH] avutil/wchar_filename: re-introduce explicit cast of void* to char*

2024-10-22 Thread Marton Balint
Fixes compile error on windows with decklink: In file included from ./libavformat/os_support.h:175, from ./libavformat/internal.h:30, from libavdevice/decklink_common.cpp:25: ./libavutil/wchar_filename.h: In function 'int wchartocp(unsigned int, const wchar_t*, c

Re: [FFmpeg-devel] [PATCH v4] fate/vvc: Add a sample which lose frames before 5c66a3

2024-10-22 Thread James Almer
On 10/21/2024 10:22 AM, Zhao Zhili wrote: On Sep 18, 2024, at 14:56, Zhao Zhili wrote: From: Zhao Zhili --- sample: 8054b4b8e62c0171476b40206d044590 Hierarchical.bit https://drive.google.com/file/d/1U5WGWeSsMFiEkhsl_vL4NiMma-LLh02t/view?usp=sharing Put Hierarchical.bit under $(TARGET_SAM

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread martin schitter
On 22.10.24 04:37, James Almer wrote: On 10/21/2024 8:51 PM, James Almer wrote: On 10/21/2024 10:02 PM, martin schitter wrote: I didn't participate in earlier rounds, but at least my opinion is that we shouldn't add new pixel formats if they are only used for a single codec and have no RIFF

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread Anton Khirnov
Quoting Martin Schitter (2024-10-21 21:57:18) > +static int pass_through(AVCodecContext *avctx, AVFrame *frame, const > AVPacket *avpkt) > +{ > +/* there is no need to copy as the data already match > + * a known pixel format */ > + > +frame->buf[0] = av_buffer_ref(avpkt->buf); I said

Re: [FFmpeg-devel] [PATCH 1/6] avutil/pixfmt: add Y216 pixel format

2024-10-22 Thread martin schitter
On 22.10.24 15:10, James Almer wrote: On 10/22/2024 11:26 AM, martin schitter wrote: On 22.10.24 14:48, James Almer wrote: +    AV_PIX_FMT_Y216BE,  ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian +    AV_PIX_FMT_Y216LE,  ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endia

[FFmpeg-devel] profile vs vprofile in 7.1?

2024-10-22 Thread Andrew Randrianasulu
We tried to update cinelerra-gg to ffmpeg 7.1 and ran into two problems: First, vf_scale now declares dynamic input and was filtered out by code in cinelerra/pluginfclient.C int flag_mask = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS; if( filter->flags & flag_mask ) return AV

Re: [FFmpeg-devel] [PATCH 1/5] avutil: add hwcontext_amf.

2024-10-22 Thread Anton Khirnov
Why yet another crappy hardware API? There is a million of those. Why yet another crappy special snowflake hardware decoder? We have more of those than we want (which is 0). As Mark has also previously commented, the hwcontext implementation seems to be to a large extent a cargo cult. -- Anton K

Re: [FFmpeg-devel] [PATCH v12 5/9] libavcodec/dnxucdec: DNxUncompressed decoder

2024-10-22 Thread Anton Khirnov
Quoting martin schitter (2024-10-22 01:40:07) > > > On 21.10.24 22:44, James Almer wrote: > > > > That's not good... > > > > [...] > > Whenever and however I change it, there will allways be somebody who > doesn't like it. !:( > > This time I spend a lot of time to modify the code as close a

Re: [FFmpeg-devel] [PATCH 1/6] avutil/pixfmt: add Y216 pixel format

2024-10-22 Thread martin schitter
On 22.10.24 14:48, James Almer wrote: +AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian +AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian Why to you avoid any more verbose naming, where any developer would see the actual

Re: [FFmpeg-devel] [PATCH 1/6] avutil/pixfmt: add Y216 pixel format

2024-10-22 Thread James Almer
On 10/22/2024 11:26 AM, martin schitter wrote: On 22.10.24 14:48, James Almer wrote: +    AV_PIX_FMT_Y216BE,  ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian +    AV_PIX_FMT_Y216LE,  ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian Why to you avoid any more verbose nam

[FFmpeg-devel] [PATCH 4/6] avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoder

2024-10-22 Thread James Almer
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats Signed-off-by: James Almer --- libavcodec/raw.c | 2 ++ libavformat/riff.c | 2 ++ tests/ref/fate/filter-pixdesc-y210le | 2 +-

[FFmpeg-devel] [PATCH 1/6] avutil/pixfmt: add Y216 pixel format

2024-10-22 Thread James Almer
Signed-off-by: James Almer --- libavutil/pixdesc.c | 23 +++ libavutil/pixfmt.h | 4 libavutil/tests/pixfmt_best.c| 2 ++ tests/ref/fate/imgutils | 4 tests/ref/fate/pixfmt_best | 2 +- tests/ref/fate/sws-pixdesc-quer

[FFmpeg-devel] [PATCH 3/6] swscale/output: add Y216LE output support

2024-10-22 Thread James Almer
Signed-off-by: James Almer --- libswscale/output.c | 44 libswscale/utils.c | 2 +- tests/ref/fate/filter-pixdesc-y216le | 1 + tests/ref/fate/filter-pixfmts-copy | 1 + tests/ref/fate/filter-pixfmts-field | 1

[FFmpeg-devel] [PATCH 5/6] libavutil/hwcontext_qsv: use the Y216 pixel format

2024-10-22 Thread James Almer
Signed-off-by: James Almer --- libavcodec/qsv.c | 8 libavutil/hwcontext_qsv.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 8a3dc95706..d9eb212b1c 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -218,7

[FFmpeg-devel] [PATCH 6/6] libavutil/hwcontext_d3d11va: use the Y216 pixel format

2024-10-22 Thread James Almer
Signed-off-by: James Almer --- libavutil/hwcontext_d3d11va.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 9b3c5f389f..ecf4207b3c 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.

[FFmpeg-devel] [PATCH 2/6] swscale/input: add Y216LE input support

2024-10-22 Thread James Almer
Signed-off-by: James Almer --- libswscale/input.c | 7 +++ libswscale/utils.c | 1 + 2 files changed, 8 insertions(+) diff --git a/libswscale/input.c b/libswscale/input.c index bb5e31a428..40629831db 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -601,6 +601,7 @@ static void yvy

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: silently ignore APPx stubs

2024-10-22 Thread Ramiro Polla
On Mon, Oct 21, 2024 at 1:41 AM Michael Niedermayer wrote: > On Thu, Oct 17, 2024 at 01:00:12PM +0200, Ramiro Polla wrote: > > Consider APPx fields that are too short to contain an id field (32-bit) > > as stubs, and silently ignore them. > > > > This has been seen in the MJPEG output from some we

Re: [FFmpeg-devel] RFC: new packed pixel formats (machine vision)

2024-10-22 Thread martin schitter
On 22.10.24 08:50, Diederick C. Niehorster wrote: I want to pick up a discussion i started last week (https://ffmpeg.org/pipermail/ffmpeg-devel/2024-October/334585.html) in a new thread, with the relevant information nicely organized. This is about adding pixel formats common in machine vision

Re: [FFmpeg-devel] [PATCH 5/5] libavcodec/ffv1: Support storing LSB raw

2024-10-22 Thread Michael Niedermayer
On Mon, Oct 21, 2024 at 04:40:41PM +0200, Jerome Martinez wrote: > Le 16/10/2024 à 22:53, Michael Niedermayer a écrit : > > what are you testing? > > the new code is faster than the old code. > > There is something not right here, the range coder based implementation > > i posted now is 5% faster t

Re: [FFmpeg-devel] [PATCH 5/5] libavcodec/ffv1: Support storing LSB raw

2024-10-22 Thread Lynne via ffmpeg-devel
On 16/10/2024 15:26, Michael Niedermayer wrote: This makes a 16bit RGB raw sample 25% faster at a 2% loss of compression with rawlsb=4 Please test and comment This stores the LSB through non binary range coding, this is simpler than using a separate coder For cases where range coding is not w

Re: [FFmpeg-devel] [PATCH 1/6] avutil/pixfmt: add Y216 pixel format

2024-10-22 Thread James Almer
On 10/22/2024 11:45 AM, martin schitter wrote: On 22.10.24 15:10, James Almer wrote: On 10/22/2024 11:26 AM, martin schitter wrote: On 22.10.24 14:48, James Almer wrote: +    AV_PIX_FMT_Y216BE,  ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian +    AV_PIX_FMT_Y216LE,  ///< pac