From owner-freebsd-multimedia Fri Apr 12 14:46:16 2002 Delivered-To: freebsd-multimedia@freebsd.org Received: from heaven.gigo.com (gigo.com [207.173.11.186]) by hub.freebsd.org (Postfix) with ESMTP id B327D37B416 for ; Fri, 12 Apr 2002 14:46:04 -0700 (PDT) Received: from bsace7003-193-224-021.dsl.telebrasilia.net.br (unknown [200.193.224.21]) by heaven.gigo.com (Postfix) with ESMTP id 33E9BB718 for ; Fri, 12 Apr 2002 14:45:57 -0700 (PDT) Received: (qmail 8903 invoked by uid 1001); 12 Apr 2002 21:39:46 -0000 Message-ID: <20020412213946.8902.qmail@exxodus.fedaykin.here> Date: Fri, 12 Apr 2002 18:39:24 -0300 From: Mario Sergio Fujikawa Ferreira To: freebsd-multimedia@FreeBSD.org Cc: nobutaka@freebsd.org Subject: Updating liba52 ac3 to 0.7.3 (Xine and Ogle DVD) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Operating-System: FreeBSD 4.5-STABLE X-Disclaimer: I hope you find what you are looking for... in life :) Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --+g7M9IMkV8truYOl Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I am holding off an update to liba52 to version 0.7.3 since it breaks libxine 0.9.8 Ogle had the same problem but I got an update from the developers. I made a similiar patch... could you verify that the following works? I have just been able to play an AC3 DVD. Or, it seems... :) Let me know if this works. If it does, I will simultaneously commit the liba52 update and patches to ogle and libxine within a week. Sooner if I get word from maintainer of xine. Bear in mind that these work for me but might work for you so beware of any possible problems in your system. If you do not like unstable installations... do not try this. :) Thanks for everyone that tries this. You have to play AC3 sound from DVD players to make sure this works. Only try DVDs you are sure were working before the update so as to avoid false negatives. - update your liba52 port $ cd /usr/ports $ patch < patch-audio:liba52 - update your ogle port $ cd /usr/ports $ patch -N < patch-graphics:ogle - update your libxine port $ ports /usr/ports/graphics $ patch < /tmp/patch-libxine Regards, --=20 Mario S F Ferreira - DF - Brazil - "I guess this is a signature." Computer Science Undergraduate | FreeBSD Committer | CS Developer flames to beloved devnull@someotherworldbeloworabove.org feature, n: a documented bug | bug, n: an undocumented feature --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-audio:liba52 Content-Transfer-Encoding: quoted-printable diff -ruN /usr/ports/audio/liba52/Makefile /usr/home/lioux/src/myports/audi= o/liba52/Makefile --- /usr/ports/audio/liba52/Makefile Sun Jan 20 17:08:12 2002 +++ /usr/home/lioux/src/myports/audio/liba52/Makefile Thu Apr 4 17:24:32 2= 002 @@ -6,7 +6,7 @@ # =20 PORTNAME=3D liba52 -PORTVERSION=3D 0.7.2 +PORTVERSION=3D 0.7.3 CATEGORIES=3D audio MASTER_SITES=3D http://liba52.sourceforge.net/files/ DISTNAME=3D a52dec-${PORTVERSION:S/.b/b/} diff -ruN /usr/ports/audio/liba52/distinfo /usr/home/lioux/src/myports/audi= o/liba52/distinfo --- /usr/ports/audio/liba52/distinfo Sun Jan 20 17:08:12 2002 +++ /usr/home/lioux/src/myports/audio/liba52/distinfo Thu Apr 4 17:24:32 2= 002 @@ -1 +1 @@ -MD5 (a52dec-0.7.2.tar.gz) =3D 8897222b9fc98b6dd276e1e662d9b5d2 +MD5 (a52dec-0.7.3.tar.gz) =3D cd4254b39fc1bde7b1037afea58f7a8b --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-graphics:ogle Content-Transfer-Encoding: quoted-printable diff -ruN /usr/ports/graphics/ogle/Makefile /usr/home/lioux/src/myports/gra= phics/ogle/Makefile --- /usr/ports/graphics/ogle/Makefile Thu Mar 28 19:16:59 2002 +++ /usr/home/lioux/src/myports/graphics/ogle/Makefile Thu Apr 4 20:05:44 = 2002 @@ -7,6 +7,7 @@ =20 PORTNAME=3D ogle PORTVERSION=3D 0.8.2 +PORTREVISION=3D 1 CATEGORIES=3D graphics MASTER_SITES=3D http://www.dtek.chalmers.se/groups/dvd/dist/ =20 diff -ruN /usr/ports/graphics/ogle/files/patch-ac3:a52_decoder.c /usr/home/= lioux/src/myports/graphics/ogle/files/patch-ac3:a52_decoder.c --- /usr/ports/graphics/ogle/files/patch-ac3:a52_decoder.c Wed Dec 31 21:00= :00 1969 +++ /usr/home/lioux/src/myports/graphics/ogle/files/patch-ac3:a52_decoder.c= Fri Apr 12 18:26:34 2002 @@ -0,0 +1,63 @@ +--- ac3/a52_decoder.c.orig Sun Dec 2 19:37:37 2001 ++++ ac3/a52_decoder.c Fri Apr 12 18:25:07 2002 +@@ -46,6 +46,7 @@ +=20 + /* A/52 */ + static ao_instance_t * output =3D NULL; ++static a52_state_t *state; + static sample_t * samples; + static int disable_dynrng =3D 0; + static clocktime_t a52_decode_data(uint8_t *start, uint8_t *end); +@@ -216,15 +217,20 @@ +=20 + { + uint32_t accel; +- accel =3D MM_ACCEL_MLIB; ++ accel =3D MM_ACCEL_DJBFFT; +=20 + open_output(get_speaker_flags()); +=20 +- samples =3D a52_init(accel); +- if(samples =3D=3D NULL) { ++ state =3D a52_init(accel); ++ if(state =3D=3D NULL) { + FATAL("A/52 init failed\n"); + exit(1); + } ++ samples =3D a52_samples(state); ++ if(samples =3D=3D NULL) { ++ FATAL("A/52 samples failed\n"); ++ exit(1); ++ } + } +=20 + if(msgqid !=3D -1) { +@@ -675,7 +681,6 @@ + } +=20 + static clocktime_t a52_decode_data(uint8_t *start, uint8_t *end) { +- static a52_state_t state; + =20 + static uint8_t buf[3840]; + static uint8_t *bufptr =3D buf; +@@ -736,17 +741,16 @@ + =09 + flags =3D speaker_flags; + flags |=3D A52_ADJUST_LEVEL; +- memset(&state, 0, sizeof(a52_state_t)); + /* flags (speaker) [in/out] level [in/out] bias [in] */ +- if(a52_frame(&state, buf, &flags, &level, bias)) { ++ if(a52_frame(state, buf, &flags, &level, bias)) { + DNOTE("a52_frame() error\n"); + goto error; + } +=20 + if(disable_dynrng) +- a52_dynrng(&state, NULL, NULL); ++ a52_dynrng(state, NULL, NULL); + for(i =3D 0; i < 6; i++) { +- if(a52_block(&state, samples)) { ++ if(a52_block(state)) { + DNOTE("a52_block() error\n"); + goto error; + } --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-libxine Content-Transfer-Encoding: quoted-printable diff -ruN /usr/ports/graphics/libxine/files/patch-src:liba52:xine_decoder.c= libxine/files/patch-src:liba52:xine_decoder.c --- /usr/ports/graphics/libxine/files/patch-src:liba52:xine_decoder.c Fri O= ct 26 14:57:38 2001 +++ libxine/files/patch-src:liba52:xine_decoder.c Fri Apr 12 18:33:15 2002 @@ -1,6 +1,6 @@ ---- src/liba52/xine_decoder.c.orig Fri Oct 19 17:55:03 2001 -+++ src/liba52/xine_decoder.c Fri Oct 19 17:55:31 2001 -@@ -31,8 +31,8 @@ +--- src/liba52/xine_decoder.c.orig Sat Jan 5 21:43:16 2002 ++++ src/liba52/xine_decoder.c Fri Apr 5 17:52:50 2002 +@@ -36,8 +36,8 @@ #include =20 #include "audio_out.h" @@ -10,4 +10,54 @@ +#include #include "buffer.h" #include "xine_internal.h" - #include "cpu_accel.h" + #include "xineutils.h" +@@ -59,7 +59,7 @@ + int frame_length, frame_todo; + uint16_t syncword; +=20 +- a52_state_t a52_state; ++ a52_state_t *a52_state; + int a52_flags; + int a52_bit_rate; + int a52_sample_rate; +@@ -158,8 +158,11 @@ + this->pts =3D 0; + this->last_pts =3D 0; +=20 +- if( !this->samples ) +- this->samples =3D a52_init (xine_mm_accel()); ++ this->a52_state =3D a52_init (xine_mm_accel()); ++ ++ if( (this->a52_state) !=3D NULL ) ++ if( !this->samples ) ++ this->samples =3D a52_samples (this->a52_state); +=20 + /* + * find out if this driver supports a52 output +@@ -288,7 +291,7 @@ + =20 + a52_output_flags =3D this->a52_flags_map[this->a52_flags & A52_CHANNE= L_MASK]; + =20 +- if (a52_frame (&this->a52_state,=20 ++ if (a52_frame (this->a52_state,=20 + this->frame_buffer,=20 + &a52_output_flags, + &level, 384)) { +@@ -297,7 +300,7 @@ + } + =20 + if (this->disable_dynrng) +- a52_dynrng (&this->a52_state, NULL, NULL); ++ a52_dynrng (this->a52_state, NULL, NULL); +=20 + this->have_lfe =3D a52_output_flags & A52_LFE; + if (this->have_lfe) +@@ -337,7 +340,7 @@ + int_samples =3D buf->mem; +=20 + for (i =3D 0; i < 6; i++) { +- if (a52_block (&this->a52_state, this->samples)) { ++ if (a52_block (this->a52_state)) { + printf ("liba52: a52_block error\n"); + return;=20 + } --pf9I7BMVVzbSWLtt-- --+g7M9IMkV8truYOl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8t1QhXvSymrg2XlURAjIkAKCE7YIpxeMO9e5dRhFmxJqkgexe6wCffasR Hy2VRb0qhae8Ae7C8P4A4O0= =DI3I -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message