[FFmpeg-devel] [PATCH] Add 'drawgrid' video filter

Stefano Sabatini stefasab at gmail.com
Sun May 12 11:18:13 CEST 2013


On date Saturday 2013-05-11 18:16:21 +0300, Andrey Utkin encoded:
> 2013/5/11 Stefano Sabatini <stefasab at gmail.com>:
> > I see this code is mostly duplicated from vf_drawbox.c. What about
> > defining the code in vf_drawbox.c, so that it can be factorized?
> 
> To me, the code does very few work (in both filters). Reusing these
> few lines of code is bigger headache than having them duplicated.
> BTW i agree with original comment in vf_drawbox.c: "A nice template
> for a filter that needs to write in the input frame". Making trivial
> example/template to be a reusable library seem over-engineering to me.

Using the code maintainer glasses I still prefer factorized work (less
code = less bugs and less maintainance work); but I don't consider
that blocking. You're welcome to do the factorization work in a
further patch, or I'll do it myself if I find the time/motivation.

Also I think you're overrating the complexity and the effort required
by the factorization.

> Drawgrid without setting a cell size makes a frame around the image,
> so it does what drawbox should do. So if we fight for eliminating
> spare code, i'd suggest dropping drawbox.
-- 
FFmpeg = Fostering Fundamentalist Muttering Puristic Exciting Gnome


More information about the ffmpeg-devel mailing list