Re: [FFmpeg-devel] [V2 03/10] libavfilter/vulkan: Fix the way to use sem

2021-08-31 Thread Chen, Wenbin
> -Original Message- > From: ffmpeg-devel On Behalf Of > Lynne > Sent: Tuesday, August 31, 2021 7:26 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [V2 03/10] libavfilter/vulkan: Fix the way to use > sem > > 31 Aug 2021, 09:24 by

Re: [FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong offset of plane

2021-08-31 Thread Chen, Wenbin
> -Original Message- > From: ffmpeg-devel On Behalf Of > Lynne > Sent: Tuesday, August 31, 2021 7:42 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong > offset of plane > > 31 Aug 2021,

Re: [FFmpeg-devel] [PATCH v2 7/8] avfilter/sleet: Add sleet filter

2021-08-31 Thread Mapul Bhola
August 30, 2021 4:17 AM, "Soft Works" wrote: > Signed-off-by: softworkz > --- > v2 Update: > > - Implemented Andreas' suggestions > - overlay_subs filter: > - removed duplicated code > - implemented direct (no pre-conversion) blending of graphical > subtitle rects > - Supported input formats:

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/pictordec: Optimize more odd cases for picmemset()

2021-08-31 Thread Peter Ross
On Tue, Aug 31, 2021 at 08:33:41PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 36875/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-4842960888922112 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

Re: [FFmpeg-devel] [PATCH v2 7/8] avfilter/sleet: Add sleet filter

2021-08-31 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Mapul Bhola > Sent: Tuesday, 31 August 2021 23:39 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 7/8] avfilter/sleet: Add sleet > filter > > August 30, 2021 4:17 AM,

Re: [FFmpeg-devel] [PATCH] avcodec/wmaprodec: skip foreign XMA packets

2021-08-31 Thread Joel Linn
On 2021-08-31 23:13, Paul B Mahol wrote: On Tue, Aug 31, 2021 at 11:10 PM Joel Linn wrote: Hello, On 2021-08-31 22:53, Paul B Mahol wrote: > What samples this fixes? No specific sample, it depends on the way the decoder is invoked. It fixes using the xma1/2 decoder directly on a memory

Re: [FFmpeg-devel] [PATCH] avcodec/wmaprodec: skip foreign XMA packets

2021-08-31 Thread Paul B Mahol
On Tue, Aug 31, 2021 at 11:10 PM Joel Linn wrote: > Hello, > > On 2021-08-31 22:53, Paul B Mahol wrote: > > What samples this fixes? > > No specific sample, it depends on the way the decoder is invoked. > > It fixes using the xma1/2 decoder directly on a memory buffer and not > wanting to decode

Re: [FFmpeg-devel] [PATCH v2 2/2] avcodec/libx265: add support for setting chroma sample location

2021-08-31 Thread Jan Ekström
On Tue, Aug 31, 2021 at 12:52 AM Jan Ekström wrote: > > On Sun, Aug 29, 2021 at 7:43 PM Jan Ekström wrote: > > > > Unlike libx264, libx265 does not handle the chroma format check > > on its own side, so in order to not write out values which are > > supposed to be ignored according to the

Re: [FFmpeg-devel] [PATCH] avcodec/wmaprodec: skip foreign XMA packets

2021-08-31 Thread Joel Linn
Hello, On 2021-08-31 22:53, Paul B Mahol wrote: What samples this fixes? No specific sample, it depends on the way the decoder is invoked. It fixes using the xma1/2 decoder directly on a memory buffer and not wanting to decode all channels in the stream. Say the stream has 6 channels and

Re: [FFmpeg-devel] [PATCH] avcodec/wmaprodec: skip foreign XMA packets

2021-08-31 Thread Paul B Mahol
What samples this fixes? ___ 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] avcodec/wmaprodec: skip foreign XMA packets

2021-08-31 Thread Joel Linn
Support decoding only a selection of the encoded XMA streams. Previously, the decoder assumed it was decoding all available streams. --- libavcodec/wmaprodec.c | 64 -- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/libavcodec/wmaprodec.c

Re: [FFmpeg-devel] [PATCH] [fateserver] Cleanup and security strengthening

2021-08-31 Thread Martin Storsjö
> On Aug 23, 2021, at 17:41, Nicolas George wrote: > > Michael Niedermayer (12021-08-23): >> Please make sure you use g...@git.ffmpeg.org:fateserver not >> g...@source.ffmpeg.org:fateserver > > My bad. I fixed it and it worked. Thanks for looking into these issues and bringing the fate site

Re: [FFmpeg-devel] [PATCH 12/12] tools/dvd2concat: generate VOBSUB extradata

2021-08-31 Thread Andreas Rheinhardt
Nicolas George: > Nicolas George (12021-08-31): >> For muxing the subtitles, some more work to be done, probably: mencoder >> is still needed. > > With Matroska output: > > With -c:s dvd_subtitle it works, and the subtitles packets are much > smaller. But I am not 100% confident in our encoder,

[FFmpeg-devel] [PATCH 2/2] avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return

2021-08-31 Thread Michael Niedermayer
Fixes: invalid shift Fixes: 37018/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG2VIDEO_fuzzer-5290280902328320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg12dec.c | 8

[FFmpeg-devel] [PATCH 1/2] avcodec/pictordec: Optimize more odd cases for picmemset()

2021-08-31 Thread Michael Niedermayer
Fixes: Timeout Fixes: 36875/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-4842960888922112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/pictordec.c | 5 ++--- 1 file

Re: [FFmpeg-devel] [PATCH 2/6] lavf/concat: add file_packet_meta directive

2021-08-31 Thread Andreas Rheinhardt
Nicolas George: > Andreas Rheinhardt (12021-08-31): >> You seem to misunderstand the semantics of the AV_DICT_DONT_STRDUP_* >> flags: av_dict_set() takes complete ownership of the strings, even on >> errors. So in case of errors the above code would lead to a double-free. >> Patches #1 and #4 of

Re: [FFmpeg-devel] [PATCH 12/12] tools/dvd2concat: generate VOBSUB extradata

2021-08-31 Thread Nicolas George
Nicolas George (12021-08-31): > For muxing the subtitles, some more work to be done, probably: mencoder > is still needed. With Matroska output: With -c:s dvd_subtitle it works, and the subtitles packets are much smaller. But I am not 100% confident in our encoder, it tries to guess which parts

[FFmpeg-devel] [PATCH 12/12] tools/dvd2concat: generate VOBSUB extradata

2021-08-31 Thread Nicolas George
The extradata contains the frame size of the subtitles images and the palette. Signed-off-by: Nicolas George --- tools/dvd2concat | 22 ++ 1 file changed, 22 insertions(+) And with this, we can encode DVDs correctly, and even have the hardcoded subtitles the right color.

[FFmpeg-devel] [PATCH 11/12] lavf/concatdec: add stream_extradata directive

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 3 +++ libavformat/concatdec.c | 11 +++ 2 files changed, 14 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 0c347e3f47..06ab152cc7 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -184,6 +184,9

[FFmpeg-devel] [PATCH 10/12] tools/dvd2concat: add support for chapters

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- tools/dvd2concat | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/dvd2concat b/tools/dvd2concat index ea8b7ba8c9..ccc021c4cc 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @@ -95,6 +95,12 @@ for my $subp (@{$track->{subp}}) { $concat .=

[FFmpeg-devel] [PATCH 09/12] lavf/concat: add support for chapters

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 4 libavformat/concatdec.c | 12 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 6bb0574e94..0c347e3f47 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi

[FFmpeg-devel] [PATCH 08/12] tools/dvd2concat: specify stream_codec for subtitles

2021-08-31 Thread Nicolas George
Avoid requiring a huge probe size and analyze duration. Signed-off-by: Nicolas George --- tools/dvd2concat | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/dvd2concat b/tools/dvd2concat index 474b474191..ea8b7ba8c9 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @@ -92,6 +92,7 @@

[FFmpeg-devel] [PATCH 07/12] lavf/concatdec: add stream_codec directive

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 3 +++ libavformat/concatdec.c | 13 + 2 files changed, 16 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 87e4d0319a..6bb0574e94 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -181,6

[FFmpeg-devel] [PATCH 05/12] tools/dvd2concat: include language metadata

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- tools/dvd2concat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/dvd2concat b/tools/dvd2concat index ef04a87d05..474b474191 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @@ -88,9 +88,11 @@ my $concat = "ffconcat version 1.0\n"; $concat .=

[FFmpeg-devel] [PATCH 06/12] tests/concat-demuxer: add stream_meta test

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 4 ++-- tests/simple2.ffconcat| 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts

[FFmpeg-devel] [PATCH 04/12] lavf/concatdec: support stream metadata

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 4 libavformat/concatdec.c | 14 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index fd06be3195..87e4d0319a 100644 --- a/doc/demuxers.texi +++

[FFmpeg-devel] [PATCH 03/12] lavf/concat: deprecate file_packet_metadata

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 1 + libavformat/concatdec.c | 3 +++ tests/extended.ffconcat | 2 +- tests/simple1.ffconcat | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index f338700396..fd06be3195

[FFmpeg-devel] [PATCH 02/12] lavf/concat: add file_packet_meta directive

2021-08-31 Thread Nicolas George
Same as file_packet_metadata without the double parsing. Signed-off-by: Nicolas George --- doc/demuxers.texi | 5 + libavformat/concatdec.c | 9 + 2 files changed, 14 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index eb3351833a..f338700396 100644 ---

[FFmpeg-devel] [PATCH 01/12] lavf/concat: refactor parsing

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- libavformat/concatdec.c | 255 ++-- 1 file changed, 167 insertions(+), 88 deletions(-) Fixed av_dict_set() on failure. Added some space. diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index

Re: [FFmpeg-devel] [PATCH 2/6] lavf/concat: add file_packet_meta directive

2021-08-31 Thread Nicolas George
Andreas Rheinhardt (12021-08-31): > You seem to misunderstand the semantics of the AV_DICT_DONT_STRDUP_* > flags: av_dict_set() takes complete ownership of the strings, even on > errors. So in case of errors the above code would lead to a double-free. > Patches #1 and #4 of this set are also

Re: [FFmpeg-devel] [PATCH 2/6] lavf/concat: add file_packet_meta directive

2021-08-31 Thread Andreas Rheinhardt
Nicolas George: > Same as file_packet_metadata without the double parsing. > > Signed-off-by: Nicolas George > --- > doc/demuxers.texi | 5 + > libavformat/concatdec.c | 8 > 2 files changed, 13 insertions(+) > > diff --git a/doc/demuxers.texi b/doc/demuxers.texi > index

Re: [FFmpeg-devel] [PATCH v2 06/10] avcodec/aptx: Use AVCodecContext.frame_size according to the API

2021-08-31 Thread Andreas Rheinhardt
Hendrik Leppkes: > On Tue, Aug 31, 2021 at 4:22 PM Hendrik Leppkes wrote: >> >> On Tue, Aug 31, 2021 at 2:44 PM Andreas Rheinhardt >> wrote: >>> >>> Currently the APTX (HD) codecs set frame_size if unset and check >>> whether it is divisible by block_size (corresponding to block_align >>> as

Re: [FFmpeg-devel] [PATCH v2 06/10] avcodec/aptx: Use AVCodecContext.frame_size according to the API

2021-08-31 Thread Andreas Rheinhardt
Hendrik Leppkes: > On Tue, Aug 31, 2021 at 2:44 PM Andreas Rheinhardt > wrote: >> >> Currently the APTX (HD) codecs set frame_size if unset and check >> whether it is divisible by block_size (corresponding to block_align >> as used by other codecs). But this is based upon a misunderstanding >> of

Re: [FFmpeg-devel] [PATCH v2 06/10] avcodec/aptx: Use AVCodecContext.frame_size according to the API

2021-08-31 Thread Hendrik Leppkes
On Tue, Aug 31, 2021 at 4:22 PM Hendrik Leppkes wrote: > > On Tue, Aug 31, 2021 at 2:44 PM Andreas Rheinhardt > wrote: > > > > Currently the APTX (HD) codecs set frame_size if unset and check > > whether it is divisible by block_size (corresponding to block_align > > as used by other codecs).

Re: [FFmpeg-devel] [PATCH v2 06/10] avcodec/aptx: Use AVCodecContext.frame_size according to the API

2021-08-31 Thread Hendrik Leppkes
On Tue, Aug 31, 2021 at 2:44 PM Andreas Rheinhardt wrote: > > Currently the APTX (HD) codecs set frame_size if unset and check > whether it is divisible by block_size (corresponding to block_align > as used by other codecs). But this is based upon a misunderstanding > of the API: frame_size is

Re: [FFmpeg-devel] [PATCH 03/11] fate/cover-art: Add test for muxing cover arts to FLAC

2021-08-31 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Also covers muxing and demuxing of nonstandard FLAC channel layouts > and the multi-dim-quant option of the FLAC encoder > (all of which was hitherto uncovered). > > Signed-off-by: Andreas Rheinhardt > --- > tests/fate/cover-art.mak| 10 +++ >

[FFmpeg-devel] [PATCH v2 10/10] avcodec/aptxenc: Process data in complete blocks of four samples only

2021-08-31 Thread Andreas Rheinhardt
Otherwise one could read into the frame's padding when one encounters the small last frame; furthermore, one would indicate a packet size that is not a multiple of the actual block size and one would write into the padding of said packet. This actually happened in our FATE tests (where the number

[FFmpeg-devel] [PATCH v2 07/10] avformat/aptxdec: Don't set AVCodecParameters.frame_size

2021-08-31 Thread Andreas Rheinhardt
This field was misunderstood: It gives the number of samples in a packet, not the number of bytes. Its usage was wrong for APTX HD. Signed-off-by: Andreas Rheinhardt --- libavformat/aptxdec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/aptxdec.c b/libavformat/aptxdec.c

[FFmpeg-devel] [PATCH v2 09/10] avcodec/aptxdec: Process data in complete blocks only

2021-08-31 Thread Andreas Rheinhardt
The APTX (HD) decoder decodes blocks of four (six) bytes to four output samples. It makes no sense to handle incomplete blocks: They would just lead to synchronization errors, in which case the complete frame is discarded. So only handle complete blocks. This also avoids reading from the packet's

[FFmpeg-devel] [PATCH v2 08/10] avformat/aptxdec: Use ff_pcm_read_packet

2021-08-31 Thread Andreas Rheinhardt
It automatically honours block_align and it clears the AV_PKT_FLAG_CORRUPT flag which up until now was always set for the last packet if the number of input blocks was not divisible by 256 (or equivalently: if the number of input samples was not divisible by 1024). It reads more data at once;

[FFmpeg-devel] [PATCH v2 06/10] avcodec/aptx: Use AVCodecContext.frame_size according to the API

2021-08-31 Thread Andreas Rheinhardt
Currently the APTX (HD) codecs set frame_size if unset and check whether it is divisible by block_size (corresponding to block_align as used by other codecs). But this is based upon a misunderstanding of the API: frame_size is not in bytes, but in samples.* Said value is also not intended to be

[FFmpeg-devel] [PATCH v2 05/10] avcodec/utils: Support APTX (HD) in av_get_audio_frame_duration()

2021-08-31 Thread Andreas Rheinhardt
APTX decodes four bytes of input to four stereo samples; APTX HD does the same with six bytes of input. So it can be easily supported in av_get_audio_frame_duration(). This fixes invalid durations and (derived) timestamps of demuxed APTX HD packets and therefore fixed the timestamp in the aptx-hd

[FFmpeg-devel] [PATCH v2 04/10] fate/audio: Add tests for APTX (HD)

2021-08-31 Thread Andreas Rheinhardt
We have de- and encoders for APTX and APTX HD, yet not FATE tests. This commit therefore adds a transcoding test to utilize them. Furthermore, during creating these tests it turned out that the duration is set incorrectly for APTX HD. This will be fixed in a future commit. (Thanks to Andriy

[FFmpeg-devel] [PATCH v2 03/10] tests/fate-run: Allow to set demuxer for generated file in transcode

2021-08-31 Thread Andreas Rheinhardt
Up until now, the transcode() function allowed (and required) to specify the input format as well as the format of the output format (i.e. the muxer) of the generated file. But for reading the generated file it relied on autodetection/probing. This does not always work, e.g. not for aptx_hd, and

[FFmpeg-devel] [PATCH v2 02/10] avformat/flacdec: Also set channels when setting channel_layout

2021-08-31 Thread Andreas Rheinhardt
This brings the FLAC demuxer in line with all the other demuxers. Furthermore, if it is not done and the FLAC decoder is disabled, the FLAC parser will overwrite the channel layout with the standard channel layout for that number of channels. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH v2 01/10] tests/fate-run: Allow multiple inputs for transcode()

2021-08-31 Thread Andreas Rheinhardt
This allows nicer tests by having a greater range of inputs available (without requiring adding further samples to the fate-suite). Signed-off-by: Andreas Rheinhardt --- The cover-art test that was included in version 1 of this patchset and made use of this didn't pass on PPC and has therefore

[FFmpeg-devel] [PATCH 6/6] tests/concat-demuxer: add stream_meta test

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 4 ++-- tests/simple2.ffconcat| 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts

[FFmpeg-devel] [PATCH 5/6] tools/dvd2concat: include language metadata.

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- tools/dvd2concat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/dvd2concat b/tools/dvd2concat index ef04a87d05..474b474191 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @@ -88,9 +88,11 @@ my $concat = "ffconcat version 1.0\n"; $concat .=

[FFmpeg-devel] [PATCH 4/6] lavf/concatdec: support stream metadata.

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 4 libavformat/concatdec.c | 14 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index fd06be3195..87e4d0319a 100644 --- a/doc/demuxers.texi +++

[FFmpeg-devel] [PATCH 3/6] lavf/concat: deprecate file_packet_metadata

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 1 + libavformat/concatdec.c | 3 +++ tests/extended.ffconcat | 2 +- tests/simple1.ffconcat | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index f338700396..fd06be3195

[FFmpeg-devel] [PATCH 2/6] lavf/concat: add file_packet_meta directive

2021-08-31 Thread Nicolas George
Same as file_packet_metadata without the double parsing. Signed-off-by: Nicolas George --- doc/demuxers.texi | 5 + libavformat/concatdec.c | 8 2 files changed, 13 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index eb3351833a..f338700396 100644 ---

[FFmpeg-devel] [PATCH 1/6] lavf/concat: refactor parsing

2021-08-31 Thread Nicolas George
Signed-off-by: Nicolas George --- libavformat/concatdec.c | 245 +--- 1 file changed, 157 insertions(+), 88 deletions(-) It does not make the code shorter, but it makes it clearer and reduces the risk of mistakes, like the ones I made myself recently. Also,

Re: [FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong offset of plane

2021-08-31 Thread Lynne
31 Aug 2021, 09:24 by wenbin.c...@intel.com: > According to spec, if we use VkBindImagePlaneMemoryInfo to bind image > we mush create image with disjoint flag. > The offset in subresourcelayout is relative to the base address of > the plane, but the offset in drm is relative to the drm objectis

Re: [FFmpeg-devel] [V2 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2021-08-31 Thread Lynne
31 Aug 2021, 09:24 by wenbin.c...@intel.com: > If the descriptorSetCount is greater than the number of setLayouts, > vkAllocateDescriptorSets will report error. Now fix it. > > Now the following command can run on the device that has queue_count greater > than one: > ffmpeg -v verbose

Re: [FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong offset of plane

2021-08-31 Thread Lynne
31 Aug 2021, 09:24 by wenbin.c...@intel.com: > According to spec, if we use VkBindImagePlaneMemoryInfo to bind image > we mush create image with disjoint flag. > The offset in subresourcelayout is relative to the base address of > the plane, but the offset in drm is relative to the drm objectis

Re: [FFmpeg-devel] [V2 03/10] libavfilter/vulkan: Fix the way to use sem

2021-08-31 Thread Lynne
31 Aug 2021, 09:24 by wenbin.c...@intel.com: > We chould set waitSem and signalSem differently. Current ffmpeg-vulkan > uses the same sem to set waitSem and signalSem and it doesn't work on > latest intel-vulkan-driver. The commit: > a193060221c4df123e26a562949cae5df3e73cde on mesa causes this

[FFmpeg-devel] [V2 08/10] libavutil/hwcontext_vulkan: fix wrong offset of plane

2021-08-31 Thread Wenbin Chen
According to spec, if we use VkBindImagePlaneMemoryInfo to bind image we mush create image with disjoint flag. The offset in subresourcelayout is relative to the base address of the plane, but the offset in drm is relative to the drm objectis so I think this offset should be 0. Also, when I import

[FFmpeg-devel] [V2 10/10] libavutil/hwcontext_vulkan: Add hwupload and hwdownload support when using one_memory flag.

2021-08-31 Thread Wenbin Chen
Add hwupload and hwdownload support to vulkan when frames are allocated in one memory Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vulkan.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index

[FFmpeg-devel] [V2 09/10] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

2021-08-31 Thread Wenbin Chen
On the lastset intel-vulkan-driver the VK_EXT_image_drm_format_modifier flags is enabled. As what driver log recommand, we need to use VK_IMAGE_TILING_LINEAR or VK_IMAGE_DRM_FORMAT_MODIFIER_EXT to create VKImage. Add code to get supported modifier for sw_format and use these modifier to create

[FFmpeg-devel] [V2 07/10] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-08-31 Thread Wenbin Chen
The vaapi can import external frame, but the planes of the external frames should be in the same drm object. I add a new function to allocate vkFrame in one memory and vulkan device will choose a way to allocate memory according to one_memory flag. A new variable is added to AVVKFrame to store the

[FFmpeg-devel] [V2 06/10] libavutil/hwcontext_vulkan: Add one_memory flag to make vulkan compatible with vaapi device.

2021-08-31 Thread Wenbin Chen
Vaapi can import external surface, but all the planes of the external frames should be in the same drm object. A new flag is introduced and vulkan can choose to allocate planes in one memory according this flag. This flag will be enabled when the vulkan device is derived from vaapi device, so that

[FFmpeg-devel] [V2 05/10] libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frame

2021-08-31 Thread Wenbin Chen
Vulkan will map nv12 to R8 and GR88, so add this map to vaapi to support vulkan frame. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vaapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 75acc851d6..994b744e4d 100644 ---

[FFmpeg-devel] [V2 04/10] hwcontext_vaapi: Use PRIME_2 memory type for modifiers.

2021-08-31 Thread Wenbin Chen
From: Bas Nieuwenhuizen This way we can pass explicit modifiers in. Sometimes the modifier matters for the number of memory planes that libva accepts, in particular when dealing with driver-compressed textures. Furthermore the driver might not actually be able to determine the implicit modifier

[FFmpeg-devel] [V2 03/10] libavfilter/vulkan: Fix the way to use sem

2021-08-31 Thread Wenbin Chen
We chould set waitSem and signalSem differently. Current ffmpeg-vulkan uses the same sem to set waitSem and signalSem and it doesn't work on latest intel-vulkan-driver. The commit: a193060221c4df123e26a562949cae5df3e73cde on mesa causes this problem. This commit add code to resets the signalSem.

[FFmpeg-devel] [V2 02/10] libavutil/hwcontext_vulkan: fix a tile mismatch problem

2021-08-31 Thread Wenbin Chen
We should configure VkImageSubresource according to tiling rather than extension. We use extension to set tiling only when we map from drm. Normally the output VkImages are not created in this way, and it will report error when we map these VkImage to drm, so we should configure VkImageSubresource

[FFmpeg-devel] [V2 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2021-08-31 Thread Wenbin Chen
If the descriptorSetCount is greater than the number of setLayouts, vkAllocateDescriptorSets will report error. Now fix it. Now the following command can run on the device that has queue_count greater than one: ffmpeg -v verbose -init_hw_device vulkan=vul:0 -filter_hw_device vul -i input1080p.264

Re: [FFmpeg-devel] [PATCH 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2021-08-31 Thread Jean-Baptiste Kempf
On Tue, 31 Aug 2021, at 08:44, Chen, Wenbin wrote: > Ok, I will submit again. Wait for the review. :D -- Jean-Baptiste Kempf - President +33 672 704 734 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2021-08-31 Thread Chen, Wenbin
Ok, I will submit again. > -Original Message- > From: ffmpeg-devel On Behalf Of > Jean-Baptiste Kempf > Sent: Tuesday, August 31, 2021 2:07 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 01/10] libavfilter/vulkan: Fix problem > when device have queue_count greater

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vble: Return value check for init_get_bits

2021-08-31 Thread Andreas Rheinhardt
maryam ebrahimzadeh: > avcodec/vble: Return value check for init_get_bits > > As the second argument for init_get_bits can be crafted, > a return value check for this function call is necessary. > So replace init_get_bits with init_get_bits8 and remove a duplicate check > before > the callsite.

Re: [FFmpeg-devel] [PATCH 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2021-08-31 Thread Jean-Baptiste Kempf
Hello, On Tue, 31 Aug 2021, at 03:43, wenbin.c...@intel.com wrote: > From: "Chen,Wenbin" > ... > Signed-off-by: Wenbin Chen > ... > email sent by "wenbin.c...@intel.com" (no name) In this thread of patches, you have 3 ways of writing your name & email. You should fix it (and IMHO, use the