[FFmpeg-devel] [PATCH] Add ATRAC3+ decoder

Michael Niedermayer michaelni at gmx.at
Sat Oct 19 18:32:44 CEST 2013


On Sat, Oct 19, 2013 at 06:17:45PM +0200, Maxim Polijakowski wrote:
> Am 19.10.2013 01:20, schrieb Michael Niedermayer:
> >
> >>>[...]
> >>>>+/** 3D base shape tables. The values are grouped together as follows:
> >>>>+ *  [num_start_values = 8][num_shape_tables = 16][num_seg_coeffs = 9]
> >>>>+ *  For each of the 8 start values there are 16 different shapes each
> >>>>+ *  9 coefficients long. */
> >>>>+const int8_t ff_atrac3p_wl_shapes[8][16][9] = {
> >>>some of the tables are only used from one file, these tables could
> >>>be static, reducing the global namespace polution and might speed up
> >>>linking in some cases on some platforms by a tiny amount
> >>Most of these tables are only used from one file. Should I convert
> >>all of them to static?
> >yes
> >
> >
> >>Should I remove the prefix "ff_atrac3p_" as well?
> >ff_ should be removed if they are static
> >atrac3p_ could be removed too if you like or it could be kept ...
> 
> All decoding tables are currently resided in atrac3plus_data.c and
> their external declaration - in atrac3plus_data.h
> Marking the tables as static in atrac3plus_data.c breaks the header
> atrac3plus_data.h where all those tables are marked with "extern".
> 
> That rises the following questions:
> Where this static data should be placed?
> What to do with non-static data?
> 
> Obviously, static (most of them) and non-static (a few) tables have
> to be separated but I have no clue how to do it properly...

you can either move static tables to the top of the file that uses
them or they could be in a seperate file that is #included from
the file that uses them


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131019/5c82f012/attachment.asc>


More information about the ffmpeg-devel mailing list