Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent expensive get_cue_desc lookups

2023-11-29 Thread Tom Boshoven via ffmpeg-devel
On Thu, Mar 30, 2023 at 4:07 PM Tom Boshoven wrote: > > Due to the way the bandwidth estimation code works, the get_cue_desc > function was called many times over. > This function did a from-scratch lookup using a timestamp. > This lookup was done using linear iteration (O(n)

Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent expensive get_cue_desc lookups

2023-08-01 Thread Tom Boshoven
On Thu, Mar 30, 2023 at 4:07 PM Tom Boshoven wrote: > > Due to the way the bandwidth estimation code works, the get_cue_desc > function was called many times over. > This function did a from-scratch lookup using a timestamp. > This lookup was done using linear iteration (O(n)

[FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent expensive get_cue_desc lookups

2023-02-15 Thread Tom Boshoven
ff_index_search_timestamp (binary search, O(log n)) for the lookup. Additionally, the lookup is prevented entirely in most cases by maintaining the indexes of the cues (O(1)). Signed-off-by: Tom Boshoven --- libavformat/matroskadec.c | 64 +++ 1 file changed, 38

[FFmpeg-devel] [PATCH] avfilter/yadif: Fix time base for large denominators

2021-05-25 Thread Tom Boshoven
This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven --- libavfilter/vf_yadif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index a6942a2aa2..91cc79ecc3

Re: [FFmpeg-devel] [PATCH] avfilter/yadif: Fix time base for large denominators

2021-05-25 Thread Tom Boshoven
On Mon, May 24, 2021 at 10:39 PM Andriy Gelman wrote: > > Some fate tests fail on patchwork: > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210524155206.47644-1-...@jwplayer.com/ Thanks! I did not realize one could make this many mistakes in a simple one-line patch. Apologies for the impr

[FFmpeg-devel] [PATCH] avfilter/yadif: Fix time base for large denominators

2021-05-24 Thread Tom Boshoven
This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven --- libavfilter/vf_yadif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index a6942a2aa2..b067c5eead

Re: [FFmpeg-devel] [PATCH] avfilter/yadif: Fix time base for large denominators

2021-05-21 Thread Tom Boshoven
On Fri, May 21, 2021 at 11:28 AM Tom Boshoven wrote: > +outlink->time_base = av_mul_q(outlink->time_base, (AVRational){2, 1}); > This should be {1, 2} . I'll fix this after I get some feedback. ___ ffmpeg-devel mailing list ffmpeg

[FFmpeg-devel] [PATCH] avfilter/yadif: Fix time base for large denominators

2021-05-21 Thread Tom Boshoven
This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven --- libavfilter/vf_yadif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index a6942a2aa2..adeec81c04