Re: [FFmpeg-devel] [PATCH v17 14/19] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2021-11-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Michael > Niedermayer > Sent: Sunday, November 28, 2021 9:31 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v17 14/19] avfilter/overlaytextsubs: Add > overlaytextsubs and textsubs2video

Re: [FFmpeg-devel] [PATCH 5/5] avformat/mxfdec: rework MCA channel layout parsing

2021-11-29 Thread Marton Balint
On Sun, 28 Nov 2021, Pierre-Anthony Lemieux wrote: On Sun, Nov 28, 2021 at 5:00 PM Marton Balint wrote: Setting the channel layout was based on SoundfieldGroupLabelSubDescriptor, but this was wrong, because soundfield groups are not necessarily used and a file can also contain e.g. a

[FFmpeg-devel] [PATCH v18 12/19] fftools/ffmpeg: Replace sub2video with subtitle frame filtering and use new frame-based subtitle encoding API

2021-11-29 Thread Soft Works
This commit actually enables subtitle filtering in ffmpeg by sending and receiving subtitle frames to and from a filtergraph. The heartbeat functionality from the previous sub2video implementation is retained and applied to all subtitle frames (bitmap, text, ..). The other part of sub2video

[FFmpeg-devel] [PATCH v18 11/19] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2021-11-29 Thread Soft Works
- overlaygraphicsubs (VS -> V) Overlay graphic subtitles onto a video stream - graphicsub2video {S -> V) Converts graphic subtitles to video frames (with alpha) Gets auto-inserted for retaining compatibility with sub2video command lines Signed-off-by: softworkz --- doc/filters.texi

[FFmpeg-devel] [PATCH v18 09/19] avfilter/avfilter: Handle subtitle frames

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/avfilter.c | 8 +--- libavfilter/avfilter.h | 11 +++ libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 22 ++ libavfilter/formats.h | 3 +++ libavfilter/internal.h | 18

[FFmpeg-devel] [PATCH v18 08/19] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2021-11-29 Thread Soft Works
Analog to avfilter/video.c and avfilter/audio.c Signed-off-by: softworkz --- libavfilter/Makefile| 1 + libavfilter/avfilter.c | 4 +++ libavfilter/internal.h | 1 + libavfilter/subtitles.c | 63 + libavfilter/subtitles.h | 44

[FFmpeg-devel] [PATCH v18 10/19] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- configure| 2 +- libavfilter/allfilters.c | 2 ++ libavfilter/buffersink.c | 54 ++ libavfilter/buffersink.h | 7 libavfilter/buffersrc.c | 72 libavfilter/buffersrc.h | 1

Re: [FFmpeg-devel] [PATCH v2] lavu/avframe: add a time_base field

2021-11-29 Thread Marton Balint
On Fri, 26 Nov 2021, Lynne wrote: 25 Nov 2021, 23:49 by c...@passwd.hu: On Thu, 25 Nov 2021, Lynne wrote: This adds a time_base field (currently unused), analogue to the AVPacket.time_base field. This allows for API clients to exchange AVFrames directly, without needing to plumb extra

[FFmpeg-devel] [PATCH 2/5] avcodec/hevcdec: make set_side_data() accessible

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/hevcdec.c | 112 +-- libavcodec/hevcdec.h | 2 + 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 46d9edf8eb..53593d6186 100644 ---

[FFmpeg-devel] [PATCH 3/5] avcodec/h264dec: make h264_export_frame_props() accessible

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/h264_slice.c | 98 + libavcodec/h264dec.h| 2 + 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4467882775..5c1f38de03 100644 ---

[FFmpeg-devel] [PATCH 0/5] Implement SEI parsing for QSV decoders

2021-11-29 Thread Soft Works
Missing SEI information has always been a major drawback when using the QSV decoders. I used to think that there's no chance to get at the data without explicit implementation from the MSDK side (or doing something weird like parsing in parallel). It turned out that there's a hardly known api

[FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12dec: make mpeg_decode_user_data() accessible

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/mpeg12.h| 25 + libavcodec/mpeg12dec.c | 36 +--- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h index fb2b37e7c8..630afa4072 100644 ---

[FFmpeg-devel] [PATCH v18 06/19] avcodec/subtitles: Migrate subtitle encoders to frame-based API and provide a compatibility shim for the legacy api

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/assenc.c| 90 + libavcodec/avcodec.h | 5 +- libavcodec/dvbsubenc.c | 96 +-- libavcodec/dvdsubenc.c | 100 +++- libavcodec/encode.c| 63

[FFmpeg-devel] [PATCH v18 05/19] avcodec, avutil: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/Makefile | 56 +++ libavcodec/ass.h | 147 ++ libavcodec/assdec.c | 2 +- libavcodec/assenc.c | 2 +-

[FFmpeg-devel] [PATCH v18 07/19] fftools/play, probe: Adjust for subtitle changes

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- fftools/ffplay.c | 102 +- fftools/ffprobe.c | 48 ++ 2 files changed, 78 insertions(+), 72 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index e7b20be76b..0af32888da 100644 ---

[FFmpeg-devel] [PATCH v18 04/19] avfilter/subtitles: Update vf_subtitles to use new decoding api

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/vf_subtitles.c | 54 +- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 377160c72b..a240cbd415 100644 --- a/libavfilter/vf_subtitles.c +++

Re: [FFmpeg-devel] [PATCH 1/1] libavformat/flvenc.c: avoid 24bit timestamp truncation for FLV metadata

2021-11-29 Thread Marton Balint
On Fri, 26 Nov 2021, asilvestre wrote: FLV AMF tags have a 24bit field for timestamps plus an 8bit for extended timestamps. All FLV AMF tags except when we write metadata handle this correctly using the put_timestamp function. Until now when writing metadata we were only using the first 24

Re: [FFmpeg-devel] [PATCH v3 1/1] fftools/ffprobe: print size of attachment streams (extradata_size)

2021-11-29 Thread Marton Balint
On Fri, 26 Nov 2021, Michael Niedermayer wrote: On Thu, Nov 25, 2021 at 04:59:41PM +, Soft Works wrote: Another attempt: Created on Linux and zipped... tested and works LGTM Applied. Thanks, Marton ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH v17 15/19] avfilter/textmod: Add textmod, censor and show_speaker filters

2021-11-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Michael > Niedermayer > Sent: Sunday, November 28, 2021 9:26 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v17 15/19] avfilter/textmod: Add textmod, > censor and show_speaker filters > >

Re: [FFmpeg-devel] [PATCH] libavformat/fifo: avoid repeated failure and recovery

2021-11-29 Thread Marton Balint
On Mon, 22 Nov 2021, Ryoji Gyoda wrote: If fifo_thread_recover() succeeds immediately after fifo_thread_dispatch_message() fails, the dts of the packet is scaled twice, causing cur_dts to be abnormally large and "Application provided invalid, non monotonically increasing dts to muxer in

[FFmpeg-devel] [PATCH 4/5] avcodec/qsvdec: Implement SEI parsing for QSV decoders

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/qsvdec.c | 210 1 file changed, 210 insertions(+) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 8bce9f2cf0..62f3e65455 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -45,6 +45,12

[FFmpeg-devel] [PATCH 5/5] avcodec/qsvenc: Ensure payload array is initialized when using enc_ctrl

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/qsvenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 06f55604b5..2c3b22e5f7 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1477,7 +1477,16 @@ static int

[FFmpeg-devel] [PATCH v18 19/19] avfilter/subscale: Add filter for scaling and/or re-arranging graphical subtitles

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 164 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 883 ++ 5 files changed, 1050 insertions(+) create mode

[FFmpeg-devel] [PATCH 2/2] avcodec/dvbsub: Don't dump images to disk based on DEBUG define

2021-11-29 Thread Soft Works
It's been a regular annoyance. Introduce a debug-only parameter for this. Signed-off-by: softworkz --- libavcodec/dvbsubdec.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index d192f3251d..e629b315c7 100644

[FFmpeg-devel] [PATCH 1/2] avcodec/dvdsub: Don't dump images to disk based on DEBUG define

2021-11-29 Thread Soft Works
It's been a regular annoyance. Introduce a debug-only parameter for this. Signed-off-by: softworkz --- libavcodec/dvdsubdec.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 52259f0730..c0f796068e 100644 ---

[FFmpeg-devel] [PATCH v18 00/19] Subtitle Filtering

2021-11-29 Thread Soft Works
New in V18 - rebased to latest head (to fix merge conflict in allfilters.c) - textmod: Removed two trailing blanks from sf_textmod.c - xsubdec: fix xsubdec regression found by Michael; packet size estimation as flawed - splitcc: Fix uninitialzed locals - splitcc: Do not propagate hwcontext on

[FFmpeg-devel] [PATCH v18 02/19] avutil/frame: Prepare AVFrame for subtitle handling

2021-11-29 Thread Soft Works
Root commit for adding subtitle filtering capabilities. In detail: - Add type (AVMediaType) field to AVFrame Replaces previous way of distinction which was based on checking width and height to determine whether a frame is audio or video - Add subtitle fields to AVFrame - Add new struct

[FFmpeg-devel] [PATCH v18 01/19] avcodec, avutil: Move enum AVSubtitleType

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/avcodec.h | 19 +-- libavutil/subfmt.h | 58 2 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 libavutil/subfmt.h diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h

[FFmpeg-devel] [PATCH v18 03/19] avcodec/subtitles: Introduce new frame-based subtitle decoding API

2021-11-29 Thread Soft Works
- Add avcodec_decode_subtitle3 which takes subtitle frames, serving as compatibility shim to legacy subtitle decoding - Add additional methods for conversion between old and new API Signed-off-by: softworkz --- libavcodec/avcodec.h| 8 +- libavcodec/codec_desc.c | 11 +++

[FFmpeg-devel] [PATCH v18 14/19] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2021-11-29 Thread Soft Works
- overlaytextsubs {VS -> V) Overlay text subtitles onto a video stream. - textsubs2video {S -> V) Converts text subtitles to video frames Signed-off-by: softworkz --- configure| 2 + doc/filters.texi | 113 ++ libavfilter/Makefile |

[FFmpeg-devel] [PATCH v18 17/19] avfilter/splitcc: Add splitcc filter for closed caption handling

2021-11-29 Thread Soft Works
- splitcc {V -> VS) Extract closed-caption (A53) data from video frames as subtitle Frames ffmpeg -y -loglevel verbose -i "https://streams.videolan.org/streams/ts/CC/NewsStream-608-ac3.ts; -filter_complex "[0:v]splitcc[vid1],textmod=mode=remove_chars:find='@',[vid1]overlay_textsubs"

[FFmpeg-devel] [PATCH v18 16/19] avfilter/stripstyles: Add stripstyles filter

2021-11-29 Thread Soft Works
- stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- doc/filters.texi | 37 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 196 +++ 4

[FFmpeg-devel] [PATCH v18 18/19] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2021-11-29 Thread Soft Works
Signed-off-by: softworkz --- configure| 1 + doc/filters.texi | 55 + libavfilter/Makefile | 2 + libavfilter/allfilters.c | 1 + libavfilter/sf_graphicsub2text.c | 354 +++ 5 files changed, 413

[FFmpeg-devel] [PATCH v18 13/19] avfilter/avfilter: Fix hardcoded input index

2021-11-29 Thread Soft Works
This fix targets (rare) cases where multiple input pads have a .filter_frame function. ff_request_frame_to_filter needs to call ff_request_frame with the correct input pad instead of the hardcoded first one. Signed-off-by: softworkz --- libavfilter/avfilter.c | 18 +- 1 file

[FFmpeg-devel] [PATCH v18 15/19] avfilter/textmod: Add textmod, censor and show_speaker filters

2021-11-29 Thread Soft Works
- textmod {S -> S) Modify subtitle text in a number of ways - censor {S -> S) Censor subtitles using a word list - show_speaker {S -> S) Prepend speaker names from ASS subtitles to the visible text lines Signed-off-by: softworkz --- doc/filters.texi | 206

Re: [FFmpeg-devel] [PATCH] avformat: do not use AVIO_FLAG_* with avio_alloc_context

2021-11-29 Thread Anton Khirnov
Quoting Marvin Scholz (2021-11-22 00:25:16) > The documentation states that here 0 should be used for read-only and > 1 for a writable buffer. AVIO_FLAG_WRITE however is 2, while it works > due to the way the flag is handled internally, it is still wrong > according to the documentation. > >

Re: [FFmpeg-devel] [PATCH 2/3] libavutil/hwcontext_qsv: fix a bug for mapping vaapi frame to qsv

2021-11-29 Thread Anton Khirnov
Quoting Chen, Wenbin (2021-11-23 02:56:37) > > From: nyanmisaka > > > > The data stored in data[3] in VAAPI AVFrame is VASurfaceID while > > the data stored in pair->first is the pointer of VASurfaceID, so > > we need to do cast to make following commandline works: > > > > ffmpeg -hwaccel vaapi

Re: [FFmpeg-devel] [PATCH 3/3] libavutil/hwcontext_opencl: fix a bug for mapping qsv frame to opencl

2021-11-29 Thread Anton Khirnov
Quoting Wenbin Chen (2021-11-16 09:16:23) > From: nyanmisaka > > mfxHDLPair was added to qsv, so modify qsv->opencl map function as well. > Now the following commandline works: > > ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 \ > -init_hw_device qsv=qs@va -init_hw_device

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: Don't set source_index redundantly

2021-11-29 Thread Andreas Rheinhardt
Andreas Rheinhardt: > It is already set in new_output_stream(). > > Signed-off-by: Andreas Rheinhardt > --- > fftools/ffmpeg_opt.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > index 8a0cad3f62..9fdb2d4967 100644 > ---

Re: [FFmpeg-devel] [PATCH] avformat/mov: Check channels for mov_parse_stsd_audio()

2021-11-29 Thread Michael Niedermayer
On Sun, Nov 07, 2021 at 02:31:31PM +0100, Michael Niedermayer wrote: > Fixes: signed integer overflow: -776522110086937600 * 16 cannot be > represented in type 'long' > Fixes: > 40563/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6644829447127040 > > Found-by: continuous fuzzing process

Re: [FFmpeg-devel] [PATCH 1/2] tools/target_dec_fuzzer: Disable MB debug after a few iterations

2021-11-29 Thread Michael Niedermayer
On Sun, Oct 03, 2021 at 03:36:05PM +0200, Michael Niedermayer wrote: > This debug code can be quite slow on constructed streams > > Fixes: Timeout > Fixes: > 38907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6334628852531200 > > Found-by: continuous fuzzing process >

[FFmpeg-devel] [PATCH] avcodec/vaapi_encode: Fix segfault upon closing uninitialized encoder

2021-11-29 Thread Andreas Rheinhardt
Fixes ticket #9537. Probably a regression since 2b3206891649f317c20993411efef4bee39ae784. Signed-off-by: Andreas Rheinhardt --- libavcodec/vaapi_encode.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: Don't duplicate array unnecessarily

2021-11-29 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > fftools/ffmpeg.c | 3 --- > fftools/ffmpeg.h | 7 --- > fftools/ffmpeg_opt.c | 43 --- > 3 files changed, 12 insertions(+), 41 deletions(-) > > diff --git a/fftools/ffmpeg.c

Re: [FFmpeg-devel] [PATCH] avcodec/vqavideo: Use GetByteContext and check for end

2021-11-29 Thread Michael Niedermayer
On Sat, Nov 13, 2021 at 10:04:47PM +0100, Michael Niedermayer wrote: > Fixes: out of array access > Fixes: Timeout > Fixes: > 40481/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6502647583080448 > > Signed-off-by: Michael Niedermayer > --- > libavcodec/vqavideo.c | 15

Re: [FFmpeg-devel] [PATCH] avcodec/vqavideo: Use GetByteContext and check for end

2021-11-29 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: out of array access > Fixes: Timeout > Fixes: > 40481/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6502647583080448 > > Signed-off-by: Michael Niedermayer > --- > libavcodec/vqavideo.c | 15 ++- > 1 file changed, 10 insertions(+), 5

Re: [FFmpeg-devel] [PATCH] avcodec/vqavideo: Use GetByteContext and check for end

2021-11-29 Thread Michael Niedermayer
On Mon, Nov 29, 2021 at 04:00:27PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: out of array access > > Fixes: Timeout > > Fixes: > > 40481/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6502647583080448 > > > > Signed-off-by: Michael Niedermayer > > --- > >

Re: [FFmpeg-devel] [PATCH v2] avformat/scd: add demuxer

2021-11-29 Thread Zane van Iperen
Ping, will apply in a few days if no objections. On 27/11/21 13:51, Zane van Iperen wrote: Adds demuxer for Square Enux SCD files. Based off [1] and personal investigation. This has only been tested against Drakengard 3 (PS3) *_SCD.XXX files (big-endian). As it is highly likely that FFXIV

[FFmpeg-devel] [PATCH 1/5] avformat/file: use proper return value in file_close

2021-11-29 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/file.c b/libavformat/file.c index 9c23f680cd..7001750c80 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -266,7 +266,8 @@ static int64_t

[FFmpeg-devel] [PATCH 4/5] avformat: make AVFormatContext io_close return an int

2021-11-29 Thread Marton Balint
Otherwise there is no way to detect any error during avio_close(). Signed-off-by: Marton Balint --- doc/APIchanges | 3 +++ libavformat/avformat.h | 6 +- libavformat/internal.h | 6 +- libavformat/options.c | 4 ++-- libavformat/utils.c| 6 -- libavformat/version.h |

[FFmpeg-devel] [PATCH 5/5] avformat/img2enc: do not ignore IO errors

2021-11-29 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/img2enc.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 62202de9f4..ce23f38efb 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c

[FFmpeg-devel] [PATCH 3/5] fftools/ffmpeg: close output files before cleanup

2021-11-29 Thread Marton Balint
This allows us to check the return value of avio_closep(). Signed-off-by: Marton Balint --- fftools/ffmpeg.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 25360423b5..ea75fad637 100644 --- a/fftools/ffmpeg.c +++

[FFmpeg-devel] [PATCH 2/5] avformat/aviobuf: return stored AVIO context error on avio_close

2021-11-29 Thread Marton Balint
Otherwise IO errors at avio_flush() before closing may be lost. Signed-off-by: Marton Balint --- libavformat/aviobuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 5da4dea7b6..d65c7b535d 100644 ---

[FFmpeg-devel] [PATCH V4 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-11-29 Thread Wenbin Chen
The vaapi can import external frame, but the planes of the external frames should be in the same drm object. A new option "contiguous_planes" is added to device. This flag tells device to allocate places in one memory. When device is derived from vaapi this flag will be enabled. A new flag

[FFmpeg-devel] [PATCH V4 1/5] hwcontext_vaapi: Use PRIME_2 memory type for modifiers.

2021-11-29 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] [PATCH V4 5/5] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

2021-11-29 Thread Wenbin Chen
When vulkan image exports to drm, the tilling need to be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan image using this format. Now the following command line works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \ vaapi -i

[FFmpeg-devel] [PATCH V4 4/5] libavutil/hwcontext_vulkan: Add support to hwmap to software frame when using contiguous_planes flag.

2021-11-29 Thread Wenbin Chen
Add support to map vulkan frames to software frames when using contiguous_planes flag. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vulkan.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index

[FFmpeg-devel] [PATCH V4 2/5] libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frame

2021-11-29 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 ---

Re: [FFmpeg-devel] [PATCH V4 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-11-29 Thread Chen, Wenbin
> The vaapi can import external frame, but the planes of the external > frames should be in the same drm object. A new option "contiguous_planes" > is added to device. This flag tells device to allocate places in one > memory. When device is derived from vaapi this flag will be enabled. > A new

Re: [FFmpeg-devel] [PATCH 3/3] libavutil/hwcontext_opencl: fix a bug for mapping qsv frame to opencl

2021-11-29 Thread Chen, Wenbin
> Quoting Wenbin Chen (2021-11-16 09:16:23) > > From: nyanmisaka > > > > mfxHDLPair was added to qsv, so modify qsv->opencl map function as well. > > Now the following commandline works: > > > > ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 \ > > -init_hw_device qsv=qs@va