[Ffmpeg-devel] #include dsputil.h needed in opt.c
Mon Sep 19 20:09:27 CEST 2005
Diego Biurrun <diego at biurrun.de> writes:
> On Mon, Sep 19, 2005 at 11:03:41AM +0200, Michael Niedermayer wrote:
>> On Mon, Sep 19, 2005 at 08:12:39AM +0200, Xavier Rodriguez (INEXBEE) wrote:
>> > I have seen that lrintf function was pre-processed in the
>> > dsputil.h file and used by several c files in order to manage the
>> > fact that some systems like the solaris ones do not have this
>> > function in its libraries. The problem is that libavcodec/opt.c
>> > file uses the lrintf function but does not include dsputil.h
>> > file.
>> maybe dsputil.h is not the best place for the lrintf() mess, maybe
>> common.h would be better ...
> Would something like the attached patch do?
> I have a question about how to best handle #indclude: There are several
> places that include both avcodec.h and common.h. Now avcodec.h
> #includes avutil.h, which in turn #includes common.h. Is it better to
> #include common.h explicitly or implicitly?
I personally prefer for all headers to explicitly include everything
they directly depend on, rather than relying on some other header, or
the main source file, doing it.
mru at inprovide.com
More information about the ffmpeg-devel