[FFmpeg-devel] [PATCH v1 1/4] lavc/hevc_refs: fix dpb logical for IRAP

2022-06-07 Thread Fei Wang
From: Xu Guangxin According to C.5.2.2, item 2. When we got an IRAP, and the NoOutputOfPriorPicsFlag = 0, we need bump all outputable frames. Tested-by: Fei Wang Signed-off-by: Xu Guangxin --- 1. Tested the patchset with ~1000 different kinds of clips and get a positive result, without any reg

[FFmpeg-devel] [PATCH v1 2/4] lavc/hevcdec: do not let missing ref frames invovled in dpb process

2022-06-07 Thread Fei Wang
From: Xu Guangxin We will generate a new frame for a missed reference. The frame can only be used for reference. We assign an invalid decode sequence to it, so it will not be involved in any dpb process. Tested-by: Fei Wang Signed-off-by: Xu Guangxin --- libavcodec/hevc_refs.c | 13 ++

[FFmpeg-devel] [PATCH v1 3/4] lavc/hevc_refs: exclude current frame from long term refs

2022-06-07 Thread Fei Wang
From: Xu Guangxin suppose a. You have 3 frames, 0, 1, 4096. b. The ltMask is 0xfff and use_msb is 0. c. The 0, 1 are lt refs for 4096. d. you are decoding frame 4096, and get the 0 frame. Since 4096 & ltMask is 0 too, even you want get 0, find_ref_idx may give you 4096. add_candidate_ref will re

[FFmpeg-devel] [PATCH v1 4/4] lavc/hevcdec: respect the value of no_output_of_prior_pics_flag

2022-06-07 Thread Fei Wang
From: Xu Guangxin Even resolution or number of picture stores changes, we still need follow no_output_of_prior_pics_flag in next IDR. Tested-by: Fei Wang Signed-off-by: Xu Guangxin --- libavcodec/hevcdec.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavc

[FFmpeg-devel] [PATCH] avformat/mov: read PCM audio configuration box ('pcmC') if available

2022-06-07 Thread Ivan Baykalov
For ipcm and fpcm streams, big-endian format is the default, but it can be changed with additional 'pcmC' sub-atom of audio sample description. Details can be found in ISO/IEC 23003-5:2020 Fixes ticket #9763 Fixes ticket #9790 --- libavformat/mov.c | 60 +

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat/cafdec: Implement FLAC-in-CAF parsing

2022-06-07 Thread Anton Khirnov
Quoting Martijn van Beurden (2022-06-04 12:35:06) > @@ -170,6 +171,49 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t > size) > } > avio_skip(pb, size - ALAC_NEW_KUKI); > } > +} else if (st->codecpar->codec_id == AV_CODEC_ID_FLAC) { > +int l

Re: [FFmpeg-devel] [PATCH] libavformat/isom: Add more language mappings

2022-06-07 Thread Anton Khirnov
Will push soonish if noone objects. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubsc

[FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly

2022-06-07 Thread Tong Wu
QSV encoder is able to encode frames with VAAPI or D3D11 pixel format directly. This patch adds support for qsv encoder to accept VAAPI and D3D11 pixel formats as input. Signed-off-by: Wenbin Chen Signed-off-by: Tong Wu --- libavcodec/qsvenc.c | 59 ++-

Re: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly

2022-06-07 Thread Anton Khirnov
Quoting Tong Wu (2022-06-07 11:22:16) > QSV encoder is able to encode frames with VAAPI or D3D11 pixel format > directly. This patch adds support for qsv encoder to accept VAAPI and > D3D11 pixel formats as input. This looks like an ad-hoc hack to me. Encoders should not do these kinds of tricks.

Re: [FFmpeg-devel] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

2022-06-07 Thread Anton Khirnov
Quoting Paolo Prete (2022-06-06 19:40:42) > Hello, > From what I see, the doc/examples files can be still improved. More > precisely, their main() is often split into functions with short names > that hide important (sometime essential) details of what they're doing > and they worsen the readabilit

Re: [FFmpeg-devel] [PATCH v2] avutil/frame: add av_frame_replace

2022-06-07 Thread Anton Khirnov
Quoting James Almer (2022-06-05 19:44:58) > + > +/* duplicate the frame data if it's not refcounted */ > +if (!src->buf[0]) { > +for (int i = 0; i < FF_ARRAY_ELEMS(dst->buf); i++) > +av_buffer_unref(&dst->buf[i]); > +for (int i = 0; i < dst->nb_extended_buf; i++)

Re: [FFmpeg-devel] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

2022-06-07 Thread Paolo Prete
What you say is true, IMHO, as long as the functions (in which the code is split) do really group logically related tasks and they have names that summarize what they are doing. In the examined case this is not true, see for example (in muxing.c): static void open_video(AVFormatContext *oc, cons

[FFmpeg-devel] FFmpeg 5.1

2022-06-07 Thread Michael Niedermayer
Hi all As was discussed previously the 5.1 release should be in june/july That means in the next weeks probably! If you know of any regressions, security issues or other major bugs, please help fixing them Also as was suggested before, this release will get the "LTS" tag unless people feel thats

Re: [FFmpeg-devel] [PATCH v2] avutil/frame: add av_frame_replace

2022-06-07 Thread James Almer
On 6/7/2022 7:21 AM, Anton Khirnov wrote: Quoting James Almer (2022-06-05 19:44:58) + +/* duplicate the frame data if it's not refcounted */ +if (!src->buf[0]) { +for (int i = 0; i < FF_ARRAY_ELEMS(dst->buf); i++) +av_buffer_unref(&dst->buf[i]); +for (int i =

Re: [FFmpeg-devel] [PATCH v2] avutil/frame: add av_frame_replace

2022-06-07 Thread Anton Khirnov
Quoting James Almer (2022-06-07 13:39:55) > >> diff --git a/libavutil/frame.h b/libavutil/frame.h > >> index 33fac2054c..e5c10e2b66 100644 > >> --- a/libavutil/frame.h > >> +++ b/libavutil/frame.h > >> @@ -752,6 +752,19 @@ void av_frame_free(AVFrame **frame); > >>*/ > >> int av_frame_ref(AVFr

Re: [FFmpeg-devel] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

2022-06-07 Thread Anton Khirnov
Quoting Paolo Prete (2022-06-07 12:59:05) > What you say is true, IMHO, as long as the functions (in which the > code is split) do really group logically related tasks and they have > names that summarize what they are doing. In the examined case this is > not true, see for example (in muxing.c): s

[FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

2022-06-07 Thread Anton Khirnov
There is no reason to think that an attachment will contain text subtitles. In addition attachments are exported in extradata, so the AV_CODEC_ID_TEXT decoder would not do anything useful with it anyway. --- libavformat/matroskadec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/m

[FFmpeg-devel] [PATCH v3] avutil/frame: add av_frame_replace

2022-06-07 Thread James Almer
Signed-off-by: James Almer --- libavutil/frame.c | 132 ++ libavutil/frame.h | 13 + 2 files changed, 145 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index 4c16488c66..293bf6a437 100644 --- a/libavutil/frame.c +++ b/libavutil/

Re: [FFmpeg-devel] [PATCH v1 2/4] lavc/hevcdec: do not let missing ref frames invovled in dpb process

2022-06-07 Thread Michael Niedermayer
On Tue, Jun 07, 2022 at 03:08:28PM +0800, Fei Wang wrote: > From: Xu Guangxin > > We will generate a new frame for a missed reference. The frame can only > be used for reference. We assign an invalid decode sequence to it, so > it will not be involved in any dpb process. > > Tested-by: Fei Wang

[FFmpeg-devel] [PATCH] ffmpeg: add option fps_mode

2022-06-07 Thread Gyan Doshi
fps_mode sets video sync per output stream. Overrides vsync for matching streams. --- doc/ffmpeg.texi | 8 +--- fftools/ffmpeg.c | 9 + fftools/ffmpeg.h | 3 +++ fftools/ffmpeg_mux.c | 2 +- fftools/ffmpeg_opt.c | 41 ++--- 5 files c

Re: [FFmpeg-devel] [PATCH v3] avutil/frame: add av_frame_replace

2022-06-07 Thread Nicolas George
James Almer (12022-06-07): > Signed-off-by: James Almer > --- > libavutil/frame.c | 132 ++ > libavutil/frame.h | 13 + > 2 files changed, 145 insertions(+) I do not like having a new function without anything that uses it. It results in several c

Re: [FFmpeg-devel] [PATCH v3] avutil/frame: add av_frame_replace

2022-06-07 Thread James Almer
On 6/7/2022 9:18 AM, Nicolas George wrote: James Almer (12022-06-07): Signed-off-by: James Almer --- libavutil/frame.c | 132 ++ libavutil/frame.h | 13 + 2 files changed, 145 insertions(+) I do not like having a new function without anythi

Re: [FFmpeg-devel] [PATCH v3] avutil/frame: add av_frame_replace

2022-06-07 Thread Nicolas George
James Almer (12022-06-07): > I did the first time i wrote this function and sent it last August. See > http://ffmpeg.org/pipermail/ffmpeg-devel/2021-August/283448.html > http://ffmpeg.org/pipermail/ffmpeg-devel/2021-August/283449.html > > I can rebase them if they don't apply anymore, but either w

Re: [FFmpeg-devel] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

2022-06-07 Thread Paolo Prete
Il martedì 7 giugno 2022, 13:56:37 CEST, Anton Khirnov ha scritto: >Quoting Paolo Prete (2022-06-07 12:59:05) >> What you say is true, IMHO, as long as the functions (in which the >> code is split) do really group logically related tasks and they have >> names that summarize what they

Re: [FFmpeg-devel] [PATCH v4 2/6] avutil/tests/uuid: add uuid tests

2022-06-07 Thread Zane van Iperen
On 2/6/22 10:30, p...@sandflow.com wrote: From: Pierre-Anthony Lemieux Ping, this patchset mostly looks good. Will apply in a few days. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To uns

[FFmpeg-devel] [RFC] User-defined default enc/dec/mux/dem/etc

2022-06-07 Thread Thilo Borgmann
Hi, currently, if -c:{a,v} is not given, the list of all codecs is successively searched until the first enc/dec is found. If I have two or more enc/dec's for the same codec ID (like by having libx264, libfdk-aac, etc..) it will still be the first in the list that is found that is used if no

[FFmpeg-devel] [PATCH] Added SO_KEEPALIVE in TCP sockets, so kernel keepalive settings manage timeouts in case of TCP hangs

2022-06-07 Thread David Maseda Neira
Signed-off-by: David Maseda Neira --- libavformat/network.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/network.c b/libavformat/network.c index 21e20b3e9a..0361346631 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -204,6 +204,12 @@ int ff_socket(int a

Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

2022-06-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Tuesday, June 7, 2022 1:59 PM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain > attachments to AV_CODEC_ID_TEXT > > There is no reason to think that

Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

2022-06-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Soft Works > Sent: Wednesday, June 8, 2022 5:19 AM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain > attachments to AV_CODEC_ID_TEXT > > > > >

Re: [FFmpeg-devel] [PATCH v3] libavcodec/qsvenc: add ROI support to qsv encoder

2022-06-07 Thread Chen, Wenbin
> Use The mfxEncoderCtrl parameter to enable ROI. Get side data > "AVRegionOfInterest" and use it to configure "mfxExtEncoderROI" which is > the MediaSDK's ROI configuration. > > Signed-off-by: Wenbin Chen > --- > libavcodec/qsv_internal.h | 4 ++ > libavcodec/qsvenc.c | 86 >

Re: [FFmpeg-devel] [RFC] User-defined default enc/dec/mux/dem/etc

2022-06-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Thilo > Borgmann > Sent: Tuesday, June 7, 2022 3:26 PM > To: FFmpeg development discussions and patches > Subject: [FFmpeg-devel] [RFC] User-defined default enc/dec/mux/dem/etc > > Hi, > > currently, if -c:{a,v} is not given, the

Re: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly

2022-06-07 Thread Wu, Tong1
> > Quoting Tong Wu (2022-06-07 11:22:16) > > QSV encoder is able to encode frames with VAAPI or D3D11 pixel format > > directly. This patch adds support for qsv encoder to accept VAAPI and > > D3D11 pixel formats as input. > > This looks like an ad-hoc hack to me. Encoders should not do these ki

[FFmpeg-devel] [PATCH v4] libavcodec/qsvenc: add ROI support to qsv encoder

2022-06-07 Thread Wenbin Chen
Use The mfxEncoderCtrl parameter to enable ROI. Get side data "AVRegionOfInterest" and use it to configure "mfxExtEncoderROI" which is the MediaSDK's ROI configuration. Signed-off-by: Wenbin Chen --- libavcodec/qsv_internal.h | 4 ++ libavcodec/qsvenc.c | 85 ++

Re: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly

2022-06-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Tong Wu > Sent: Tuesday, June 7, 2022 11:22 AM > To: ffmpeg-devel@ffmpeg.org > Cc: Tong Wu ; Wenbin Chen > Subject: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI > and D3D11 frames directly > > QSV encoder i

Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

2022-06-07 Thread Anton Khirnov
Quoting Soft Works (2022-06-08 05:45:38) > You might allow me the question whether we can be sure that > this is the only case which is subject to the regression? > > Besides from what I reported above (and you might probably come up > with a new codec ID for discriminating text subs vs. text > at

Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

2022-06-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Wednesday, June 8, 2022 8:17 AM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain > attachments to AV_CODEC_ID_TEXT > > Quoting

Re: [FFmpeg-devel] [RFC] User-defined default enc/dec/mux/dem/etc

2022-06-07 Thread Nicolas George
Thilo Borgman (12022-06-07): > Hi, > > currently, if -c:{a,v} is not given, the list of all codecs is successively > searched until the first enc/dec is found. > > If I have two or more enc/dec's for the same codec ID (like by having > libx264, libfdk-aac, etc..) it will still be the first in t