[FFmpeg-devel] [PATCH] avfilter/delogo: Check that logo area is inside the picture

2016-05-10 Thread Jean Delvare
We can only remove the logo if it is inside the picture. We need at least one pixel around the logo area for interpolation. Fixes ticket #5527 (Delogo crash with x=0 and/or y=0). Signed-off-by: Jean Delvare --- libavfilter/vf_delogo.c | 15 +++ 1 file changed, 15 insertions

[FFmpeg-devel] [PATCH] avfilter/vf_delogo: change the definition of logo_x2 and logo_y2

2015-12-18 Thread Jean Delvare
In the code we keep using logo_x2-1 and logo_y2-1 rather than logo_x2 and logo_y2 themselves. Define them to be what we need instead, to avoid the repeated subtractions. Signed-off-by: Jean Delvare --- libavfilter/vf_delogo.c | 26 +- 1 file changed, 13 insertions

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-16 Thread Jean Delvare
Hi Derek, On Wed, 16 Dec 2015 17:16:26 +, Derek Buitenhuis wrote: > On 12/15/2015 10:39 PM, Jean Delvare wrote: > > I see two completely different things. > > > > The change I proposed is specific to one function, only changes const > > vs non-const, and the objec

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-15 Thread Jean Delvare
Hi Derek, On Tue, 15 Dec 2015 17:39:23 +, Derek Buitenhuis wrote: > On 12/15/2015 5:23 PM, Jean Delvare wrote: > > Looks like something different from what we were discussing here. > > In which way? > > That patch fixes pointer aliasing in the same way yours breaks i

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-15 Thread Jean Delvare
On Tue, 15 Dec 2015 16:56:02 +, Derek Buitenhuis wrote: > On 12/15/2015 10:44 AM, Jean Delvare wrote: > > Originally I proposed this patch for performance reasons and also > > because I think it makes the code more readable. But seeing how the > > same cast is already pres

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-15 Thread Jean Delvare
Hi Hendrik, On Tue, 15 Dec 2015 11:31:57 +0100, Hendrik Leppkes wrote: > On Tue, Dec 15, 2015 at 11:20 AM, Michael Niedermayer > wrote: > > On Tue, Dec 15, 2015 at 08:58:01AM +0100, Jean Delvare wrote: > >> Also I can see 12 occurrences of the same cast for this param

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-15 Thread Jean Delvare
hey like has always frightened me. I prefer when tools obey to whoever if handling them, rather than making their own decisions. -- Jean Delvare SUSE L3 Support ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffm

Re: [FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-14 Thread Jean Delvare
Hallo Michael, On Mon, 14 Dec 2015 23:18:39 +0100, Michael Niedermayer wrote: > On Mon, Dec 14, 2015 at 07:36:51PM +0100, Jean Delvare wrote: > > As I understand it, the temporary stack buffer "src_data" was > > introduced solely to avoid a compiler warning. I believe

[FFmpeg-devel] [PATCH] lavu/frame: Optimize frame_copy_video

2015-12-14 Thread Jean Delvare
As I understand it, the temporary stack buffer "src_data" was introduced solely to avoid a compiler warning. I believe that a better way to solve this warning it to explicitly cast src->data. This should be somewhat faster, and just as safe. Signed-off-by: Jean Delvare Cc:

[FFmpeg-devel] [PATCH] avfilter/vf_delogo: fix show option when clipping

2015-12-14 Thread Jean Delvare
The show option did not take clipping into account, so the borders on the clipped side wouldn't show up. Fix it. Signed-off-by: Jean Delvare --- libavfilter/vf_delogo.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- ffmpeg.orig/libavfilter/vf_delogo.c 2015-12-11

Re: [FFmpeg-devel] Question about av_frame_is_writable

2015-12-12 Thread Jean Delvare
Hi Paul, On Sat, 12 Dec 2015 12:03:39 +, Paul B Mahol wrote: > On 12/12/15, Jean Delvare wrote: > > Can av_frame_is_writable() ever return 1, and if so, when? > > > > Context: I am testing corner cases of the delogo filter. To my > > surprise, even for

[FFmpeg-devel] Question about av_frame_is_writable

2015-12-12 Thread Jean Delvare
n't see why we can't modify the video data in-place. Can someone enlighten me? Thanks, -- Jean Delvare SUSE L3 Support ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

[FFmpeg-devel] [PATCH RFC] avfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components

2015-12-10 Thread Jean Delvare
Relying on AVPixFmtDescriptor.nb_components is cleaner and faster than checking data and linesize for every possible plane. Signed-off-by: Jean Delvare --- I see that most filters use AVPixFmtDescriptor.nb_components while others still check data and linesize. Am I correct assuming that the

Re: [FFmpeg-devel] Detecting invalid filter parameters

2015-12-10 Thread Jean Delvare
On Thu, 10 Dec 2015 08:58:05 +0100, Nicolas George wrote: > Le decadi 20 frimaire, an CCXXIV, Jean Delvare a écrit : > > This brings two additional questions: > > > > 1* Can a filter declare which midstream changes it does or does not > > support? > > >

Re: [FFmpeg-devel] Detecting invalid filter parameters

2015-12-09 Thread Jean Delvare
Hi Paul, Thanks for your quick reply. On Wed, 9 Dec 2015 19:45:16 +, Paul B Mahol wrote: > On 12/9/15, Jean Delvare wrote: > > I would like to add a check for the delogo filter parameters to ensure > > that there is enough frame room around the area to execute the > >

[FFmpeg-devel] Detecting invalid filter parameters

2015-12-09 Thread Jean Delvare
estion but well I guess that's what I am. I'm still not sure what is the difference between filter links and pads (or more generally what pads are)... Thanks, -- Jean Delvare SUSE L3 Support ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH] avfilter/vf_delogo: round to the closest value

2015-12-09 Thread Jean Delvare
% on average on a number of sample input and logo area combinations. Signed-off-by: Jean Delvare --- We are having hack week 13 at SUSE and my project this time is to improve and clean up vf_delogo. Note: All testing was done with band=1 as this is the new default value. I purposely left the code

Re: [FFmpeg-devel] [PATCH v2] avfilter/delogo: Set default band to 1

2015-10-08 Thread Jean Delvare
On Thu, 8 Oct 2015 13:00:33 +0200, Stefano Sabatini wrote: > On date Thursday 2015-10-08 12:42:34 +0200, Jean Delvare encoded: > > On Thu, 8 Oct 2015 12:20:25 +0200, Hendrik Leppkes wrote: > [...] > > > This seems to have broken FATE, ie: > > > http://fate.ffmpeg.org/

Re: [FFmpeg-devel] [PATCH v2] avfilter/delogo: Set default band to 1

2015-10-08 Thread Jean Delvare
On Thu, 8 Oct 2015 12:20:25 +0200, Hendrik Leppkes wrote: > On Thu, Oct 8, 2015 at 11:30 AM, Stefano Sabatini wrote: > > On date Wednesday 2015-10-07 15:03:32 +0200, Jean Delvare encoded: > >> The original interpolation algorithm behaved poorly on the borders and > >

[FFmpeg-devel] [PATCH v2] avfilter/delogo: Set default band to 1

2015-10-07 Thread Jean Delvare
the band value from 4 to 1 resulted in 8 to 39 % less interpolation error per frame (or 1 to 34 % less interpolation error per luma sample.) Signed-off-by: Jean Delvare --- Changes since v1: * Added #ifs so that the deprecated options are dropped automatically on next major version of libavfi

Re: [FFmpeg-devel] [PATCH] avfilter/delogo: Set default band to 1

2015-10-07 Thread Jean Delvare
v_log(ctx, AV_LOG_VERBOSE, "x:%d y:%d, w:%d h:%d band:%d show:%d\n", > > s->x, s->y, s->w, s->h, s->band, s->show); > > Looks fine to me. Great. > > Or should I use FF_API_OLD_FILTER_OPTS? >

Re: [FFmpeg-devel] [PATCH] avfilter/delogo: Set default band to 1

2015-10-07 Thread Jean Delvare
Hi Stefano, On Wed, 7 Oct 2015 11:21:45 +0200, Stefano Sabatini wrote: > On date Wednesday 2015-10-07 08:54:59 +0200, Jean Delvare encoded: > > The original interpolation algorithm behaved poorly on the borders and > > did not even guarantee continuity at the borders. For

[FFmpeg-devel] [PATCH] avfilter/delogo: Set default band to 1

2015-10-06 Thread Jean Delvare
the band value from 4 to 1 resulted in 8 to 39 % less interpolation error per frame (or 1 to 34 % less interpolation error per luma sample.) Signed-off-by: Jean Delvare --- doc/filters.texi|4 +++- libavfilter/vf_delogo.c | 11 +-- 2 files changed, 12 insertions(

[FFmpeg-devel] [PATCH] avfilter/delogo: Fix show option when band is small

2015-09-28 Thread Jean Delvare
the band value and chroma plane subsampling factors.) Fix the problem by not making any assumption on where the outermost interpolated pixels will be. The new code was verified to produce the same result as the original code when the band value is not small. Signed-off-by: Jean Delvare

[FFmpeg-devel] Update my email address

2015-09-22 Thread Jean Delvare
+365,7 @@ Filters: vf_colorlevels.c Paul B Mahol vf_deband.c Paul B Mahol vf_dejudder.c Nicholas Robbins - vf_delogo.c Jean Delvare (CC ) + vf_delogo.c Jean Delvare (CC

[FFmpeg-devel] [PATCH] cmdutils: fix success path

2015-02-11 Thread Jean Delvare
} out: -av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", av_err2str(ret)); +if (ret < 0) + av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", av_err2str(ret)); fclose(f); return ret; } -- Jean Delvare SUSE L3 Support _