diff options
author | jstebbins <[email protected]> | 2014-02-20 01:51:45 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-02-20 01:51:45 +0000 |
commit | 0306771b4a5c09d5bbd5742221eb0bc52103f2c5 (patch) | |
tree | 3c970115d32d0515840eb8b7bb50b2e8976d8d27 | |
parent | a7c4a9f9f03cafa63068150a2e483db6ef686718 (diff) |
libhb: remove a52dec
replace it with libavcodec ac3 decoder
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6049 b64f7644-9d1e-0410-96f1-a4d463321fa5
28 files changed, 59 insertions, 1310 deletions
diff --git a/contrib/a52dec/A00-a52-state-t-public.patch b/contrib/a52dec/A00-a52-state-t-public.patch index 5e0af3577..e69de29bb 100644 --- a/contrib/a52dec/A00-a52-state-t-public.patch +++ b/contrib/a52dec/A00-a52-state-t-public.patch @@ -1,152 +0,0 @@ -diff -Naur a52dec.old/include/a52.h a52dec.new/include/a52.h ---- a52dec.old/include/a52.h 2002-01-28 06:37:54.000000000 +0100 -+++ a52dec.new/include/a52.h 2012-07-16 14:13:35.000000000 +0200 -@@ -30,7 +30,71 @@ - typedef double sample_t; - #endif - --typedef struct a52_state_s a52_state_t; -+typedef struct { -+ uint8_t bai; /* fine SNR offset, fast gain */ -+ uint8_t deltbae; /* delta bit allocation exists */ -+ int8_t deltba[50]; /* per-band delta bit allocation */ -+} ba_t; -+ -+typedef struct { -+ uint8_t exp[256]; /* decoded channel exponents */ -+ int8_t bap[256]; /* derived channel bit allocation */ -+} expbap_t; -+ -+typedef struct { -+ uint8_t fscod; /* sample rate */ -+ uint8_t halfrate; /* halfrate factor */ -+ uint8_t acmod; /* coded channels */ -+ uint8_t lfeon; /* coded lfe channel */ -+ sample_t clev; /* centre channel mix level */ -+ sample_t slev; /* surround channels mix level */ -+ -+ int output; /* type of output */ -+ sample_t level; /* output level */ -+ sample_t bias; /* output bias */ -+ -+ int dynrnge; /* apply dynamic range */ -+ sample_t dynrng; /* dynamic range */ -+ void * dynrngdata; /* dynamic range callback funtion and data */ -+ sample_t (* dynrngcall) (sample_t range, void * dynrngdata); -+ -+ uint8_t chincpl; /* channel coupled */ -+ uint8_t phsflginu; /* phase flags in use (stereo only) */ -+ uint8_t cplstrtmant; /* coupling channel start mantissa */ -+ uint8_t cplendmant; /* coupling channel end mantissa */ -+ uint32_t cplbndstrc; /* coupling band structure */ -+ sample_t cplco[5][18]; /* coupling coordinates */ -+ -+ /* derived information */ -+ uint8_t cplstrtbnd; /* coupling start band (for bit allocation) */ -+ uint8_t ncplbnd; /* number of coupling bands */ -+ -+ uint8_t rematflg; /* stereo rematrixing */ -+ -+ uint8_t endmant[5]; /* channel end mantissa */ -+ -+ uint16_t bai; /* bit allocation information */ -+ -+ uint32_t * buffer_start; -+ uint16_t lfsr_state; /* dither state */ -+ uint32_t bits_left; -+ uint32_t current_word; -+ -+ uint8_t csnroffst; /* coarse SNR offset */ -+ ba_t cplba; /* coupling bit allocation parameters */ -+ ba_t ba[5]; /* channel bit allocation parameters */ -+ ba_t lfeba; /* lfe bit allocation parameters */ -+ -+ uint8_t cplfleak; /* coupling fast leak init */ -+ uint8_t cplsleak; /* coupling slow leak init */ -+ -+ expbap_t cpl_expbap; -+ expbap_t fbw_expbap[5]; -+ expbap_t lfe_expbap; -+ -+ sample_t * samples; -+ int downmixed; -+} a52_state_t; - - #define A52_CHANNEL 0 - #define A52_MONO 1 -diff -Naur a52dec.old/liba52/a52_internal.h a52dec.new/liba52/a52_internal.h ---- a52dec.old/liba52/a52_internal.h 2002-07-28 03:52:06.000000000 +0200 -+++ a52dec.new/liba52/a52_internal.h 2012-07-16 14:11:47.000000000 +0200 -@@ -21,72 +21,6 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - --typedef struct { -- uint8_t bai; /* fine SNR offset, fast gain */ -- uint8_t deltbae; /* delta bit allocation exists */ -- int8_t deltba[50]; /* per-band delta bit allocation */ --} ba_t; -- --typedef struct { -- uint8_t exp[256]; /* decoded channel exponents */ -- int8_t bap[256]; /* derived channel bit allocation */ --} expbap_t; -- --struct a52_state_s { -- uint8_t fscod; /* sample rate */ -- uint8_t halfrate; /* halfrate factor */ -- uint8_t acmod; /* coded channels */ -- uint8_t lfeon; /* coded lfe channel */ -- sample_t clev; /* centre channel mix level */ -- sample_t slev; /* surround channels mix level */ -- -- int output; /* type of output */ -- sample_t level; /* output level */ -- sample_t bias; /* output bias */ -- -- int dynrnge; /* apply dynamic range */ -- sample_t dynrng; /* dynamic range */ -- void * dynrngdata; /* dynamic range callback funtion and data */ -- sample_t (* dynrngcall) (sample_t range, void * dynrngdata); -- -- uint8_t chincpl; /* channel coupled */ -- uint8_t phsflginu; /* phase flags in use (stereo only) */ -- uint8_t cplstrtmant; /* coupling channel start mantissa */ -- uint8_t cplendmant; /* coupling channel end mantissa */ -- uint32_t cplbndstrc; /* coupling band structure */ -- sample_t cplco[5][18]; /* coupling coordinates */ -- -- /* derived information */ -- uint8_t cplstrtbnd; /* coupling start band (for bit allocation) */ -- uint8_t ncplbnd; /* number of coupling bands */ -- -- uint8_t rematflg; /* stereo rematrixing */ -- -- uint8_t endmant[5]; /* channel end mantissa */ -- -- uint16_t bai; /* bit allocation information */ -- -- uint32_t * buffer_start; -- uint16_t lfsr_state; /* dither state */ -- uint32_t bits_left; -- uint32_t current_word; -- -- uint8_t csnroffst; /* coarse SNR offset */ -- ba_t cplba; /* coupling bit allocation parameters */ -- ba_t ba[5]; /* channel bit allocation parameters */ -- ba_t lfeba; /* lfe bit allocation parameters */ -- -- uint8_t cplfleak; /* coupling fast leak init */ -- uint8_t cplsleak; /* coupling slow leak init */ -- -- expbap_t cpl_expbap; -- expbap_t fbw_expbap[5]; -- expbap_t lfe_expbap; -- -- sample_t * samples; -- int downmixed; --}; -- - #define LEVEL_PLUS6DB 2.0 - #define LEVEL_PLUS3DB 1.4142135623730951 - #define LEVEL_3DB 0.7071067811865476 diff --git a/contrib/a52dec/A01-thread-safe.patch b/contrib/a52dec/A01-thread-safe.patch index 4ca2d1a08..e69de29bb 100644 --- a/contrib/a52dec/A01-thread-safe.patch +++ b/contrib/a52dec/A01-thread-safe.patch @@ -1,462 +0,0 @@ -diff -Naur a52dec.old/include/a52.h a52dec.new/include/a52.h ---- a52dec.old/include/a52.h 2012-07-16 14:24:14.000000000 +0200 -+++ a52dec.new/include/a52.h 2012-07-16 14:31:37.000000000 +0200 -@@ -42,6 +42,11 @@ - } expbap_t; - - typedef struct { -+ sample_t real; -+ sample_t imag; -+} complex_t; -+ -+typedef struct { - uint8_t fscod; /* sample rate */ - uint8_t halfrate; /* halfrate factor */ - uint8_t acmod; /* coded channels */ -@@ -94,6 +99,20 @@ - - sample_t * samples; - int downmixed; -+ -+ /* Root values for IFFT */ -+ sample_t * roots16; // size 3 -+ sample_t * roots32; // size 7 -+ sample_t * roots64; // size 15 -+ sample_t * roots128; // size 31 -+ -+ /* Twiddle factors for IMDCT */ -+ complex_t * pre1; // size 128 -+ complex_t * post1; // size 64 -+ complex_t * pre2; // size 64 -+ complex_t * post2; // size 32 -+ -+ sample_t * a52_imdct_window; // size 256 - } a52_state_t; - - #define A52_CHANNEL 0 -diff -Naur a52dec.old/liba52/a52_internal.h a52dec.new/liba52/a52_internal.h ---- a52dec.old/liba52/a52_internal.h 2012-07-16 14:24:14.000000000 +0200 -+++ a52dec.new/liba52/a52_internal.h 2012-07-16 14:28:33.000000000 +0200 -@@ -49,6 +49,6 @@ - sample_t clev, sample_t slev); - void a52_upmix (sample_t * samples, int acmod, int output); - --void a52_imdct_init (uint32_t mm_accel); --void a52_imdct_256 (sample_t * data, sample_t * delay, sample_t bias); --void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias); -+void a52_imdct_init (a52_state_t * state, uint32_t mm_accel); -+void a52_imdct_256 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias); -+void a52_imdct_512 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias); -diff -Naur a52dec.old/liba52/imdct.c a52dec.new/liba52/imdct.c ---- a52dec.old/liba52/imdct.c 2012-07-16 14:24:14.000000000 +0200 -+++ a52dec.new/liba52/imdct.c 2012-07-16 14:33:00.000000000 +0200 -@@ -40,11 +40,6 @@ - #include "a52_internal.h" - #include "mm_accel.h" - --typedef struct complex_s { -- sample_t real; -- sample_t imag; --} complex_t; -- - static uint8_t fftorder[] = { - 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176, - 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88, -@@ -56,22 +51,8 @@ - 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86 - }; - --/* Root values for IFFT */ --static sample_t roots16[3]; --static sample_t roots32[7]; --static sample_t roots64[15]; --static sample_t roots128[31]; -- --/* Twiddle factors for IMDCT */ --static complex_t pre1[128]; --static complex_t post1[64]; --static complex_t pre2[64]; --static complex_t post2[32]; -- --static sample_t a52_imdct_window[256]; -- --static void (* ifft128) (complex_t * buf); --static void (* ifft64) (complex_t * buf); -+static void (* ifft128) (a52_state_t * state, complex_t * buf); -+static void (* ifft64) (a52_state_t * state, complex_t * buf); - - static inline void ifft2 (complex_t * buf) - { -@@ -167,7 +148,7 @@ - a1.imag += tmp4; \ - } while (0) - --static inline void ifft8 (complex_t * buf) -+static inline void ifft8 (a52_state_t * state, complex_t * buf) - { - double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; - -@@ -175,7 +156,7 @@ - ifft2 (buf + 4); - ifft2 (buf + 6); - BUTTERFLY_ZERO (buf[0], buf[2], buf[4], buf[6]); -- BUTTERFLY_HALF (buf[1], buf[3], buf[5], buf[7], roots16[1]); -+ BUTTERFLY_HALF (buf[1], buf[3], buf[5], buf[7], state->roots16[1]); - } - - static void ifft_pass (complex_t * buf, sample_t * weight, int n) -@@ -205,66 +186,66 @@ - } while (--i); - } - --static void ifft16 (complex_t * buf) -+static void ifft16 (a52_state_t * state, complex_t * buf) - { -- ifft8 (buf); -+ ifft8 (state, buf); - ifft4 (buf + 8); - ifft4 (buf + 12); -- ifft_pass (buf, roots16 - 4, 4); -+ ifft_pass (buf, state->roots16 - 4, 4); - } - --static void ifft32 (complex_t * buf) -+static void ifft32 (a52_state_t * state, complex_t * buf) - { -- ifft16 (buf); -- ifft8 (buf + 16); -- ifft8 (buf + 24); -- ifft_pass (buf, roots32 - 8, 8); -+ ifft16 (state, buf); -+ ifft8 (state, buf + 16); -+ ifft8 (state, buf + 24); -+ ifft_pass (buf, state->roots32 - 8, 8); - } - --static void ifft64_c (complex_t * buf) -+static void ifft64_c (a52_state_t * state, complex_t * buf) - { -- ifft32 (buf); -- ifft16 (buf + 32); -- ifft16 (buf + 48); -- ifft_pass (buf, roots64 - 16, 16); -+ ifft32 (state, buf); -+ ifft16 (state, buf + 32); -+ ifft16 (state, buf + 48); -+ ifft_pass (buf, state->roots64 - 16, 16); - } - --static void ifft128_c (complex_t * buf) -+static void ifft128_c (a52_state_t * state, complex_t * buf) - { -- ifft32 (buf); -- ifft16 (buf + 32); -- ifft16 (buf + 48); -- ifft_pass (buf, roots64 - 16, 16); -+ ifft32 (state, buf); -+ ifft16 (state, buf + 32); -+ ifft16 (state, buf + 48); -+ ifft_pass (buf, state->roots64 - 16, 16); - -- ifft32 (buf + 64); -- ifft32 (buf + 96); -- ifft_pass (buf, roots128 - 32, 32); -+ ifft32 (state, buf + 64); -+ ifft32 (state, buf + 96); -+ ifft_pass (buf, state->roots128 - 32, 32); - } - --void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias) -+void a52_imdct_512 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias) - { - int i, k; - sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; -- const sample_t * window = a52_imdct_window; -+ const sample_t * window = state->a52_imdct_window; - complex_t buf[128]; - - for (i = 0; i < 128; i++) { - k = fftorder[i]; -- t_r = pre1[i].real; -- t_i = pre1[i].imag; -+ t_r = state->pre1[i].real; -+ t_i = state->pre1[i].imag; - - buf[i].real = t_i * data[255-k] + t_r * data[k]; - buf[i].imag = t_r * data[255-k] - t_i * data[k]; - } - -- ifft128 (buf); -+ ifft128 (state, buf); - - /* Post IFFT complex multiply plus IFFT complex conjugate*/ - /* Window and convert to real valued signal */ - for (i = 0; i < 64; i++) { - /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */ -- t_r = post1[i].real; -- t_i = post1[i].imag; -+ t_r = state->post1[i].real; -+ t_i = state->post1[i].imag; - - a_r = t_r * buf[i].real + t_i * buf[i].imag; - a_i = t_i * buf[i].real - t_r * buf[i].imag; -@@ -285,18 +266,18 @@ - } - } - --void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias) -+void a52_imdct_256(a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias) - { - int i, k; - sample_t t_r, t_i, a_r, a_i, b_r, b_i, c_r, c_i, d_r, d_i, w_1, w_2; -- const sample_t * window = a52_imdct_window; -+ const sample_t * window = state->a52_imdct_window; - complex_t buf1[64], buf2[64]; - - /* Pre IFFT complex multiply plus IFFT cmplx conjugate */ - for (i = 0; i < 64; i++) { - k = fftorder[i]; -- t_r = pre2[i].real; -- t_i = pre2[i].imag; -+ t_r = state->pre2[i].real; -+ t_i = state->pre2[i].imag; - - buf1[i].real = t_i * data[254-k] + t_r * data[k]; - buf1[i].imag = t_r * data[254-k] - t_i * data[k]; -@@ -305,15 +286,15 @@ - buf2[i].imag = t_r * data[255-k] - t_i * data[k+1]; - } - -- ifft64 (buf1); -- ifft64 (buf2); -+ ifft64 (state, buf1); -+ ifft64 (state, buf2); - - /* Post IFFT complex multiply */ - /* Window and convert to real valued signal */ - for (i = 0; i < 32; i++) { - /* y1[n] = z1[n] * (xcos2[n] + j * xs in2[n]) ; */ -- t_r = post2[i].real; -- t_i = post2[i].imag; -+ t_r = state->post2[i].real; -+ t_i = state->post2[i].imag; - - a_r = t_r * buf1[i].real + t_i * buf1[i].imag; - a_i = t_i * buf1[i].real - t_r * buf1[i].imag; -@@ -362,7 +343,7 @@ - return bessel; - } - --void a52_imdct_init (uint32_t mm_accel) -+void a52_imdct_init (a52_state_t * state, uint32_t mm_accel) - { - int i, k; - double sum; -@@ -371,50 +352,50 @@ - sum = 0; - for (i = 0; i < 256; i++) { - sum += besselI0 (i * (256 - i) * (5 * M_PI / 256) * (5 * M_PI / 256)); -- a52_imdct_window[i] = sum; -+ state->a52_imdct_window[i] = sum; - } - sum++; - for (i = 0; i < 256; i++) -- a52_imdct_window[i] = sqrt (a52_imdct_window[i] / sum); -+ state->a52_imdct_window[i] = sqrt (state->a52_imdct_window[i] / sum); - - for (i = 0; i < 3; i++) -- roots16[i] = cos ((M_PI / 8) * (i + 1)); -+ state->roots16[i] = cos ((M_PI / 8) * (i + 1)); - - for (i = 0; i < 7; i++) -- roots32[i] = cos ((M_PI / 16) * (i + 1)); -+ state->roots32[i] = cos ((M_PI / 16) * (i + 1)); - - for (i = 0; i < 15; i++) -- roots64[i] = cos ((M_PI / 32) * (i + 1)); -+ state->roots64[i] = cos ((M_PI / 32) * (i + 1)); - - for (i = 0; i < 31; i++) -- roots128[i] = cos ((M_PI / 64) * (i + 1)); -+ state->roots128[i] = cos ((M_PI / 64) * (i + 1)); - - for (i = 0; i < 64; i++) { - k = fftorder[i] / 2 + 64; -- pre1[i].real = cos ((M_PI / 256) * (k - 0.25)); -- pre1[i].imag = sin ((M_PI / 256) * (k - 0.25)); -+ state->pre1[i].real = cos ((M_PI / 256) * (k - 0.25)); -+ state->pre1[i].imag = sin ((M_PI / 256) * (k - 0.25)); - } - - for (i = 64; i < 128; i++) { - k = fftorder[i] / 2 + 64; -- pre1[i].real = -cos ((M_PI / 256) * (k - 0.25)); -- pre1[i].imag = -sin ((M_PI / 256) * (k - 0.25)); -+ state->pre1[i].real = -cos ((M_PI / 256) * (k - 0.25)); -+ state->pre1[i].imag = -sin ((M_PI / 256) * (k - 0.25)); - } - - for (i = 0; i < 64; i++) { -- post1[i].real = cos ((M_PI / 256) * (i + 0.5)); -- post1[i].imag = sin ((M_PI / 256) * (i + 0.5)); -+ state->post1[i].real = cos ((M_PI / 256) * (i + 0.5)); -+ state->post1[i].imag = sin ((M_PI / 256) * (i + 0.5)); - } - - for (i = 0; i < 64; i++) { - k = fftorder[i] / 4; -- pre2[i].real = cos ((M_PI / 128) * (k - 0.25)); -- pre2[i].imag = sin ((M_PI / 128) * (k - 0.25)); -+ state->pre2[i].real = cos ((M_PI / 128) * (k - 0.25)); -+ state->pre2[i].imag = sin ((M_PI / 128) * (k - 0.25)); - } - - for (i = 0; i < 32; i++) { -- post2[i].real = cos ((M_PI / 128) * (i + 0.5)); -- post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); -+ state->post2[i].real = cos ((M_PI / 128) * (i + 0.5)); -+ state->post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); - } - - #ifdef LIBA52_DJBFFT -diff -Naur a52dec.old/liba52/parse.c a52dec.new/liba52/parse.c ---- a52dec.old/liba52/parse.c 2012-07-16 14:24:14.000000000 +0200 -+++ a52dec.new/liba52/parse.c 2012-07-16 14:33:00.000000000 +0200 -@@ -56,16 +56,53 @@ - a52_state_t * state; - int i; - -- state = malloc (sizeof (a52_state_t)); -+ state = calloc (1, sizeof (a52_state_t)); - if (state == NULL) - return NULL; - - state->samples = memalign (16, 256 * 12 * sizeof (sample_t)); - if (state->samples == NULL) { -- free (state); -- return NULL; -+ goto fail; - } - -+ /* Root values for IFFT */ -+ state->roots16 = memalign (16, 3 * sizeof (sample_t)); -+ if (state->roots16 == NULL) -+ goto fail; -+ -+ state->roots32 = memalign (16, 7 * sizeof (sample_t)); -+ if (state->roots32 == NULL) -+ goto fail; -+ -+ state->roots64 = memalign (16, 15 * sizeof (sample_t)); -+ if (state->roots64 == NULL) -+ goto fail; -+ -+ state->roots128 = memalign (16, 31 * sizeof (sample_t)); -+ if (state->roots128 == NULL) -+ goto fail; -+ -+ /* Twiddle factors for IMDCT */ -+ state->pre1 = memalign (16, 128 * sizeof (complex_t)); -+ if (state->pre1 == NULL) -+ goto fail; -+ -+ state->post1 = memalign (16, 64 * sizeof (complex_t)); -+ if (state->post1 == NULL) -+ goto fail; -+ -+ state->pre2 = memalign (16, 64 * sizeof (complex_t)); -+ if (state->pre2 == NULL) -+ goto fail; -+ -+ state->post2 = memalign (16, 32 * sizeof (complex_t)); -+ if (state->post2 == NULL) -+ goto fail; -+ -+ state->a52_imdct_window = memalign (16, 256 * sizeof (sample_t)); -+ if (state->a52_imdct_window == NULL) -+ goto fail; -+ - for (i = 0; i < 256 * 12; i++) - state->samples[i] = 0; - -@@ -73,9 +110,27 @@ - - state->lfsr_state = 1; - -- a52_imdct_init (mm_accel); -+ a52_imdct_init (state, mm_accel); - - return state; -+ -+fail: -+ if ( state ) -+ { -+ free (state->a52_imdct_window); -+ free (state->post2); -+ free (state->pre2); -+ free (state->post1); -+ free (state->pre1); -+ free (state->roots128); -+ free (state->roots64); -+ free (state->roots32); -+ free (state->roots16); -+ free (state->samples); -+ free (state); -+ } -+ return NULL; -+ - } - - sample_t * a52_samples (a52_state_t * state) -@@ -825,7 +880,7 @@ - state->dynrng, 0, 7); - for (i = 7; i < 256; i++) - (samples-256)[i] = 0; -- a52_imdct_512 (samples - 256, samples + 1536 - 256, state->bias); -+ a52_imdct_512 (state, samples - 256, samples + 1536 - 256, state->bias); - } else { - /* just skip the LFE coefficients */ - coeff_get (state, samples + 1280, &state->lfe_expbap, &quantizer, -@@ -854,10 +909,10 @@ - - if (coeff[i]) { - if (blksw[i]) -- a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, -+ a52_imdct_256 (state, samples + 256 * i, samples + 1536 + 256 * i, - bias); - else -- a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, -+ a52_imdct_512 (state, samples + 256 * i, samples + 1536 + 256 * i, - bias); - } else { - int j; -@@ -883,11 +938,11 @@ - - if (blksw[0]) - for (i = 0; i < nfchans; i++) -- a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, -+ a52_imdct_256 (state, samples + 256 * i, samples + 1536 + 256 * i, - state->bias); - else - for (i = 0; i < nfchans; i++) -- a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, -+ a52_imdct_512 (state, samples + 256 * i, samples + 1536 + 256 * i, - state->bias); - } - -@@ -896,6 +951,15 @@ - - void a52_free (a52_state_t * state) - { -+ free (state->a52_imdct_window); -+ free (state->post2); -+ free (state->pre2); -+ free (state->post1); -+ free (state->pre1); -+ free (state->roots128); -+ free (state->roots64); -+ free (state->roots32); -+ free (state->roots16); - free (state->samples); - free (state); - } diff --git a/contrib/a52dec/A02-imdct-shutup.patch b/contrib/a52dec/A02-imdct-shutup.patch index a22e5979e..e69de29bb 100644 --- a/contrib/a52dec/A02-imdct-shutup.patch +++ b/contrib/a52dec/A02-imdct-shutup.patch @@ -1,11 +0,0 @@ -diff -Naur a52dec_original/liba52/imdct.c a52dec_patched/liba52/imdct.c ---- a52dec.old/liba52/imdct.c 2002-07-28 03:52:07.000000000 +0200 -+++ a52dec.new/liba52/imdct.c 2011-07-15 20:29:09.000000000 +0200 -@@ -425,7 +425,6 @@ - } else - #endif - { -- fprintf (stderr, "No accelerated IMDCT transform found\n"); - ifft128 = ifft128_c; - ifft64 = ifft64_c; - } diff --git a/contrib/a52dec/A03-automake.patch b/contrib/a52dec/A03-automake.patch index 142091dc6..e69de29bb 100644 --- a/contrib/a52dec/A03-automake.patch +++ b/contrib/a52dec/A03-automake.patch @@ -1,12 +0,0 @@ -diff -Naur a52dec.orig/configure.in a52dec/configure.in ---- a52dec.orig/configure.in 2002-07-27 23:50:20.000000000 -0400 -+++ a52dec/configure.in 2013-01-28 21:06:27.000000000 -0500 -@@ -6,7 +6,7 @@ - AC_CONFIG_FILES([Makefile autotools/Makefile include/Makefile test/Makefile - doc/Makefile src/Makefile liba52/Makefile libao/Makefile vc++/Makefile]) - AM_INIT_AUTOMAKE([a52dec],[0.7.4]) --AM_CONFIG_HEADER(include/config.h) -+AC_CONFIG_HEADER(include/config.h) - AM_MAINTAINER_MODE - AC_CANONICAL_HOST - diff --git a/contrib/a52dec/A04-modern-gcc-cflags.patch b/contrib/a52dec/A04-modern-gcc-cflags.patch index b88c5275d..e69de29bb 100644 --- a/contrib/a52dec/A04-modern-gcc-cflags.patch +++ b/contrib/a52dec/A04-modern-gcc-cflags.patch @@ -1,19 +0,0 @@ ---- a52dec/configure.in.bak Thu Nov 28 00:00:22 2013 -+++ a52dec/configure.in Thu Nov 28 00:03:20 2013 -@@ -34,11 +34,11 @@ - case "$host" in - i?86-* | k?-*) - case "$host" in -- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; -- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; -- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; -- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; -- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; -+ i386-*) OPT_CFLAGS="$CFLAGS -mtune=i386";; -+ i486-*) OPT_CFLAGS="$CFLAGS -mtune=i486";; -+ i586-*) OPT_CFLAGS="$CFLAGS -mtune=pentium";; -+ i686-*) OPT_CFLAGS="$CFLAGS -mtune=pentiumpro";; -+ k6-*) OPT_CFLAGS="$CFLAGS -mtune=k6";; - esac - AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; - sparc-* | sparc64-*) diff --git a/contrib/a52dec/P00-darwin-configure-inline.patch b/contrib/a52dec/P00-darwin-configure-inline.patch index 4774ec4d3..e69de29bb 100644 --- a/contrib/a52dec/P00-darwin-configure-inline.patch +++ b/contrib/a52dec/P00-darwin-configure-inline.patch @@ -1,12 +0,0 @@ -diff --git a52dec/configure.in a52dec/configure.in -index 71fd92b..46e1d3d 100644 ---- a52dec/configure.in -+++ a52dec/configure.in -@@ -85,7 +85,6 @@ AC_CHECK_GENERATE_INTTYPES([include]) - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST --AC_C_ALWAYS_INLINE - AC_C_RESTRICT - AC_TYPE_SIZE_T - AC_C_BIGENDIAN diff --git a/contrib/a52dec/module.defs b/contrib/a52dec/module.defs index b185f8a61..e69de29bb 100644 --- a/contrib/a52dec/module.defs +++ b/contrib/a52dec/module.defs @@ -1,13 +0,0 @@ -$(eval $(call import.MODULE.defs,A52DEC,a52dec)) -$(eval $(call import.CONTRIB.defs,A52DEC)) - -A52DEC.FETCH.url = http://download.handbrake.fr/handbrake/contrib/a52dec-0.7.4.tar.gz -A52DEC.EXTRACT.tarbase = a52dec -A52DEC.INSTALL.strip = liba52.a - -A52DEC.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache; autoreconf -fiv; - -# this contrib will not build under MinGW with -std=gnu99 -ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system)) - A52DEC.GCC.args.c_std = -endif diff --git a/contrib/a52dec/module.rules b/contrib/a52dec/module.rules index cecab72f7..e69de29bb 100644 --- a/contrib/a52dec/module.rules +++ b/contrib/a52dec/module.rules @@ -1,2 +0,0 @@ -$(eval $(call import.MODULE.rules,A52DEC)) -$(eval $(call import.CONTRIB.rules,A52DEC)) diff --git a/gtk/configure.ac b/gtk/configure.ac index 46434f503..6c57e9851 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -175,7 +175,7 @@ fi GHB_TOOLS_CFLAGS=`$BUILD_PKG_CONFIG --cflags glib-2.0 gdk-pixbuf-2.0` GHB_TOOLS_LIBS=`$BUILD_PKG_CONFIG --libs glib-2.0 gdk-pixbuf-2.0` -HB_LIBS="-lhandbrake -la52 -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2" +HB_LIBS="-lhandbrake -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2" case $host in *-*-mingw*) diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 43270a5fe..cb938aa8f 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -381,23 +381,6 @@ HandBrake authors: Mark Krenek Van Jacobson -liba52 authors: - Aaron Holtzman - Michel Lespinasse - Gildas Bazin - Billy Biggs - Eduard Hasenleithner - HÃ¥kan Hjort - Charles M. Hannum - Chris Hodges - Michael Holzt - Angelos Keromytis - David I. Lehn - Don Mahurin - Jim Miller - Takefumi Sayo - Shoji Tokunaga - libavcodec authors: Fabrice Bellard Alex Beregszaszi diff --git a/libhb/bd.c b/libhb/bd.c index 2a6f1c2ee..9cd9d6ef1 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -420,7 +420,7 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) case BLURAY_STREAM_TYPE_AUDIO_TRUHD: // Add 2 audio tracks. One for TrueHD and one for AC-3 add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_AC3, - HB_ACODEC_AC3, 0); + HB_ACODEC_AC3, AV_CODEC_ID_AC3); add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_TRUEHD, HB_ACODEC_FFMPEG, AV_CODEC_ID_TRUEHD); break; @@ -448,7 +448,7 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) case BLURAY_STREAM_TYPE_AUDIO_AC3: add_audio(ii, title->list_audio, bdaudio, 0, - HB_ACODEC_AC3, 0); + HB_ACODEC_AC3, AV_CODEC_ID_AC3); break; case BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER: diff --git a/libhb/common.h b/libhb/common.h index 4c8dd2cc6..f709f7570 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -613,7 +613,7 @@ struct hb_job_s #define HB_ACODEC_FFFLAC24 0x00200000 #define HB_ACODEC_FDK_AAC 0x00400000 #define HB_ACODEC_FDK_HAAC 0x00800000 -#define HB_ACODEC_FF_MASK 0x00FF2000 +#define HB_ACODEC_FF_MASK 0x00FF2800 #define HB_ACODEC_PASS_FLAG 0x40000000 #define HB_ACODEC_PASS_MASK (HB_ACODEC_MP3 | HB_ACODEC_FFAAC | HB_ACODEC_DCA_HD | HB_ACODEC_AC3 | HB_ACODEC_DCA) #define HB_ACODEC_AUTO_PASS (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG) @@ -1085,8 +1085,6 @@ extern hb_work_object_t hb_encqsv; extern hb_work_object_t hb_encx264; extern hb_work_object_t hb_enctheora; extern hb_work_object_t hb_encx265; -extern hb_work_object_t hb_deca52; -extern hb_work_object_t hb_decdca; extern hb_work_object_t hb_decavcodeca; extern hb_work_object_t hb_decavcodecv; extern hb_work_object_t hb_declpcm; diff --git a/libhb/deca52.c b/libhb/deca52.c index 203c07e8a..e69de29bb 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -1,556 +0,0 @@ -/* deca52.c - - Copyright (c) 2003-2014 HandBrake Team - This file is part of the HandBrake source code - Homepage: <http://handbrake.fr/>. - It may be used under the terms of the GNU General Public License v2. - For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html - */ - -#include "hb.h" -#include "audio_remap.h" -#include "audio_resample.h" - -#include "a52dec/a52.h" -#include "libavutil/crc.h" - -struct hb_work_private_s -{ - hb_job_t * job; - - /* liba52 handle */ - a52_state_t * state; - - int flags; - int rate; - int bitrate; - int error; - int frames; // number of good frames decoded - int crc_errors; // number of frames with crc errors - int bytes_dropped; // total bytes dropped while resyncing - float level; - float dynamic_range_compression; - double next_expected_pts; - int64_t last_buf_pts; - hb_list_t *list; - const AVCRC *crc_table; - uint8_t frame[3840]; - uint8_t buf[6][6][256 * sizeof(float)]; // decoded frame (up to 6 channels, 6 blocks * 256 samples) - uint8_t *samples[6]; // pointers to the start of each plane (1 per channel) - - int use_mix_levels; - uint64_t channel_layout; - hb_audio_remap_t *remap; - hb_audio_resample_t *resample; -}; - -static int deca52Init( hb_work_object_t *, hb_job_t * ); -static int deca52Work( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** ); -static void deca52Close( hb_work_object_t * ); -static int deca52BSInfo( hb_work_object_t * , const hb_buffer_t *, - hb_work_info_t * ); - -hb_work_object_t hb_deca52 = -{ - WORK_DECA52, - "AC3 decoder", - deca52Init, - deca52Work, - deca52Close, - 0, - deca52BSInfo -}; - -/* Translate acmod and lfeon on AV_CH_LAYOUT */ -static const uint64_t acmod2layout[] = -{ - AV_CH_LAYOUT_STEREO, // A52_CHANNEL (0) - AV_CH_LAYOUT_MONO, // A52_MONO (1) - AV_CH_LAYOUT_STEREO, // A52_STEREO (2) - AV_CH_LAYOUT_SURROUND, // A52_3F (3) - AV_CH_LAYOUT_2_1, // A52_2F1R (4) - AV_CH_LAYOUT_4POINT0, // A52_3F1R (5) - AV_CH_LAYOUT_2_2, // A52_2F2R (6) - AV_CH_LAYOUT_5POINT0, // A52_3F2R (7) - AV_CH_LAYOUT_MONO, // A52_CHANNEL1 (8) - AV_CH_LAYOUT_MONO, // A52_CHANNEL2 (9) - AV_CH_LAYOUT_STEREO_DOWNMIX, // A52_DOLBY (10) - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_STEREO, // A52_CHANNEL_MASK (15) -}; - -static const uint64_t lfeon2layout[] = -{ - 0, - AV_CH_LOW_FREQUENCY, -}; - -/*********************************************************************** - * Local prototypes - **********************************************************************/ -static hb_buffer_t * Decode( hb_work_object_t * w ); - -/*********************************************************************** - * dynrng_call - *********************************************************************** - * Boosts soft audio -- taken from gbooker's work in A52Decoder, comment and all.. - * Two cases - * 1) The user requested a compression of 1 or less, return the typical power rule - * 2) The user requested a compression of more than 1 (decompression): - * If the stream's requested compression is less than 1.0 (loud sound), return the normal compression - * If the stream's requested compression is more than 1.0 (soft sound), use power rule (which will make - * it louder in this case). - * - **********************************************************************/ -static sample_t dynrng_call (sample_t c, void *data) -{ - float *level = (float *)data; - float levelToUse = (float)*level; - if(c > 1.0 || levelToUse <= 1.0) - { - return powf(c, levelToUse); - } - else - return c; -} - -/*********************************************************************** - * hb_work_deca52_init - *********************************************************************** - * Allocate the work object, initialize liba52 - **********************************************************************/ -static int deca52Init(hb_work_object_t *w, hb_job_t *job) -{ - hb_work_private_t *pv = calloc(1, sizeof(hb_work_private_t)); - hb_audio_t *audio = w->audio; - w->private_data = pv; - - pv->job = job; - pv->state = a52_init(0); - pv->list = hb_list_init(); - pv->crc_table = av_crc_get_table(AV_CRC_16_ANSI); - - /* - * Decoding, remapping, downmixing - */ - if (audio->config.out.codec != HB_ACODEC_AC3_PASS) - { - /* - * Output AV_SAMPLE_FMT_FLT samples - */ - pv->resample = - hb_audio_resample_init(AV_SAMPLE_FMT_FLT, - audio->config.out.mixdown, - audio->config.out.normalize_mix_level); - if (pv->resample == NULL) - { - hb_error("deca52Init: hb_audio_resample_init() failed"); - return 1; - } - - /* - * Decode to AV_SAMPLE_FMT_FLTP - */ - pv->level = 1.0; - pv->dynamic_range_compression = - audio->config.out.dynamic_range_compression; - hb_audio_resample_set_sample_fmt(pv->resample, AV_SAMPLE_FMT_FLTP); - - /* - * liba52 doesn't provide Lt/Rt mix levels, only Lo/Ro. - * - * When doing an Lt/Rt downmix, ignore mix levels - * (this matches what liba52's own downmix code does). - */ - pv->use_mix_levels = - !(audio->config.out.mixdown == HB_AMIXDOWN_DOLBY || - audio->config.out.mixdown == HB_AMIXDOWN_DOLBYPLII); - - /* - * Remap from liba52 to Libav channel order - */ - pv->remap = hb_audio_remap_init(AV_SAMPLE_FMT_FLTP, &hb_libav_chan_map, - &hb_liba52_chan_map); - if (pv->remap == NULL) - { - hb_error("deca52Init: hb_audio_remap_init() failed"); - return 1; - } - } - else - { - pv->remap = NULL; - pv->resample = NULL; - } - - return 0; -} - -/*********************************************************************** - * Close - *********************************************************************** - * Free memory - **********************************************************************/ -static void deca52Close(hb_work_object_t *w) -{ - hb_work_private_t *pv = w->private_data; - w->private_data = NULL; - - if (pv->crc_errors) - { - hb_log("deca52: %d frames decoded, %d crc errors, %d bytes dropped", - pv->frames, pv->crc_errors, pv->bytes_dropped); - } - - hb_audio_resample_free(pv->resample); - hb_audio_remap_free(pv->remap); - hb_list_empty(&pv->list); - a52_free(pv->state); - free(pv); -} - -/*********************************************************************** - * Work - *********************************************************************** - * Add the given buffer to the data we already have, and decode as much - * as we can - **********************************************************************/ -static int deca52Work( hb_work_object_t * w, hb_buffer_t ** buf_in, - hb_buffer_t ** buf_out ) -{ - hb_work_private_t * pv = w->private_data; - hb_buffer_t * buf; - - if ( (*buf_in)->size <= 0 ) - { - /* EOF on input stream - send it downstream & say that we're done */ - *buf_out = *buf_in; - *buf_in = NULL; - return HB_WORK_DONE; - } - - if ( (*buf_in)->s.start < 0 && pv->next_expected_pts == 0 ) - { - // discard buffers that start before video time 0 - *buf_out = NULL; - return HB_WORK_OK; - } - - hb_list_add( pv->list, *buf_in ); - *buf_in = NULL; - - /* If we got more than a frame, chain raw buffers */ - *buf_out = buf = Decode( w ); - while( buf ) - { - buf->next = Decode( w ); - buf = buf->next; - } - - return HB_WORK_OK; -} - -/*********************************************************************** - * Decode - *********************************************************************** - * - **********************************************************************/ -static hb_buffer_t* Decode(hb_work_object_t *w) -{ - hb_work_private_t *pv = w->private_data; - hb_audio_t *audio = w->audio; - hb_buffer_t *out; - int size = 0; - - // check that we're at the start of a valid frame and align to the - // start of a valid frame if we're not. - // we have to check the header & crc so we need at least - // 7 (the header size) + 128 (the minimum frame size) bytes - while( hb_list_bytes( pv->list ) >= 7+128 ) - { - /* check if this is a valid header */ - hb_list_seebytes( pv->list, pv->frame, 7 ); - size = a52_syncinfo(pv->frame, &pv->flags, &pv->rate, &pv->bitrate); - if ( size > 0 ) - { - // header looks valid - check the crc1 - if( size > hb_list_bytes( pv->list ) ) - { - // don't have all the frame's data yet - return NULL; - } - int crc1size = (size >> 1) + (size >> 3); - hb_list_seebytes( pv->list, pv->frame, crc1size ); - if ( av_crc( pv->crc_table, 0, pv->frame + 2, crc1size - 2 ) == 0 ) - { - // crc1 is ok - say we have valid frame sync - if( pv->error ) - { - hb_log( "output track %d: ac3 in sync after skipping %d bytes", - audio->config.out.track, pv->error ); - pv->bytes_dropped += pv->error; - pv->error = 0; - } - break; - } - } - // no sync - discard one byte then try again - hb_list_getbytes( pv->list, pv->frame, 1, NULL, NULL ); - ++pv->error; - } - - // we exit the above loop either in error state (we didn't find sync - // or don't have enough data yet to validate sync) or in sync. If we're - // not in sync we need more data so just return. - if( pv->error || size <= 0 || hb_list_bytes( pv->list ) < size ) - { - /* Need more data */ - return NULL; - } - - // Get the whole frame and check its CRC. If the CRC is wrong - // discard the frame - we'll resync on the next call. - - uint64_t ipts; - hb_list_getbytes( pv->list, pv->frame, size, &ipts, NULL ); - if ( av_crc( pv->crc_table, 0, pv->frame + 2, size - 2 ) != 0 ) - { - ++pv->crc_errors; - return NULL; - } - ++pv->frames; - if ( ipts != pv->last_buf_pts ) - { - pv->last_buf_pts = ipts; - } - else - { - // spec says that the PTS is the start time of the first frame - // that starts in the PES frame so we only use the PTS once then - // get the following frames' PTS from the frame length. - ipts = AV_NOPTS_VALUE; - } - - double frame_dur = (6. * 256. * 90000.) / pv->rate; - double pts; - if (hb_gui_use_hwd_flag == 1 && ipts != AV_NOPTS_VALUE) - pts = ((double)ipts >= pv->next_expected_pts) ? (double)ipts : pv->next_expected_pts; - else - pts = (ipts != AV_NOPTS_VALUE) ? (double)ipts : pv->next_expected_pts; - - /* AC3 passthrough: don't decode the AC3 frame */ - if (audio->config.out.codec == HB_ACODEC_AC3_PASS) - { - out = hb_buffer_init(size); - memcpy(out->data, pv->frame, size); - } - else - { - int i, j; - float *block_samples; - - /* - * Feed liba52 - */ - a52_frame(pv->state, pv->frame, &pv->flags, &pv->level, 0); - - /* - * If the user requested strong DRC (>1), adjust it. - * If the user requested default DRC (1), leave it alone. - * If the user requested no DRC (0), call a null function. - * - * a52_frame() resets the callback so it must be called for each frame. - */ - if (pv->dynamic_range_compression > 1.0) - { - a52_dynrng(pv->state, dynrng_call, &pv->dynamic_range_compression); - } - else if (!pv->dynamic_range_compression) - { - a52_dynrng(pv->state, NULL, NULL); - } - - /* - * Update input channel layout, prepare remapping and downmixing - */ - uint64_t new_layout = (acmod2layout[(pv->flags & A52_CHANNEL_MASK)] | - lfeon2layout[(pv->flags & A52_LFE) != 0]); - - if (new_layout != pv->channel_layout) - { - pv->channel_layout = new_layout; - hb_audio_remap_set_channel_layout(pv->remap, - pv->channel_layout); - hb_audio_resample_set_channel_layout(pv->resample, - pv->channel_layout); - } - if (pv->use_mix_levels) - { - hb_audio_resample_set_mix_levels(pv->resample, - (double)pv->state->slev, - (double)pv->state->clev, - HB_MIXLEV_ZERO); - } - if (hb_audio_resample_update(pv->resample)) - { - hb_log("deca52: hb_audio_resample_update() failed"); - return NULL; - } - - /* - * decode all blocks before downmixing - */ - for (i = 0; i < 6; i++) - { - a52_block(pv->state); - block_samples = (float*)a52_samples(pv->state); - - /* - * reset pv->samples (may have been modified by hb_audio_remap) - * - * copy samples to our internal buffer - */ - for (j = 0; - j < av_get_channel_layout_nb_channels(pv->channel_layout); j++) - { - pv->samples[j] = (uint8_t*)pv->buf[j]; - memcpy(pv->buf[j][i], block_samples, 256 * sizeof(float)); - block_samples += 256; - } - } - - hb_audio_remap(pv->remap, pv->samples, 1536); - out = hb_audio_resample(pv->resample, pv->samples, 1536); - } - - if (out != NULL) - { - out->s.start = pts; - out->s.duration = frame_dur; - pts += frame_dur; - out->s.stop = pts; - pv->next_expected_pts = pts; - } - return out; -} - -static int find_sync( const uint8_t *buf, int len ) -{ - int i; - - // since AC3 frames don't line up with MPEG ES frames scan the - // frame for an AC3 sync pattern. - for ( i = 0; i < len - 16; ++i ) - { - int rate, bitrate, flags; - int size = a52_syncinfo( (uint8_t *)buf + i, &flags, &rate, &bitrate ); - if( size > 0 ) - { - // we have a plausible sync header - see if crc1 checks - int crc1size = (size >> 1) + (size >> 3); - if ( i + crc1size > len ) - { - // don't have enough data to check crc1 - break; - } - if ( av_crc( av_crc_get_table( AV_CRC_16_ANSI ), 0, - buf + i + 2, crc1size - 2 ) == 0 ) - { - // crc checks - we've got sync - return i; - } - } - } - return -1; -} - -static int deca52BSInfo( hb_work_object_t *w, const hb_buffer_t *b, - hb_work_info_t *info ) -{ - memset( info, 0, sizeof(*info) ); - - // We don't know if the way that AC3 frames are fragmented into whatever - // packetization the container uses will give us enough bytes per fragment - // to check the CRC (we need at least 5/8 of the the frame). So we - // copy the fragment we got into an accumulation buffer in the audio object - // then look for sync over all the frags we've accumulated so far. - uint8_t *buf = w->audio->priv.config.a52.buf; - int len = w->audio->priv.config.a52.len, blen = b->size; - if ( len + blen > sizeof(w->audio->priv.config.a52.buf) ) - { - // we don't have enough empty space in the accumulation buffer to - // hold the new frag - make room for it by discarding the oldest data. - if ( blen >= sizeof(w->audio->priv.config.a52.buf) ) - { - // the frag is bigger than our accumulation buffer - copy all - // that will fit (the excess doesn't matter since the buffer - // is many times the size of a max length ac3 frame). - blen = sizeof(w->audio->priv.config.a52.buf); - len = 0; - } - else - { - // discard enough bytes from the front of the buffer to make - // room for the new stuff - int newlen = sizeof(w->audio->priv.config.a52.buf) - blen; - memmove( buf, buf + len - newlen, newlen ); - len = newlen; - } - } - // add the new frag to the buffer - memcpy( buf+len, b->data, blen ); - len += blen; - - int i; - if ( ( i = find_sync( buf, len ) ) < 0 ) - { - // didn't find sync - wait for more data - w->audio->priv.config.a52.len = len; - return 0; - } - - // got sync - extract and canoncalize the bitstream parameters - int rate = 0, bitrate = 0, flags = 0; - uint8_t raw = buf[i + 5]; - a52_syncinfo( buf + i, &flags, &rate, &bitrate ); - - if ( rate == 0 || bitrate == 0 ) - { - // invalid AC-3 parameters - toss what we have so we'll start over - // with the next buf otherwise we'll keep syncing on this junk. - w->audio->priv.config.a52.len = 0; - return 0; - } - - // bsid | bsmod | acmod | cmixlv | surmixlv | dsurmod | lfeon | dialnorm | compre - // 5 3 3 2 2 2 1 5 1 - // byte1 | byte2 | byte3 - - info->name = "AC-3"; - info->rate = rate; - info->rate_base = 1; - info->bitrate = bitrate; - info->flags = flags; - info->version = raw >> 3; /* bsid is the first 5 bits */ - info->mode = raw & 0x7; /* bsmod is the following 3 bits */ - info->samples_per_frame = 1536; - - if ((flags & A52_CHANNEL_MASK) == A52_DOLBY) - { - info->matrix_encoding = AV_MATRIX_ENCODING_DOLBY; - } - else - { - info->matrix_encoding = AV_MATRIX_ENCODING_NONE; - } - info->channel_layout = (acmod2layout[(flags & A52_CHANNEL_MASK)] | - lfeon2layout[(flags & A52_LFE) != 0]); - - // we remap to Libav order in Decode() - info->channel_map = &hb_libav_chan_map; - - return 1; -} diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 52a80f9dd..1a3132eb6 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -18,7 +18,7 @@ has different decoder calling conventions for audio & video. These work objects are self-contained & follow all of HB's conventions for a decoder module. They can be used like - any other HB decoder (deca52, decmpeg2, etc.). + any other HB decoder These decoders handle 2 kinds of input. Streams that are demuxed by HandBrake and streams that are demuxed by libavformat. In the @@ -753,6 +753,18 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, info->channel_layout = frame->channel_layout; } } + if (context->codec_id == AV_CODEC_ID_AC3 || + context->codec_id == AV_CODEC_ID_EAC3) + { + if (context->audio_service_type == AV_AUDIO_SERVICE_TYPE_KARAOKE) + { + info->mode = 7; + } + else + { + info->mode = context->audio_service_type; + } + } ret = 1; break; diff --git a/libhb/dvd.c b/libhb/dvd.c index c1b42d213..7fb3830fb 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -360,6 +360,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur case 0x00: audio->id = ( ( 0x80 + position ) << 8 ) | 0xbd; audio->config.in.codec = HB_ACODEC_AC3; + audio->config.in.codec_param = AV_CODEC_ID_AC3; codec_name = "AC3"; break; diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 9965318ec..888289b60 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -528,6 +528,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura case 0x00: audio->id = ( ( 0x80 + position ) << 8 ) | 0xbd; audio->config.in.codec = HB_ACODEC_AC3; + audio->config.in.codec_param = AV_CODEC_ID_AC3; codec_name = "AC3"; break; diff --git a/libhb/hb.c b/libhb/hb.c index 23cd70ff9..b6a939e3a 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -1634,7 +1634,6 @@ int hb_global_init() hb_register(&hb_reader); hb_register(&hb_sync_video); hb_register(&hb_sync_audio); - hb_register(&hb_deca52); hb_register(&hb_decavcodecv); hb_register(&hb_decavcodeca); hb_register(&hb_declpcm); diff --git a/libhb/internal.h b/libhb/internal.h index 168624179..a551333aa 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -386,23 +386,6 @@ union hb_esconfig_u uint8_t headers[3][HB_CONFIG_MAX_SIZE]; char *language; } vorbis; - - struct - { - /* ac3flags stores the flags from the AC3 source, as found in scan.c */ - int ac3flags; - // next two items are used by the bsinfo routine to accumulate small - // frames until we have enough to validate the crc. - int len; // space currently used in 'buf' - uint8_t buf[HB_CONFIG_MAX_SIZE-sizeof(int)]; - } a52; - - struct - { - /* dcaflags stores the flags from the DCA source, as found in scan.c */ - int dcaflags; - } dca; - }; enum @@ -423,7 +406,6 @@ enum WORK_ENCX264, WORK_ENCX265, WORK_ENCTHEORA, - WORK_DECA52, WORK_DECAVCODEC, WORK_DECAVCODECV, WORK_DECLPCM, diff --git a/libhb/module.defs b/libhb/module.defs index 80a74102e..6cefac706 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -121,7 +121,7 @@ LIBHB.dll = $(LIBHB.build/)hb.dll LIBHB.lib = $(LIBHB.build/)hb.lib LIBHB.dll.libs = $(foreach n, \ - a52 ass avcodec avformat avutil avresample dvdnav dvdread \ + ass avcodec avformat avutil avresample dvdnav dvdread \ fontconfig freetype mp3lame \ ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \ $(CONTRIB.build/)lib/lib$(n).a ) diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index bab0e414f..dfb4ed58a 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -12,7 +12,6 @@ #if defined(USE_MP4V2) #include "mp4v2/mp4v2.h" -#include "a52dec/a52.h" struct hb_mux_object_s { @@ -316,8 +315,42 @@ static int MP4Init( hb_mux_object_t * m ) if ( audio->config.out.codec & HB_ACODEC_PASS_FLAG ) { bsmod = audio->config.in.mode; - acmod = audio->config.in.flags & 0x7; - lfeon = !!(audio->config.in.flags & A52_LFE); + switch (audio->config.in.channel_layout & ~AV_CH_LOW_FREQUENCY) + { + case AV_CH_LAYOUT_MONO: + acmod = 1; + break; + + case AV_CH_LAYOUT_STEREO: + acmod = 2; + break; + + case AV_CH_LAYOUT_SURROUND: + acmod = 3; + break; + + case AV_CH_LAYOUT_2_1: + acmod = 4; + break; + + case AV_CH_LAYOUT_4POINT0: + acmod = 5; + break; + + case AV_CH_LAYOUT_2_2: + acmod = 6; + break; + + case AV_CH_LAYOUT_5POINT0: + acmod = 7; + break; + + default: + hb_error("MP4Init: bad mixdown"); + acmod = 2; + break; + } + lfeon = !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY); bitrate = audio->config.in.bitrate; mux_data->sample_rate = audio->config.in.samplerate; mux_data->samples_per_frame = audio->config.in.samples_per_frame; diff --git a/libhb/scan.c b/libhb/scan.c index 84ac35b0e..3ae8e9ac9 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -10,7 +10,6 @@ #include "hb.h" #include "opencl.h" #include "hbffmpeg.h" -#include "a52dec/a52.h" typedef struct { diff --git a/libhb/stream.c b/libhb/stream.c index aaec4c613..43f155fd4 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -14,7 +14,6 @@ #include "hb.h" #include "hbffmpeg.h" #include "lang.h" -#include "a52dec/a52.h" #include "libbluray/bluray.h" #include "vadxva2.h" @@ -73,7 +72,7 @@ static const stream2codec_t st2codec[256] = { st(0x1b, V, WORK_DECAVCODECV, AV_CODEC_ID_H264, "H.264"), st(0x80, U, HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY, "Digicipher II Video"), - st(0x81, A, HB_ACODEC_AC3, 0, "AC3"), + st(0x81, A, HB_ACODEC_AC3, AV_CODEC_ID_AC3, "AC3"), st(0x82, A, HB_ACODEC_DCA, AV_CODEC_ID_DTS, "DTS"), // 0x83 can be LPCM or BD TrueHD. Set to 'unknown' till we know more. st(0x83, U, HB_ACODEC_LPCM, 0, "LPCM"), @@ -4130,6 +4129,7 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) update_ts_streams( stream, pid, HB_SUBSTREAM_BD_AC3, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_AC3; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_AC3; update_ts_streams( stream, pid, HB_SUBSTREAM_BD_TRUEHD, stype, A, &pes_idx ); @@ -5010,7 +5010,6 @@ static void add_ffmpeg_audio(hb_title_t *title, hb_stream_t *stream, int id) case AV_CODEC_ID_AC3: audio->config.in.codec = HB_ACODEC_AC3; - audio->config.in.codec_param = 0; break; case AV_CODEC_ID_DTS: diff --git a/libhb/work.c b/libhb/work.c index afec2701a..2192f593b 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -8,7 +8,6 @@ */ #include "hb.h" -#include "a52dec/a52.h" #include "libavformat/avformat.h" #include "openclwrapper.h" #include "opencl.h" @@ -125,7 +124,6 @@ hb_work_object_t* hb_codec_decoder(int codec) } switch (codec) { - case HB_ACODEC_AC3: return hb_get_work(WORK_DECA52); case HB_ACODEC_LPCM: return hb_get_work(WORK_DECLPCM); default: break; } diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 4c1987b33..7c80f16bd 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -76,8 +76,6 @@ 273F21C214ADE7BC0021BE6D /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F20C014ADC1250021BE6D /* Sparkle.framework */; }; 27D6C72514B1019100B785E4 /* libhandbrake.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72414B1019100B785E4 /* libhandbrake.a */; }; 27D6C72614B1019100B785E4 /* libhandbrake.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72414B1019100B785E4 /* libhandbrake.a */; }; - 27D6C74114B102DA00B785E4 /* liba52.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72714B102DA00B785E4 /* liba52.a */; }; - 27D6C74214B102DA00B785E4 /* liba52.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72714B102DA00B785E4 /* liba52.a */; }; 27D6C74314B102DA00B785E4 /* libass.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72814B102DA00B785E4 /* libass.a */; }; 27D6C74414B102DA00B785E4 /* libass.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72814B102DA00B785E4 /* libass.a */; }; 27D6C74514B102DA00B785E4 /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27D6C72914B102DA00B785E4 /* libavcodec.a */; }; @@ -288,7 +286,6 @@ 277EFE9117ED7749001D4A6A /* libfaac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfaac.a; path = external/contrib/lib/libfaac.a; sourceTree = BUILT_PRODUCTS_DIR; }; 277EFE9217ED799E001D4A6A /* libfdk-aac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfdk-aac.a"; path = "../../../../Users/mike/Library/Developer/Xcode/DerivedData/HandBrake-anpxrfhxsejsxehiwuiaexjoygra/Build/Products/debug/external/contrib/lib/libfdk-aac.a"; sourceTree = "<group>"; }; 27D6C72414B1019100B785E4 /* libhandbrake.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libhandbrake.a; path = external/libhb/libhandbrake.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 27D6C72714B102DA00B785E4 /* liba52.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liba52.a; path = external/contrib/lib/liba52.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27D6C72814B102DA00B785E4 /* libass.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libass.a; path = external/contrib/lib/libass.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27D6C72914B102DA00B785E4 /* libavcodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavcodec.a; path = external/contrib/lib/libavcodec.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27D6C72A14B102DA00B785E4 /* libavformat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavformat.a; path = external/contrib/lib/libavformat.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -359,7 +356,6 @@ 273F202814ADB8BE0021BE6D /* libbz2.dylib in Frameworks */, 273F202614ADB8A40021BE6D /* libz.dylib in Frameworks */, 27D6C72614B1019100B785E4 /* libhandbrake.a in Frameworks */, - 27D6C74214B102DA00B785E4 /* liba52.a in Frameworks */, 27D6C74414B102DA00B785E4 /* libass.a in Frameworks */, 27D6C74614B102DA00B785E4 /* libavcodec.a in Frameworks */, 27D6C74814B102DA00B785E4 /* libavformat.a in Frameworks */, @@ -398,7 +394,6 @@ 273F20C414ADC4B60021BE6D /* libbz2.dylib in Frameworks */, 273F20C514ADC4BD0021BE6D /* libz.dylib in Frameworks */, 27D6C72514B1019100B785E4 /* libhandbrake.a in Frameworks */, - 27D6C74114B102DA00B785E4 /* liba52.a in Frameworks */, 27D6C74314B102DA00B785E4 /* libass.a in Frameworks */, 27D6C74514B102DA00B785E4 /* libavcodec.a in Frameworks */, 27D6C74714B102DA00B785E4 /* libavformat.a in Frameworks */, @@ -429,7 +424,6 @@ isa = PBXGroup; children = ( 27D6C72414B1019100B785E4 /* libhandbrake.a */, - 27D6C72714B102DA00B785E4 /* liba52.a */, 27D6C72814B102DA00B785E4 /* libass.a */, 27D6C72914B102DA00B785E4 /* libavcodec.a */, 27D6C72A14B102DA00B785E4 /* libavformat.a */, diff --git a/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj b/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj index 6c69d63cc..03cb21682 100644 --- a/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj +++ b/macosx/InstantHandBrake/InstantHandBrake.xcodeproj/project.pbxproj @@ -385,7 +385,6 @@ OTHER_LDFLAGS = ( ../libhb/libhb.a, ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, ../contrib/lib/libavformat.a, ../contrib/lib/libavcodec.a, ../contrib/lib/libavutil.a, diff --git a/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj b/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj index 6d1f7ff43..e6801c237 100644 --- a/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj +++ b/macosx/InstantHandBrake/libhb.xcodeproj/project.pbxproj @@ -10,7 +10,6 @@ A9DB39100D37EA0300F77345 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38E70D37EA0300F77345 /* common.c */; }; A9DB39110D37EA0300F77345 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = A9DB38E80D37EA0300F77345 /* common.h */; }; A9DB39120D37EA0300F77345 /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38E90D37EA0300F77345 /* deblock.c */; }; - A9DB39130D37EA0300F77345 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EA0D37EA0300F77345 /* deca52.c */; }; A9DB39140D37EA0300F77345 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EB0D37EA0300F77345 /* decavcodec.c */; }; A9DB39150D37EA0300F77345 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38EC0D37EA0300F77345 /* decdca.c */; }; A9DB39160D37EA0300F77345 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB38ED0D37EA0300F77345 /* declpcm.c */; }; @@ -47,7 +46,6 @@ A9DB39360D37EA0300F77345 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390D0D37EA0300F77345 /* sync.c */; }; A9DB39370D37EA0300F77345 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390E0D37EA0300F77345 /* update.c */; }; A9DB39380D37EA0300F77345 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = A9DB390F0D37EA0300F77345 /* work.c */; }; - A9DB39B20D37EB4700F77345 /* liba52.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399D0D37EB4700F77345 /* liba52.a */; }; A9DB39B30D37EB4700F77345 /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399E0D37EB4700F77345 /* libavcodec.a */; }; A9DB39B40D37EB4700F77345 /* libavformat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB399F0D37EB4700F77345 /* libavformat.a */; }; A9DB39B50D37EB4700F77345 /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DB39A00D37EB4700F77345 /* libavutil.a */; }; @@ -79,7 +77,6 @@ A9DB38E70D37EA0300F77345 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../../libhb/common.c; sourceTree = SOURCE_ROOT; }; A9DB38E80D37EA0300F77345 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../../libhb/common.h; sourceTree = SOURCE_ROOT; }; A9DB38E90D37EA0300F77345 /* deblock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deblock.c; path = ../../libhb/deblock.c; sourceTree = SOURCE_ROOT; }; - A9DB38EA0D37EA0300F77345 /* deca52.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deca52.c; path = ../../libhb/deca52.c; sourceTree = SOURCE_ROOT; }; A9DB38EB0D37EA0300F77345 /* decavcodec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decavcodec.c; path = ../../libhb/decavcodec.c; sourceTree = SOURCE_ROOT; }; A9DB38EC0D37EA0300F77345 /* decdca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decdca.c; path = ../../libhb/decdca.c; sourceTree = SOURCE_ROOT; }; A9DB38ED0D37EA0300F77345 /* declpcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = declpcm.c; path = ../../libhb/declpcm.c; sourceTree = SOURCE_ROOT; }; @@ -116,7 +113,6 @@ A9DB390D0D37EA0300F77345 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync.c; path = ../../libhb/sync.c; sourceTree = SOURCE_ROOT; }; A9DB390E0D37EA0300F77345 /* update.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = update.c; path = ../../libhb/update.c; sourceTree = SOURCE_ROOT; }; A9DB390F0D37EA0300F77345 /* work.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = work.c; path = ../../libhb/work.c; sourceTree = SOURCE_ROOT; }; - A9DB399D0D37EB4700F77345 /* liba52.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liba52.a; path = ../../contrib/lib/liba52.a; sourceTree = SOURCE_ROOT; }; A9DB399E0D37EB4700F77345 /* libavcodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavcodec.a; path = ../../contrib/lib/libavcodec.a; sourceTree = SOURCE_ROOT; }; A9DB399F0D37EB4700F77345 /* libavformat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavformat.a; path = ../../contrib/lib/libavformat.a; sourceTree = SOURCE_ROOT; }; A9DB39A00D37EB4700F77345 /* libavutil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavutil.a; path = ../../contrib/lib/libavutil.a; sourceTree = SOURCE_ROOT; }; @@ -143,7 +139,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A9DB39B20D37EB4700F77345 /* liba52.a in Frameworks */, A9DB39B30D37EB4700F77345 /* libavcodec.a in Frameworks */, A9DB39B40D37EB4700F77345 /* libavformat.a in Frameworks */, A9DB39B50D37EB4700F77345 /* libavutil.a in Frameworks */, @@ -183,7 +178,6 @@ A9DB38E70D37EA0300F77345 /* common.c */, A9DB38E80D37EA0300F77345 /* common.h */, A9DB38E90D37EA0300F77345 /* deblock.c */, - A9DB38EA0D37EA0300F77345 /* deca52.c */, A9DB38EB0D37EA0300F77345 /* decavcodec.c */, A9DB38EC0D37EA0300F77345 /* decdca.c */, A9DB38ED0D37EA0300F77345 /* declpcm.c */, @@ -229,7 +223,6 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - A9DB399D0D37EB4700F77345 /* liba52.a */, A9DB399E0D37EB4700F77345 /* libavcodec.a */, A9DB399F0D37EB4700F77345 /* libavformat.a */, A9DB39A00D37EB4700F77345 /* libavutil.a */, @@ -317,7 +310,6 @@ files = ( A9DB39100D37EA0300F77345 /* common.c in Sources */, A9DB39120D37EA0300F77345 /* deblock.c in Sources */, - A9DB39130D37EA0300F77345 /* deca52.c in Sources */, A9DB39140D37EA0300F77345 /* decavcodec.c in Sources */, A9DB39150D37EA0300F77345 /* decdca.c in Sources */, A9DB39160D37EA0300F77345 /* declpcm.c in Sources */, diff --git a/make/include/main.defs b/make/include/main.defs index 93d99fc15..c3dcfd8f6 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -23,8 +23,6 @@ else AUTOTOOL_MODULES = endif -MODULES += contrib/a52dec - ifneq (,$(filter $(BUILD.system),cygwin mingw)) ifneq ($(HAS.bz2),1) MODULES += contrib/bzip2 diff --git a/test/module.defs b/test/module.defs index bac482b6d..09b61b1ae 100644 --- a/test/module.defs +++ b/test/module.defs @@ -14,7 +14,7 @@ TEST.GCC.L = $(CONTRIB.build/)lib TEST.libs = $(LIBHB.a) TEST.GCC.l = \ - a52 ass avcodec avformat avutil avresample dvdnav dvdread \ + ass avcodec avformat avutil avresample dvdnav dvdread \ fontconfig fribidi mp3lame ogg \ samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \ bluray freetype xml2 bz2 z |