[FFmpeg-devel] [PATCH] Move ff_reverse to libavutil
Sat Nov 7 20:48:49 CET 2009
Sorry if this is a bit confusing, this is basically carried over
from a MPlayer discussion I think.
The main question I'd say is whether ff_reverse should be moved to
libavutil and independently from that whether it should be made part
of the public API as av_reverse.
On Sat, Nov 07, 2009 at 08:36:43PM +0100, Francesco Lavra wrote:
> The ff_reverse array, which allows to reverse the bit order, is
> currently declared as extern variable in libavcodec/get_bits.h and
> defined as static variable in libavcodec/utils.c. If I try to include
> libavcodec/get_bits.h from outside libavcodec, compilation fails because
> that file includes mathops.h which in turn needs some libavcodec
> internal definitions (it complains about missing INT_BIT).
You can just hack in a
extern const uint8_t ff_reverse;
like get_bits.h does.
get_bits.h is not public API of libavcodec so one is as unsupported
as the other.
> The attached patch moves ff_reverse declaration and definition in
> libavutil, making it possible to use ff_reverse from e.g. MPlayer code.
Well, with the ff_prefix it stay internal API so except that you can
reuse the declaration from FFmpeg it is just as much an unsupported
hack as the "manual" extern declaration I gave above.
More information about the ffmpeg-devel