[FFmpeg-devel] [PATCH] avcodec/libsvtav1: add version guard for external param

2023-11-07 Thread Gyan Doshi
Setting of external param 'force_key_frames' was added in 7bcc1b4eb8.
It is available since v1.1.0 but ffmpeg allows linking against v0.9.0.
---
 libavcodec/libsvtav1.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 8d2c7f3be4..862192945b 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -250,6 +250,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 if (avctx->gop_size > 1)
 param->intra_period_length  = avctx->gop_size - 1;
 
+#if SVT_AV1_CHECK_VERSION(1, 1, 0)
 // In order for SVT-AV1 to force keyframes by setting pic_type to
 // EB_AV1_KEY_PICTURE on any frame, force_key_frames has to be set. Note
 // that this does not force all frames to be keyframes (it only forces a
@@ -260,6 +261,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 // to be updated to set force_key_frames accordingly.
 if (avctx->gop_size == 1)
 param->force_key_frames = 1;
+#endif
 
 if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
 param->frame_rate_numerator   = avctx->framerate.num;
-- 
2.39.1

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 3/3] avcodec/jpegxl_parser: Check get_vlc2()

2023-11-07 Thread Michael Niedermayer
Fixes: shift exponent -1 is negative
Fixes: 
63889/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6009343056936960

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/jpegxl_parser.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/jpegxl_parser.c b/libavcodec/jpegxl_parser.c
index 630fc8a60bf..964f5a9ad5a 100644
--- a/libavcodec/jpegxl_parser.c
+++ b/libavcodec/jpegxl_parser.c
@@ -698,6 +698,10 @@ static int read_vlc_prefix(GetBitContext *gb, 
JXLEntropyDecoder *dec, JXLSymbolD
 level1_codecounts[0] = hskip;
 for (int i = hskip; i < 18; i++) {
 len = level1_lens[prefix_codelen_map[i]] = get_vlc2(gb, level0_table, 
4, 1);
+if (len < 0) {
+ret = AVERROR_INVALIDDATA;
+goto end;
+}
 level1_codecounts[len]++;
 if (len) {
 total_code += (32 >> len);
@@ -743,6 +747,10 @@ static int read_vlc_prefix(GetBitContext *gb, 
JXLEntropyDecoder *dec, JXLSymbolD
 total_code = 0;
 for (int i = 0; i < dist->alphabet_size; i++) {
 len = get_vlc2(gb, level1_vlc.table, 5, 1);
+if (len < 0) {
+ret = AVERROR_INVALIDDATA;
+goto end;
+}
 if (get_bits_left(gb) < 0) {
 ret = AVERROR_BUFFER_TOO_SMALL;
 goto end;
-- 
2.17.1

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 2/3] avcodec/4xm: Check for cfrm exhaustion

2023-11-07 Thread Michael Niedermayer
Fixes: index -1 out of bounds for type 'CFrameBuffer [100]'
Fixes: 
63877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5854263397711872

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/4xm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 158b37a38bc..cfe65c178a4 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -885,6 +885,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame 
*picture,
 }
 
 if (i >= CFRAME_BUFFER_COUNT) {
+if (free_index < 0)
+return AVERROR_INVALIDDATA;
 i = free_index;
 f->cfrm[i].id = id;
 }
-- 
2.17.1

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 1/3] avformat/mov: Disallow FTYP after streams

2023-11-07 Thread Michael Niedermayer
Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799
Fixes: 
63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index e8efccf6ebf..34ca8095c22 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1222,6 +1222,8 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 int ret = ffio_read_size(pb, type, 4);
 if (ret < 0)
 return ret;
+if (c->fc->nb_streams)
+return AVERROR_INVALIDDATA;
 
 if (strcmp(type, "qt  "))
 c->isom = 1;
-- 
2.17.1

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Add support for VP8 codec bitstream

2023-11-07 Thread Dai, Jianhui J


> -Original Message-
> From: ffmpeg-devel  On Behalf Of Ronald S.
> Bultje
> Sent: Wednesday, November 8, 2023 4:26 AM
> To: FFmpeg development discussions and patches 
> Subject: Re: [FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Add support for VP8
> codec bitstream
> 
> Hi,
> 
> On Tue, Nov 7, 2023 at 12:01 AM Dai, Jianhui J < jianhui.j.dai-at-
> intel@ffmpeg.org> wrote:
> 
> >
> >
> > > -Original Message-
> > > From: ffmpeg-devel  On Behalf Of
> > > Ronald S. Bultje
> > > Sent: Monday, November 6, 2023 8:08 PM
> > > To: FFmpeg development discussions and patches  > > de...@ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Add support
> > > for
> > > VP8 codec bitstream
> > >
> > > Hi,
> > >
> > > On Mon, Nov 6, 2023 at 7:07 AM Ronald S. Bultje 
> > > wrote:
> > >
> > > > On Sun, Nov 5, 2023 at 11:13 PM Dai, Jianhui J <
> > > > jianhui.j.dai-at-intel@ffmpeg.org> wrote:
> > > >
> > > >> > > +static const uint8_t vp8_token_update_probs[4][8][3][11] = {
> > > >> >
> > > >> > It would be nice if these symbols could be re-used from the
> > > >> > existing vp8 native decoder, instead of duplicating them? Both
> > > >> > source + binary size
> > > >> are
> > > >> > relevant here.
> > > >>
> > > >> Including vp8data.h would introduce many unwanted static tables
> > > >> other than vp8_token_update_probs and increase the binary size.
> > > >> As suggested in patch v3, it is better to use local defined
> > > >> vp8_token_update_probs.
> > > >>
> > > >
> > > > I didn't mean to include vp8data.h. I mean to include a new *.h
> > > > that declares extern const uint8_t vp8_token_update_probs[][][][]
> > > > and move said table into a new *.c file. The point is to prevent
> > > > symbol
> > duplication.
> > > >
> > >
> > > And to elaborate further, in case it's unclear: the symbol move
> > > means the native VP8 decoder would include this probability table
> > > using the same
> > new
> > > mechanism also. It would no longer exist in vp8data.h.
> >
> > Right.
> > I made another change to reorganize the vp8data.[c|h] and only export
> > ` ff_vp8_dct_cat_prob` and `ff_vp8_token_default_probs`.
> > Please take a look.
> >
> 
> I'm not sure it's a good idea to move all tables back into vp8.c. There's a 
> reason
> we added it in a separate header file, so that "large random tables with 
> numbers"
> don't obfuscate the actual source code file. Or to say it
> diffrently: you could probably have accomplished the same effect with a much
> smaller diff... That's just my opinion though. Anyone else care about any of 
> this?

The smaller delta patch to export the variable:  
https://patchwork.ffmpeg.org/project/ffmpeg/patch/dm6pr11mb268186349e600824e1577dfdb1...@dm6pr11mb2681.namprd11.prod.outlook.com/
Personally, I prefer to limit the static data only in vp8.c. 

> 
> Ronald
> ___
> 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 "unsubscribe".
___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v2] avcodec/vp8: Export `vp8_token_default_probs` variable

2023-11-07 Thread Dai, Jianhui J
This commit exports the `vp8_token_default_probs` variable to internal
library scope to facilitate its reuse within the library.

Signed-off-by: Jianhui Dai 
---
 libavcodec/vp8.c |   2 +-
 libavcodec/vp8data.c | 170 ++
 libavcodec/vp8data.h | 171 +--
 3 files changed, 172 insertions(+), 171 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index ffc430dd32..de44fdcc21 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -445,7 +445,7 @@ static void vp78_reset_probability_tables(VP8Context *s)
 int i, j;
 for (i = 0; i < 4; i++)
 for (j = 0; j < 16; j++)
-memcpy(s->prob->token[i][j], 
vp8_token_default_probs[i][vp8_coeff_band[j]],
+memcpy(s->prob->token[i][j], 
ff_vp8_token_default_probs[i][vp8_coeff_band[j]],
sizeof(s->prob->token[i][j]));
 }
 
diff --git a/libavcodec/vp8data.c b/libavcodec/vp8data.c
index 857406928a..b0a029f902 100644
--- a/libavcodec/vp8data.c
+++ b/libavcodec/vp8data.c
@@ -40,3 +40,173 @@ const uint8_t *const ff_vp8_dct_cat_prob[] = {
 vp8_dct_cat6_prob,
 };
 
+const uint8_t ff_vp8_token_default_probs[4][8][3][11] = {
+{
+{
+{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
+{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
+{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
+},
+{
+{ 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 },
+{ 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 },
+{ 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 },
+},
+{
+{   1,  98, 248, 255, 236, 226, 255, 255, 128, 128, 128 },
+{ 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 },
+{  78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 },
+},
+{
+{   1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 },
+{ 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 },
+{  77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 },
+},
+{
+{   1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 },
+{ 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 },
+{  37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 },
+},
+{
+{   1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 },
+{ 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 },
+{ 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 },
+},
+{
+{   1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 },
+{ 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 },
+{  80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 },
+},
+{
+{   1,   1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
+{ 246,   1, 255, 128, 128, 128, 128, 128, 128, 128, 128 },
+{ 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
+},
+},
+{
+{
+{ 198,  35, 237, 223, 193, 187, 162, 160, 145, 155,  62 },
+{ 131,  45, 198, 221, 172, 176, 220, 157, 252, 221,   1 },
+{  68,  47, 146, 208, 149, 167, 221, 162, 255, 223, 128 },
+},
+{
+{   1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 },
+{ 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 },
+{  81,  99, 181, 242, 176, 190, 249, 202, 255, 255, 128 },
+},
+{
+{   1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 },
+{  99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 },
+{  23,  91, 163, 242, 170, 187, 247, 210, 255, 255, 128 },
+},
+{
+{   1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 },
+{ 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 },
+{  44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 },
+},
+{
+{   1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 },
+{  94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 },
+{  22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 },
+},
+{
+{   1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 },
+{ 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 },
+{  35,  77, 181, 251, 193, 211, 255, 205, 128, 128, 128 },
+},
+{
+{   1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 },
+{ 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 },
+{  45,  99, 188, 251, 195, 217, 255, 224, 128, 128, 128 },
+},
+{
+{   1,   1, 251, 255, 213, 255, 128, 128, 128, 128, 128 },
+{ 203,   1, 248, 255, 255, 128, 128, 128, 128, 128, 128 },
+{ 

Re: [FFmpeg-devel] [RFC] Release 6.1

2023-11-07 Thread Steven Liu
Steven Liu  于2023年11月8日周三 09:26写道:
>
> Tristan Matthews  于2023年11月8日周三 00:47写道:
> >
> > On Tue, Nov 7, 2023 at 2:36 AM Lynne  wrote:
> > >
> > > Oct 29, 2023, 06:57 by d...@lynne.ee:
> > >
> > > > Oct 29, 2023, 05:51 by mich...@niedermayer.cc:
> > > >
> > > >> On Sat, Oct 28, 2023 at 09:23:45PM +0200, Lynne wrote:
> > > >>
> > > >>> Oct 28, 2023, 18:49 by mich...@niedermayer.cc:
> > > >>>
> > > >>> > On Thu, Jul 06, 2023 at 06:04:41PM +0200, Lynne wrote:
> > > >>> >
> > > >>> >> It's been a while since we've had a release, and we've had
> > > >>> >> a lot of new features in.
> > > >>> >> We did say we would make releases more often, and I think
> > > >>> >> it's about time we have a new release.
> > > >>> >>
> > > >>> >> Anything anyone wants to have merged or should we branch
> > > >>> >> off 6.1 in a few days?
> > > >>> >>
> > > >>> >
> > > >>> > Whats the status of this ?
> > > >>> > I can branch 6.1 anytime
> > > >>> >
> > > >>> > It was just that jb told me
> > > >>> > "6.1 opportunity is gone.
> > > >>> >  We're too late on the schedule, and noone had time to work on it, 
> > > >>> > so it is wiser to target 7.0 in January"
> > > >>> >
> > > >>> > but now i see on IRC
> > > >>> >  make a damn release already
> > > >>> >  j-b: drop MiNi from release maintership and 
> > > >>> > nominate Lynne
> > > >>> >  I pledge to bring back /slap IRC messages to those who fail 
> > > >>> > to push the patches they want for release!
> > > >>> >  durandal_1707: good point, we should look at doing another 
> > > >>> > 5.1.x release and a 6.0.x release.
> > > >>> >
> > > >>> > noone mentioned 5.1.x and 6.0.x to me before
> > > >>> >
> > > >>> > anyway, ill try to make releases from all maintained branches,
> > > >>> >
> > > >>> > and will branch 6.1 as soon as Lynne or others say everything is 
> > > >>> > ready.
> > > >>> >
> > > >>> > thx
> > > >>> >
> > > >>>
> > > >>> It's never too late to make a release. If we do a release now, 
> > > >>> nothing's stopping
> > > >>> us from doing a 7.0 and getting back on track with releases every two 
> > > >>> months or so,
> > > >>> like the plan was.
> > > >>>
> > > >>> 7.0 is likely to be a pretty big release, with YUVJ removal, (xHE) 
> > > >>> AAC+fixes, D3D12 hwdec,
> > > >>> Vulkan encode and Vulkan AV1, and VVC, and IAMF, and MLP work, so 
> > > >>> it's a good idea to
> > > >>> have a release before all this lands.
> > > >>>
> > > >>> I think the tree is in a pretty good state ATM, you should go ahead 
> > > >>> and branch if you're
> > > >>> comfortable with it as well.
> > > >>>
> > > >>
> > > >> branch made
> > > >>
> > > >
> > > > Thanks. I'll get a blog post ready for the transform work, as kierank 
> > > > wanted to post something,
> > > > and if users can know to who to point fingers to in case it degrades 
> > > > performance on RPI1 devices.
> > > >
> > > >
> > > >>> Let's aim for a release by Sunday next week. That should give 
> > > >>> everyone enough time to
> > > >>> backport fixes they want in.
> > > >>>
> > > >>
> > > >> I would aim for 1-3 weeks (when code and developers are ready)
> > > >> dont want to aim for a specific day, better pick a day when everything 
> > > >> is fine
> > > >> not too many distractions, ...
> > > >>
> > > >> Or is there something that favors us to be before a specific date ?
> > > >>
> > > >
> > > > Not really a reason, Sunday is just an optimistic date to aim for.
> > > > If there are no big fixes to backport to the branch, I think we can 
> > > > target it.
> > > >
> > >
> > > The nlmeans_vulkan patch I just sent is the last patch I'd like to have 
> > > in 6.1.
> > > Does anyone else have any patches they would like in 6.1?
> >
> > I was going to request Steven Liu's enhanced RTMP set but it looks
> > like those are already in the release/6.1 branch, so cheers.
> :-) Thanks ttmath
s/ttmath/tmatth/g
> >
> > -t
>
> Thanks
> Steven
___
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 "unsubscribe".


Re: [FFmpeg-devel] [RFC] Release 6.1

2023-11-07 Thread Steven Liu
Tristan Matthews  于2023年11月8日周三 00:47写道:
>
> On Tue, Nov 7, 2023 at 2:36 AM Lynne  wrote:
> >
> > Oct 29, 2023, 06:57 by d...@lynne.ee:
> >
> > > Oct 29, 2023, 05:51 by mich...@niedermayer.cc:
> > >
> > >> On Sat, Oct 28, 2023 at 09:23:45PM +0200, Lynne wrote:
> > >>
> > >>> Oct 28, 2023, 18:49 by mich...@niedermayer.cc:
> > >>>
> > >>> > On Thu, Jul 06, 2023 at 06:04:41PM +0200, Lynne wrote:
> > >>> >
> > >>> >> It's been a while since we've had a release, and we've had
> > >>> >> a lot of new features in.
> > >>> >> We did say we would make releases more often, and I think
> > >>> >> it's about time we have a new release.
> > >>> >>
> > >>> >> Anything anyone wants to have merged or should we branch
> > >>> >> off 6.1 in a few days?
> > >>> >>
> > >>> >
> > >>> > Whats the status of this ?
> > >>> > I can branch 6.1 anytime
> > >>> >
> > >>> > It was just that jb told me
> > >>> > "6.1 opportunity is gone.
> > >>> >  We're too late on the schedule, and noone had time to work on it, so 
> > >>> > it is wiser to target 7.0 in January"
> > >>> >
> > >>> > but now i see on IRC
> > >>> >  make a damn release already
> > >>> >  j-b: drop MiNi from release maintership and nominate 
> > >>> > Lynne
> > >>> >  I pledge to bring back /slap IRC messages to those who fail 
> > >>> > to push the patches they want for release!
> > >>> >  durandal_1707: good point, we should look at doing another 
> > >>> > 5.1.x release and a 6.0.x release.
> > >>> >
> > >>> > noone mentioned 5.1.x and 6.0.x to me before
> > >>> >
> > >>> > anyway, ill try to make releases from all maintained branches,
> > >>> >
> > >>> > and will branch 6.1 as soon as Lynne or others say everything is 
> > >>> > ready.
> > >>> >
> > >>> > thx
> > >>> >
> > >>>
> > >>> It's never too late to make a release. If we do a release now, 
> > >>> nothing's stopping
> > >>> us from doing a 7.0 and getting back on track with releases every two 
> > >>> months or so,
> > >>> like the plan was.
> > >>>
> > >>> 7.0 is likely to be a pretty big release, with YUVJ removal, (xHE) 
> > >>> AAC+fixes, D3D12 hwdec,
> > >>> Vulkan encode and Vulkan AV1, and VVC, and IAMF, and MLP work, so it's 
> > >>> a good idea to
> > >>> have a release before all this lands.
> > >>>
> > >>> I think the tree is in a pretty good state ATM, you should go ahead and 
> > >>> branch if you're
> > >>> comfortable with it as well.
> > >>>
> > >>
> > >> branch made
> > >>
> > >
> > > Thanks. I'll get a blog post ready for the transform work, as kierank 
> > > wanted to post something,
> > > and if users can know to who to point fingers to in case it degrades 
> > > performance on RPI1 devices.
> > >
> > >
> > >>> Let's aim for a release by Sunday next week. That should give everyone 
> > >>> enough time to
> > >>> backport fixes they want in.
> > >>>
> > >>
> > >> I would aim for 1-3 weeks (when code and developers are ready)
> > >> dont want to aim for a specific day, better pick a day when everything 
> > >> is fine
> > >> not too many distractions, ...
> > >>
> > >> Or is there something that favors us to be before a specific date ?
> > >>
> > >
> > > Not really a reason, Sunday is just an optimistic date to aim for.
> > > If there are no big fixes to backport to the branch, I think we can 
> > > target it.
> > >
> >
> > The nlmeans_vulkan patch I just sent is the last patch I'd like to have in 
> > 6.1.
> > Does anyone else have any patches they would like in 6.1?
>
> I was going to request Steven Liu's enhanced RTMP set but it looks
> like those are already in the release/6.1 branch, so cheers.
:-) Thanks ttmath
>
> -t

Thanks
Steven
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v9 1/9] libavutil: add hwcontext_d3d12va and AV_PIX_FMT_D3D12

2023-11-07 Thread Wu, Tong1


Since 6.1 release has branched out. Resend this patch set and add this feature 
to the next release version.

> configure  |   5 +
> doc/APIchanges |   7 +
> libavutil/Makefile |   3 +
> libavutil/hwcontext.c  |   4 +
> libavutil/hwcontext.h  |   1 +
> libavutil/hwcontext_d3d12va.c  | 695 +
> libavutil/hwcontext_d3d12va.h  | 142 +
> libavutil/hwcontext_d3d12va_internal.h |  59 +++
> libavutil/hwcontext_internal.h |   1 +
> libavutil/pixdesc.c|   4 +
> libavutil/pixfmt.h |   7 +
> libavutil/tests/hwdevice.c |   2 +
> libavutil/version.h|   2 +-
> 13 files changed, 931 insertions(+), 1 deletion(-)
> create mode 100644 libavutil/hwcontext_d3d12va.c
> create mode 100644 libavutil/hwcontext_d3d12va.h
> create mode 100644 libavutil/hwcontext_d3d12va_internal.h
>
>diff --git a/configure b/configure
>index 8ab658f730..69d7a48280 100755
>--- a/configure
>+++ b/configure
>@@ -334,6 +334,7 @@ External library support:
>   --disable-cuda-llvm  disable CUDA compilation using clang [autodetect]
>   --disable-cuvid  disable Nvidia CUVID support [autodetect]
>   --disable-d3d11vadisable Microsoft Direct3D 11 video acceleration 
> code
>[autodetect]
>+  --disable-d3d12vadisable Microsoft Direct3D 12 video acceleration 
>code
>[autodetect]
>   --disable-dxva2  disable Microsoft DirectX 9 video acceleration code
>[autodetect]
>   --disable-ffnvcodec  disable dynamically linked Nvidia code [autodetect]
>   --enable-libdrm  enable DRM code (Linux) [no]
>@@ -1922,6 +1923,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
> cuda_llvm
> cuvid
> d3d11va
>+d3d12va
> dxva2
> ffnvcodec
> nvdec
>@@ -3041,6 +3043,7 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
> cuda_deps="ffnvcodec"
> cuvid_deps="ffnvcodec"
> d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
>+d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder"
> dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
> ffnvcodec_deps_any="libdl LoadLibrary"
> mediacodec_deps="android"
>@@ -6563,6 +6566,8 @@ check_type "windows.h dxgi1_2.h" "IDXGIOutput1"
> check_type "windows.h dxgi1_5.h" "IDXGIOutput5"
> check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
> check_type "windows.h d3d11.h" "ID3D11VideoContext"
>+check_type "windows.h d3d12.h" "ID3D12Device"
>+check_type "windows.h d3d12video.h" "ID3D12VideoDecoder"
> check_type "windows.h" "DPI_AWARENESS_CONTEXT" -
>D_WIN32_WINNT=0x0A00
> check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -
>D_WIN32_WINNT=0x0602
> check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat
>diff --git a/doc/APIchanges b/doc/APIchanges
>index d4511ce2dd..2e71943b34 100644
>--- a/doc/APIchanges
>+++ b/doc/APIchanges
>@@ -2,6 +2,13 @@ The last version increases of all libraries were on 2023-02-
>09
>
> API changes, most recent first:
>
>+2023-11-07 - xx - lavu 58.32.100 - pixfmt.h hwcontext.h
>hwcontext_d3d12va.h
>+  Add AV_HWDEVICE_TYPE_D3D12VA and AV_PIX_FMT_D3D12.
>+  Add AVD3D12VADeviceContext, AVD3D12VASyncContext, AVD3D12VAFrame
>and
>+  AVD3D12VAFramesContext.
>+  Add av_d3d12va_map_sw_to_hw_format, av_d3d12va_sync_context_alloc,
>+  av_d3d12va_sync_context_free.
>+
> 2023-10-31 - xx - lavu 58.31.100 - pixdesc.h
>   Add AV_PIX_FMT_FLAG_XYZ.
>
>diff --git a/libavutil/Makefile b/libavutil/Makefile
>index 4711f8cde8..6a8566f1d9 100644
>--- a/libavutil/Makefile
>+++ b/libavutil/Makefile
>@@ -42,6 +42,7 @@ HEADERS = adler32.h  
>   \
>   hwcontext.h   \
>   hwcontext_cuda.h  \
>   hwcontext_d3d11va.h   \
>+  hwcontext_d3d12va.h   \
>   hwcontext_drm.h   \
>   hwcontext_dxva2.h \
>   hwcontext_qsv.h   \
>@@ -190,6 +191,7 @@ OBJS = adler32.o   
> \
>
> OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o
> OBJS-$(CONFIG_D3D11VA)  += hwcontext_d3d11va.o
>+OBJS-$(CONFIG_D3D12VA)  += hwcontext_d3d12va.o
> OBJS-$(CONFIG_DXVA2)+= hwcontext_dxva2.o
> OBJS-$(CONFIG_LIBDRM)   += hwcontext_drm.o
> OBJS-$(CONFIG_MACOS_KPERF)  += macos_kperf.o
>@@ -213,6 +215,7 @@ SKIPHEADERS-$(HAVE_CUDA_H) +=
>hwcontext_cuda.h
> SKIPHEADERS-$(CONFIG_CUDA) += hwcontext_cuda_internal.h \
>   cuda_check.h
> SKIPHEADERS-$(CONFIG_D3D11VA)   

[FFmpeg-devel] [PATCH v9 9/9] avcodec/d3d12va_hevc: enable allow_profile_mismatch flag for d3d12va msp profile

2023-11-07 Thread Tong Wu
Same as d3d11va, this flag enables main still picture profile for
d3d12va. User should add this flag when decoding main still picture
profile.

Signed-off-by: Tong Wu 
---
 libavcodec/d3d12va_hevc.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c
index 4f6640be2f..1894fddb79 100644
--- a/libavcodec/d3d12va_hevc.c
+++ b/libavcodec/d3d12va_hevc.c
@@ -181,8 +181,13 @@ static int d3d12va_hevc_decode_init(AVCodecContext *avctx)
 break;
 
 case FF_PROFILE_HEVC_MAIN_STILL_PICTURE:
-av_log(avctx, AV_LOG_ERROR, "D3D12 doesn't support 
PROFILE_HEVC_MAIN_STILL_PICTURE!\n");
-return AVERROR(EINVAL);
+if (avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH) {
+ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN;
+break;
+} else {
+av_log(avctx, AV_LOG_ERROR, "D3D12 doesn't support 
PROFILE_HEVC_MAIN_STILL_PICTURE!\n");
+return AVERROR(EINVAL);
+}
 
 case FF_PROFILE_HEVC_MAIN:
 default:
-- 
2.41.0.windows.1

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v9 6/9] avcodec: add D3D12VA hardware accelerated MPEG-2 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   2 +
 libavcodec/Makefile |   1 +
 libavcodec/d3d12va_mpeg2.c  | 191 
 libavcodec/dxva2_internal.h |   6 ++
 libavcodec/dxva2_mpeg2.c|  18 ++--
 libavcodec/hwaccels.h   |   1 +
 libavcodec/mpeg12dec.c  |   6 ++
 7 files changed, 216 insertions(+), 9 deletions(-)
 create mode 100644 libavcodec/d3d12va_mpeg2.c

diff --git a/configure b/configure
index 3cac120b1c..2fd864f3ef 100755
--- a/configure
+++ b/configure
@@ -3123,6 +3123,8 @@ mpeg2_d3d11va_hwaccel_deps="d3d11va"
 mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
 mpeg2_d3d11va2_hwaccel_deps="d3d11va"
 mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder"
+mpeg2_d3d12va_hwaccel_deps="d3d12va"
+mpeg2_d3d12va_hwaccel_select="mpeg2video_decoder"
 mpeg2_dxva2_hwaccel_deps="dxva2"
 mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
 mpeg2_nvdec_hwaccel_deps="nvdec"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index c63982c5de..a0be346c88 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1024,6 +1024,7 @@ OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL)+= 
vdpau_mpeg12.o
 OBJS-$(CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
 OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL)  += dxva2_mpeg2.o
 OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL)+= dxva2_mpeg2.o
+OBJS-$(CONFIG_MPEG2_D3D12VA_HWACCEL)  += dxva2_mpeg2.o d3d12va_mpeg2.o
 OBJS-$(CONFIG_MPEG2_NVDEC_HWACCEL)+= nvdec_mpeg12.o
 OBJS-$(CONFIG_MPEG2_QSV_HWACCEL)  += qsvdec.o
 OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL)+= vaapi_mpeg2.o
diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c
new file mode 100644
index 00..fe3636d242
--- /dev/null
+++ b/libavcodec/d3d12va_mpeg2.c
@@ -0,0 +1,191 @@
+/*
+ * Direct3D12 MPEG-2 HW acceleration
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config_components.h"
+#include "libavutil/avassert.h"
+#include "libavutil/hwcontext_d3d12va_internal.h"
+#include "mpegutils.h"
+#include "mpegvideodec.h"
+#include "d3d12va_decode.h"
+#include "dxva2_internal.h"
+
+#define MAX_SLICES  1024
+#define INVALID_REF 0x
+
+#define REF_RESOURCE(index) if (index != INVALID_REF) { \
+ctx->ref_resources[index] = frames_hwctx->texture_infos[index].texture; \
+}
+
+typedef struct D3D12DecodePictureContext {
+DXVA_PictureParameters  pp;
+DXVA_QmatrixDataqm;
+unsignedslice_count;
+DXVA_SliceInfo  slices[MAX_SLICES];
+const uint8_t  *bitstream;
+unsignedbitstream_size;
+} D3D12DecodePictureContext;
+
+static int d3d12va_mpeg2_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer,  av_unused uint32_t size)
+{
+const MpegEncContext  *s   = avctx->priv_data;
+D3D12VADecodeContext  *ctx = D3D12VA_DECODE_CONTEXT(avctx);
+D3D12DecodePictureContext *ctx_pic = 
s->current_picture_ptr->hwaccel_picture_private;
+DXVA_QmatrixData  *qm  = _pic->qm;
+
+if (!ctx)
+return -1;
+
+av_assert0(ctx_pic);
+
+ff_dxva2_mpeg2_fill_picture_parameters(avctx, (AVDXVAContext *)ctx, 
_pic->pp);
+ff_dxva2_mpeg2_fill_quantization_matrices(avctx, (AVDXVAContext *)ctx, 
_pic->qm);
+
+// Post processing operations are not supported in D3D12 Video
+ctx_pic->pp.wDeblockedPictureIndex = INVALID_REF;
+
+ctx_pic->bitstream  = NULL;
+ctx_pic->bitstream_size = 0;
+ctx_pic->slice_count= 0;
+
+return 0;
+}
+
+static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t 
*buffer, uint32_t size)
+{
+const MpegEncContext  *s   = avctx->priv_data;
+D3D12DecodePictureContext *ctx_pic = 
s->current_picture_ptr->hwaccel_picture_private;
+
+int is_field = s->picture_structure != PICT_FRAME;
+
+if (ctx_pic->slice_count >= MAX_SLICES) {
+return AVERROR(ERANGE);
+}
+
+if (!ctx_pic->bitstream)
+ctx_pic->bitstream = buffer;
+ctx_pic->bitstream_size += size;
+
+ff_dxva2_mpeg2_fill_slice(avctx, 

[FFmpeg-devel] [PATCH v9 8/9] Changelog: D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 Changelog | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Changelog b/Changelog
index 8f0606fc26..c394534afb 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,9 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version :
+- D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding
+
 version 6.1:
 - libaribcaption decoder
 - Playdate video decoder and demuxer
-- 
2.41.0.windows.1

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v9 5/9] avcodec: add D3D12VA hardware accelerated AV1 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   2 +
 libavcodec/Makefile |   1 +
 libavcodec/av1dec.c |  10 ++
 libavcodec/d3d12va_av1.c| 220 
 libavcodec/dxva2_av1.c  |   5 +-
 libavcodec/dxva2_internal.h |   4 +
 libavcodec/hwaccels.h   |   1 +
 7 files changed, 241 insertions(+), 2 deletions(-)
 create mode 100644 libavcodec/d3d12va_av1.c

diff --git a/configure b/configure
index 99b6cdcb13..3cac120b1c 100755
--- a/configure
+++ b/configure
@@ -3057,6 +3057,8 @@ av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
 av1_d3d11va_hwaccel_select="av1_decoder"
 av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
 av1_d3d11va2_hwaccel_select="av1_decoder"
+av1_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_AV1"
+av1_d3d12va_hwaccel_select="av1_decoder"
 av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1"
 av1_dxva2_hwaccel_select="av1_decoder"
 av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 3d8df464ab..c63982c5de 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -993,6 +993,7 @@ OBJS-$(CONFIG_VULKAN) += vulkan.o 
vulkan_video.o
 
 OBJS-$(CONFIG_AV1_D3D11VA_HWACCEL)+= dxva2_av1.o
 OBJS-$(CONFIG_AV1_DXVA2_HWACCEL)  += dxva2_av1.o
+OBJS-$(CONFIG_AV1_D3D12VA_HWACCEL)+= dxva2_av1.o d3d12va_av1.o
 OBJS-$(CONFIG_AV1_NVDEC_HWACCEL)  += nvdec_av1.o
 OBJS-$(CONFIG_AV1_VAAPI_HWACCEL)  += vaapi_av1.o
 OBJS-$(CONFIG_AV1_VDPAU_HWACCEL)  += vdpau_av1.o
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 6114cb78e6..d23627f184 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -511,6 +511,7 @@ static int get_pixel_format(AVCodecContext *avctx)
 enum AVPixelFormat pix_fmt = get_sw_pixel_format(avctx, seq);
 #define HWACCEL_MAX (CONFIG_AV1_DXVA2_HWACCEL + \
  CONFIG_AV1_D3D11VA_HWACCEL * 2 + \
+ CONFIG_AV1_D3D12VA_HWACCEL + \
  CONFIG_AV1_NVDEC_HWACCEL + \
  CONFIG_AV1_VAAPI_HWACCEL + \
  CONFIG_AV1_VDPAU_HWACCEL + \
@@ -529,6 +530,9 @@ static int get_pixel_format(AVCodecContext *avctx)
 *fmtp++ = AV_PIX_FMT_D3D11VA_VLD;
 *fmtp++ = AV_PIX_FMT_D3D11;
 #endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+*fmtp++ = AV_PIX_FMT_D3D12;
+#endif
 #if CONFIG_AV1_NVDEC_HWACCEL
 *fmtp++ = AV_PIX_FMT_CUDA;
 #endif
@@ -550,6 +554,9 @@ static int get_pixel_format(AVCodecContext *avctx)
 *fmtp++ = AV_PIX_FMT_D3D11VA_VLD;
 *fmtp++ = AV_PIX_FMT_D3D11;
 #endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+*fmtp++ = AV_PIX_FMT_D3D12;
+#endif
 #if CONFIG_AV1_NVDEC_HWACCEL
 *fmtp++ = AV_PIX_FMT_CUDA;
 #endif
@@ -1507,6 +1514,9 @@ const FFCodec ff_av1_decoder = {
 #if CONFIG_AV1_D3D11VA2_HWACCEL
 HWACCEL_D3D11VA2(av1),
 #endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+HWACCEL_D3D12VA(av1),
+#endif
 #if CONFIG_AV1_NVDEC_HWACCEL
 HWACCEL_NVDEC(av1),
 #endif
diff --git a/libavcodec/d3d12va_av1.c b/libavcodec/d3d12va_av1.c
new file mode 100644
index 00..4476f5bd8a
--- /dev/null
+++ b/libavcodec/d3d12va_av1.c
@@ -0,0 +1,220 @@
+/*
+ * Direct3D 12 AV1 HW acceleration
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config_components.h"
+#include "libavutil/avassert.h"
+#include "libavutil/hwcontext_d3d12va_internal.h"
+#include "av1dec.h"
+#include "dxva2_internal.h"
+#include "d3d12va_decode.h"
+
+#define MAX_TILES 256
+
+typedef struct D3D12AV1DecodeContext {
+D3D12VADecodeContext ctx;
+uint8_t *bitstream_buffer;
+} D3D12AV1DecodeContext;
+
+#define D3D12_AV1_DECODE_CONTEXT(avctx) ((D3D12AV1DecodeContext 
*)D3D12VA_DECODE_CONTEXT(avctx))
+
+typedef struct AV1DecodePictureContext {
+DXVA_PicParams_AV1  pp;
+unsignedtile_count;
+DXVA_Tile_AV1   tiles[MAX_TILES];
+uint8_t*bitstream;
+unsignedbitstream_size;
+} AV1DecodePictureContext;
+
+static int 

[FFmpeg-devel] [PATCH v9 7/9] avcodec: add D3D12VA hardware accelerated VC1 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   3 +
 libavcodec/Makefile |   1 +
 libavcodec/d3d12va_vc1.c| 214 
 libavcodec/dxva2_internal.h |   4 +
 libavcodec/dxva2_vc1.c  |  11 +-
 libavcodec/hwaccels.h   |   2 +
 libavcodec/vc1dec.c |   9 ++
 7 files changed, 239 insertions(+), 5 deletions(-)
 create mode 100644 libavcodec/d3d12va_vc1.c

diff --git a/configure b/configure
index 2fd864f3ef..f1f8b81b51 100755
--- a/configure
+++ b/configure
@@ -3149,6 +3149,8 @@ vc1_d3d11va_hwaccel_deps="d3d11va"
 vc1_d3d11va_hwaccel_select="vc1_decoder"
 vc1_d3d11va2_hwaccel_deps="d3d11va"
 vc1_d3d11va2_hwaccel_select="vc1_decoder"
+vc1_d3d12va_hwaccel_deps="d3d12va"
+vc1_d3d12va_hwaccel_select="vc1_decoder"
 vc1_dxva2_hwaccel_deps="dxva2"
 vc1_dxva2_hwaccel_select="vc1_decoder"
 vc1_nvdec_hwaccel_deps="nvdec"
@@ -3179,6 +3181,7 @@ vp9_videotoolbox_hwaccel_deps="videotoolbox"
 vp9_videotoolbox_hwaccel_select="vp9_decoder"
 wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
 wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel"
+wmv3_d3d12va_hwaccel_select="vc1_d3d12va_hwaccel"
 wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
 wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel"
 wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index a0be346c88..fb95e9d8e9 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1036,6 +1036,7 @@ OBJS-$(CONFIG_MPEG4_VDPAU_HWACCEL)+= vdpau_mpeg4.o
 OBJS-$(CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
 OBJS-$(CONFIG_VC1_D3D11VA_HWACCEL)+= dxva2_vc1.o
 OBJS-$(CONFIG_VC1_DXVA2_HWACCEL)  += dxva2_vc1.o
+OBJS-$(CONFIG_VC1_D3D12VA_HWACCEL)+= dxva2_vc1.o d3d12va_vc1.o
 OBJS-$(CONFIG_VC1_NVDEC_HWACCEL)  += nvdec_vc1.o
 OBJS-$(CONFIG_VC1_QSV_HWACCEL)+= qsvdec.o
 OBJS-$(CONFIG_VC1_VAAPI_HWACCEL)  += vaapi_vc1.o
diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c
new file mode 100644
index 00..73887db602
--- /dev/null
+++ b/libavcodec/d3d12va_vc1.c
@@ -0,0 +1,214 @@
+/*
+ * Direct3D12 WMV3/VC-1 HW acceleration
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config_components.h"
+#include "libavutil/avassert.h"
+#include "libavutil/hwcontext_d3d12va_internal.h"
+#include "mpegutils.h"
+#include "mpegvideodec.h"
+#include "vc1.h"
+#include "vc1data.h"
+#include "d3d12va_decode.h"
+#include "dxva2_internal.h"
+
+#define MAX_SLICES  1024
+#define INVALID_REF 0x
+
+#define REF_RESOURCE(index) if (index != INVALID_REF) { \
+ctx->ref_resources[index] = frames_hwctx->texture_infos[index].texture; \
+}
+
+typedef struct D3D12DecodePictureContext {
+DXVA_PictureParameters pp;
+unsigned   slice_count;
+DXVA_SliceInfo slices[MAX_SLICES];
+const uint8_t *bitstream;
+unsigned   bitstream_size;
+} D3D12DecodePictureContext;
+
+static int d3d12va_vc1_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer,  av_unused uint32_t size)
+{
+const VC1Context  *v   = avctx->priv_data;
+D3D12VADecodeContext  *ctx = D3D12VA_DECODE_CONTEXT(avctx);
+D3D12DecodePictureContext *ctx_pic = 
v->s.current_picture_ptr->hwaccel_picture_private;
+
+if (!ctx)
+return -1;
+
+av_assert0(ctx_pic);
+
+ff_dxva2_vc1_fill_picture_parameters(avctx, (AVDXVAContext *)ctx, 
_pic->pp);
+ctx_pic->pp.wDeblockedPictureIndex = INVALID_REF;
+
+ctx_pic->bitstream  = NULL;
+ctx_pic->bitstream_size = 0;
+ctx_pic->slice_count= 0;
+
+return 0;
+}
+
+static int d3d12va_vc1_decode_slice(AVCodecContext *avctx, const uint8_t 
*buffer, uint32_t size)
+{
+const VC1Context  *v   = avctx->priv_data;
+D3D12DecodePictureContext *ctx_pic = 
v->s.current_picture_ptr->hwaccel_picture_private;
+
+if (ctx_pic->slice_count >= MAX_SLICES) {
+return AVERROR(ERANGE);
+}
+
+if (avctx->codec_id == AV_CODEC_ID_VC1 &&
+size >= 4 && 

[FFmpeg-devel] [PATCH v9 4/9] avcodec: add D3D12VA hardware accelerated VP9 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   2 +
 libavcodec/Makefile |   1 +
 libavcodec/d3d12va_vp9.c| 176 
 libavcodec/dxva2_internal.h |   2 +
 libavcodec/dxva2_vp9.c  |   7 +-
 libavcodec/hwaccels.h   |   1 +
 libavcodec/vp9.c|   7 ++
 7 files changed, 193 insertions(+), 3 deletions(-)
 create mode 100644 libavcodec/d3d12va_vp9.c

diff --git a/configure b/configure
index dc6ebd9768..99b6cdcb13 100755
--- a/configure
+++ b/configure
@@ -3161,6 +3161,8 @@ vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9"
 vp9_d3d11va_hwaccel_select="vp9_decoder"
 vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9"
 vp9_d3d11va2_hwaccel_select="vp9_decoder"
+vp9_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_VP9"
+vp9_d3d12va_hwaccel_select="vp9_decoder"
 vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9"
 vp9_dxva2_hwaccel_select="vp9_decoder"
 vp9_nvdec_hwaccel_deps="nvdec"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 7fdfc1801c..3d8df464ab 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1042,6 +1042,7 @@ OBJS-$(CONFIG_VP8_NVDEC_HWACCEL)  += nvdec_vp8.o
 OBJS-$(CONFIG_VP8_VAAPI_HWACCEL)  += vaapi_vp8.o
 OBJS-$(CONFIG_VP9_D3D11VA_HWACCEL)+= dxva2_vp9.o
 OBJS-$(CONFIG_VP9_DXVA2_HWACCEL)  += dxva2_vp9.o
+OBJS-$(CONFIG_VP9_D3D12VA_HWACCEL)+= dxva2_vp9.o d3d12va_vp9.o
 OBJS-$(CONFIG_VP9_NVDEC_HWACCEL)  += nvdec_vp9.o
 OBJS-$(CONFIG_VP9_VAAPI_HWACCEL)  += vaapi_vp9.o
 OBJS-$(CONFIG_VP9_VDPAU_HWACCEL)  += vdpau_vp9.o
diff --git a/libavcodec/d3d12va_vp9.c b/libavcodec/d3d12va_vp9.c
new file mode 100644
index 00..6ff0c5400d
--- /dev/null
+++ b/libavcodec/d3d12va_vp9.c
@@ -0,0 +1,176 @@
+/*
+ * Direct3D 12 VP9 HW acceleration
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config_components.h"
+
+#include "libavutil/avassert.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/hwcontext_d3d12va_internal.h"
+
+#include "vp9shared.h"
+#include "dxva2_internal.h"
+#include "d3d12va_decode.h"
+
+typedef struct VP9DecodePictureContext {
+DXVA_PicParams_VP9pp;
+DXVA_Slice_VPx_Short  slice;
+const uint8_t*bitstream;
+unsigned  bitstream_size;
+} VP9DecodePictureContext;
+
+static void fill_slice_short(DXVA_Slice_VPx_Short *slice, unsigned position, 
unsigned size)
+{
+memset(slice, 0, sizeof(*slice));
+slice->BSNALunitDataLocation = position;
+slice->SliceBytesInBuffer= size;
+slice->wBadSliceChopping = 0;
+}
+
+static int d3d12va_vp9_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer, av_unused uint32_t size)
+{
+const VP9SharedContext  *h   = avctx->priv_data;
+D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
+VP9DecodePictureContext *ctx_pic = 
h->frames[CUR_FRAME].hwaccel_picture_private;
+
+if (!ctx)
+return -1;
+
+av_assert0(ctx_pic);
+
+if (ff_dxva2_vp9_fill_picture_parameters(avctx, (AVDXVAContext *)ctx, 
_pic->pp) < 0)
+return -1;
+
+ctx_pic->bitstream_size = 0;
+ctx_pic->bitstream = NULL;
+
+return 0;
+}
+
+static int d3d12va_vp9_decode_slice(AVCodecContext *avctx, const uint8_t 
*buffer, uint32_t size)
+{
+const VP9SharedContext  *h   = avctx->priv_data;
+VP9DecodePictureContext *ctx_pic = 
h->frames[CUR_FRAME].hwaccel_picture_private;
+unsigned position;
+
+if (!ctx_pic->bitstream)
+ctx_pic->bitstream = buffer;
+ctx_pic->bitstream_size += size;
+
+position = buffer - ctx_pic->bitstream;
+fill_slice_short(_pic->slice, position, size);
+
+return 0;
+}
+
+static int update_input_arguments(AVCodecContext *avctx, 
D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
+{
+D3D12VADecodeContext   *ctx  = D3D12VA_DECODE_CONTEXT(avctx);
+AVHWFramesContext  *frames_ctx   = D3D12VA_FRAMES_CONTEXT(avctx);
+AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
+
+const VP9SharedContext 

[FFmpeg-devel] [PATCH v9 3/9] avcodec: add D3D12VA hardware accelerated HEVC decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   2 +
 libavcodec/Makefile |   1 +
 libavcodec/d3d12va_hevc.c   | 211 
 libavcodec/dxva2_hevc.c |  10 +-
 libavcodec/dxva2_internal.h |   4 +
 libavcodec/hevcdec.c|  10 ++
 libavcodec/hwaccels.h   |   1 +
 7 files changed, 235 insertions(+), 4 deletions(-)
 create mode 100644 libavcodec/d3d12va_hevc.c

diff --git a/configure b/configure
index 28108a95b7..dc6ebd9768 100755
--- a/configure
+++ b/configure
@@ -3093,6 +3093,8 @@ hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
 hevc_d3d11va_hwaccel_select="hevc_decoder"
 hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
 hevc_d3d11va2_hwaccel_select="hevc_decoder"
+hevc_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_HEVC"
+hevc_d3d12va_hwaccel_select="hevc_decoder"
 hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
 hevc_dxva2_hwaccel_select="hevc_decoder"
 hevc_nvdec_hwaccel_deps="nvdec"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 0c8026db83..7fdfc1801c 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1010,6 +1010,7 @@ OBJS-$(CONFIG_H264_VIDEOTOOLBOX_HWACCEL)  += 
videotoolbox.o
 OBJS-$(CONFIG_H264_VULKAN_HWACCEL)+= vulkan_decode.o vulkan_h264.o
 OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL)   += dxva2_hevc.o
 OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o
+OBJS-$(CONFIG_HEVC_D3D12VA_HWACCEL)   += dxva2_hevc.o d3d12va_hevc.o
 OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL) += nvdec_hevc.o
 OBJS-$(CONFIG_HEVC_QSV_HWACCEL)   += qsvdec.o
 OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL) += vaapi_hevc.o h265_profile_level.o
diff --git a/libavcodec/d3d12va_hevc.c b/libavcodec/d3d12va_hevc.c
new file mode 100644
index 00..4f6640be2f
--- /dev/null
+++ b/libavcodec/d3d12va_hevc.c
@@ -0,0 +1,211 @@
+/*
+ * Direct3D 12 HEVC HW acceleration
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config_components.h"
+
+#include "libavutil/avassert.h"
+#include "libavutil/hwcontext_d3d12va_internal.h"
+#include "hevc_data.h"
+#include "hevcdec.h"
+#include "dxva2_internal.h"
+#include "d3d12va_decode.h"
+#include 
+
+#define MAX_SLICES 256
+
+typedef struct HEVCDecodePictureContext {
+DXVA_PicParams_HEVCpp;
+DXVA_Qmatrix_HEVC  qm;
+unsigned   slice_count;
+DXVA_Slice_HEVC_Short  slice_short[MAX_SLICES];
+const uint8_t *bitstream;
+unsigned   bitstream_size;
+} HEVCDecodePictureContext;
+
+static void fill_slice_short(DXVA_Slice_HEVC_Short *slice, unsigned position, 
unsigned size)
+{
+memset(slice, 0, sizeof(*slice));
+slice->BSNALunitDataLocation = position;
+slice->SliceBytesInBuffer= size;
+slice->wBadSliceChopping = 0;
+}
+
+static int d3d12va_hevc_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer, av_unused uint32_t size)
+{
+const HEVCContext*h   = avctx->priv_data;
+D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
+HEVCDecodePictureContext *ctx_pic = h->ref->hwaccel_picture_private;
+
+if (!ctx)
+return -1;
+
+av_assert0(ctx_pic);
+
+ff_dxva2_hevc_fill_picture_parameters(avctx, (AVDXVAContext *)ctx, 
_pic->pp);
+
+ff_dxva2_hevc_fill_scaling_lists(avctx, (AVDXVAContext *)ctx, 
_pic->qm);
+
+ctx_pic->slice_count= 0;
+ctx_pic->bitstream_size = 0;
+ctx_pic->bitstream  = NULL;
+
+return 0;
+}
+
+static int d3d12va_hevc_decode_slice(AVCodecContext *avctx, const uint8_t 
*buffer, uint32_t size)
+{
+const HEVCContext*h   = avctx->priv_data;
+const HEVCFrame  *current_picture = h->ref;
+HEVCDecodePictureContext *ctx_pic = 
current_picture->hwaccel_picture_private;
+unsigned position;
+
+if (ctx_pic->slice_count >= MAX_SLICES)
+return AVERROR(ERANGE);
+
+if (!ctx_pic->bitstream)
+ctx_pic->bitstream = buffer;
+ctx_pic->bitstream_size += size;
+
+position = buffer - ctx_pic->bitstream;
+

[FFmpeg-devel] [PATCH v9 2/9] avcodec: add D3D12VA hardware accelerated H264 decoding

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

The implementation is based on:
https://learn.microsoft.com/en-us/windows/win32/medfound/direct3d-12-video-overview

With the Direct3D 12 video decoding support, we can render or process
the decoded images by the pixel shaders or compute shaders directly
without the extra copy overhead, which is beneficial especially if you
are trying to render or post-process a 4K or 8K video.

The command below is how to enable d3d12va:
ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure   |   2 +
 libavcodec/Makefile |   3 +
 libavcodec/d3d11va.h|   3 -
 libavcodec/d3d12va_decode.c | 536 
 libavcodec/d3d12va_decode.h | 176 
 libavcodec/d3d12va_h264.c   | 210 ++
 libavcodec/dxva2.c  |  27 ++
 libavcodec/dxva2.h  |   3 -
 libavcodec/dxva2_h264.c |  12 +-
 libavcodec/dxva2_internal.h |  67 ++---
 libavcodec/h264_slice.c |   4 +
 libavcodec/h264dec.c|   3 +
 libavcodec/hwaccels.h   |   1 +
 libavcodec/hwconfig.h   |   2 +
 14 files changed, 1007 insertions(+), 42 deletions(-)
 create mode 100644 libavcodec/d3d12va_decode.c
 create mode 100644 libavcodec/d3d12va_decode.h
 create mode 100644 libavcodec/d3d12va_h264.c

diff --git a/configure b/configure
index 69d7a48280..28108a95b7 100755
--- a/configure
+++ b/configure
@@ -3075,6 +3075,8 @@ h264_d3d11va_hwaccel_deps="d3d11va"
 h264_d3d11va_hwaccel_select="h264_decoder"
 h264_d3d11va2_hwaccel_deps="d3d11va"
 h264_d3d11va2_hwaccel_select="h264_decoder"
+h264_d3d12va_hwaccel_deps="d3d12va"
+h264_d3d12va_hwaccel_select="h264_decoder"
 h264_dxva2_hwaccel_deps="dxva2"
 h264_dxva2_hwaccel_select="h264_decoder"
 h264_nvdec_hwaccel_deps="nvdec"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index ab7fba394a..0c8026db83 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -983,6 +983,7 @@ OBJS-$(CONFIG_ADPCM_ZORK_DECODER) += adpcm.o 
adpcm_data.o
 
 # hardware accelerators
 OBJS-$(CONFIG_D3D11VA)+= dxva2.o
+OBJS-$(CONFIG_D3D12VA)+= dxva2.o d3d12va_decode.o
 OBJS-$(CONFIG_DXVA2)  += dxva2.o
 OBJS-$(CONFIG_NVDEC)  += nvdec.o
 OBJS-$(CONFIG_VAAPI)  += vaapi_decode.o
@@ -1000,6 +1001,7 @@ OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o
 OBJS-$(CONFIG_H263_VIDEOTOOLBOX_HWACCEL)  += videotoolbox.o
 OBJS-$(CONFIG_H264_D3D11VA_HWACCEL)   += dxva2_h264.o
 OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
+OBJS-$(CONFIG_H264_D3D12VA_HWACCEL)   += dxva2_h264.o d3d12va_h264.o
 OBJS-$(CONFIG_H264_NVDEC_HWACCEL) += nvdec_h264.o
 OBJS-$(CONFIG_H264_QSV_HWACCEL)   += qsvdec.o
 OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
@@ -1291,6 +1293,7 @@ SKIPHEADERS+= %_tablegen.h
  \
 
 SKIPHEADERS-$(CONFIG_AMF)  += amfenc.h
 SKIPHEADERS-$(CONFIG_D3D11VA)  += d3d11va.h dxva2_internal.h
+SKIPHEADERS-$(CONFIG_D3D12VA)  += d3d12va_decode.h
 SKIPHEADERS-$(CONFIG_DXVA2)+= dxva2.h dxva2_internal.h
 SKIPHEADERS-$(CONFIG_JNI)  += ffjni.h
 SKIPHEADERS-$(CONFIG_LCMS2)+= fflcms2.h
diff --git a/libavcodec/d3d11va.h b/libavcodec/d3d11va.h
index 6816b6c1e6..27f40e5519 100644
--- a/libavcodec/d3d11va.h
+++ b/libavcodec/d3d11va.h
@@ -45,9 +45,6 @@
  * @{
  */
 
-#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for 
Direct3D11 and old UVD/UVD+ ATI video cards
-#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO2 ///< Work around for 
Direct3D11 and old Intel GPUs with ClearVideo interface
-
 /**
  * This structure is used to provides the necessary configurations and data
  * to the Direct3D11 FFmpeg HWAccel implementation.
diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c
new file mode 100644
index 00..e194adc7ed
--- /dev/null
+++ b/libavcodec/d3d12va_decode.c
@@ -0,0 +1,536 @@
+/*
+ * Direct3D 12 HW acceleration video decoder
+ *
+ * copyright (c) 2022-2023 Wu Jianhua 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include 
+#include 
+#include 
+
+#include 

[FFmpeg-devel] [PATCH v9 1/9] libavutil: add hwcontext_d3d12va and AV_PIX_FMT_D3D12

2023-11-07 Thread Tong Wu
From: Wu Jianhua 

Signed-off-by: Wu Jianhua 
Signed-off-by: Tong Wu 
---
 configure  |   5 +
 doc/APIchanges |   7 +
 libavutil/Makefile |   3 +
 libavutil/hwcontext.c  |   4 +
 libavutil/hwcontext.h  |   1 +
 libavutil/hwcontext_d3d12va.c  | 695 +
 libavutil/hwcontext_d3d12va.h  | 142 +
 libavutil/hwcontext_d3d12va_internal.h |  59 +++
 libavutil/hwcontext_internal.h |   1 +
 libavutil/pixdesc.c|   4 +
 libavutil/pixfmt.h |   7 +
 libavutil/tests/hwdevice.c |   2 +
 libavutil/version.h|   2 +-
 13 files changed, 931 insertions(+), 1 deletion(-)
 create mode 100644 libavutil/hwcontext_d3d12va.c
 create mode 100644 libavutil/hwcontext_d3d12va.h
 create mode 100644 libavutil/hwcontext_d3d12va_internal.h

diff --git a/configure b/configure
index 8ab658f730..69d7a48280 100755
--- a/configure
+++ b/configure
@@ -334,6 +334,7 @@ External library support:
   --disable-cuda-llvm  disable CUDA compilation using clang [autodetect]
   --disable-cuvid  disable Nvidia CUVID support [autodetect]
   --disable-d3d11vadisable Microsoft Direct3D 11 video acceleration 
code [autodetect]
+  --disable-d3d12vadisable Microsoft Direct3D 12 video acceleration 
code [autodetect]
   --disable-dxva2  disable Microsoft DirectX 9 video acceleration code 
[autodetect]
   --disable-ffnvcodec  disable dynamically linked Nvidia code [autodetect]
   --enable-libdrm  enable DRM code (Linux) [no]
@@ -1922,6 +1923,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
 cuda_llvm
 cuvid
 d3d11va
+d3d12va
 dxva2
 ffnvcodec
 nvdec
@@ -3041,6 +3043,7 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
 cuda_deps="ffnvcodec"
 cuvid_deps="ffnvcodec"
 d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
+d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder"
 dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
 ffnvcodec_deps_any="libdl LoadLibrary"
 mediacodec_deps="android"
@@ -6563,6 +6566,8 @@ check_type "windows.h dxgi1_2.h" "IDXGIOutput1"
 check_type "windows.h dxgi1_5.h" "IDXGIOutput5"
 check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
 check_type "windows.h d3d11.h" "ID3D11VideoContext"
+check_type "windows.h d3d12.h" "ID3D12Device"
+check_type "windows.h d3d12video.h" "ID3D12VideoDecoder"
 check_type "windows.h" "DPI_AWARENESS_CONTEXT" -D_WIN32_WINNT=0x0A00
 check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
 check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat
diff --git a/doc/APIchanges b/doc/APIchanges
index d4511ce2dd..2e71943b34 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,13 @@ The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
+2023-11-07 - xx - lavu 58.32.100 - pixfmt.h hwcontext.h 
hwcontext_d3d12va.h
+  Add AV_HWDEVICE_TYPE_D3D12VA and AV_PIX_FMT_D3D12.
+  Add AVD3D12VADeviceContext, AVD3D12VASyncContext, AVD3D12VAFrame and
+  AVD3D12VAFramesContext.
+  Add av_d3d12va_map_sw_to_hw_format, av_d3d12va_sync_context_alloc,
+  av_d3d12va_sync_context_free.
+
 2023-10-31 - xx - lavu 58.31.100 - pixdesc.h
   Add AV_PIX_FMT_FLAG_XYZ.
 
diff --git a/libavutil/Makefile b/libavutil/Makefile
index 4711f8cde8..6a8566f1d9 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -42,6 +42,7 @@ HEADERS = adler32.h   
  \
   hwcontext.h   \
   hwcontext_cuda.h  \
   hwcontext_d3d11va.h   \
+  hwcontext_d3d12va.h   \
   hwcontext_drm.h   \
   hwcontext_dxva2.h \
   hwcontext_qsv.h   \
@@ -190,6 +191,7 @@ OBJS = adler32.o
\
 
 OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o
 OBJS-$(CONFIG_D3D11VA)  += hwcontext_d3d11va.o
+OBJS-$(CONFIG_D3D12VA)  += hwcontext_d3d12va.o
 OBJS-$(CONFIG_DXVA2)+= hwcontext_dxva2.o
 OBJS-$(CONFIG_LIBDRM)   += hwcontext_drm.o
 OBJS-$(CONFIG_MACOS_KPERF)  += macos_kperf.o
@@ -213,6 +215,7 @@ SKIPHEADERS-$(HAVE_CUDA_H) += hwcontext_cuda.h
 SKIPHEADERS-$(CONFIG_CUDA) += hwcontext_cuda_internal.h \
   cuda_check.h
 SKIPHEADERS-$(CONFIG_D3D11VA)  += hwcontext_d3d11va.h
+SKIPHEADERS-$(CONFIG_D3D12VA)  += hwcontext_d3d12va.h
 SKIPHEADERS-$(CONFIG_DXVA2)+= 

Re: [FFmpeg-devel] [PATCH v2] doc/t2h: Support texinfo 7.0

2023-11-07 Thread Stefano Sabatini
On date Tuesday 2023-11-07 23:32:23 +0100, epira...@gmail.com wrote:
> On 7 Nov 2023, at 22:44, Frank Plowman wrote:
> 
> > On 07/11/2023 20:38, epira...@gmail.com wrote:
[...]
> >> Just had a quick look and was wondering why your patch touches the
> >> bootstrap.min.css?
> >

> > Texinfo 7.0 produces quite different HTML to Texinfo 6.8. Without
> > that change to the CSS, enumerated option flags (i.e. Possible
> > values of x are...) render as white text on a white background
> > with Texinfo 7.0 and are unreadable. The change removes a style
> > for the selector `.table .table` which causes the background to
> > turn white. As far as I can tell, it is not actually used anywhere
> > in files generated by Texinfo 6.8.
> >
> 

> Thanks for the clarification, I think it might be a good idea to split this 
> change
> into a second commit with the explanation you gave in the commit message. 
> That way
> if it ever causes an issue, it is easier to figure out, as this minified css 
> is
> nearly unreviewable…

+1

That said, I tested the latest patch and seems to work fine with
texinfo 6.8.
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Nicolas George
Sean McGovern (12023-11-07):
> This is really unfair to Paul to let this drag on for so long.

What does fair have to do with this? If there is a bug, it has been
there for years, it can be there for a few more months without any
drawback. Plus, Paul has the patch that makes the bug disappear in his
test case, he can use it if he want.

Some reviews have dragged for weeks before somebody even looked at the
patch. It has been just three days since Paul deigned giving some kind
of analysis.

> If you are genuinely this busy, is there really no one else on the list who
> you can delegate to review this piece?

This is a public mailing-list, have you seen somebody volunteering?

The scheduling in libavfilter is tricky, and I am not aware of anybody
else having manifested interest about the subtle details.

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Sean McGovern
Hi,

On Tue, Nov 7, 2023, 16:50 Nicolas George  wrote:

> Paul B Mahol (12023-11-07):
> > Will apply in next 48h.
>
> So, you are again threatening to violate the project's policy.
>
> > Libavfilter code is not so complex to need so big time interval for
> review
> > from experienced C developer.
>
> First, the issue is not only analyzing the code but first finding time
> to do so. Realize that some of us have a job distinct from FFmpeg. And a
> life. And that does not make us second class citizens of the project.
>
> Second, yes, the scheduling of libavfilter is quite complex, and the
> fact that you believe it is not shows how little qualified you are to
> judge your own patch.
>
> --
>   Nicolas George
> ___
> 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 "unsubscribe".
>

This is really unfair to Paul to let this drag on for so long.

If you are genuinely this busy, is there really no one else on the list who
you can delegate to review this piece?

-- Sean McGovern

>
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2] doc/t2h: Support texinfo 7.0

2023-11-07 Thread epirat07


On 7 Nov 2023, at 22:44, Frank Plowman wrote:

> On 07/11/2023 20:38, epira...@gmail.com wrote:
>
>> On 7 Nov 2023, at 16:57, Frank Plowman wrote:
>>
>>> Resolves #10636 (http://trac.ffmpeg.org/ticket/10636)
>>>
>>> Texinfo 7.0, released in November 2022, changed the names of various
>>> functions. Compiling docs with Texinfo 7.0 results in warnings and
>>> improperly formatted documentation. More old names appear to have
>>> been removed in Texinfo 7.1, released October 2023, which causes docs
>>> compilation to fail.
>>>
>>> This PR addresses the issue by adding logic to switch between the old
>>> and new function names depending on the Texinfo version. Texinfo 6.8
>>> produces identical documentation before and after the patch. The change
>>> to the CSS makes the documentation generated by Texinfo >= 7.0 appear
>>> more similar to that generated by Texinfo <= 6.8.
>>>
>>> CC
>>> https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1938238.html
>>> https://bugs.gentoo.org/916104
>>>
>>> Signed-off-by: Frank Plowman 
>>>
>> Thanks!
>> Just had a quick look and was wondering why your patch touches the
>> bootstrap.min.css?
>
> Texinfo 7.0 produces quite different HTML to Texinfo 6.8. Without that change 
> to the CSS, enumerated option flags (i.e. Possible values of x are...) render 
> as white text on a white background with Texinfo 7.0 and are unreadable. The 
> change removes a style for the selector `.table .table` which causes the 
> background to turn white. As far as I can tell, it is not actually used 
> anywhere in files generated by Texinfo 6.8.
>

Thanks for the clarification, I think it might be a good idea to split this 
change
into a second commit with the explanation you gave in the commit message. That 
way
if it ever causes an issue, it is easier to figure out, as this minified css is
nearly unreviewable…

> -- 
> https://www.frankplowman.com/
___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 2/2] fate: enhance tpad filter test

2023-11-07 Thread Marvin Scholz
Adds another test that uses the start_duration and stop_duration
options instead of start and stop.
---
 tests/fate/filter-video.mak |  3 ++-
 tests/ref/fate/filter-tpad-add-duration | 11 +++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 tests/ref/fate/filter-tpad-add-duration

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 789ec6414c..58edc70f46 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -299,9 +299,10 @@ fate-filter-tblend: CMD = framecrc -c:v pgmyuv -i $(SRC) 
-vf tblend=all_mode=dif
 FATE_FILTER_VSYNTH_PGMYUV-$(CONFIG_TELECINE_FILTER) += fate-filter-telecine
 fate-filter-telecine: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf telecine
 
-FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 TPAD) += fate-filter-tpad-add 
fate-filter-tpad-clone
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 TPAD) += fate-filter-tpad-add 
fate-filter-tpad-clone fate-filter-tpad-add-duration
 fate-filter-tpad-add:   CMD = framecrc -lavfi 
testsrc2=d=1:r=2,tpad=start=1:stop=3:color=gray
 fate-filter-tpad-clone: CMD = framecrc -lavfi 
testsrc2=d=1:r=2,tpad=start=1:stop=2:stop_mode=clone:color=black
+fate-filter-tpad-add-duration: CMD = framecrc -lavfi 
testsrc2=d=1:r=2,tpad=start_duration=0.5s:stop_duration=1.5s:color=gray
 
 FATE_FILTER_VSYNTH_PGMYUV-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-transpose
 fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose
diff --git a/tests/ref/fate/filter-tpad-add-duration 
b/tests/ref/fate/filter-tpad-add-duration
new file mode 100644
index 00..10e01655a1
--- /dev/null
+++ b/tests/ref/fate/filter-tpad-add-duration
@@ -0,0 +1,11 @@
+#tb 0: 1/2
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 320x240
+#sar 0: 1/1
+0,  0,  0,1,   115200, 0x2213b502
+0,  1,  1,1,   115200, 0xeba70ff3
+0,  2,  2,1,   115200, 0xa764e4d5
+0,  3,  3,1,   115200, 0x2213b502
+0,  4,  4,1,   115200, 0x2213b502
+0,  5,  5,1,   115200, 0x2213b502
-- 
2.39.3 (Apple Git-145)

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 1/2] avfilter/vf_tpad: fix check for drawing initialization

2023-11-07 Thread Marvin Scholz
The check if drawing needs to be initialized and supported formats
should be drawable ones was flawed, as pad_stop/pad_start is only
populated from stop_duration/start_duration after these checks.

To fix that, check the _duration variants as well and for better
readability and maintainability break the check out into its own
helper.

Fixes a regression from 86b252ea9dee18006910e30646ad1067f2d1323f
Fix #10621
---
 libavfilter/vf_tpad.c | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
index 7990403e81..1efe4ec479 100644
--- a/libavfilter/vf_tpad.c
+++ b/libavfilter/vf_tpad.c
@@ -70,11 +70,17 @@ static const AVOption tpad_options[] = {
 
 AVFILTER_DEFINE_CLASS(tpad);
 
+static int needs_drawing(const TPadContext *s) {
+return (
+(s->stop_mode  == MODE_ADD && (s->pad_stop  != 0 || s->stop_duration  
!= 0)) ||
+(s->start_mode == MODE_ADD && (s->pad_start != 0 || s->start_duration 
!= 0))
+);
+}
+
 static int query_formats(AVFilterContext *ctx)
 {
 TPadContext *s = ctx->priv;
-if ((s->stop_mode == MODE_ADD && s->pad_stop != 0) ||
-(s->start_mode == MODE_ADD && s->pad_start != 0))
+if (needs_drawing(s))
 return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
 
 return ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_VIDEO));
@@ -196,8 +202,7 @@ static int config_input(AVFilterLink *inlink)
 AVFilterContext *ctx = inlink->dst;
 TPadContext *s = ctx->priv;
 
-if ((s->stop_mode == MODE_ADD && s->pad_stop != 0) ||
-(s->start_mode == MODE_ADD && s->pad_start != 0)) {
+if (needs_drawing(s)) {
 ff_draw_init(>draw, inlink->format, 0);
 ff_draw_color(>draw, >color, s->rgba_color);
 }
-- 
2.39.3 (Apple Git-145)

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2] doc: add spi.txt

2023-11-07 Thread Lynne
Nov 7, 2023, 21:17 by mich...@niedermayer.cc:

> On Thu, Oct 19, 2023 at 03:29:57AM +0200, Lynne wrote:
>
>> Oct 19, 2023, 00:15 by stefa...@gmail.com:
>>
>> > On date Wednesday 2023-10-18 23:46:48 +0200, Stefano Sabatini wrote:
>> >
>> >> On date Tuesday 2023-10-17 14:41:00 +0200, epira...@gmail.com wrote:
>> >>
>> > [...]
>> >
>> >> > IMO this would be much more discoverable on the website, it would
>> >> > never occur to me to look for such information in the FFmpeg source
>> >> > tree doc folder.
>> >>
>> >> I'm fine with either, I'll let Michael decide the final target repository.
>> >>
>> >
>> > OTOH more visibility for something which is not yet very well defined
>> > is not necessarily good, I'd move that to the website only when/iff
>> > the process is more consolidated.
>> >
>>
>> I think since it's not related to code, it should go on the website,
>> if only to keep the repo clean.
>>
>
> where would you suggest to put it on the wegbpage ?
> the webpage is html, i dont think we have .txt on the webpage
>
> thx
>

Under More->SPI or Developers->SPI?
You could copy paste some other page to use as boilerplate
and paste the doc on there?
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Nicolas George
Paul B Mahol (12023-11-07):
> Will apply in next 48h.

So, you are again threatening to violate the project's policy.

> Libavfilter code is not so complex to need so big time interval for review
> from experienced C developer.

First, the issue is not only analyzing the code but first finding time
to do so. Realize that some of us have a job distinct from FFmpeg. And a
life. And that does not make us second class citizens of the project.

Second, yes, the scheduling of libavfilter is quite complex, and the
fact that you believe it is not shows how little qualified you are to
judge your own patch.

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2] doc/t2h: Support texinfo 7.0

2023-11-07 Thread Frank Plowman

On 07/11/2023 20:38, epira...@gmail.com wrote:


On 7 Nov 2023, at 16:57, Frank Plowman wrote:


Resolves #10636 (http://trac.ffmpeg.org/ticket/10636)

Texinfo 7.0, released in November 2022, changed the names of various
functions. Compiling docs with Texinfo 7.0 results in warnings and
improperly formatted documentation. More old names appear to have
been removed in Texinfo 7.1, released October 2023, which causes docs
compilation to fail.

This PR addresses the issue by adding logic to switch between the old
and new function names depending on the Texinfo version. Texinfo 6.8
produces identical documentation before and after the patch. The change
to the CSS makes the documentation generated by Texinfo >= 7.0 appear
more similar to that generated by Texinfo <= 6.8.

CC
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1938238.html
https://bugs.gentoo.org/916104

Signed-off-by: Frank Plowman 


Thanks!
Just had a quick look and was wondering why your patch touches the
bootstrap.min.css?


Texinfo 7.0 produces quite different HTML to Texinfo 6.8. Without that 
change to the CSS, enumerated option flags (i.e. Possible values of x 
are...) render as white text on a white background with Texinfo 7.0 and 
are unreadable. The change removes a style for the selector `.table 
.table` which causes the background to turn white. As far as I can tell, 
it is not actually used anywhere in files generated by Texinfo 6.8.


--
https://www.frankplowman.com/

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH] fftools/ffplay: use SDL_WaitEvent instead of SDL_PeepEvents while paused

2023-11-07 Thread Bolshoy Toster
Currently, when ffplay is paused, it still constantly polls for events 
at the
REFRESH_RATE (100 times per second). This leads to a high (5-10% on the 
latest

commit, using SDL2 2.28.5-1) CPU usage, when it should be idle.

This commit changes this behavior to use SDL_WaitEvent while paused, 
allowing
ffplay to use less (0-5% under X11) CPU time while paused on supported 
platforms

(windows, X11 and wayland) with SDL versions >=2.0.16.

This has the side effect of only running the refresh loop when there's 
an event,

preventing the cursor from being hidden while paused.

Signed-off-by: bolshoytoster 
---
 fftools/ffplay.c | 31 ---
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index d8c69e1..7814589 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3221,20 +3221,29 @@ static void toggle_audio_display(VideoState *is)
 }
 }
 +static void refresh(VideoState *is, double *remaining_time) {
+if (!cursor_hidden && av_gettime_relative() - cursor_last_shown > 
CURSOR_HIDE_DELAY) {

+SDL_ShowCursor(0);
+cursor_hidden = 1;
+}
+if (*remaining_time > 0.0)
+av_usleep((int64_t)(*remaining_time * 100.0));
+*remaining_time = REFRESH_RATE;
+if (is->show_mode != SHOW_MODE_NONE && (!is->paused || 
is->force_refresh))

+video_refresh(is, remaining_time);
+}
+
 static void refresh_loop_wait_event(VideoState *is, SDL_Event *event) {
 double remaining_time = 0.0;
-SDL_PumpEvents();
-while (!SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, 
SDL_LASTEVENT)) {
-if (!cursor_hidden && av_gettime_relative() - cursor_last_shown 
> CURSOR_HIDE_DELAY) {

-SDL_ShowCursor(0);
-cursor_hidden = 1;
-}
-if (remaining_time > 0.0)
-av_usleep((int64_t)(remaining_time * 100.0));
-remaining_time = REFRESH_RATE;
-if (is->show_mode != SHOW_MODE_NONE && (!is->paused || 
is->force_refresh))

-video_refresh(is, _time);
+if (is->paused) {
+refresh(is, _time);
+SDL_WaitEvent(event);
+} else {
 SDL_PumpEvents();
+while (!SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, 
SDL_LASTEVENT)) {

+refresh(is, _time);
+SDL_PumpEvents();
+}
 }
 }
 -- 2.42.1

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH 4/4] lavu/log: do not assume AVClass.item_name is always set

2023-11-07 Thread James Almer

On 11/7/2023 9:58 AM, Anton Khirnov wrote:

---
  libavutil/log.c | 9 +++--
  1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavutil/log.c b/libavutil/log.c
index 2d358b7ab9..46662f3db0 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -291,6 +291,11 @@ static const char *get_level_str(int level)
  }
  }
  
+static const char *item_name(void *obj, const AVClass *cls)

+{
+return (cls->item_name ? cls->item_name : av_default_item_name)(obj);
+}
+
  static void format_line(void *avcl, int level, const char *fmt, va_list vl,
  AVBPrint part[4], int *print_prefix, int type[2])
  {
@@ -307,12 +312,12 @@ static void format_line(void *avcl, int level, const char 
*fmt, va_list vl,
 avc->parent_log_context_offset);
  if (parent && *parent) {
  av_bprintf(part+0, "[%s @ %p] ",
- (*parent)->item_name(parent), parent);
+   item_name(parent, *parent), parent);
  if(type) type[0] = get_category(parent);
  }
  }
  av_bprintf(part+1, "[%s @ %p] ",
- avc->item_name(avcl), avcl);
+   item_name(avcl, avc), avcl);
  if(type) type[1] = get_category(avcl);
  }


If this lets us define an AVClass without having to add the item_name = 
av_default_item_name line, then +1.


Btw, there's also .version that's always set to LIBAVUTIL_VERSION_INT, 
but that can't be changed as they are compile time constants. What can 
probably be dropped however are the checks in log.c for runtime major 
version 50 and 51.

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2] doc/t2h: Support texinfo 7.0

2023-11-07 Thread epirat07
On 7 Nov 2023, at 16:57, Frank Plowman wrote:

> Resolves #10636 (http://trac.ffmpeg.org/ticket/10636)
>
> Texinfo 7.0, released in November 2022, changed the names of various
> functions. Compiling docs with Texinfo 7.0 results in warnings and
> improperly formatted documentation. More old names appear to have
> been removed in Texinfo 7.1, released October 2023, which causes docs
> compilation to fail.
>
> This PR addresses the issue by adding logic to switch between the old
> and new function names depending on the Texinfo version. Texinfo 6.8
> produces identical documentation before and after the patch. The change
> to the CSS makes the documentation generated by Texinfo >= 7.0 appear
> more similar to that generated by Texinfo <= 6.8.
>
> CC
> https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1938238.html
> https://bugs.gentoo.org/916104
>
> Signed-off-by: Frank Plowman 
>

Thanks!
Just had a quick look and was wondering why your patch touches the
bootstrap.min.css?

> ---
> ___
> 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 "unsubscribe".
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Add support for VP8 codec bitstream

2023-11-07 Thread Ronald S. Bultje
Hi,

On Tue, Nov 7, 2023 at 12:01 AM Dai, Jianhui J <
jianhui.j.dai-at-intel@ffmpeg.org> wrote:

>
>
> > -Original Message-
> > From: ffmpeg-devel  On Behalf Of
> > Ronald S. Bultje
> > Sent: Monday, November 6, 2023 8:08 PM
> > To: FFmpeg development discussions and patches  > de...@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Add support for
> > VP8 codec bitstream
> >
> > Hi,
> >
> > On Mon, Nov 6, 2023 at 7:07 AM Ronald S. Bultje 
> > wrote:
> >
> > > On Sun, Nov 5, 2023 at 11:13 PM Dai, Jianhui J <
> > > jianhui.j.dai-at-intel@ffmpeg.org> wrote:
> > >
> > >> > > +static const uint8_t vp8_token_update_probs[4][8][3][11] = {
> > >> >
> > >> > It would be nice if these symbols could be re-used from the
> > >> > existing vp8 native decoder, instead of duplicating them? Both
> > >> > source + binary size
> > >> are
> > >> > relevant here.
> > >>
> > >> Including vp8data.h would introduce many unwanted static tables other
> > >> than vp8_token_update_probs and increase the binary size.
> > >> As suggested in patch v3, it is better to use local defined
> > >> vp8_token_update_probs.
> > >>
> > >
> > > I didn't mean to include vp8data.h. I mean to include a new *.h that
> > > declares extern const uint8_t vp8_token_update_probs[][][][] and move
> > > said table into a new *.c file. The point is to prevent symbol
> duplication.
> > >
> >
> > And to elaborate further, in case it's unclear: the symbol move means the
> > native VP8 decoder would include this probability table using the same
> new
> > mechanism also. It would no longer exist in vp8data.h.
>
> Right.
> I made another change to reorganize the vp8data.[c|h] and only export `
> ff_vp8_dct_cat_prob` and `ff_vp8_token_default_probs`.
> Please take a look.
>

I'm not sure it's a good idea to move all tables back into vp8.c. There's a
reason we added it in a separate header file, so that "large random tables
with numbers" don't obfuscate the actual source code file. Or to say it
diffrently: you could probably have accomplished the same effect with a
much smaller diff... That's just my opinion though. Anyone else care about
any of this?

Ronald
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2] doc: add spi.txt

2023-11-07 Thread Michael Niedermayer
On Thu, Oct 19, 2023 at 03:29:57AM +0200, Lynne wrote:
> Oct 19, 2023, 00:15 by stefa...@gmail.com:
> 
> > On date Wednesday 2023-10-18 23:46:48 +0200, Stefano Sabatini wrote:
> >
> >> On date Tuesday 2023-10-17 14:41:00 +0200, epira...@gmail.com wrote:
> >>
> > [...]
> >
> >> > IMO this would be much more discoverable on the website, it would
> >> > never occur to me to look for such information in the FFmpeg source
> >> > tree doc folder.
> >>
> >> I'm fine with either, I'll let Michael decide the final target repository.
> >>
> >
> > OTOH more visibility for something which is not yet very well defined
> > is not necessarily good, I'd move that to the website only when/iff
> > the process is more consolidated.
> >
> 
> I think since it's not related to code, it should go on the website,
> if only to keep the repo clean.

where would you suggest to put it on the wegbpage ?
the webpage is html, i dont think we have .txt on the webpage

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier


signature.asc
Description: PGP signature
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Paul B Mahol
Will apply in next 48h.

Libavfilter code is not so complex to need so big time interval for review
from experienced C developer.
___
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 "unsubscribe".


Re: [FFmpeg-devel] [ANNOUNCE] upcoming vote: TC/CC elections

2023-11-07 Thread Anton Khirnov
Quoting Vittorio Giovara (2023-11-06 21:06:50)
> Could I volunteer as well for CC?

Certainly, anyone willing to do the work is welcome.

Cheers,
-- 
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 "unsubscribe".


Re: [FFmpeg-devel] [RFC] Release 6.1

2023-11-07 Thread Tristan Matthews
On Tue, Nov 7, 2023 at 2:36 AM Lynne  wrote:
>
> Oct 29, 2023, 06:57 by d...@lynne.ee:
>
> > Oct 29, 2023, 05:51 by mich...@niedermayer.cc:
> >
> >> On Sat, Oct 28, 2023 at 09:23:45PM +0200, Lynne wrote:
> >>
> >>> Oct 28, 2023, 18:49 by mich...@niedermayer.cc:
> >>>
> >>> > On Thu, Jul 06, 2023 at 06:04:41PM +0200, Lynne wrote:
> >>> >
> >>> >> It's been a while since we've had a release, and we've had
> >>> >> a lot of new features in.
> >>> >> We did say we would make releases more often, and I think
> >>> >> it's about time we have a new release.
> >>> >>
> >>> >> Anything anyone wants to have merged or should we branch
> >>> >> off 6.1 in a few days?
> >>> >>
> >>> >
> >>> > Whats the status of this ?
> >>> > I can branch 6.1 anytime
> >>> >
> >>> > It was just that jb told me
> >>> > "6.1 opportunity is gone.
> >>> >  We're too late on the schedule, and noone had time to work on it, so 
> >>> > it is wiser to target 7.0 in January"
> >>> >
> >>> > but now i see on IRC
> >>> >  make a damn release already
> >>> >  j-b: drop MiNi from release maintership and nominate 
> >>> > Lynne
> >>> >  I pledge to bring back /slap IRC messages to those who fail to 
> >>> > push the patches they want for release!
> >>> >  durandal_1707: good point, we should look at doing another 5.1.x 
> >>> > release and a 6.0.x release.
> >>> >
> >>> > noone mentioned 5.1.x and 6.0.x to me before
> >>> >
> >>> > anyway, ill try to make releases from all maintained branches,
> >>> >
> >>> > and will branch 6.1 as soon as Lynne or others say everything is ready.
> >>> >
> >>> > thx
> >>> >
> >>>
> >>> It's never too late to make a release. If we do a release now, nothing's 
> >>> stopping
> >>> us from doing a 7.0 and getting back on track with releases every two 
> >>> months or so,
> >>> like the plan was.
> >>>
> >>> 7.0 is likely to be a pretty big release, with YUVJ removal, (xHE) 
> >>> AAC+fixes, D3D12 hwdec,
> >>> Vulkan encode and Vulkan AV1, and VVC, and IAMF, and MLP work, so it's a 
> >>> good idea to
> >>> have a release before all this lands.
> >>>
> >>> I think the tree is in a pretty good state ATM, you should go ahead and 
> >>> branch if you're
> >>> comfortable with it as well.
> >>>
> >>
> >> branch made
> >>
> >
> > Thanks. I'll get a blog post ready for the transform work, as kierank 
> > wanted to post something,
> > and if users can know to who to point fingers to in case it degrades 
> > performance on RPI1 devices.
> >
> >
> >>> Let's aim for a release by Sunday next week. That should give everyone 
> >>> enough time to
> >>> backport fixes they want in.
> >>>
> >>
> >> I would aim for 1-3 weeks (when code and developers are ready)
> >> dont want to aim for a specific day, better pick a day when everything is 
> >> fine
> >> not too many distractions, ...
> >>
> >> Or is there something that favors us to be before a specific date ?
> >>
> >
> > Not really a reason, Sunday is just an optimistic date to aim for.
> > If there are no big fixes to backport to the branch, I think we can target 
> > it.
> >
>
> The nlmeans_vulkan patch I just sent is the last patch I'd like to have in 
> 6.1.
> Does anyone else have any patches they would like in 6.1?

I was going to request Steven Liu's enhanced RTMP set but it looks
like those are already in the release/6.1 branch, so cheers.

-t
___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v6] fftools/ffplay: add hwaccel decoding support

2023-11-07 Thread Zhao Zhili
From: Zhao Zhili 

Add vulkan renderer via libplacebo.

Simple usage:
$ ffplay -hwaccel vulkan foo.mp4

Use cuda to vulkan map:
$ ffplay -hwaccel cuda foo.mp4

Create vulkan instance by libplacebo, and enable debug:
$ ffplay -hwaccel vulkan \
-vulkan_params create_by_placebo=1:debug=1 foo.mp4
---
v6:
1. check PL_API_VER >= 278
2. check hwctx->get_proc_addr against SDL_Vulkan_GetVkGetInstanceProcAddr()

v5:
1. add vulkan_params option.
2. vulkan instance can be create by hwcontext or libplacebo.

v4: add more optional extensions
v3: shared vulkan instance between libplacebo and hwcontext

 configure |   2 +-
 doc/ffplay.texi   |  12 +
 fftools/Makefile  |   2 +
 fftools/ffplay.c  |  96 -
 fftools/ffplay_renderer.c | 824 ++
 fftools/ffplay_renderer.h |  41 ++
 6 files changed, 971 insertions(+), 6 deletions(-)
 create mode 100644 fftools/ffplay_renderer.c
 create mode 100644 fftools/ffplay_renderer.h

diff --git a/configure b/configure
index 8ab658f730..80bfa8557c 100755
--- a/configure
+++ b/configure
@@ -3903,7 +3903,7 @@ ffmpeg_select="aformat_filter anull_filter atrim_filter 
format_filter
 ffmpeg_suggest="ole32 psapi shell32"
 ffplay_deps="avcodec avformat avfilter swscale swresample sdl2"
 ffplay_select="crop_filter transpose_filter hflip_filter vflip_filter 
rotate_filter"
-ffplay_suggest="shell32"
+ffplay_suggest="shell32 libplacebo vulkan"
 ffprobe_deps="avcodec avformat"
 ffprobe_suggest="shell32"
 
diff --git a/doc/ffplay.texi b/doc/ffplay.texi
index 5dd860b846..93f77eeece 100644
--- a/doc/ffplay.texi
+++ b/doc/ffplay.texi
@@ -196,6 +196,18 @@ will produce a thread pool with this many threads 
available for parallel
 processing. The default is 0 which means that the thread count will be
 determined by the number of available CPUs.
 
+@item -enable_vulkan
+Use vulkan renderer rather than SDL builtin renderer. Depends on libplacebo.
+
+@item -vulkan_params
+
+Vulkan configuration using a list of @var{key}=@var{value} pairs separated by
+":".
+
+@item -hwaccel
+Use HW accelerated decoding. Enable this option will enable vulkan renderer
+automatically.
+
 @end table
 
 @section While playing
diff --git a/fftools/Makefile b/fftools/Makefile
index 56820e6bc8..3c763e3db9 100644
--- a/fftools/Makefile
+++ b/fftools/Makefile
@@ -22,6 +22,8 @@ OBJS-ffmpeg +=  \
 fftools/sync_queue.o\
 fftools/thread_queue.o  \
 
+OBJS-ffplay += fftools/ffplay_renderer.o
+
 define DOFFTOOL
 OBJS-$(1) += fftools/cmdutils.o fftools/opt_common.o fftools/$(1).o 
$(OBJS-$(1)-yes)
 ifdef HAVE_GNU_WINDRES
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index d8c69e10bc..873ee8cc74 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -58,6 +58,7 @@
 #include 
 
 #include "cmdutils.h"
+#include "ffplay_renderer.h"
 #include "opt_common.h"
 
 const char program_name[] = "ffplay";
@@ -350,6 +351,9 @@ static char *afilters = NULL;
 static int autorotate = 1;
 static int find_stream_info = 1;
 static int filter_nbthreads = 0;
+static int enable_vulkan = 0;
+static char *vulkan_params = NULL;
+static const char *hwaccel = NULL;
 
 /* current context */
 static int is_full_screen;
@@ -362,6 +366,8 @@ static SDL_Renderer *renderer;
 static SDL_RendererInfo renderer_info = {0};
 static SDL_AudioDeviceID audio_dev;
 
+static VkRenderer *vk_renderer;
+
 static const struct TextureFormatEntry {
 enum AVPixelFormat format;
 int texture_fmt;
@@ -954,6 +960,11 @@ static void video_image_display(VideoState *is)
 SDL_Rect rect;
 
 vp = frame_queue_peek_last(>pictq);
+if (vk_renderer) {
+vk_renderer_display(vk_renderer, vp->frame);
+return;
+}
+
 if (is->subtitle_st) {
 if (frame_queue_nb_remaining(>subpq) > 0) {
 sp = frame_queue_peek(>subpq);
@@ -1289,6 +1300,8 @@ static void do_exit(VideoState *is)
 }
 if (renderer)
 SDL_DestroyRenderer(renderer);
+if (vk_renderer)
+vk_renderer_destroy(vk_renderer);
 if (window)
 SDL_DestroyWindow(window);
 uninit_opts();
@@ -2546,6 +2559,37 @@ static int audio_open(void *opaque, AVChannelLayout 
*wanted_channel_layout, int
 return spec.size;
 }
 
+static int create_hwaccel(AVBufferRef **device_ctx)
+{
+enum AVHWDeviceType type;
+int ret;
+AVBufferRef *vk_dev;
+
+*device_ctx = NULL;
+
+if (!hwaccel)
+return 0;
+
+type = av_hwdevice_find_type_by_name(hwaccel);
+if (type == AV_HWDEVICE_TYPE_NONE)
+return AVERROR(ENOTSUP);
+
+ret = vk_renderer_get_hw_dev(vk_renderer, _dev);
+if (ret < 0)
+return ret;
+
+ret = av_hwdevice_ctx_create_derived(device_ctx, type, vk_dev, 0);
+if (!ret)
+return 0;
+
+if (ret != AVERROR(ENOSYS))
+return ret;
+
+av_log(NULL, AV_LOG_WARNING, "Derive %s from vulkan not supported.\n", 
hwaccel);
+ret = av_hwdevice_ctx_create(device_ctx, type, NULL, 

[FFmpeg-devel] [PATCH v2] avutil/hwcontext_vulkan: fix run on macOS

2023-11-07 Thread Zhao Zhili
From: Zhao Zhili 

VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
be set.
---
 libavutil/hwcontext_vulkan.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 8481427b42..521ad76690 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -405,7 +405,6 @@ typedef struct VulkanOptExtension {
 } VulkanOptExtension;
 
 static const VulkanOptExtension optional_instance_exts[] = {
-/* Pointless, here avoid zero-sized structs */
 { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,  
FF_VK_EXT_NO_FLAG},
 };
 
@@ -784,6 +783,16 @@ static int create_instance(AVHWDeviceContext *ctx, 
AVDictionary *opts)
 inst_props.pNext = _features;
 }
 
+#ifdef __APPLE__
+for (int i = 0; i < inst_props.enabledExtensionCount; i++) {
+if (!strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
+inst_props.ppEnabledExtensionNames[i])) {
+inst_props.flags |= 
VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
+break;
+}
+}
+#endif
+
 /* Try to create the instance */
 ret = vk->CreateInstance(_props, hwctx->alloc, >inst);
 
-- 
2.42.0

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v2 6/6] libavformat/webrtc_mux: add WebRTC-HTTP ingestion protocol (WHIP) muxer

2023-11-07 Thread Michael Riedl
Signed-off-by: Michael Riedl 
---
 Changelog  |   1 +
 configure  |   2 +
 doc/muxers.texi|  21 +++
 libavformat/Makefile   |   1 +
 libavformat/allformats.c   |   1 +
 libavformat/webrtc_mux.c (new) | 273 +
 6 files changed, 299 insertions(+)

diff --git a/Changelog b/Changelog
index 45c6c752a06..2604a2925bb 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
 
 version :
 - WHEP demuxer
+- WHIP muxer
 
 
 version 6.1:
diff --git a/configure b/configure
index 02c6f7f2c5d..05cfbbb2376 100755
--- a/configure
+++ b/configure
@@ -3557,6 +3557,8 @@ wav_demuxer_select="riffdec"
 wav_muxer_select="riffenc"
 webm_chunk_muxer_select="webm_muxer"
 webm_dash_manifest_demuxer_select="matroska_demuxer"
+whip_muxer_deps="libdatachannel rtp_muxer"
+whip_muxer_select="http_protocol rtpenc_chain"
 whep_demuxer_deps="libdatachannel sdp_demuxer"
 whep_demuxer_select="http_protocol"
 wtv_demuxer_select="mpegts_demuxer riffdec"
diff --git a/doc/muxers.texi b/doc/muxers.texi
index f6071484ff6..144b0638571 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -2846,4 +2846,25 @@ ffmpeg -f webm_dash_manifest -i video1.webm \
manifest.xml
 @end example
 
+@section whip
+
+WebRTC-HTTP ingestion protocol (WHIP) muxer.
+
+This muxer allows sending audio and video streams to a remote media server
+using the WebRTC-HTTP ingestion protocol (WHIP) as defined in
+@url{https://datatracker.ietf.org/doc/draft-ietf-wish-whip/}.
+
+This muxer supports the following options:
+@table @option
+@item bearer_token
+Optional bearer token for authentication and authorization to the HTTP server.
+Default is @code{NULL}.
+@item connection_timeout
+Timeout for establishing a connection to the media server.
+Default is 10 seconds.
+@item rw_timeout
+Timeout for receiving/writing data from/to the media server.
+Default is 1 second.
+@end table
+
 @c man end MUXERS
diff --git a/libavformat/Makefile b/libavformat/Makefile
index f790fa8cae4..000fd308be2 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -621,6 +621,7 @@ OBJS-$(CONFIG_WEBM_CHUNK_MUXER)  += webm_chunk.o
 OBJS-$(CONFIG_WEBP_MUXER)+= webpenc.o
 OBJS-$(CONFIG_WEBVTT_DEMUXER)+= webvttdec.o subtitles.o
 OBJS-$(CONFIG_WEBVTT_MUXER)  += webvttenc.o
+OBJS-$(CONFIG_WHIP_MUXER)+= webrtc.o webrtc_mux.o
 OBJS-$(CONFIG_WHEP_DEMUXER)  += webrtc.o webrtc_demux.o
 OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood_aud.o
 OBJS-$(CONFIG_WSAUD_MUXER)   += westwood_audenc.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 7acb05634c8..2ad2a6dcba2 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -504,6 +504,7 @@ extern const FFOutputFormat ff_webm_chunk_muxer;
 extern const FFOutputFormat ff_webp_muxer;
 extern const AVInputFormat  ff_webvtt_demuxer;
 extern const FFOutputFormat ff_webvtt_muxer;
+extern const FFOutputFormat ff_whip_muxer;
 extern const AVInputFormat  ff_whep_demuxer;
 extern const AVInputFormat  ff_wsaud_demuxer;
 extern const FFOutputFormat ff_wsaud_muxer;
diff --git a/libavformat/webrtc_mux.c b/libavformat/webrtc_mux.c
new file mode 100644
index 000..2a659ffa41b
--- /dev/null
+++ b/libavformat/webrtc_mux.c
@@ -0,0 +1,273 @@
+/*
+ * WebRTC-HTTP ingestion protocol (WHIP) muxer using libdatachannel
+ *
+ * Copyright (C) 2023 NativeWaves GmbH 
+ * This work is supported by FFG project 47168763.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "avformat.h"
+#include "internal.h"
+#include "libavutil/avstring.h"
+#include "libavutil/time.h"
+#include "mux.h"
+#include "rtpenc.h"
+#include "rtpenc_chain.h"
+#include "rtsp.h"
+#include "webrtc.h"
+#include "version.h"
+
+typedef struct WHIPContext {
+AVClass *av_class;
+WebRTCContext webrtc_ctx;
+} WHIPContext;
+
+
+static void whip_deinit(AVFormatContext* avctx);
+static int whip_init(AVFormatContext* avctx)
+{
+WHIPContext*const ctx = (WHIPContext*const)avctx->priv_data;
+AVStream* stream;
+const AVCodecParameters* codecpar;
+int i, ret;
+char media_stream_id[37] = { 0 };
+

[FFmpeg-devel] [PATCH v2 4/6] libavformat/webrtc: add common code for WebRTC streaming

2023-11-07 Thread Michael Riedl
Signed-off-by: Michael Riedl 
---
 MAINTAINERS|   1 +
 libavformat/webrtc.c (new) | 410 +
 libavformat/webrtc.h (new) |  70 +++
 3 files changed, 481 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index b66c3d09a68..840290c4514 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -505,6 +505,7 @@ Muxers/Demuxers:
   wav.c Michael Niedermayer
   wc3movie.cMike Melanson
   webm dash (matroskaenc.c) Vignesh Venkatasubramanian
+  webrtc*   Michael Riedl
   webvtt*   Matthew J Heaney
   westwood.cMike Melanson
   wtv.c Peter Ross
diff --git a/libavformat/webrtc.c b/libavformat/webrtc.c
new file mode 100644
index 000..c5a0ce8f5de
--- /dev/null
+++ b/libavformat/webrtc.c
@@ -0,0 +1,410 @@
+/*
+ * WebRTC-HTTP ingestion/egress protocol (WHIP/WHEP) common code
+ *
+ * Copyright (C) 2023 NativeWaves GmbH 
+ * This work is supported by FFG project 47168763.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/avstring.h"
+#include "libavutil/opt.h"
+#include "libavutil/uuid.h"
+#include "libavutil/random_seed.h"
+#include "rtpenc_chain.h"
+#include "rtsp.h"
+#include "webrtc.h"
+
+static const char* webrtc_get_state_name(const rtcState state)
+{
+switch (state)
+{
+case RTC_NEW:
+return "RTC_NEW";
+case RTC_CONNECTING:
+return "RTC_CONNECTING";
+case RTC_CONNECTED:
+return "RTC_CONNECTED";
+case RTC_DISCONNECTED:
+return "RTC_DISCONNECTED";
+case RTC_FAILED:
+return "RTC_FAILED";
+case RTC_CLOSED:
+return "RTC_CLOSED";
+default:
+return "UNKNOWN";
+}
+}
+
+static void webrtc_log(const rtcLogLevel rtcLevel, const char *const message)
+{
+int level = AV_LOG_VERBOSE;
+switch (rtcLevel)
+{
+case RTC_LOG_NONE:
+level = AV_LOG_QUIET;
+break;
+case RTC_LOG_DEBUG:
+case RTC_LOG_VERBOSE:
+level = AV_LOG_DEBUG;
+break;
+case RTC_LOG_INFO:
+level = AV_LOG_VERBOSE;
+break;
+case RTC_LOG_WARNING:
+level = AV_LOG_WARNING;
+break;
+case RTC_LOG_ERROR:
+level = AV_LOG_ERROR;
+break;
+case RTC_LOG_FATAL:
+level = AV_LOG_FATAL;
+break;
+}
+
+av_log(NULL, level, "[libdatachannel] %s\n", message);
+}
+
+void ff_webrtc_init_logger(void)
+{
+rtcLogLevel level = RTC_LOG_VERBOSE;
+switch (av_log_get_level())
+{
+case AV_LOG_QUIET:
+level = RTC_LOG_NONE;
+break;
+case AV_LOG_DEBUG:
+level = RTC_LOG_DEBUG;
+break;
+case AV_LOG_VERBOSE:
+level = RTC_LOG_VERBOSE;
+break;
+case AV_LOG_WARNING:
+level = RTC_LOG_WARNING;
+break;
+case AV_LOG_ERROR:
+level = RTC_LOG_ERROR;
+break;
+case AV_LOG_FATAL:
+level = RTC_LOG_FATAL;
+break;
+}
+
+rtcInitLogger(level, webrtc_log);
+}
+
+int ff_webrtc_generate_media_stream_id(char media_stream_id[37])
+{
+int ret;
+AVUUID uuid;
+
+ret = av_random_bytes(uuid, sizeof(uuid));
+if (ret < 0) {
+goto fail;
+}
+av_uuid_unparse(uuid, media_stream_id);
+return 0;
+
+fail:
+return ret;
+}
+
+int ff_webrtc_create_resource(WebRTCContext*const ctx)
+{
+int ret;
+URLContext* h = NULL;
+char* headers = NULL;
+char offer_sdp[SDP_MAX_SIZE] = { 0 };
+char response_sdp[SDP_MAX_SIZE] = { 0 };
+
+/* set local description */
+if (rtcSetLocalDescription(ctx->peer_connection, "offer") != 
RTC_ERR_SUCCESS) {
+av_log(ctx->avctx, AV_LOG_ERROR, "Failed to set local description\n");
+ret = AVERROR_EXTERNAL;
+goto fail;
+}
+
+/* create offer */
+ret = rtcGetLocalDescription(ctx->peer_connection, offer_sdp, 
sizeof(offer_sdp));
+if (ret < 0) {
+av_log(ctx->avctx, 

[FFmpeg-devel] [PATCH v2 5/6] libavformat/webrtc_demux: add WebRTC-HTTP egress protocol (WHEP) demuxer

2023-11-07 Thread Michael Riedl
Signed-off-by: Michael Riedl 
---
 Changelog|   4 +
 configure|   2 +
 doc/demuxers.texi|  22 +++
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/webrtc_demux.c (new) | 246 +++
 6 files changed, 276 insertions(+)

diff --git a/Changelog b/Changelog
index 8f0606fc267..45c6c752a06 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,10 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version :
+- WHEP demuxer
+
+
 version 6.1:
 - libaribcaption decoder
 - Playdate video decoder and demuxer
diff --git a/configure b/configure
index 187f16b425d..02c6f7f2c5d 100755
--- a/configure
+++ b/configure
@@ -3557,6 +3557,8 @@ wav_demuxer_select="riffdec"
 wav_muxer_select="riffenc"
 webm_chunk_muxer_select="webm_muxer"
 webm_dash_manifest_demuxer_select="matroska_demuxer"
+whep_demuxer_deps="libdatachannel sdp_demuxer"
+whep_demuxer_select="http_protocol"
 wtv_demuxer_select="mpegts_demuxer riffdec"
 wtv_muxer_select="mpegts_muxer riffenc"
 xmv_demuxer_select="riffdec"
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index ca1563abb03..81940b8ece7 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -943,4 +943,26 @@ which in turn, acts as a ceiling for the size of scripts 
that can be read.
 Default is 1 MiB.
 @end table
 
+@section whep
+
+WebRTC-HTTP egress protocol (WHEP) demuxer.
+
+This demuxers allows reading media from a remote media server using the
+WebRTC-HTTP egress protocol (WHEP) as defined in
+@url{https://datatracker.ietf.org/doc/draft-murillo-whep/02}. Currently, only a
+single video (H.264) and a single audio stream (OPUS) are supported.
+
+This demuxer accepts the following options:
+@table @option
+@item bearer_token
+Optional bearer token for authentication and authorization to the HTTP server.
+Default is @code{NULL}.
+@item connection_timeout
+Timeout for establishing a connection to the media server.
+Default is 10 seconds.
+@item rw_timeout
+Timeout for receiving/writing data from/to the media server.
+Default is 1 second.
+@end table
+
 @c man end DEMUXERS
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 329055ccfd9..f790fa8cae4 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -621,6 +621,7 @@ OBJS-$(CONFIG_WEBM_CHUNK_MUXER)  += webm_chunk.o
 OBJS-$(CONFIG_WEBP_MUXER)+= webpenc.o
 OBJS-$(CONFIG_WEBVTT_DEMUXER)+= webvttdec.o subtitles.o
 OBJS-$(CONFIG_WEBVTT_MUXER)  += webvttenc.o
+OBJS-$(CONFIG_WHEP_DEMUXER)  += webrtc.o webrtc_demux.o
 OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood_aud.o
 OBJS-$(CONFIG_WSAUD_MUXER)   += westwood_audenc.o
 OBJS-$(CONFIG_WSD_DEMUXER)   += wsddec.o rawdec.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index d4b505a5a32..7acb05634c8 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -504,6 +504,7 @@ extern const FFOutputFormat ff_webm_chunk_muxer;
 extern const FFOutputFormat ff_webp_muxer;
 extern const AVInputFormat  ff_webvtt_demuxer;
 extern const FFOutputFormat ff_webvtt_muxer;
+extern const AVInputFormat  ff_whep_demuxer;
 extern const AVInputFormat  ff_wsaud_demuxer;
 extern const FFOutputFormat ff_wsaud_muxer;
 extern const AVInputFormat  ff_wsd_demuxer;
diff --git a/libavformat/webrtc_demux.c b/libavformat/webrtc_demux.c
new file mode 100644
index 000..391eea6d654
--- /dev/null
+++ b/libavformat/webrtc_demux.c
@@ -0,0 +1,246 @@
+/*
+ * WebRTC-HTTP egress protocol (WHEP) demuxer using libdatachannel
+ *
+ * Copyright (C) 2023 NativeWaves GmbH 
+ * This work is supported by FFG project 47168763.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "internal.h"
+#include "libavutil/avstring.h"
+#include "libavutil/time.h"
+#include "libavutil/random_seed.h"
+#include "version.h"
+#include "rtsp.h"
+#include "webrtc.h"
+
+typedef struct WHEPContext {
+const AVClass *av_class;
+WebRTCContext webrtc_ctx;
+} WHEPContext;
+
+static int whep_read_header(AVFormatContext* avctx)
+{
+WHEPContext*const ctx = 

[FFmpeg-devel] [PATCH v2 3/6] configure: add libdatachannel as external library

2023-11-07 Thread Michael Riedl
Signed-off-by: Michael Riedl 
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index 8ab658f7303..187f16b425d 100755
--- a/configure
+++ b/configure
@@ -223,6 +223,7 @@ External library support:
   --enable-libcelt enable CELT decoding via libcelt [no]
   --enable-libcdio enable audio CD grabbing with libcdio [no]
   --enable-libcodec2   enable codec2 en/decoding using libcodec2 [no]
+  --enable-libdatachannel  enable WHIP muxing via libdatachannel [no]
   --enable-libdav1denable AV1 decoding via libdav1d [no]
   --enable-libdavs2enable AVS2 decoding via libdavs2 [no]
   --enable-libdc1394   enable IIDC-1394 grabbing using libdc1394
@@ -1849,6 +1850,7 @@ EXTERNAL_LIBRARY_LIST="
 libcaca
 libcelt
 libcodec2
+libdatachannel
 libdav1d
 libdc1394
 libdrm
@@ -6708,6 +6710,7 @@ enabled libcelt   && require libcelt celt/celt.h 
celt_decode -lcelt0 &&
 enabled libcaca   && require_pkg_config libcaca caca caca.h 
caca_create_canvas
 enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
-lcodec2
 enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.5.0" 
"dav1d/dav1d.h" dav1d_version
+enabled libdatachannel&& require libdatachannel rtc/rtc.h rtcPreload 
-ldatachannel
 enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
davs2.h davs2_decoder_open
 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
dc1394/dc1394.h dc1394_new
 enabled libdrm&& require_pkg_config libdrm libdrm xf86drm.h 
drmGetVersion
-- 
2.39.2

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v2 2/6] libavformat/sdp: remove whitespaces in fmtp

2023-11-07 Thread Michael Riedl
Whitespaces after semicolon breaks some servers

Signed-off-by: Michael Riedl 
---
 libavformat/sdp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 68889362906..5ab017b1ba5 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -159,8 +159,8 @@ static int extradata2psets(AVFormatContext *s, const 
AVCodecParameters *par,
 {
 char *psets, *p;
 const uint8_t *r;
-static const char pset_string[] = "; sprop-parameter-sets=";
-static const char profile_string[] = "; profile-level-id=";
+static const char pset_string[] = ";sprop-parameter-sets=";
+static const char profile_string[] = ";profile-level-id=";
 uint8_t *extradata = par->extradata;
 int extradata_size = par->extradata_size;
 uint8_t *tmpbuf = NULL;
-- 
2.39.2

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v2 1/6] libavformat/http: expose actual Location header value

2023-11-07 Thread Michael Riedl
This is needed for (de)muxers which need to access the Location header as 
transmitted when no redirection happend.

Signed-off-by: Michael Riedl 
---
 libavformat/http.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index c0fe7c36d91..27f9c8e3000 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -166,6 +166,7 @@ static const AVOption options[] = {
 { "basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, { .i64 = 
HTTP_AUTH_BASIC }, 0, 0, D | E, "auth_type"},
 { "send_expect_100", "Force sending an Expect: 100-continue header for 
POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, E },
 { "location", "The actual location of the data received", 
OFFSET(location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E },
+{ "new_location", "The location header value of the data received", 
OFFSET(new_location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
 { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { .i64 
= 0 }, 0, INT64_MAX, D },
 { "end_offset", "try to limit the request to bytes preceding this offset", 
OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
 { "method", "Override the HTTP method or set the expected HTTP method from 
a client", OFFSET(method), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E },
-- 
2.39.2

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH v2 0/6] WebRTC sub-second live streaming support

2023-11-07 Thread Michael Riedl
This patch series adds support for WHIP and WHEP (WebRTC-HTTP ingestion protocol
and WebRTC-HTTP egress protocol). It supersedes the previous patch series. Thank
you all for your feedback and suggestions!

The WHIP and WHEP are defined in the following draft RFCs:
- WHIP: https://datatracker.ietf.org/doc/draft-ietf-wish-whip
- WHEP: https://datatracker.ietf.org/doc/draft-murillo-whep/

The implementation builds on FFmpeg's existing RTP, HTTP and SDP support as well
as libdatachannel for the rest. This library is much more lightweight than other
libraries (e.g. libwebrtc). At the same time, using this library avoids
reimplementing parts of WebRTC in FFmpeg.

This patch series was tested with WebRTC servers Dolby.io (formerly Millicast)
and SRS (https://github.com/ossrs/srs). Using a local server, an end-to-end
latency of 3 frames (50 ms at 60 fps) was measured with video-only output, and
12 frames (200 ms at 60 fps) with audio and video output. Using a DeckLink input
device, an end-to-end latency of about 4 frames (70 ms at 60 fps) was measured
with both, video-only and audio and video output.

Using a remote server, only the RTT is added to the end-to-end latency. For
example, using a server in Amsterdam (The Netherlands) from a location in
Salzburg (Austria), with RTT=18ms, an end-to-end latency of 50+18=68 ms was
measured for video-only output.


Michael Riedl (6):
  libavformat/http: expose actual Location header value
  libavformat/sdp: remove whitespaces in fmtp
  configure: add libdatachannel as external library
  libavformat/webrtc: add common code for WebRTC streaming
  libavformat/webrtc_demux: add WebRTC-HTTP egress protocol (WHEP)
demuxer
  libavformat/webrtc_mux: add WebRTC-HTTP ingestion protocol (WHIP)
muxer

 Changelog|   5 +
 MAINTAINERS  |   1 +
 configure|   7 +
 doc/demuxers.texi|  22 ++
 doc/muxers.texi  |  21 ++
 libavformat/Makefile |   2 +
 libavformat/allformats.c |   2 +
 libavformat/http.c   |   1 +
 libavformat/sdp.c|   4 +-
 libavformat/webrtc.c (new)   | 410 +++
 libavformat/webrtc.h (new)   |  70 ++
 libavformat/webrtc_demux.c (new) | 246 +++
 libavformat/webrtc_mux.c (new)   | 273 
 13 files changed, 1062 insertions(+), 2 deletions(-)
 create mode 100644 libavformat/webrtc.c
 create mode 100644 libavformat/webrtc.h
 create mode 100644 libavformat/webrtc_demux.c
 create mode 100644 libavformat/webrtc_mux.c

--
2.39.2

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix run on macOS

2023-11-07 Thread Zhao Zhili

> On Nov 7, 2023, at 20:46, epira...@gmail.com wrote:
> 
> 
> 
> On 7 Nov 2023, at 12:42, Lynne wrote:
> 
>> Nov 7, 2023, 12:25 by quinkbl...@foxmail.com:
>> 
>>> Ping.
>>> 
 在 2023年10月30日,下午4:17,Zhao Zhili  写道:
 
 From: Zhao Zhili 
 
 VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
 and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
 be set.
 ---
 libavutil/hwcontext_vulkan.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
 index 8481427b42..9fbf61ee70 100644
 --- a/libavutil/hwcontext_vulkan.c
 +++ b/libavutil/hwcontext_vulkan.c
 @@ -405,7 +405,6 @@ typedef struct VulkanOptExtension {
 } VulkanOptExtension;
 
 static const VulkanOptExtension optional_instance_exts[] = {
 -/* Pointless, here avoid zero-sized structs */
 { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,  
 FF_VK_EXT_NO_FLAG},
 };
 
 @@ -784,6 +783,14 @@ static int create_instance(AVHWDeviceContext *ctx, 
 AVDictionary *opts)
 inst_props.pNext = _features;
 }
 
 +for (int i = 0; i < inst_props.enabledExtensionCount; i++) {
 +if (!strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
 +inst_props.ppEnabledExtensionNames[i])) {
 +inst_props.flags |= 
 VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
 +break;
 +}
 +}
 +
 /* Try to create the instance */
 ret = vk->CreateInstance(_props, hwctx->alloc, >inst);
 
>> 
>> Pong. It is a bit incorrect - from memory,
>> VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR requires that
>> only Vulkan 1.1 features are enabled, while we require 1.3.
>> But if it works, sure. Could you ifdef it out everywhere outside of OSX?
> 
> I wonder, how is this working given that MoltenVK does not provide Vulkan 1.3
> but only 1.2?

I haven't checked the details. It looks like all hwcontext required features 
are available in
MoltenVK, although it doesn’t provide full 1.3 implementation.

libplacebo does the same 
https://github.com/haasn/libplacebo/pull/129/files

Progress of MoltenVK to support 1.3
https://github.com/KhronosGroup/MoltenVK/issues/1930

> 
>> ___
>> 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 "unsubscribe".
> ___
> 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 "unsubscribe".

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH v3 1/8] swscale: fix sws_setColorspaceDetails after sws_init_context

2023-11-07 Thread Niklas Haas
Will apply soon.
___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 4/4] lavu/log: do not assume AVClass.item_name is always set

2023-11-07 Thread Anton Khirnov
---
 libavutil/log.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavutil/log.c b/libavutil/log.c
index 2d358b7ab9..46662f3db0 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -291,6 +291,11 @@ static const char *get_level_str(int level)
 }
 }
 
+static const char *item_name(void *obj, const AVClass *cls)
+{
+return (cls->item_name ? cls->item_name : av_default_item_name)(obj);
+}
+
 static void format_line(void *avcl, int level, const char *fmt, va_list vl,
 AVBPrint part[4], int *print_prefix, int type[2])
 {
@@ -307,12 +312,12 @@ static void format_line(void *avcl, int level, const char 
*fmt, va_list vl,
avc->parent_log_context_offset);
 if (parent && *parent) {
 av_bprintf(part+0, "[%s @ %p] ",
- (*parent)->item_name(parent), parent);
+   item_name(parent, *parent), parent);
 if(type) type[0] = get_category(parent);
 }
 }
 av_bprintf(part+1, "[%s @ %p] ",
- avc->item_name(avcl), avcl);
+   item_name(avcl, avc), avcl);
 if(type) type[1] = get_category(avcl);
 }
 
-- 
2.42.0

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 1/4] fftools/cmdutils: only set array size after allocation succeeded

2023-11-07 Thread Anton Khirnov
---
 fftools/cmdutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 156c13801a..86cd3bddb4 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -665,10 +665,10 @@ static int init_parse_context(OptionParseContext *octx,
 
 memset(octx, 0, sizeof(*octx));
 
-octx->nb_groups = nb_groups;
-octx->groups= av_calloc(octx->nb_groups, sizeof(*octx->groups));
+octx->groups= av_calloc(nb_groups, sizeof(*octx->groups));
 if (!octx->groups)
 return AVERROR(ENOMEM);
+octx->nb_groups = nb_groups;
 
 for (i = 0; i < octx->nb_groups; i++)
 octx->groups[i].group_def = [i];
-- 
2.42.0

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_filter: return an error on ofilter_alloc() failure

2023-11-07 Thread Anton Khirnov
---
 fftools/ffmpeg_filter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index c8920d9234..b7da105141 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -928,8 +928,10 @@ int fg_create(FilterGraph **pfg, char *graph_desc)
 for (AVFilterInOut *cur = outputs; cur; cur = cur->next) {
 OutputFilter *const ofilter = ofilter_alloc(fg);
 
-if (!ofilter)
+if (!ofilter) {
+ret = AVERROR(ENOMEM);
 goto fail;
+}
 
 ofilter->linklabel = cur->name;
 cur->name  = NULL;
-- 
2.42.0

___
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 "unsubscribe".


[FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_filter: fail on ifilter_alloc() failure

2023-11-07 Thread Anton Khirnov
---
 fftools/ffmpeg_filter.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index c738fc3397..c8920d9234 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -905,8 +905,14 @@ int fg_create(FilterGraph **pfg, char *graph_desc)
 
 for (AVFilterInOut *cur = inputs; cur; cur = cur->next) {
 InputFilter *const ifilter = ifilter_alloc(fg);
-InputFilterPriv   *ifp = ifp_from_ifilter(ifilter);
+InputFilterPriv   *ifp;
 
+if (!ifilter) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+
+ifp= ifp_from_ifilter(ifilter);
 ifp->linklabel = cur->name;
 cur->name  = NULL;
 
-- 
2.42.0

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix run on macOS

2023-11-07 Thread epirat07


On 7 Nov 2023, at 12:42, Lynne wrote:

> Nov 7, 2023, 12:25 by quinkbl...@foxmail.com:
>
>> Ping.
>>
>>> 在 2023年10月30日,下午4:17,Zhao Zhili  写道:
>>>
>>> From: Zhao Zhili 
>>>
>>> VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
>>> and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
>>> be set.
>>> ---
>>> libavutil/hwcontext_vulkan.c | 9 -
>>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
>>> index 8481427b42..9fbf61ee70 100644
>>> --- a/libavutil/hwcontext_vulkan.c
>>> +++ b/libavutil/hwcontext_vulkan.c
>>> @@ -405,7 +405,6 @@ typedef struct VulkanOptExtension {
>>> } VulkanOptExtension;
>>>
>>> static const VulkanOptExtension optional_instance_exts[] = {
>>> -/* Pointless, here avoid zero-sized structs */
>>>  { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,  
>>> FF_VK_EXT_NO_FLAG},
>>> };
>>>
>>> @@ -784,6 +783,14 @@ static int create_instance(AVHWDeviceContext *ctx, 
>>> AVDictionary *opts)
>>>  inst_props.pNext = _features;
>>>  }
>>>
>>> +for (int i = 0; i < inst_props.enabledExtensionCount; i++) {
>>> +if (!strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
>>> +inst_props.ppEnabledExtensionNames[i])) {
>>> +inst_props.flags |= 
>>> VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
>>> +break;
>>> +}
>>> +}
>>> +
>>>  /* Try to create the instance */
>>>  ret = vk->CreateInstance(_props, hwctx->alloc, >inst);
>>>
>
> Pong. It is a bit incorrect - from memory,
> VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR requires that
> only Vulkan 1.1 features are enabled, while we require 1.3.
> But if it works, sure. Could you ifdef it out everywhere outside of OSX?

I wonder, how is this working given that MoltenVK does not provide Vulkan 1.3
but only 1.2?

> ___
> 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 "unsubscribe".
___
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 "unsubscribe".


Re: [FFmpeg-devel] [ANN] Poll Results: GA voters list updates

2023-11-07 Thread Jean-Baptiste Kempf
Hello,

On Mon, 6 Nov 2023, at 16:56, Alexander Strasser wrote:
> Hi all,
> hi J-B!
>
> On 2023-11-06 07:10 +0100, Jean-Baptiste Kempf wrote:
>> Yo,
>>
>> Time is up, results are here:
>> https://vote.ffmpeg.org/cgi-bin/civs/results.pl?id=E_029f7195fed7aadf
>
> Should I have been mailed about this vote?
> I'm pretty sure I could vote in 2020. Or am I just missing something?

You should have been mailed. 

Sorry, this is probably my mistake: it seems the list I used did not include 
the extra members, and I forgot to add some of them. Next time we'll add the 
members into the script so it can't happen again. I'm very sorry.

Hopefully, since the results are so clearly in favor of A, no single vote could 
change it.

However, please add yourself to the extra-members thread, so we don't forget it 
:)

jb
-- 
Jean-Baptiste Kempf -  President
+33 672 704 734
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix run on macOS

2023-11-07 Thread Lynne
Nov 7, 2023, 12:25 by quinkbl...@foxmail.com:

> Ping.
>
>> 在 2023年10月30日,下午4:17,Zhao Zhili  写道:
>>
>> From: Zhao Zhili 
>>
>> VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
>> and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
>> be set.
>> ---
>> libavutil/hwcontext_vulkan.c | 9 -
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
>> index 8481427b42..9fbf61ee70 100644
>> --- a/libavutil/hwcontext_vulkan.c
>> +++ b/libavutil/hwcontext_vulkan.c
>> @@ -405,7 +405,6 @@ typedef struct VulkanOptExtension {
>> } VulkanOptExtension;
>>
>> static const VulkanOptExtension optional_instance_exts[] = {
>> -/* Pointless, here avoid zero-sized structs */
>>  { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,  FF_VK_EXT_NO_FLAG 
>>},
>> };
>>
>> @@ -784,6 +783,14 @@ static int create_instance(AVHWDeviceContext *ctx, 
>> AVDictionary *opts)
>>  inst_props.pNext = _features;
>>  }
>>
>> +for (int i = 0; i < inst_props.enabledExtensionCount; i++) {
>> +if (!strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
>> +inst_props.ppEnabledExtensionNames[i])) {
>> +inst_props.flags |= 
>> VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
>> +break;
>> +}
>> +}
>> +
>>  /* Try to create the instance */
>>  ret = vk->CreateInstance(_props, hwctx->alloc, >inst);
>>

Pong. It is a bit incorrect - from memory,
VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR requires that
only Vulkan 1.1 features are enabled, while we require 1.3.
But if it works, sure. Could you ifdef it out everywhere outside of OSX?
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: fix run on macOS

2023-11-07 Thread Zhao Zhili
Ping.

> 在 2023年10月30日,下午4:17,Zhao Zhili  写道:
> 
> From: Zhao Zhili 
> 
> VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
> and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
> be set.
> ---
> libavutil/hwcontext_vulkan.c | 9 -
> 1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
> index 8481427b42..9fbf61ee70 100644
> --- a/libavutil/hwcontext_vulkan.c
> +++ b/libavutil/hwcontext_vulkan.c
> @@ -405,7 +405,6 @@ typedef struct VulkanOptExtension {
> } VulkanOptExtension;
> 
> static const VulkanOptExtension optional_instance_exts[] = {
> -/* Pointless, here avoid zero-sized structs */
> { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,  
> FF_VK_EXT_NO_FLAG},
> };
> 
> @@ -784,6 +783,14 @@ static int create_instance(AVHWDeviceContext *ctx, 
> AVDictionary *opts)
> inst_props.pNext = _features;
> }
> 
> +for (int i = 0; i < inst_props.enabledExtensionCount; i++) {
> +if (!strcmp(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
> +inst_props.ppEnabledExtensionNames[i])) {
> +inst_props.flags |= 
> VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
> +break;
> +}
> +}
> +
> /* Try to create the instance */
> ret = vk->CreateInstance(_props, hwctx->alloc, >inst);
> 
> --
> 2.42.0
> 

___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Nicolas George
Vittorio Giovara (12023-11-07):
> To better explain the case at hand, there is no developer policy that lets
> you request an indefinite amount of review time with a single "No, you are
> not" message.

There is a policy that maintainers review patches and patches are not
pushed when somebody wants to review.

>   A good way to ask for an extension would be a message like
> "Please let me have a few days to review this and debug it. I know last
> time I used the same request only to test you and spread more toxicity
> around me, but this time I really mean it". (
> https://ffmpeg.org/pipermail/ffmpeg-devel/2023-October/316297.html)... Hm I
> wonder why your request is being ignored now.

Thanks for pointing this e-mail, anybody reading this honestly will
realize Paul's “I did proper analysis already. Pushed.” was the problem
in the first place, even more so since it was purely trolling.

-- 
  Nicolas George
___
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 "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: switch to activate

2023-11-07 Thread Vittorio Giovara
On Tue, Nov 7, 2023 at 2:44 AM Nicolas George  wrote:

> Vittorio Giovara (12023-11-06):
> >  Correct, it's you trying to win arguments with aggressive communication
>
> No. You came into an argument without knowing the first thing about it
> and you decided to side with the guy who wants to violate the project's
> policy about review.
>

Oh you like policies now? Interesting :)

Your behavior in this thread was toxic from your very first post.


I'm sorry but it was your behavior that has been toxic, rude, and frankly
unacceptable. It seems like you pick on everybody who dares to confront
you, and don't care about taking an entire discussion offtopic just for the
sake of winning an argument.

To better explain the case at hand, there is no developer policy that lets
you request an indefinite amount of review time with a single "No, you are
not" message. A good way to ask for an extension would be a message like
"Please let me have a few days to review this and debug it. I know last
time I used the same request only to test you and spread more toxicity
around me, but this time I really mean it". (
https://ffmpeg.org/pipermail/ffmpeg-devel/2023-October/316297.html)... Hm I
wonder why your request is being ignored now.

And no, I am not siding with anybody, skipping over your personal attack
about my libavfilter knowledge, I literally have no stake in the matter. I
do recognize toxic behavior tho, and I think it should stop at a certain
point, as the list deserves better than reading this email exchange. If you
would like to provide more technical feedback to the patch (or bring
references to points already made), please go ahead, otherwise just drop
this vendetta you seem to have against everybody in your path.

Please and thank you, I believe in you.
-- 
Vittorio
___
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 "unsubscribe".