[FFmpeg-devel] [PATCH] [RFC] E-AC-3 vs. AC-3 separation

Justin Ruggles justin.ruggles
Thu Jul 23 00:37:19 CEST 2009


Diego Biurrun wrote:
> On Tue, Jul 21, 2009 at 07:17:06PM -0400, Justin Ruggles wrote:
>> Diego Biurrun wrote:
>>> Here is a feeble attempt to separate the E-AC-3 and the AC-3 decoders.
>>> I have the nagging feeling that it might not be quite so easy, but it
>>> could be a start..
>> If it compiles when E-AC-3 is disabled but AC-3 is enabled, then it
>> actually looks ok.  They could be separated even more by splitting up
>> ac3dec_data.c into 2 files.  For example, the VQ tables, which are
>> pretty big, are not needed for regular AC-3 and are only used in eac3dec.c.
> 
> Your wish is my command, see the attached patch..
> 
> Diego
> 
> Index: libavcodec/ac3dec_data.h
> ===================================================================
> --- libavcodec/ac3dec_data.h	(revision 19483)
> +++ libavcodec/ac3dec_data.h	(working copy)
> @@ -1,5 +1,5 @@
>  /*
> - * AC-3 and E-AC-3 decoder tables
> + * AC-3 decoder tables
>   * Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec at gmail.com>
>   *
>   * This file is part of FFmpeg.
> @@ -22,19 +22,9 @@
>  #ifndef AVCODEC_AC3DEC_DATA_H
>  #define AVCODEC_AC3DEC_DATA_H
>  
> -#include "libavutil/common.h"
> +#include <stdint.h>
>  
>  extern const uint8_t ff_ac3_ungroup_3_in_5_bits_tab[32][3];
> -extern const uint8_t ff_eac3_hebap_tab[64];
> -extern const uint8_t ff_eac3_bits_vs_hebap[20];
> -extern const int16_t ff_eac3_gaq_remap_1[12];
> -extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2];
> -extern const int16_t ff_eac3_gaq_remap_2_4_b[9][2];
> -
> -extern const int16_t (* const ff_eac3_mantissa_vq[8])[6];
> -extern const uint8_t ff_eac3_frm_expstr[32][6];
> -extern const uint8_t ff_eac3_default_cpl_band_struct[18];

ff_eac3_default_cpl_band_struct needs to stay with ac3dec_data.c because
it is used in ac3dec.c by the shared AC-3/E-AC-3 code.

Everything else in this patch looks ok if it works.

-Justin



More information about the ffmpeg-devel mailing list