# ChangeLog for media-video/transcode
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/transcode/ChangeLog,v 1.70 2004/08/09 02:41:16 pkdawson Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/transcode/ChangeLog,v 1.71 2004/09/30 01:07:00 morfic Exp $
+
+*transcode-0.6.12-r2 (29 Sep 2004)
+
+ 29 Sep 2004; Daniel Goller <morfic@gentoo.org>
+ +files/transcode-0.6.12-r2-dvdmenu.patch,
+ +files/transcode-0.6.12-r2-gcc34.patch, +transcode-0.6.12-r2.ebuild:
+ ebuild cleanup + fixes for bug #43907, bug #57513, bug #56535
+ Special thanks to autovoicer Bret Towe
08 Aug 2004; Patrick Dawson <pkdawson@gentoo.org> transcode-0.6.11.ebuild:
Added another gcc-3.4 fix. Closes bug #54046.
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 f9eec7a52a7ed77258780fe2864a6a68 transcode-0.6.11.ebuild 3824
+MD5 a4cf0b67ac117bcf19379edf8b49311e transcode-0.6.12-r2.ebuild 4291
MD5 d1c7003902b194931e4fcf7994105fb5 transcode-0.6.10.ebuild 3758
MD5 e7a071e38ddb21bcdc312d95cb540485 transcode-0.6.12-r1.ebuild 3653
+MD5 9fa6c73142167474cba955dae7bac18c .ChangeLog.swp 16384
MD5 01c1de259f9be1df3ec8d7b595547419 transcode-0.6.12.ebuild 2907
-MD5 bfcfb81deb6ca4792aea1938f3781e27 ChangeLog 13293
+MD5 a24d9320135e6b6b11b245537f7ecf86 ChangeLog 13597
MD5 7300a7b361fa9f48e37722c6952bd432 metadata.xml 158
MD5 b2561dbf66455c878a08afd19868dc5d files/transcode-0.6.12-gcc-3.4.patch 2503
MD5 ef79fbe94405505c11c537e07b25c669 files/digest-transcode-0.6.10 69
MD5 bc1cb5a39d56ce5216c803c74e73545d files/digest-transcode-0.6.11 69
MD5 8fde4803c96e026f6caa94fa0e42687f files/digest-transcode-0.6.12 69
MD5 3b957eef288ce095a2ff0a256aec7c93 files/transcode-0.6.11-no-mmx.patch 1491
+MD5 90f42fff1c2a0b4be8df0b015ac2b309 files/transcode-0.6.12-r2-gcc34.patch 2963
+MD5 085f514d559cd32a401241bbbf639d39 files/transcode-0.6.12-r2-dvdmenu.patch 4840
MD5 8fde4803c96e026f6caa94fa0e42687f files/digest-transcode-0.6.12-r1 69
+MD5 8fde4803c96e026f6caa94fa0e42687f files/digest-transcode-0.6.12-r2 69
MD5 2cb7b1a00a0529a8256fc0104b5f2a09 files/transcode-gcc34.patch 460
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.5 (GNU/Linux)
-
-iD8DBQFBFuRNE67gNkjlZFIRAu+mAJ0YVB+CImnV6Q99wNcbGNI0p7dw8wCeJzMN
-iCu6zgfIZBP8CmQ0Dz2xcA4=
-=PLEv
------END PGP SIGNATURE-----
--- /dev/null
+MD5 550214ed9f85224423ca8c7308ed96ce transcode-0.6.12.tar.gz 3454807
--- /dev/null
+--- transcode-0.6.12/bbmpeg/mplex.h.old 2004-09-22 17:26:14.722188082 -0700
++++ transcode-0.6.12/bbmpeg/mplex.h 2004-09-22 17:26:48.601657790 -0700
+@@ -364,7 +364,9 @@
+ unsigned int write_seq_end,
+ unsigned int write_seq_hdr,
+ unsigned int sh_length,
+- unsigned char *seq_hdr);
++ unsigned char *seq_hdr,
++ unsigned int nsyncwords,
++ unsigned int firstsync);
+
+ void create_sys_header ( /* erstellt einen System Header */
+ Sys_header_struc *sys_header,
+--- transcode-0.6.12/bbmpeg/tcmplex/multplex.c.old 2004-09-22 17:27:04.443007097 -0700
++++ transcode-0.6.12/bbmpeg/tcmplex/multplex.c 2004-09-22 17:32:41.781855873 -0700
+@@ -1787,7 +1787,7 @@
+ istream_v, VIDEO_STR_0, 0, 1, video_buffer_size/1024,
+ video_PSTD, &PTSsave, &DTSsave, timestamps, which_streams, 0, i,
+ do_broken_link, (start_new_file || stop_output) && write_end_codes,
+- do_sequence_header, sh_length, seq_hdr))
++ do_sequence_header, sh_length, seq_hdr, 0, 0))
+ return FALSE;
+
+
+@@ -1899,6 +1899,7 @@
+ Timecode_struc PTSsave;
+ int eos, tcfound;
+ char tmpStr[100];
++ unsigned int nsyncwords, firstsync; /* firstsync is 1-based */
+
+ if (marker_pack)
+ {
+@@ -1938,6 +1939,8 @@
+
+ tcfound = 0;
+ eos = 0;
++ nsyncwords = 0;
++ firstsync = 0;
+ /* Let's generate packet */
+
+ /* does a audio frame start in this packet? */
+@@ -1945,6 +1948,8 @@
+ /* CASE: packet starts with new access unit */
+ if (*audio_frame_start)
+ {
++ nsyncwords++;
++ firstsync = 1;
+ timestamps = (mplex_type > MPEG_VCD) ? MPEG2_TIMESTAMPS_PTS : MPEG1_TIMESTAMPS_PTS;
+ PTSsave = audio_au->PTS;
+ tcfound = 1;
+@@ -1979,6 +1984,9 @@
+ *audio_counter = *audio_counter + 1;
+ if ((!restart_output && !stop_output) || (get_timecode(&audio_au->PTS) < start_video_PTS))
+ {
++ nsyncwords++;
++ if (!firstsync)
++ firstsync = temp + 1;
+ add_to_timecode(SCR_delay, &audio_au->PTS);
+ if (temp + audio_au->length > packet_data_size)
+ {
+@@ -2023,7 +2031,8 @@
+ if (!create_sector(§or, pack_ptr, sys_header_ptr,
+ packet_data_size, temp,
+ istream_a, aid, audio_subid, abuffer_scale, abuffer_size,
+- audio_PSTD, &PTSsave, NULL, timestamps, which_streams, k, 0, 0, 0, 0, 0, NULL))
++ audio_PSTD, &PTSsave, NULL, timestamps, which_streams, k, 0, 0, 0, 0, 0, NULL,
++ nsyncwords, firstsync))
+ return FALSE;
+
+ *audio_frame_start = FALSE;
+@@ -2186,7 +2195,7 @@
+ i, i,
+ NULL, PADDING_STR, 0, 0, 0,
+ FALSE, NULL, NULL,
+- TIMESTAMPS_NO, j, k, 0, 0, 0, 0, 0, NULL);
++ TIMESTAMPS_NO, j, k, 0, 0, 0, 0, 0, NULL, 0, 0);
+
+ if (output_on)
+ {
+--- transcode-0.6.12/bbmpeg/tcmplex/systems.c.old 2004-09-22 17:32:58.548108803 -0700
++++ transcode-0.6.12/bbmpeg/tcmplex/systems.c 2004-09-22 17:35:56.562559425 -0700
+@@ -32,10 +32,12 @@
+ unsigned int write_seq_end,
+ unsigned int write_seq_hdr,
+ unsigned int sh_length,
+-unsigned char *seq_hdr)
++unsigned char *seq_hdr,
++unsigned int nsyncwords,
++unsigned int firstsync)
+ {
+- int i, j, data_bytes, numFound, syncFound, firstOffset, pad_size;
+- unsigned char *index, *tmpPtr=NULL;
++ int i, j, data_bytes, pad_size;
++ unsigned char *index;
+ unsigned int data_size, stuff_size, k;
+ unsigned int l;
+
+@@ -329,41 +331,14 @@
+ if (type == PRIVATE_STREAM1)
+ {
+ *(index++) = subtype;
+- tmpPtr = index; // remember for AC3 data
+- *(index++) = 0; // num of AC3 syncwords in packet
+- *(index++) = 0; // hi offset of first AC3 syncword
+- *(index++) = 0; // lo offset of first AC3 syncword (starting at 1)
++ *(index++) = nsyncwords; // num of AC3 syncwords in packet
++ *(index++) = firstsync >> 8; // hi offset of first AC3 syncword
++ // (starting at 1)
++ *(index++) = firstsync & 0xFF; // lo offset of first AC3 syncword
+ data_bytes -= 4;
+ }
+
+ memcpy(index, data_buffer, data_bytes);
+- if (type == PRIVATE_STREAM1)
+- {
+- numFound = 0;
+- syncFound = 0;
+- firstOffset = 0;
+- for (j = 0; j < data_bytes; j++)
+- {
+- switch (syncFound)
+- {
+- case 0:
+- if (index[j] == 0x0b)
+- syncFound = 1;
+- break;
+- case 1:
+- if (index[j] == 0x77)
+- {
+- numFound++;
+- if (numFound == 1)
+- firstOffset = j;
+- }
+- syncFound = 0;
+- }
+- }
+- tmpPtr[0] = (unsigned char) numFound;
+- tmpPtr[1] = (unsigned char) (firstOffset >> 8);
+- tmpPtr[2] = (unsigned char) (firstOffset & 0xff);
+- }
+ index += data_bytes;
+
+ if (type == PRIVATE_STREAM1)
--- /dev/null
+diff -ur transcode-0.6.12.orig/ffmpeg/libavcodec/i386/dsputil_mmx.c transcode-0.6.12/ffmpeg/libavcodec/i386/dsputil_mmx.c
+--- transcode-0.6.12.orig/ffmpeg/libavcodec/i386/dsputil_mmx.c 2003-12-30 10:02:10.000000000 +0000
++++ transcode-0.6.12/ffmpeg/libavcodec/i386/dsputil_mmx.c 2004-05-21 19:47:12.808592624 +0000
+@@ -31,8 +31,8 @@
+ static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
+ static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL;
+
+-static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL;
+-static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) = 0x0003000300030003ULL;
++static const uint64_t ff_pw_20 __attribute__ ((aligned(8), used)) = 0x0014001400140014ULL;
++static const uint64_t ff_pw_3 __attribute__ ((aligned(8), used)) = 0x0003000300030003ULL;
+ static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL;
+ static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL;
+
+diff -ur transcode-0.6.12.orig/ffmpeg/libavcodec/i386/motion_est_mmx.c transcode-0.6.12/ffmpeg/libavcodec/i386/motion_est_mmx.c
+--- transcode-0.6.12.orig/ffmpeg/libavcodec/i386/motion_est_mmx.c 2003-12-30 10:02:10.000000000 +0000
++++ transcode-0.6.12/ffmpeg/libavcodec/i386/motion_est_mmx.c 2004-05-21 19:44:37.969131800 +0000
+@@ -26,7 +26,7 @@
+ 0x0002000200020002ULL,
+ };
+
+-static __attribute__ ((aligned(8), unused)) uint64_t bone= 0x0101010101010101LL;
++static __attribute__ ((aligned(8), used)) uint64_t bone= 0x0101010101010101LL;
+
+ static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
+ {
+diff -ur transcode-0.6.12.orig/ffmpeg/libavcodec/i386/simple_idct_mmx.c transcode-0.6.12/ffmpeg/libavcodec/i386/simple_idct_mmx.c
+--- transcode-0.6.12.orig/ffmpeg/libavcodec/i386/simple_idct_mmx.c 2003-12-20 11:49:12.000000000 +0000
++++ transcode-0.6.12/ffmpeg/libavcodec/i386/simple_idct_mmx.c 2004-05-21 19:48:06.594415936 +0000
+@@ -45,8 +45,8 @@
+ #define ROW_SHIFT 11
+ #define COL_SHIFT 20 // 6
+
+-static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
+-static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
++static const uint64_t __attribute__((aligned(8), used)) wm1010= 0xFFFF0000FFFF0000ULL;
++static const uint64_t __attribute__((aligned(8), used)) d40000= 0x0000000000040000ULL;
+
+ static const int16_t __attribute__((aligned(8))) coeffs[]= {
+ 1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0,
+diff -ur transcode-0.6.12.orig/filter/subtitler/frame_list.c transcode-0.6.12/filter/subtitler/frame_list.c
+--- transcode-0.6.12.orig/filter/subtitler/frame_list.c 2004-01-05 07:12:55.000000000 -0600
++++ transcode-0.6.12/filter/subtitler/frame_list.c 2004-04-24 23:48:19.275043224 -0500
+@@ -33,7 +33,7 @@
+
+ char *strsave(char *s) /*save char array s somewhere*/
+ {
+-char *p, *malloc();
++char *p;
+ if(p = malloc( strlen(s) + 1) ) strcpy(p, s);
+ return(p);
+ }
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/transcode/transcode-0.6.12-r2.ebuild,v 1.1 2004/09/30 01:07:00 morfic Exp $
+
+inherit libtool flag-o-matic gcc
+
+# dont strip binarys causes missing symbol problems
+# with pvm compiles
+RESTRICT="nostrip"
+
+MY_P="${P/_pre/.}"
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="video stream processing tool"
+HOMEPAGE="http://zebra.fh-weingarten.de/~transcode/"
+SRC_URI="http://www.zebra.fh-weingarten.de/~transcode/pre/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc -sparc -amd64"
+IUSE="sdl static mpeg mmx sse 3dnow encode X quicktime avi altivec oggvorbis theora pvm"
+
+DEPEND=">=media-libs/a52dec-0.7.4
+ =sys-devel/gcc-3*
+ >=media-libs/libdv-0.99
+ x86? ( >=dev-lang/nasm-0.98.36 )
+ >=media-libs/libdvdread-0.9.0
+ >=media-video/ffmpeg-0.4.8.20040322-r1
+ >=media-libs/xvid-0.9.1
+ >=media-video/mjpegtools-1.6.2-r3
+ >=dev-libs/lzo-1.08
+ >=media-libs/libfame-0.9.1
+ >=media-gfx/imagemagick-5.5.6.0
+ media-libs/netpbm
+ media-libs/libexif
+ X? ( virtual/x11 )
+ avi? ( >=media-video/avifile-0.7.38.20030710
+ x86? ( >=media-libs/divx4linux-20030428 ) )
+ mpeg? ( media-libs/libmpeg3 )
+ encode? ( >=media-sound/lame-3.93 )
+ sdl? ( media-libs/libsdl )
+ quicktime? ( virtual/quicktime )
+ oggvorbis? ( media-libs/libvorbis
+ media-libs/libogg )
+ theora? ( media-libs/libtheora )
+ pvm? ( >=sys-cluster/pvm-3.4 )"
+
+RDEPEND="${DEPEND}
+ app-text/gocr"
+
+src_unpack() {
+
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${PF}-dvdmenu.patch
+
+ [ "$(gcc-version)" == "3.4" ]; epatch ${FILESDIR}/${PF}-gcc34.patch
+
+ if has_version '>=media-libs/netpbm-9.13'; then
+ sed -i 's:-lppm:-lnetpbm:' \
+ contrib/subrip/Makefile || die
+ fi
+
+ # workaround for including avifile haders, which are expected
+ # in an directory named "avifile"
+ if use avi; then
+ avi_inc=$(avifile-config --cflags | sed -e "s|^-I||")
+ if [ -d "$avi_inc" ] && [ "$(basename "$avi_inc")" != "avifile" ]
+ then
+ ln -s "$avi_inc" avifile
+ fi
+ fi
+
+}
+
+src_compile() {
+ local myconf="--disable-dependency-tracking --with-dvdread"
+
+ # Don't build with -mfpmath=sse (Bug #14920)
+ filter-mfpmath sse
+ filter-flags -maltivec -mabi=altivec -fforce-addr -momit-leaf-frame-pointer
+
+ # doesnt work correctly/fully
+ if use static; then
+ myconf="${myconf} --enable-static --disable-shared"
+ fi
+
+ # BREG error with -fPIC
+ # see bug #48699
+ # ---
+ # really ? no on amd64, and we need -fPIC.
+ # Danny van Dyk <kugelfang@gentoo.org> 2004/05/25
+ use !amd64 && filter-flags -fPIC
+
+ # fix invalid paths in .la files of plugins
+ elibtoolize
+
+ if use quicktime; then
+ # determine which quicktime lib is used and set correct
+ # configure options
+ if has_version 'media-libs/openquicktime'; then
+ myconf="${myconf} --with-openqt --without-qt"
+ else
+ myconf="${myconf} --without-openqt --with-qt"
+ fi
+ fi
+
+ use pvm \
+ && myconf="${myconf} --with-pvm3 \
+ --with-pvm3-lib=/usr/local/pvm3/lib/LINUX \
+ --with-pvm3-include=/usr/local/pvm3/include"
+
+ # Use the MPlayer libpostproc if present
+ [ -f ${ROOT}/usr/lib/libpostproc.a ] && \
+ [ -f ${ROOT}/usr/include/postproc/postprocess.h ] && \
+ myconf="${myconf} --with-libpostproc-builddir=${ROOT}/usr/lib"
+
+ append-flags -DDCT_YUV_PRECISION=1
+
+ econf \
+ $(use_enable sse) \
+ $(use_enable mmx) \
+ $(use_enable 3dnow) \
+ $(use_enable altivec) \
+ $(use_with avi avifile-mods) \
+ $(use_enable avi avifile6) \
+ $(use_enable encode lame) \
+ $(use_enable mpeg libmpeg3) \
+ $(use_with oggvorbis ogg) \
+ $(use_with oggvorbis vorbis) \
+ $(use_with theora) \
+ $(use_enable X x) \
+ ${myconf} \
+ || die
+
+ einfo "if this fails with broken kde libs, try reemerge avifile"
+ # mmx and amd64 is a nono so dont confuse the users
+ use !amd64 \
+ && einfo "also add mmx to your USE flags if you cpu supports it"
+
+ emake || die
+
+ # subrip stuff
+ cd contrib/subrip
+ emake || die
+
+ if use pvm; then
+ sed -i -e "s:\${exec_prefix}/bin/pvmgs:\$(DESTDIR)/\${exec_prefix}/bin/pvmgs:" ${S}/pvm3/Makefile || die
+ fi
+}
+
+src_install () {
+ make DESTDIR=${D} install || die
+
+ dodoc AUTHORS ChangeLog README TODO
+
+ # subrip stuff
+ dobin contrib/subrip/{pgm2txt,srttool,subtitle2pgm,subtitle2vobsub} || die
+
+ #TODO mv to pkg_* (needed?)
+ #einfo "This ebuild uses subtitles !!!"
+}