[FFmpeg-devel] [PATCH] moves ff_set_mpeg4_time to mpegvideo_enc.c

Aurelien Jacobs aurel
Mon Jul 9 15:16:10 CEST 2007

On Fri, 6 Jul 2007 10:44:55 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> Hi
> On Fri, Jul 06, 2007 at 01:51:20AM +0200, Aurelien Jacobs wrote:
> > Hi,
> > 
> > The attached patch moves ff_set_mpeg4_time to mpegvideo_enc.c because
> > it is only used by this file. This allows to make the function static.
> > Moreover this function is used for mpeg1/2 as well as mpeg4 so it
> > definitely don't belong in h263.c and it really deserve a renaming
> > (as suggested by the FIXME comment).
> > 
> > Is it OK ?
> well ...
> the function should be split, some of the things are needed for all
> b frame encodings some are mpeg4 specific, later belong in h263.c
> not mpegvideo*.c unless you split mpeg4 out of h263.c ...

I'm not sure of what you mean exactly. The only mpeg4 specific thing
in this function is the call to ff_mpeg4_init_direct_mv().
I now moved it out of the function (see attached patch). Tell me
if that's what you mean.

Note1: mpegvideo_enc.c is full of calls to mpeg4_* functions. I intend
to protect those calls with if(ENABLE_MPEG4_ENCODER) or similar tests.

Note2: I intend to simplify set_mpeg_time() after this patch is applied.
(time_div and time_mod can be removed).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ff_set_mpeg4_time_2.diff
Type: text/x-diff
Size: 2960 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070709/982d638f/attachment.diff>

More information about the ffmpeg-devel mailing list