[FFmpeg-devel] [PATCH] libavcodec/hevc_mp4toannexb_bsf: update the extradata in codec par if change detected

2021-12-03 Thread Linjie Fu
From: Linjie Fu Container may support multiple sample descriptions in a single bitstream, like multiple stsd in mov, which introduces different sequence header(e.g.profile/bit_depth) in the middle of the bitstream. Update the extradata field in context parameter once packet with different

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

2021-12-03 Thread Chen, Wenbin
> 2 Dec 2021, 02:53 by wenbin.c...@intel.com: > > >> 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

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread lance . lmwang
On Fri, Dec 03, 2021 at 08:55:08PM -0500, quietvoid wrote: > On Fri, Dec 3, 2021 at 8:51 PM quietvoid wrote: > > > > > On Fri, Dec 3, 2021 at 8:40 PM wrote: > > > >> On Fri, Dec 03, 2021 at 08:27:06PM -0500, quietvoid wrote: > >> > On Fri, Dec 3, 2021 at 8:19 PM wrote: > >> > > >> > > On Sat,

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread quietvoid
On Fri, Dec 3, 2021 at 8:51 PM quietvoid wrote: > > On Fri, Dec 3, 2021 at 8:40 PM wrote: > >> On Fri, Dec 03, 2021 at 08:27:06PM -0500, quietvoid wrote: >> > On Fri, Dec 3, 2021 at 8:19 PM wrote: >> > >> > > On Sat, Dec 04, 2021 at 02:09:04AM +0100, quietvoid wrote: >> > > > From: quietvoid

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread quietvoid
On Fri, Dec 3, 2021 at 8:40 PM wrote: > On Fri, Dec 03, 2021 at 08:27:06PM -0500, quietvoid wrote: > > On Fri, Dec 3, 2021 at 8:19 PM wrote: > > > > > On Sat, Dec 04, 2021 at 02:09:04AM +0100, quietvoid wrote: > > > > From: quietvoid > > > > > > > > Improves code legibility by not using bit

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread lance . lmwang
On Fri, Dec 03, 2021 at 08:27:06PM -0500, quietvoid wrote: > On Fri, Dec 3, 2021 at 8:19 PM wrote: > > > On Sat, Dec 04, 2021 at 02:09:04AM +0100, quietvoid wrote: > > > From: quietvoid > > > > > > Improves code legibility by not using bit shifts. > > > Also avoids duplicating the dvcC/dvvC

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread quietvoid
On Fri, Dec 3, 2021 at 8:19 PM wrote: > On Sat, Dec 04, 2021 at 02:09:04AM +0100, quietvoid wrote: > > From: quietvoid > > > > Improves code legibility by not using bit shifts. > > Also avoids duplicating the dvcC/dvvC ISOM box writing code. > > > > Signed-off-by: quietvoid > > --- > >

Re: [FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread lance . lmwang
On Sat, Dec 04, 2021 at 02:09:04AM +0100, quietvoid wrote: > From: quietvoid > > Improves code legibility by not using bit shifts. > Also avoids duplicating the dvcC/dvvC ISOM box writing code. > > Signed-off-by: quietvoid > --- > libavformat/movenc.c | 26 +- > 1 file

[FFmpeg-devel] [PATCH v8 5/5] fate/matroska: Add tests for reading/writing BlockAdditionMapping elements

2021-12-03 Thread quietvoid
Tests the parsing and writing of AVDOVIDecoderConfigurationRecord, when it is present as a Dolby Vision configuration block addition mapping. Signed-off-by: quietvoid --- The required regression test file is available here: https://0x0.st/-hWK.mkv Should be moved to fate-suite/mkv/dovi-p5.mkv

[FFmpeg-devel] [PATCH v8 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-03 Thread quietvoid
From: quietvoid Improves code legibility by not using bit shifts. Also avoids duplicating the dvcC/dvvC ISOM box writing code. Signed-off-by: quietvoid --- libavformat/movenc.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/libavformat/movenc.c

[FFmpeg-devel] [PATCH v8 3/5] avformat/mov: Refactor mov_read_dvcc_dvvc to use ff_isom_parse_dvcc_dvvc

2021-12-03 Thread quietvoid
From: quietvoid To avoid duplicating code. The implementation in dovi_isom is identical. Signed-off-by: quietvoid --- libavformat/mov.c | 50 +-- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c

[FFmpeg-devel] [PATCH v8 2/5] avformat/matroska{dec, enc}: Parse BlockAdditionMapping elements

2021-12-03 Thread quietvoid
From: quietvoid Adds handling of dvcC/dvvC block addition mappings. The parsing creates AVDOVIDecoderConfigurationRecord side data. The configuration block is written when muxing into Matroska, if DOVI side data is present for the track. Most of the Matroska element parsing is based on Plex's

[FFmpeg-devel] [PATCH v8 1/5] avformat/dovi_isom: Implement Dolby Vision configuration parsing/writing

2021-12-03 Thread quietvoid
Both parse/write implementations are based on mov/movenc. This only adds support for the "Dolby Vision configuration box". Other configuration boxes, such as "Dolby Vision enhancement layer configuration box" are not supported. The new functions will be used to implement parsing/writing the DOVI

[FFmpeg-devel] [PATCH v8 0/5] Add support for Matroska BlockAdditionMapping elements

2021-12-03 Thread quietvoid
This patch set adds support for reading/writing the Matroska BlockAdditionMapping elements, as well as for reading/writing dvcC/dvvC blocks in Matroska. Created utility functions to read/write Dolby Vision boxes for ISOM. This was done to avoid duplicating the code, as the Matroska blocks and

Re: [FFmpeg-devel] [PATCH V5 5/5] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

2021-12-03 Thread Lynne
2 Dec 2021, 02:43 by wenbin.c...@intel.com: > 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

[FFmpeg-devel] [PATCH] avformat/takdec: Simplify data->hex conversion

2021-12-03 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/takdec.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavformat/takdec.c b/libavformat/takdec.c index 839e3cc781..6bb26683b4 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -109,7 +109,7 @@ static

[FFmpeg-devel] [PATCH] avformat/smoothstreamingenc: Move buffers to the end of structs

2021-12-03 Thread Andreas Rheinhardt
This reduces codesize because the offsets of commonly used elements are now smaller and thus need less bytes to encode in ptr+offset addressing modes (with GCC 11.2 on x64: 0x1b8b -> 0x1a7b). Signed-off-by: Andreas Rheinhardt --- libavformat/smoothstreamingenc.c | 8 1 file changed, 4

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

2021-12-03 Thread Lynne
1 Dec 2021, 21:11 by d...@lynne.ee: > 1 Dec 2021, 16:47 by an...@khirnov.net: > >> Quoting Lynne (2021-11-26 09:00:59) >> >>> 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

[FFmpeg-devel] [PATCH] packet: add description for the AVPacket.time_base field

2021-12-03 Thread Lynne
This description documents the field. Thanks to elenril for suggesting the phrasing. Patch attached, but it's literally 3 lines: ``` /**   * Time base of the packet's timestamps. + * In the future, this field may be set on packets output by encoders or + * demuxers, but its

[FFmpeg-devel] [PATCH 7/7] avutil/frame: Treat frame as uninitialized in get_frame_defaults()

2021-12-03 Thread Andreas Rheinhardt
Currently, it also tests whether extended_data points to something different than the AVFrame's data array and frees extended_data if it is different. Yet this is only necessary for one of its three callers, namely av_frame_unref(); meanwhile the other two callers took measures to avoid this (or

[FFmpeg-devel] [PATCH 6/7] fftools/ffmpeg: Avoid creating unnecessary reference

2021-12-03 Thread Andreas Rheinhardt
The only caller of do_video_out() doesn't need the frame afterwards, ergo one can replace an av_frame_ref() by av_frame_move_ref(). Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c

[FFmpeg-devel] [PATCH 5/7] fftools/ffmpeg: Avoid allocating+freeing frame, check allocations

2021-12-03 Thread Andreas Rheinhardt
Fixes a potential crash upon av_frame_alloc() failure. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg.c | 11 --- fftools/ffmpeg_opt.c | 4 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index cfb04d5eff..8c3a4f7c0c

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

2021-12-03 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 v19 19/20] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2021-12-03 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 v19 18/20] avfilter/splitcc: Add splitcc filter for closed caption handling

2021-12-03 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 v19 17/20] avfilter/stripstyles: Add stripstyles filter

2021-12-03 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 v19 16/20] avfilter/textmod: Add textmod, censor and show_speaker filters

2021-12-03 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

[FFmpeg-devel] [PATCH v19 13/20] fftools/ffmpeg: Replace sub2video with subtitle frame filtering and use new frame-based subtitle encoding API

2021-12-03 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 v19 12/20] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2021-12-03 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 v19 15/20] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2021-12-03 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 v19 14/20] avfilter/avfilter: Fix hardcoded input index

2021-12-03 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 v19 11/20] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2021-12-03 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

[FFmpeg-devel] [PATCH v19 08/20] fftools/play, probe: Adjust for subtitle changes

2021-12-03 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 v19 07/20] avcodec/subtitles: Replace deprecated enum values

2021-12-03 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/ass.h | 2 +- libavcodec/assdec.c| 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/xsubdec.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)

[FFmpeg-devel] [PATCH v19 10/20] avfilter/avfilter: Handle subtitle frames

2021-12-03 Thread Soft Works
Signed-off-by: softworkz --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 8 +--- libavfilter/avfilter.h | 11 +++ libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 22 ++ libavfilter/formats.h | 3 +++

[FFmpeg-devel] [PATCH v19 09/20] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2021-12-03 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 v19 03/20] avcodec/subtitles: Introduce new frame-based subtitle decoding API

2021-12-03 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 --- doc/APIchanges | 7 ++ libavcodec/avcodec.h| 8 +-

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

2021-12-03 Thread Soft Works
Signed-off-by: softworkz --- doc/APIchanges | 3 + libavcodec/assenc.c| 90 + libavcodec/avcodec.h | 5 +- libavcodec/dvbsubenc.c | 96 +-- libavcodec/dvdsubenc.c | 100

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

2021-12-03 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 +++

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

2021-12-03 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 v19 02/20] avutil/frame: Prepare AVFrame for subtitle handling

2021-12-03 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 v19 01/20] avcodec, avutil: Move enum AVSubtitleType to avutil, add new and deprecate old values

2021-12-03 Thread Soft Works
Signed-off-by: softworkz --- doc/APIchanges | 6 libavcodec/avcodec.h | 19 + libavutil/Makefile | 1 + libavutil/subfmt.h | 66 libavutil/version.h | 1 + 5 files changed, 75 insertions(+), 18 deletions(-) create mode

[FFmpeg-devel] [PATCH v19 00/20] Subtitle Filtering

2021-12-03 Thread Soft Works
New in V19 - Document API changes in all relevant commits - Move enum AVSubtitleType: Improved commit message - Put deprecated enum values under removal guards - Document AV_SUBTITLE_FMT_NB - Fixed all trailing whitespace - splitcc: Add scatter_realtime_output option - splitcc: Emit empty

[FFmpeg-devel] [PATCH 4/4] fftools/cmdutils: Use av_dynarray_add_nofree()

2021-12-03 Thread Andreas Rheinhardt
Simplifies code and reduces the number of allocations a bit by overallocating. Signed-off-by: Andreas Rheinhardt --- fftools/cmdutils.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 0b57552e5c..3c8e5a82cd 100644

[FFmpeg-devel] [PATCH 3/4] fftools/cmdutils: Make allocate_array_elem() return ptr to new element

2021-12-03 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- fftools/cmdutils.c | 6 -- fftools/cmdutils.h | 4 ++-- fftools/ffmpeg_filter.c | 13 - fftools/ffmpeg_opt.c| 9 +++-- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/fftools/cmdutils.c

[FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_(filter|opt): Use dedicated pointer for array elem access

2021-12-03 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_filter.c | 56 +++-- fftools/ffmpeg_opt.c| 14 +++ 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 75194fe66e..04253a9b21

[FFmpeg-devel] [PATCH 1/4] fftools/cmdutils: Atomically add elements to list of pointers, fix crash

2021-12-03 Thread Andreas Rheinhardt
Currently, adding a (separately allocated) element to a list of pointers works by first reallocating the array of pointers and (on success) incrementing its size and only then allocating the new element. If the latter allocation fails, the size is inconsistent, i.e. array[nb_array_elems - 1] is

[FFmpeg-devel] [PATCH 2/4] avcodec/apedec: Use 64bit in 4/3 calculation in do_apply_filter()

2021-12-03 Thread Michael Niedermayer
Fixes: Integer overflow Fixes: 40973/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6739312704618496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 2 +- 1 file

[FFmpeg-devel] [PATCH 3/4] avcodec/alacdsp: fix integer overflow in decorrelate_stereo()

2021-12-03 Thread Michael Niedermayer
Fixes: signed integer overflow: -16777216 * 131 cannot be represented in type 'int' Fixes: 23835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5669943160078336 Fixes: 41101/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-4636330705944576 Found-by: continuous

[FFmpeg-devel] [PATCH 4/4] tools/target_dec_fuzzer: Adjust threshold for HQ_HQA

2021-12-03 Thread Michael Niedermayer
Fixes: Timeout Fixes: 41120/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6327761690558464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file

[FFmpeg-devel] [PATCH 1/4] avformat/mov: Disallow duplicate smdm

2021-12-03 Thread Michael Niedermayer
Fixes: memleak Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 +++ 1 file changed, 3

[FFmpeg-devel] [PATCH v3] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Lynne
The issue is that if ffmpeg is compiled without Vulkan, and an API user includes and uses the functions exposed in hwcontext_vulkan.h, then a linking error will happen, as the hwcontext_vulkan.c file has not been compiled. Move the functions to another file, and make it always compiled. The

[FFmpeg-devel] [PATCH v2] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Lynne
The issue is that if ffmpeg is compiled without Vulkan, and an API user includes and uses the functions exposed in hwcontext_vulkan.h, then a linking error will happen, as the hwcontext_vulkan.c file has not been compiled. Move the functions to another file, and make it always compiled. The

Re: [FFmpeg-devel] [PATCH 1/2] avdevice/lavfi: Properly free an AVDictionary

2021-12-03 Thread Nicolas George
Andreas Rheinhardt (12021-12-02): > It is not documented that freeing the last (and only) entry of > an AVDictionary frees the dictionary. > > Signed-off-by: Andreas Rheinhardt > --- > libavdevice/lavfi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Ok to the whole series. Regards,

[FFmpeg-devel] [PATCH v2 1/1] avcodec/dvbsubdec: Fix conditions for fallback to default resolution

2021-12-03 Thread Soft Works
The previous code expected a segment of type CLUT definition to exist in order to accept a set of segments to be complete. This was an incorrect assumption as the presence of a CLUT segment is not mandatory. (version 1.6.1 of the spec is probably a bit more clear about this than earlier versions:

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

2021-12-03 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Michael > Niedermayer > Sent: Tuesday, November 30, 2021 2:11 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v18 12/19] fftools/ffmpeg: Replace > sub2video with subtitle frame filtering

[FFmpeg-devel] [PATCH] avcodec/dvbsubdec: Fix conditions for fallback to default resolution

2021-12-03 Thread Soft Works
The previous code expected a segment of type CLUT definition to exist in order to accept a set of segments to be complete. This was an incorrect assumption as the presence of a CLUT segment is not mandatory. (version 1.6.1 of the spec is probably a bit more clear about this than earlier

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: load the sdp file with avio_read_to_bprint()

2021-12-03 Thread lance . lmwang
On Fri, Dec 03, 2021 at 02:50:14PM +0100, Michael Niedermayer wrote: > On Fri, Dec 03, 2021 at 09:14:12PM +0800, lance.lmw...@gmail.com wrote: > > On Thu, Dec 02, 2021 at 11:52:23PM +0100, Michael Niedermayer wrote: > > > On Thu, Dec 02, 2021 at 06:37:38PM +0800, lance.lmw...@gmail.com wrote: > >

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/targa: Do not return images when there is no image in the tga

2021-12-03 Thread Michael Niedermayer
On Sat, Sep 18, 2021 at 06:27:15PM +0200, Michael Niedermayer wrote: > On Fri, Sep 17, 2021 at 08:06:48PM +0200, Paul B Mahol wrote: > > On Fri, Sep 17, 2021 at 8:00 PM Michael Niedermayer > > wrote: > > > > > On Fri, Sep 17, 2021 at 07:35:32PM +0200, Paul B Mahol wrote: > > > > Please do not

Re: [FFmpeg-devel] [PATCH 4/5] avformat/movenc: reduce tfra box size when every sample is a sync sample

2021-12-03 Thread zhilizhao(赵志立)
> On Dec 3, 2021, at 9:33 PM, Michael Niedermayer > wrote: > > On Fri, Dec 03, 2021 at 01:06:56PM +0800, Zhao Zhili wrote: >> --- >> libavformat/movenc.c | 8 + >> libavformat/movenc.h | 1 + >> tests/ref/fate/movenc | 80 +-- >> 3 files changed,

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: load the sdp file with avio_read_to_bprint()

2021-12-03 Thread Michael Niedermayer
On Fri, Dec 03, 2021 at 09:14:12PM +0800, lance.lmw...@gmail.com wrote: > On Thu, Dec 02, 2021 at 11:52:23PM +0100, Michael Niedermayer wrote: > > On Thu, Dec 02, 2021 at 06:37:38PM +0800, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > > > this allows getting rid of the hardcoded

Re: [FFmpeg-devel] [PATCH 4/5] avformat/movenc: reduce tfra box size when every sample is a sync sample

2021-12-03 Thread Michael Niedermayer
On Fri, Dec 03, 2021 at 01:06:56PM +0800, Zhao Zhili wrote: > --- > libavformat/movenc.c | 8 + > libavformat/movenc.h | 1 + > tests/ref/fate/movenc | 80 +-- > 3 files changed, 49 insertions(+), 40 deletions(-) Heres a testcase this seems to

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Hendrik Leppkes
On Thu, Dec 2, 2021 at 7:13 PM Andreas Rheinhardt wrote: > 2. And even if not: Actually compiling the whole implementation is > unnecessary; in such cases we typically #if everything away (e.g. in > your case: it will always return NULL). > 3. The hwcontext_vulkan.h header requires vulkan system

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Hendrik Leppkes
On Thu, Dec 2, 2021 at 7:13 PM Andreas Rheinhardt wrote: > > Lynne: > > The issue is that if ffmpeg is compiled without Vulkan, and an API > > user includes and uses the functions exposed in hwcontext_vulkan.h, > > then a linking error will happen, as the hwcontext_vulkan.c file has > > not been

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: load the sdp file with avio_read_to_bprint()

2021-12-03 Thread lance . lmwang
On Thu, Dec 02, 2021 at 11:52:23PM +0100, Michael Niedermayer wrote: > On Thu, Dec 02, 2021 at 06:37:38PM +0800, lance.lmw...@gmail.com wrote: > > From: Limin Wang > > > > this allows getting rid of the hardcoded max size of SDP. > > > > Reviewed-by: Martin Storsjö > > Signed-off-by: Limin

Re: [FFmpeg-devel] [PATCH] Exception when frame is set NULL

2021-12-03 Thread Yy
> 2021年12月3日 下午6:04,Andreas Rheinhardt 写道: > > Yu Yang: >> fftools/ffmpegc When `ost->last_frame` is NULL, 'SEGV' occurs when >> accessing its pts. >> >> libavutil/framec `ost->last_frame` may be set NULL by av_frame_alloc(). In >> this situation, >> av_frame_unref() and

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Niklas Haas
On Thu, 02 Dec 2021 19:13:17 +0100 Andreas Rheinhardt wrote: > Lynne: > > The issue is that if ffmpeg is compiled without Vulkan, and an API > > user includes and uses the functions exposed in hwcontext_vulkan.h, > > then a linking error will happen, as the hwcontext_vulkan.c file has > > not

Re: [FFmpeg-devel] [PATCH] libavcodec/avpacketc packet release exception

2021-12-03 Thread Yy
> 2021年12月3日 下午5:45,Andreas Rheinhardt 写道: > > Yu Yang: >> 'pkt' and '*pkt' should be judged separately for release. >> SEGV by a READ memory access (address points to the zero page) >> >> ```c >> // in fftools/ffmpeg.c:515 >> 515 static void ffmpeg_cleanup(int ret) >> 516 { >> ... >>

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: prefer to use avio_read_partial()

2021-12-03 Thread lance . lmwang
On Fri, Dec 03, 2021 at 01:59:16PM +0200, Martin Storsjö wrote: > On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: > > > On Fri, Dec 03, 2021 at 10:47:00AM +0100, Marton Balint wrote: > > > > > > > > > On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: > > > > > > > From: Limin Wang > > > >

Re: [FFmpeg-devel] [PATCH v1] avcodec/av1_parser: ensure only one show frame packed data parsered

2021-12-03 Thread James Almer
On Fri, Dec 3, 2021 at 5:12 AM Fei Wang wrote: > Split packed data when it contains multiple show frames in some > non-standard bitstream. This can benefit downstream decoder which can > decode continuously instead of interrupt with unexpected error. > > Signed-off-by: Fei Wang > --- >

Re: [FFmpeg-devel] fftools/ffmpeg_optc AVDictionary **opts, If memory allocation fails,

2021-12-03 Thread Yy
> 2021年12月3日 下午5:42,Andreas Rheinhardt 写道: > > Yu Yang: >> Opts is assigned by setup_find_stream_info_opts(). Opts may be NULL. >> This situation is compatible in avformat_find_stream_info(). >> Before av_dict_free(), the necessary checks were ignored. >> >> // in fftools/ffmpeg_opt.c:1266

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: prefer to use avio_read_partial()

2021-12-03 Thread Martin Storsjö
On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: On Fri, Dec 03, 2021 at 10:47:00AM +0100, Marton Balint wrote: On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang This is allowed to read fewer bytes than requested. The missing bytes can be read in the next call. I

Re: [FFmpeg-devel] [PATCH] libavcodec/avpacket: add av_packet_remove_side_data

2021-12-03 Thread zhilizhao(赵志立)
I searched and surprised to find out there is another version of patch from James earlier than this one. https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200908223510.7839-1-jamr...@gmail.com/ There’re some discussion and then stopped. Any way to make some progress before v3? > On Nov 4,

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: prefer to use avio_read_partial()

2021-12-03 Thread Marton Balint
On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: On Fri, Dec 03, 2021 at 10:47:00AM +0100, Marton Balint wrote: On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang This is allowed to read fewer bytes than requested. The missing bytes can be read in the next call. I

Re: [FFmpeg-devel] [PATCH v1] avcodec/av1_parser: ensure only one show frame packed data parsered

2021-12-03 Thread Michael Niedermayer
On Fri, Dec 03, 2021 at 04:09:20PM +0800, Fei Wang wrote: > Split packed data when it contains multiple show frames in some > non-standard bitstream. This can benefit downstream decoder which can > decode continuously instead of interrupt with unexpected error. > > Signed-off-by: Fei Wang > ---

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-03 Thread Thomas Guillem
On Fri, Dec 3, 2021, at 09:52, Anton Khirnov wrote: > Quoting Thomas Guillem (2021-12-02 20:44:33) >> >> On Thu, Dec 2, 2021, at 15:05, Andreas Rheinhardt wrote: >> > 1. hw_device_ctx is in the public AVCodecContext, not in the private >> > AVCodecInternal. >> > 2. ctx->internal is intended to

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: prefer to use avio_read_partial()

2021-12-03 Thread lance . lmwang
On Fri, Dec 03, 2021 at 10:47:00AM +0100, Marton Balint wrote: > > > On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > This is allowed to read fewer bytes than requested. The missing bytes can > > be read in the next call. > > I don't think this is needed,

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

2021-12-03 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Wednesday, December 1, 2021 2:35 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v18 01/19] avcodec, avutil: Move enum > AVSubtitleType > > Quoting Soft Works (2021-11-29 20:47:52) > >

Re: [FFmpeg-devel] [PATCH] Exception when frame is set NULL

2021-12-03 Thread Andreas Rheinhardt
Yu Yang: > fftools/ffmpegc When `ost->last_frame` is NULL, 'SEGV' occurs when accessing > its pts. > > libavutil/framec `ost->last_frame` may be set NULL by av_frame_alloc(). In > this situation, > av_frame_unref() and av_frame_free() do nothing. Frame is >

[FFmpeg-devel] [PATCH 2/2] avformat/mxf: add documentation for eia608_extract parameter

2021-12-03 Thread Marc-Antoine Arnaud
--- doc/demuxers.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 23b6753602..587ce11c95 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -776,6 +776,9 @@ MXF demuxer. @table @option +@item -eia608_extract @var{bool} +Extract

[FFmpeg-devel] [PATCH 1/2] avformat/mxf: support MCA audio information

2021-12-03 Thread Marc-Antoine Arnaud
--- doc/demuxers.texi | 10 ++ libavformat/mxf.h | 3 + libavformat/mxfdec.c | 335 +- libavformat/version.h | 2 +- 4 files changed, 343 insertions(+), 7 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index

Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: make 2 public functions always available

2021-12-03 Thread Michael Niedermayer
On Thu, Dec 02, 2021 at 07:01:08PM +0100, Lynne wrote: > The issue is that if ffmpeg is compiled without Vulkan, and an API > user includes and uses the functions exposed in hwcontext_vulkan.h, > then a linking error will happen, as the hwcontext_vulkan.c file has > not been compiled. > > Move

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: prefer to use avio_read_partial()

2021-12-03 Thread Marton Balint
On Fri, 3 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang This is allowed to read fewer bytes than requested. The missing bytes can be read in the next call. I don't think this is needed, after all we want to read all data, there is no point in reading it in smaller chunks, no?

Re: [FFmpeg-devel] [PATCH] libavcodec/avpacketc packet release exception

2021-12-03 Thread Andreas Rheinhardt
Yu Yang: > 'pkt' and '*pkt' should be judged separately for release. > SEGV by a READ memory access (address points to the zero page) > > ```c > // in fftools/ffmpeg.c:515 > 515 static void ffmpeg_cleanup(int ret) > 516 { >... > > 626 for (i = 0; i < nb_input_files; i++) { >

[FFmpeg-devel] [PATCH] Exception when frame is set NULL

2021-12-03 Thread Yu Yang
fftools/ffmpegc When `ost->last_frame` is NULL, 'SEGV' occurs when accessing its pts. libavutil/framec `ost->last_frame` may be set NULL by av_frame_alloc(). In this situation, av_frame_unref() and av_frame_free() do nothing. Frame is not released. ```c //

Re: [FFmpeg-devel] fftools/ffmpeg_optc AVDictionary **opts, If memory allocation fails,

2021-12-03 Thread Andreas Rheinhardt
Yu Yang: > Opts is assigned by setup_find_stream_info_opts(). Opts may be NULL. > This situation is compatible in avformat_find_stream_info(). > Before av_dict_free(), the necessary checks were ignored. > > // in fftools/ffmpeg_opt.c:1266 > 1067 static int open_input_file(OptionsContext *o,

[FFmpeg-devel] [PATCH] libavcodec/avpacketc packet release exception

2021-12-03 Thread Yu Yang
'pkt' and '*pkt' should be judged separately for release. SEGV by a READ memory access (address points to the zero page) ```c // in fftools/ffmpeg.c:515 515 static void ffmpeg_cleanup(int ret) 516 { ... 626 for (i = 0; i < nb_input_files; i++) { 627

[FFmpeg-devel] fftools/ffmpeg_optc AVDictionary **opts, If memory allocation fails,

2021-12-03 Thread Yu Yang
Opts is assigned by setup_find_stream_info_opts(). Opts may be NULL. This situation is compatible in avformat_find_stream_info(). Before av_dict_free(), the necessary checks were ignored. // in fftools/ffmpeg_opt.c:1266 1067 static int open_input_file(OptionsContext *o, const char *filename)

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-03 Thread Nicolas Gaullier
>Please add a reference to the relevant SMPTE document in the comment, or >perhaps at the list of references at the start of the file > >/Tomas I have added the reference to ST2019-4 for "VC3 mapping", so that should be ok for generic standard files. It seems redundant for me, but if you want,

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

2021-12-03 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Wednesday, December 1, 2021 2:35 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v18 01/19] avcodec, avutil: Move enum > AVSubtitleType > > Quoting Soft Works (2021-11-29 20:47:52) > >

Re: [FFmpeg-devel] [PATCH] all: Use av_memdup() where appropriate

2021-12-03 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/decode.c | 4 +--- > libavcodec/dvbsubdec.c | 8 ++-- > libavcodec/g723_1enc.c | 3 +-- > libavformat/hdsenc.c | 6 ++ > libavformat/mpegts.c | 3 +-- >

Re: [FFmpeg-devel] [PATCH 1/4] all: Remove unused-but-set variables

2021-12-03 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Newer versions of Clang detect this and emit warnings for it. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/aaccoder.c| 3 +-- > libavcodec/cinepakenc.c | 3 --- > libavcodec/error_resilience.c| 3 --- > libavcodec/imc.c

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/h264_redundant_pps_bsf: Remove flush callback

2021-12-03 Thread Andreas Rheinhardt
Andreas Rheinhardt: > extradata_pic_init_qp is unset since > fa75e438756f159a667080dcba58ea2e3b190001 > (and resetting current_pic_init_qp to the value it had in extradata > never made much sense). > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/h264_redundant_pps_bsf.c | 8 >

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/mvdec: handle audio sample size

2021-12-03 Thread Peter Ross
On Wed, Dec 01, 2021 at 04:18:42PM +1100, Peter Ross wrote: > On Sat, Nov 27, 2021 at 04:45:51PM -0500, John-Paul Stewart wrote: > > Adds support for reading audio sample size from the data instead of > > assuming all audio is 16 bits per sample. > > --- > > libavformat/mvdec.c | 18

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-03 Thread Anton Khirnov
Quoting Thomas Guillem (2021-12-02 20:44:33) > > On Thu, Dec 2, 2021, at 15:05, Andreas Rheinhardt wrote: > > 1. hw_device_ctx is in the public AVCodecContext, not in the private > > AVCodecInternal. > > 2. ctx->internal is intended to be allocated for all the internal > > AVCodecContexts; the

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-03 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Friday, December 3, 2021 9:23 AM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data > from input to output frame > > Quoting Soft

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-03 Thread Anton Khirnov
Quoting Soft Works (2021-12-03 08:55:19) > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Anton > > Khirnov > > Sent: Wednesday, December 1, 2021 11:55 AM > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data > >

[FFmpeg-devel] [PATCH v1] avcodec/av1_parser: ensure only one show frame packed data parsered

2021-12-03 Thread Fei Wang
Split packed data when it contains multiple show frames in some non-standard bitstream. This can benefit downstream decoder which can decode continuously instead of interrupt with unexpected error. Signed-off-by: Fei Wang --- libavcodec/av1_parser.c | 19 +++ 1 file changed, 15