[Ffmpeg-devel] [PATCH] Try 2: centralise mpeg12data tables

Michael Niedermayer michaelni
Wed Sep 20 11:20:55 CEST 2006


Hi

On Wed, Sep 20, 2006 at 09:22:26AM +0200, Diego 'Flameeyes' Petten? wrote:
> On Wednesday 20 September 2006 02:35, Michael Niedermayer wrote:
> > could you attach diffs similar on how they would be on svn log with svn cp,
> > i mean diffing mpeg12data.c against the old mpeg12data.h that would make
> > this much easier to review
> This one should do (created with git-svn).
[...]
> --- a/libavcodec/mpeg12data.c
> +++ b/libavcodec/mpeg12data.c
> @@ -18,10 +18,7 @@
>   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>   */
>  
> -/**
> - * @file mpeg12data.h
> - * MPEG1/2 tables.
> - */
> +#include "mpeg12data.h"
>  
>  const int16_t ff_mpeg1_default_intra_matrix[64] = {
>          8, 16, 19, 22, 26, 27, 29, 34,
> @@ -45,10 +42,10 @@ const int16_t ff_mpeg1_default_non_intra
>      16, 16, 16, 16, 16, 16, 16, 16,
>  };
>  
> -static const uint16_t vlc_dc_lum_code[12] = {
> +const uint16_t vlc_dc_lum_code[12] = {

making static tables non static pollutes the global namespace and might
prevent some optimizations as the compiler does no longer know the values
(the table is now also in a different translation unit)

why dont you simple leave everything as it is and add a mpeg12.h which
contains the declarations?

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list