Reimport into new category (ok jolan@, xsa@, robert@).

Update to 0.6.14; from new maintainer Jacob Meuser <jakemsr@jakemsr.com>.

Notable changes:
- new import module for bktr(4) devices, import_bktr
- new import module for audio(4) devices, import_sunau
- export profiles
- better error checking
- uses YV12/I420 colorspace by default instead of RGB
- uses external ffmpeg/libavcodec
- optimized memcpy on i386
- many small bugs fixed
This commit is contained in:
naddy 2005-01-25 21:58:59 +00:00
parent d7e7a8fa4e
commit 672bff840b
22 changed files with 932 additions and 0 deletions

View File

@ -0,0 +1,106 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
COMMENT= "video stream processing tools"
DISTNAME= transcode-0.6.14
CATEGORIES= multimedia
HOMEPAGE= http://www.transcoding.org/
MAINTAINER= Jacob Meuser <jakemsr@jakemsr.com>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= ICE SM X11 Xaw Xext Xpm Xt Xv c freetype \
m pthread stdc++ usbhid z
MASTER_SITES= http://www.jakemsr.com/transcode/ \
http://dl.fkb.wormulon.net/transcode/
FLAVORS= lzo mjpegtools quicktime
FLAVOR?=
BUILD_DEPENDS+= ::devel/pkgconfig
.if ${MACHINE_ARCH} == "i386"
BUILD_DEPENDS+= ::devel/nasm
PKG_ARGS+= -Di386=1
.else
PKG_ARGS+= -Di386=0
.endif
LIB_DEPENDS= SDL.2::devel/sdl \
a52.0::audio/liba52 \
avcodec.4.9::graphics/ffmpeg \
dv.4::multimedia/libdv \
dvdread.3::devel/libdvdread \
iconv.4::converters/libiconv \
jpeg.62::graphics/jpeg \
mp3lame.0::audio/lame \
ogg.5::audio/libogg \
vorbis.3,vorbisfile.4::audio/libvorbis \
xml2.8::textproc/libxml
RUN_DEPENDS= ::graphics/ffmpeg \
::audio/sox \
::audio/vorbis-tools \
::audio/toolame \
::multimedia/xvidcore \
::x11/mplayer
SEPARATE_BUILD= concurrent
SHARED_ONLY= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-a52 \
--enable-a52-default-decoder \
--enable-bktr \
--enable-libdv \
--enable-libxml2 \
--enable-ogg \
--enable-sdl \
--enable-sunau \
--enable-vorbis \
--enable-ffbin \
--disable-3dnow \
--disable-sse \
--disable-sse2 \
--disable-cmov \
--disable-altivec
.if ${FLAVOR:L:Mlzo}
CONFIGURE_ARGS+= --enable-lzo
LIB_DEPENDS+= lzo.1::archivers/lzo
PKG_ARGS+= -Dlzo=1
.else
PKG_ARGS+= -Dlzo=0
.endif
.if ${FLAVOR:L:Mmjpegtools}
CONFIGURE_ARGS+= --enable-mjpegtools
BUILD_DEPENDS+= ::multimedia/mjpegtools
RUN_DEPENDS+= ::multimedia/mjpegtools
PKG_ARGS+= -Dmjpegtools=1
.else
PKG_ARGS+= -Dmjpegtools=0
.endif
.if ${FLAVOR:L:Mquicktime}
CONFIGURE_ARGS+= --enable-libquicktime
LIB_DEPENDS+= quicktime.0::multimedia/libquicktime
WANTLIB+= png
PKG_ARGS+= -Dquicktime=1
.else
PKG_ARGS+= -Dquicktime=0
.endif
NO_REGRESS= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
MD5 (transcode-0.6.14.tar.gz) = 9bfef83b7e0fe2c27d25d871fef75a92
RMD160 (transcode-0.6.14.tar.gz) = 936997bf737360fda39ad9c9bdc60b136ea08a34
SHA1 (transcode-0.6.14.tar.gz) = 52f071e380285eebe52248b3adeb3a0fc7f45030
SIZE (transcode-0.6.14.tar.gz) = 2614579

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-aclib_tcmemcpy_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- aclib/tcmemcpy.c.orig Sat Jan 8 19:24:53 2005
+++ aclib/tcmemcpy.c Sat Jan 8 19:47:38 2005
@@ -6,11 +6,12 @@ void * (*tc_memcpy)(void *, const void *
void tc_memcpy_init(int verbose, int mmflags)
{
- int accel = mmflags == -1 ? ac_mmflag() : mmflags;
const char * method = "libc";
/* these functions are nasm assembly */
#ifdef HAVE_ASM_NASM
+ int accel = mmflags == -1 ? ac_mmflag() : mmflags;
+
if((accel & MM_MMXEXT) || (accel & MM_SSE))
{
method = "mmxext";

View File

@ -0,0 +1,66 @@
$OpenBSD: patch-avilib_avilib_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- avilib/avilib.c.orig Tue Nov 2 19:45:45 2004
+++ avilib/avilib.c Thu Jan 6 12:19:11 2005
@@ -289,6 +289,7 @@ static int avi_init_super_index(avi_t *A
AVI_errno = AVI_ERR_NO_MEM;
return -1;
}
+ memset(sil, 0, sizeof (avisuperindex_chunk));
memcpy (sil->fcc, "indx", 4);
sil->dwSize = 0; // size of this chunk
sil->wLongsPerEntry = 4;
@@ -313,6 +314,7 @@ static int avi_init_super_index(avi_t *A
}
for (k = 0; k < NR_IXNN_CHUNKS; k++) {
sil->stdindex[k] = malloc (sizeof (avistdindex_chunk));
+ memset(sil->stdindex[k], 0, sizeof (avistdindex_chunk));
// gets rewritten later
sil->stdindex[k]->qwBaseOffset = (uint64_t)k * NEW_RIFF_THRES;
}
@@ -1888,7 +1890,7 @@ int AVI_get_comment_fd(avi_t *AVI)
int AVI_close(avi_t *AVI)
{
int ret;
- int j;
+ int j,k;
/* If the file was open for writing, the header and index still have
to be written */
@@ -1907,6 +1909,15 @@ int AVI_close(avi_t *AVI)
if(AVI->idx) free(AVI->idx);
if(AVI->video_index) free(AVI->video_index);
if(AVI->video_superindex) {
+ for (j = 0; j < NR_IXNN_CHUNKS; j++) {
+ if (AVI->video_superindex->stdindex[j]) {
+ if (AVI->video_superindex->stdindex[j]->aIndex) {
+ free(AVI->video_superindex->stdindex[j]->aIndex);
+ }
+ free(AVI->video_superindex->stdindex[j]);
+ }
+ }
+ if(AVI->video_superindex->stdindex) free(AVI->video_superindex->stdindex);
if(AVI->video_superindex->aIndex) free(AVI->video_superindex->aIndex);
free(AVI->video_superindex);
}
@@ -1915,8 +1926,19 @@ int AVI_close(avi_t *AVI)
{
if(AVI->track[j].audio_index) free(AVI->track[j].audio_index);
if(AVI->track[j].audio_superindex) {
- if(AVI->track[j].audio_superindex->aIndex) free(AVI->track[j].audio_superindex->aIndex);
- free(AVI->track[j].audio_superindex);
+ // shortcut
+ avisuperindex_chunk *a = AVI->track[j].audio_superindex;
+ for (k = 0; k < NR_IXNN_CHUNKS; k++) {
+ if (a->stdindex[k]) {
+ if (a->stdindex[k]->aIndex) {
+ free(a->stdindex[k]->aIndex);
+ }
+ free(a->stdindex[k]);
+ }
+ }
+ if(a->stdindex) free(a->stdindex);
+ if(a->aIndex) free(a->aIndex);
+ free(a);
}
}

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-configure,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- configure.orig Wed Nov 17 19:54:16 2004
+++ configure Thu Dec 30 18:12:18 2004
@@ -37422,7 +37422,7 @@ if test "${ac_cv_lib_mjpegutils_y4m_si_g
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmjpegutils $MJPEGTOOLS_EXTRA_LIBS $LIBS"
+LIBS="-lmjpegutils_pic $MJPEGTOOLS_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -37481,7 +37481,7 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_lib_mjpegutils_y4m_si_get_height" >&5
echo "${ECHO_T}$ac_cv_lib_mjpegutils_y4m_si_get_height" >&6
if test $ac_cv_lib_mjpegutils_y4m_si_get_height = yes; then
- MJPEGTOOLS_LIBS="$mjpegtools_ll -lmjpegutils $MJPEGTOOLS_EXTRA_LIBS"
+ MJPEGTOOLS_LIBS="$mjpegtools_ll -lmjpegutils_pic $MJPEGTOOLS_EXTRA_LIBS"
else
{ { echo "$as_me:$LINENO: error: mjpegtools requested, but cannot link against libmjpegutils" >&5
echo "$as_me: error: mjpegtools requested, but cannot link against libmjpegutils" >&2;}
@@ -37496,7 +37496,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
ac_compiler_gnu=$ac_cv_c_compiler_gnu
else
- MJPEGTOOLS_LIBS="$mjpegtools_ll -lmjpegutils $MJPEGTOOLS_EXTRA_LIBS",
+ MJPEGTOOLS_LIBS="$mjpegtools_ll -lmjpegutils_pic $MJPEGTOOLS_EXTRA_LIBS",
fi
# got here without error so all is well

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-filter_filter_smartyuv_c,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
--- filter/filter_smartyuv.c.orig Sat Jan 8 20:06:42 2005
+++ filter/filter_smartyuv.c Sat Jan 8 20:13:21 2005
@@ -220,7 +220,9 @@ static void Erode_Dilate (uint8_t *_movi
int sum, x, y;
uint8_t *m, *fmoving, *moving, *p;
int w4 = width+PAD;
+#ifdef HAVE_MMX
int can_use_mmx = !(width%4);
+#endif
// Erode.
fmoving = _fmoving;
@@ -406,8 +408,12 @@ static void smartyuv_core (char *_src, c
unsigned char fiMotion;
int cubic = mfd->cubic;
static int counter=0;
+#ifdef HAVE_MMX
const int can_use_mmx = !(w%8); // width must a multiple of 8
- // const int can_use_altivec = !(w%16); // width must a multiple of 16
+#endif
+#ifdef CAN_COMPILE_C_ALTIVEC
+ const int can_use_altivec = !(w%16); // width must a multiple of 16
+#endif
char * dst_buf;

View File

@ -0,0 +1,72 @@
$OpenBSD: patch-filter_filter_unsharp_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- filter/filter_unsharp.c.orig Tue Nov 2 19:45:58 2004
+++ filter/filter_unsharp.c Fri Dec 31 01:13:17 2004
@@ -60,6 +60,7 @@ typedef struct FilterParam {
int msizeX, msizeY;
double amount;
uint32_t *SC[MAX_MATRIX_SIZE-1];
+ uint32_t *SC_unaligned[MAX_MATRIX_SIZE-1];
} FilterParam;
typedef struct vf_priv_s {
@@ -78,8 +79,18 @@ static void *bufalloc(size_t size)
long buffer_align=16;
#endif
- char *buf = malloc(size + buffer_align);
+ return malloc(size + buffer_align);
+}
+static void *bufalign(char *buf)
+{
+
+#ifdef HAVE_GETPAGESIZE
+ long buffer_align=getpagesize();
+#else
+ long buffer_align=16;
+#endif
+
long adjust;
if (buf == NULL) {
@@ -311,7 +322,10 @@ int tc_filter(vframe_list_t *ptr, char *
stepsX = fp->msizeX/2;
stepsY = fp->msizeY/2;
for( z=0; z<2*stepsY; z++ )
- fp->SC[z] = bufalloc(sizeof(*(fp->SC[z])) * (width+2*stepsX) );
+ {
+ fp->SC_unaligned[z] = bufalloc(sizeof(*(fp->SC[z])) * (width+2*stepsX) );
+ fp->SC[z] = bufalign((char *)(fp->SC_unaligned[z]));
+ }
fp = &mfd->chromaParam;
effect = fp->amount == 0 ? "don't touch" : fp->amount < 0 ? "blur" : "sharpen";
@@ -320,7 +334,10 @@ int tc_filter(vframe_list_t *ptr, char *
stepsX = fp->msizeX/2;
stepsY = fp->msizeY/2;
for( z=0; z<2*stepsY; z++ )
- fp->SC[z] = bufalloc( sizeof(*(fp->SC[z])) * (width+2*stepsX) );
+ {
+ fp->SC_unaligned[z] = bufalloc( sizeof(*(fp->SC[z])) * (width+2*stepsX) );
+ fp->SC[z] = bufalign((char *)(fp->SC_unaligned[z]));
+ }
if(verbose) printf("[%s] %s %s\n", MOD_NAME, MOD_VERSION, MOD_CAP);
@@ -336,12 +353,14 @@ int tc_filter(vframe_list_t *ptr, char *
fp = &mfd->lumaParam;
for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
- if( fp->SC[z] ) free( fp->SC[z] );
+ if( fp->SC_unaligned[z] ) free( fp->SC_unaligned[z] );
+ fp->SC_unaligned[z] = NULL;
fp->SC[z] = NULL;
}
fp = &mfd->chromaParam;
for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
- if( fp->SC[z] ) free( fp->SC[z] );
+ if( fp->SC_unaligned[z] ) free( fp->SC_unaligned[z] );
+ fp->SC_unaligned[z] = NULL;
fp->SC[z] = NULL;
}

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-filter_subtitler_Makefile_in,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- filter/subtitler/Makefile.in.orig Thu Dec 30 23:14:59 2004
+++ filter/subtitler/Makefile.in Thu Dec 30 23:15:41 2004
@@ -395,6 +395,7 @@ x_includes = @x_includes@
x_libraries = @x_libraries@
AUTOMAKE_OPTIONS = 1.3 foreign
INCLUDES = \
+ -I$(top_srcdir) \
-I$(top_srcdir)/filter \
-I$(top_srcdir)/src

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-import_decode_dv_c,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
--- import/decode_dv.c.orig Tue Nov 2 19:45:41 2004
+++ import/decode_dv.c Sun Jan 9 19:38:43 2005
@@ -251,7 +251,7 @@ void decode_dv(decode_t *decode)
// print info:
if(!dvinfo && verbose && (decode->format != TC_CODEC_PCM)) {
- fprintf(stderr, "(%s) %s video: %dx%d framesize=%d sampling=%d\n", __FILE__, ((dv_decoder->system==e_dv_system_625_50)?"PAL":"NTSC"), dv_decoder->width, dv_decoder->height, dv_decoder->frame_size, dv_decoder->sampling);
+ fprintf(stderr, "(%s) %s video: %dx%d framesize=%lu sampling=%d\n", __FILE__, ((dv_decoder->system==e_dv_system_625_50)?"PAL":"NTSC"), dv_decoder->width, dv_decoder->height, (unsigned long)dv_decoder->frame_size, dv_decoder->sampling);
dvinfo=1;
}

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-import_dvd_reader_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- import/dvd_reader.c.orig Tue Nov 2 19:45:41 2004
+++ import/dvd_reader.c Fri Dec 31 01:13:17 2004
@@ -1090,6 +1090,10 @@ int dvd_stream(int arg_title,int arg_cha
unsigned long cur_pack=0, max_sectors=0, blocks_left=0, blocks_written=0, first_block=0;
int ttn, pgn;
+ int end_cell;
+ int e_pgc_id, e_pgn;
+ pgc_t *e_cur_pgc;
+
dvd_file_t *title;
ifo_handle_t *vmg_file;
tt_srpt_t *tt_srpt;
@@ -1171,6 +1175,15 @@ int dvd_stream(int arg_title,int arg_cha
start_cell = cur_pgc->program_map[ pgn - 1 ] - 1;
+ if ( chapid+1 >= tt_srpt->title[ titleid ].nr_of_ptts ) {
+ end_cell = cur_pgc->nr_of_cells - 1;
+ } else {
+ e_pgc_id = vts_ptt_srpt->title[ ttn - 1 ].ptt[ chapid+1 ].pgcn;
+ e_pgn = vts_ptt_srpt->title[ ttn - 1 ].ptt[ chapid+1 ].pgn;
+ e_cur_pgc = vts_file->vts_pgcit->pgci_srp[ e_pgc_id - 1 ].pgc;
+ end_cell = ( e_cur_pgc->program_map[ e_pgn - 1 ] - 1 ) -1;
+ }
+
/**
* We've got enough info, time to open the title set data.
*/
@@ -1189,13 +1202,16 @@ int dvd_stream(int arg_title,int arg_cha
/**
* Playback the cells for our title
*/
+ if (start_cell==end_cell)
+ fprintf(stderr,"(%s) Title %d in VTS %02d is defined by PGC %d with %d cells, exporting cell %d\n",
+ __FILE__,titleid+1,tt_srpt->title[ titleid ].title_set_nr,pgc_id,cur_pgc->nr_of_cells,start_cell+1);
+ else
+ fprintf(stderr,"(%s) Title %d in VTS %02d is defined by PGC %d with %d cells, exporting from cell %d to cell %d\n",
+ __FILE__,titleid+1,tt_srpt->title[ titleid ].title_set_nr,pgc_id,cur_pgc->nr_of_cells,start_cell+1,end_cell+1);
- fprintf(stderr,"(%s) Title %d in VTS %02d is defined by PGC %d with %d cells, exporting cell %d\n",
- __FILE__,titleid+1,tt_srpt->title[ titleid ].title_set_nr,pgc_id,cur_pgc->nr_of_cells,chapid+1);
+ cur_pack = cur_pgc->cell_playback[start_cell].first_sector;
- cur_pack = cur_pgc->cell_playback[chapid].first_sector;
-
- max_sectors = (long) cur_pgc->cell_playback[chapid].last_sector;
+ max_sectors = (long) cur_pgc->cell_playback[end_cell].last_sector;
fprintf(stderr,"(%s) From block %ld to block %ld\n",__FILE__,(long)cur_pack,(long)max_sectors);
first_block = cur_pack;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-import_extract_ac3_c,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
--- import/extract_ac3.c.orig Sat Jan 8 19:50:56 2005
+++ import/extract_ac3.c Sat Jan 8 20:01:49 2005
@@ -237,7 +237,7 @@ static void pes_ac3_loop (void)
subtitle_header.payload_length=tmp2-tmp1;
if(verbose & TC_STATS)
- fprintf(stderr,"subtitle=0x%x size=%4d lpts=%d rpts=%f rptsfromvid=%f\n", track_code, tmp2-tmp1, subtitle_header.lpts, subtitle_header.rpts,abs_rpts);
+ fprintf(stderr,"subtitle=0x%x size=%4d lpts=%d rpts=%f rptsfromvid=%f\n", track_code, subtitle_header.payload_length, subtitle_header.lpts, subtitle_header.rpts,abs_rpts);
if(p_write(STDOUT_FILENO, (char*) subtitle_header_str, strlen(subtitle_header_str))<0) {
fprintf(stderr, "error writing subtitle\n");

View File

@ -0,0 +1,47 @@
$OpenBSD: patch-import_import_bktr_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- import/import_bktr.c.orig Tue Nov 2 19:45:42 2004
+++ import/import_bktr.c Sun Jan 9 19:37:40 2005
@@ -458,8 +458,8 @@ int bktr_grab(size_t size, char * dest)
if (dest) {
if (verbose_flag & TC_DEBUG) {
fprintf(stderr,
- "[%s] copying %d bytes, buffer size is %d\n",
- MOD_NAME, size, bktr_buffer_size);
+ "[%s] copying %lu bytes, buffer size is %lu\n",
+ MOD_NAME, (unsigned long)size, (unsigned long)bktr_buffer_size);
}
switch (bktr_convert) {
case BKTR2RGB: copy_buf_rgb(dest, size); break;
@@ -486,8 +486,8 @@ static void copy_buf_yuv422(char * dest,
{
if (bktr_buffer_size != size)
fprintf(stderr,
- "[%s] buffer sizes do not match (input %d != output %d)\n",
- MOD_NAME, bktr_buffer_size, size);
+ "[%s] buffer sizes do not match (input %lu != output %lu)\n",
+ MOD_NAME, (unsigned long)bktr_buffer_size, (unsigned long)size);
tc_memcpy(dest, bktr_buffer, size);
}
@@ -502,8 +502,8 @@ static void copy_buf_yuv(char * dest, si
if (bktr_buffer_size != size)
fprintf(stderr,
- "[%s] buffer sizes do not match (input %d != output %d)\n",
- MOD_NAME, bktr_buffer_size, size);
+ "[%s] buffer sizes do not match (input %lu != output %lu)\n",
+ MOD_NAME, (unsigned long)bktr_buffer_size, (unsigned long)size);
/* switch Cb and Cr */
tc_memcpy(dest + y_offset, bktr_buffer + y_offset, y_size);
@@ -519,8 +519,8 @@ static void copy_buf_rgb(char * dest, si
if (bktr_buffer_size * 3 / 4 != size)
fprintf(stderr,
- "[%s] buffer sizes do not match (input %d != output %d)\n",
- MOD_NAME, bktr_buffer_size * 3 / 4, size);
+ "[%s] buffer sizes do not match (input %lu != output %lu)\n",
+ MOD_NAME, (unsigned long)bktr_buffer_size * 3 / 4, (unsigned long)size);
/* bktr_buffer_size was set to width * height * 4 (32 bits) */
/* so width * height = bktr_buffer_size / 4 */

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-libxio_libxio_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- libxio/libxio.c.orig Sat Jan 8 19:13:59 2005
+++ libxio/libxio.c Sat Jan 8 19:17:59 2005
@@ -41,7 +41,11 @@ char *strndup(const char *s, size_t n);
#include <sys/stat.h>
#include <sys/errno.h>
#include <stdarg.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
struct xio_handle_t {
ssize_t (*xio_read_v)(void *stream, void *buf, size_t count);
@@ -704,7 +708,7 @@ xio_open(const char *pathname, int flags
_handles[ret_fd]->xio_ftruncate_v = (int (*)(void *, off_t))&ftruncate;
_handles[ret_fd]->xio_fstat_v = (int (*)(void *, struct stat *))&fstat;
- _handles[ret_fd]->data = (void *)open(pathname, flags, mode);
+ _handles[ret_fd]->data = (void *)(intptr_t)open(pathname, flags, mode);
if(!_handles[ret_fd]->data) {
free(_handles[ret_fd]);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_audio_trans_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- src/audio_trans.c.orig Tue Nov 2 19:45:36 2004
+++ src/audio_trans.c Fri Dec 31 01:13:17 2004
@@ -203,7 +203,7 @@ int process_aud_frame(vob_t *vob, aframe
s = (short *)ptr->audio_buf + ptr->audio_size;
b = (char *)ptr->audio_buf + ptr->audio_size;
for (n = 0; n < ptr->audio_size; n++) *--s = ((short)*--b - 0x80) * 0x100;
- ptr->audio_size /= 2;
+ ptr->audio_size *= 2;
}
//-----------------------------------------------------------------

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_decoder_c,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
--- src/decoder.c.orig Sat Jan 8 20:28:59 2005
+++ src/decoder.c Sat Jan 8 20:33:23 2005
@@ -137,7 +137,7 @@ void import_threads_cancel()
#endif
cc1=pthread_join(vthread, &status);
- if(verbose & TC_DEBUG) fprintf(stderr, "(%s) video thread exit (ret_code=%d) (status_code=%d)\n", __FILE__, cc1, (int) status);
+ if(verbose & TC_DEBUG) fprintf(stderr, "(%s) video thread exit (ret_code=%d) (status_code=%lu)\n", __FILE__, cc1, (unsigned long)status);
#ifdef BROKEN_PTHREADS // Used to be MacOSX specific; kernel 2.6 as well?
pthread_cond_signal(&aframe_list_full_cv);
@@ -147,7 +147,7 @@ void import_threads_cancel()
#endif
cc2=pthread_join(athread, &status);
- if(verbose & TC_DEBUG) fprintf(stderr, "(%s) audio thread exit (ret_code=%d) (status_code=%d)\n", __FILE__, cc2, (int) status);
+ if(verbose & TC_DEBUG) fprintf(stderr, "(%s) audio thread exit (ret_code=%d) (status_code=%lu)\n", __FILE__, cc2, (unsigned long) status);
cc1 = pthread_mutex_trylock(&vframe_list_lock);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_encoder_c,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
--- src/encoder.c.orig Sat Jan 8 20:34:44 2005
+++ src/encoder.c Sat Jan 8 20:35:38 2005
@@ -485,7 +485,7 @@ void encoder(vob_t *vob, int frame_a, in
cont1:
- if(verbose & TC_STATS) fprintf(stderr, "got frame 0x%x (%d)\n", (int) vptr, fid);
+ if(verbose & TC_STATS) fprintf(stderr, "got frame 0x%lux (%d)\n", (unsigned long) vptr, fid);
// now we do the post processing ... this way, if just a video frame is
// skipped, we'll know.

View File

@ -0,0 +1,20 @@
transcode is a text console video-stream processing tool.
It supports elementary video and audio frame transformations.
Some example modules are included to enable import of MPEG-1/2,
Digital Video, and other formats. It also includes export
modules for writing to AVI files with DivX, OpenDivX, XviD,
Digital Video or other codecs. Direct DVD transcoding is also
supported. A set of tools is available to extract and decode
the sources into raw video/audio streams for import and to
enable post-processing of AVI files.
There are a few FLAVORS that add functionality to transcode:
lzo: adds the ability to import and export AVI files
that use LZO compression for video.
mjpegtools: adds video encoding with mpeg2enc and audio
encoding with mp2enc from the mjpegtools package.
also adds the ability to import YUV4MPEG streams.
quicktime: adds the ability to import and export using
the libquicktime API, thus it adds the ability to
import and export QuickTime-compatible .mov files.

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PFRAG.i386,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
@comment lib/transcode/export_mpeg.la
lib/transcode/export_mpeg.so
@comment lib/transcode/filter_dilyuvmmx.la
lib/transcode/filter_dilyuvmmx.so
share/doc/transcode/export_mpeg.txt

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PFRAG.lzo,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
@comment lib/transcode/export_lzo.la
lib/transcode/export_lzo.so
@comment lib/transcode/import_lzo.la
lib/transcode/import_lzo.so

View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PFRAG.mjpegtools,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
@comment lib/transcode/export_mp2enc.la
lib/transcode/export_mp2enc.so
@comment lib/transcode/export_mpeg2enc.la
lib/transcode/export_mpeg2enc.so
@comment lib/transcode/export_yuv4mpeg.la
lib/transcode/export_yuv4mpeg.so
@comment lib/transcode/import_lav.la
lib/transcode/import_lav.so

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PFRAG.quicktime,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
@comment lib/transcode/export_mov.la
lib/transcode/export_mov.so
@comment lib/transcode/import_mov.la
lib/transcode/import_mov.so

View File

@ -0,0 +1,362 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/01/25 21:59:00 naddy Exp $
%%i386%%
%%mjpegtools%%
%%quicktime%%
%%lzo%%
bin/avifix
bin/aviindex
bin/avimerge
bin/avisplit
bin/avisync
bin/tccat
bin/tcdecode
bin/tcdemux
bin/tcextract
bin/tcmodinfo
bin/tcmp3cut
bin/tcmplex
bin/tcprobe
bin/tcrequant
bin/tcscan
bin/tcxmlcheck
bin/tcxpm2rgb
bin/transcode
lib/transcode/
@comment lib/transcode/a52_decore.la
lib/transcode/a52_decore.so
@comment lib/transcode/af6_decore.la
@comment lib/transcode/af6_decore.so
@comment lib/transcode/export_ac3.la
lib/transcode/export_ac3.so
@comment lib/transcode/export_af6.conf
@comment lib/transcode/export_debugppm.la
lib/transcode/export_debugppm.so
@comment lib/transcode/export_divx4.la
@comment lib/transcode/export_divx4.so
@comment lib/transcode/export_divx4raw.la
@comment lib/transcode/export_divx4raw.so
@comment lib/transcode/export_divx5.la
@comment lib/transcode/export_divx5.so
@comment lib/transcode/export_divx5raw.la
@comment lib/transcode/export_divx5raw.so
@comment lib/transcode/export_dv.la
lib/transcode/export_dv.so
@comment lib/transcode/export_dvraw.la
lib/transcode/export_dvraw.so
@comment lib/transcode/export_ffmpeg.la
lib/transcode/export_ffmpeg.so
@comment lib/transcode/export_jpg.la
lib/transcode/export_jpg.so
@comment lib/transcode/export_lame.la
lib/transcode/export_lame.so
@comment lib/transcode/export_mjpeg.la
lib/transcode/export_mjpeg.so
@comment lib/transcode/export_mp1e.la
@comment lib/transcode/export_mp1e.so
@comment lib/transcode/export_mp2.la
lib/transcode/export_mp2.so
@comment lib/transcode/export_null.la
lib/transcode/export_null.so
@comment lib/transcode/export_ogg.la
lib/transcode/export_ogg.so
@comment lib/transcode/export_pcm.la
lib/transcode/export_pcm.so
@comment lib/transcode/export_ppm.la
lib/transcode/export_ppm.so
@comment lib/transcode/export_pvn.la
lib/transcode/export_pvn.so
@comment lib/transcode/export_raw.la
lib/transcode/export_raw.so
@comment lib/transcode/export_toolame.la
lib/transcode/export_toolame.so
@comment lib/transcode/export_wav.la
lib/transcode/export_wav.so
lib/transcode/export_xvid.so
@comment lib/transcode/export_xvid2.la
@comment lib/transcode/export_xvid2.so
@comment lib/transcode/export_xvid3.la
@comment lib/transcode/export_xvid3.so
@comment lib/transcode/export_xvid4.la
lib/transcode/export_xvid4.so
@comment lib/transcode/filter_29to23.la
lib/transcode/filter_29to23.so
@comment lib/transcode/filter_32detect.la
lib/transcode/filter_32detect.so
@comment lib/transcode/filter_32drop.la
lib/transcode/filter_32drop.so
@comment lib/transcode/filter_aclip.la
lib/transcode/filter_aclip.so
@comment lib/transcode/filter_astat.la
lib/transcode/filter_astat.so
@comment lib/transcode/filter_clone.la
lib/transcode/filter_clone.so
@comment lib/transcode/filter_control.la
lib/transcode/filter_control.so
@comment lib/transcode/filter_cpaudio.la
lib/transcode/filter_cpaudio.so
@comment lib/transcode/filter_cshift.la
lib/transcode/filter_cshift.so
@comment lib/transcode/filter_cut.la
lib/transcode/filter_cut.so
@comment lib/transcode/filter_decimate.la
lib/transcode/filter_decimate.so
@comment lib/transcode/filter_denoise3d.la
lib/transcode/filter_denoise3d.so
@comment lib/transcode/filter_detectclipping.la
lib/transcode/filter_detectclipping.so
@comment lib/transcode/filter_detectsilence.la
lib/transcode/filter_detectsilence.so
@comment lib/transcode/filter_divxkey.la
lib/transcode/filter_divxkey.so
@comment lib/transcode/filter_dnr.la
lib/transcode/filter_dnr.so
@comment lib/transcode/filter_doublefps.la
lib/transcode/filter_doublefps.so
@comment lib/transcode/filter_extsub.la
lib/transcode/filter_extsub.so
@comment lib/transcode/filter_extsub2.la
lib/transcode/filter_extsub2.so
@comment lib/transcode/filter_fieldanalysis.la
lib/transcode/filter_fieldanalysis.so
@comment lib/transcode/filter_fields.la
lib/transcode/filter_fields.so
@comment lib/transcode/filter_fps.la
lib/transcode/filter_fps.so
@comment lib/transcode/filter_hqdn3d.la
lib/transcode/filter_hqdn3d.so
@comment lib/transcode/filter_invert.la
lib/transcode/filter_invert.so
@comment lib/transcode/filter_ivtc.la
lib/transcode/filter_ivtc.so
@comment lib/transcode/filter_levels.la
lib/transcode/filter_levels.so
lib/transcode/filter_list.awk
@comment lib/transcode/filter_lowpass.la
lib/transcode/filter_lowpass.so
@comment lib/transcode/filter_mask.la
lib/transcode/filter_mask.so
@comment lib/transcode/filter_modfps.la
lib/transcode/filter_modfps.so
@comment lib/transcode/filter_msharpen.la
lib/transcode/filter_msharpen.so
@comment lib/transcode/filter_nored.la
lib/transcode/filter_nored.so
@comment lib/transcode/filter_normalize.la
lib/transcode/filter_normalize.so
@comment lib/transcode/filter_null.la
lib/transcode/filter_null.so
@comment lib/transcode/filter_pp.la
lib/transcode/filter_pp.so
@comment lib/transcode/filter_preview.la
lib/transcode/filter_preview.so
@comment lib/transcode/filter_pv.la
lib/transcode/filter_pv.so
@comment lib/transcode/filter_resample.la
lib/transcode/filter_resample.so
@comment lib/transcode/filter_skip.la
lib/transcode/filter_skip.so
@comment lib/transcode/filter_slowmo.la
lib/transcode/filter_slowmo.so
@comment lib/transcode/filter_smartbob.la
lib/transcode/filter_smartbob.so
@comment lib/transcode/filter_smartdeinter.la
lib/transcode/filter_smartdeinter.so
@comment lib/transcode/filter_smartyuv.la
lib/transcode/filter_smartyuv.so
@comment lib/transcode/filter_smooth.la
lib/transcode/filter_smooth.so
@comment lib/transcode/filter_subtitler.la
@comment lib/transcode/filter_subtitler.so
@comment lib/transcode/filter_tc_audio.la
lib/transcode/filter_tc_audio.so
@comment lib/transcode/filter_tc_video.la
lib/transcode/filter_tc_video.so
@comment lib/transcode/filter_test.la
lib/transcode/filter_test.so
@comment lib/transcode/filter_testframe.la
lib/transcode/filter_testframe.so
@comment lib/transcode/filter_text.la
lib/transcode/filter_text.so
@comment lib/transcode/filter_unsharp.la
lib/transcode/filter_unsharp.so
@comment lib/transcode/filter_videocore.la
lib/transcode/filter_videocore.so
@comment lib/transcode/filter_whitebalance.la
lib/transcode/filter_whitebalance.so
@comment lib/transcode/filter_xsharpen.la
lib/transcode/filter_xsharpen.so
@comment lib/transcode/filter_yuvdenoise.la
lib/transcode/filter_yuvdenoise.so
@comment lib/transcode/filter_yuvmedian.la
lib/transcode/filter_yuvmedian.so
@comment lib/transcode/filter_yuy2toyv12.la
lib/transcode/filter_yuy2toyv12.so
@comment lib/transcode/import_ac3.la
lib/transcode/import_ac3.so
@comment lib/transcode/import_avi.la
lib/transcode/import_avi.so
@comment lib/transcode/import_bktr.la
lib/transcode/import_bktr.so
@comment lib/transcode/import_divx.la
@comment lib/transcode/import_divx.so
@comment lib/transcode/import_dv.la
lib/transcode/import_dv.so
@comment lib/transcode/import_dvd.la
lib/transcode/import_dvd.so
@comment lib/transcode/import_ffbin.la
lib/transcode/import_ffbin.so
@comment lib/transcode/import_ffmpeg.la
lib/transcode/import_ffmpeg.so
@comment lib/transcode/import_fraps.la
lib/transcode/import_fraps.so
@comment lib/transcode/import_mp3.la
lib/transcode/import_mp3.so
@comment lib/transcode/import_mpeg2.la
lib/transcode/import_mpeg2.so
@comment lib/transcode/import_mplayer.la
lib/transcode/import_mplayer.so
@comment lib/transcode/import_null.la
lib/transcode/import_null.so
@comment lib/transcode/import_nuv.la
lib/transcode/import_nuv.so
@comment lib/transcode/import_nvrec.la
@comment lib/transcode/import_nvrec.so
@comment lib/transcode/import_ogg.la
lib/transcode/import_ogg.so
@comment lib/transcode/import_pvn.la
lib/transcode/import_pvn.so
@comment lib/transcode/import_raw.la
lib/transcode/import_raw.so
@comment lib/transcode/import_rawlist.la
lib/transcode/import_rawlist.so
@comment lib/transcode/import_sh.la
lib/transcode/import_sh.so
@comment lib/transcode/import_sunau.la
lib/transcode/import_sunau.so
@comment lib/transcode/import_vdrac3.la
lib/transcode/import_vdrac3.so
@comment lib/transcode/import_vnc.la
@comment lib/transcode/import_vnc.so
@comment lib/transcode/import_vob.la
lib/transcode/import_vob.so
@comment lib/transcode/import_xml.la
lib/transcode/import_xml.so
@comment lib/transcode/import_xvid.la
lib/transcode/import_xvid.so
@comment lib/transcode/import_yuv.la
lib/transcode/import_yuv.so
@comment lib/transcode/import_yuv4mpeg.la
lib/transcode/import_yuv4mpeg.so
lib/transcode/parse_csv.awk
@comment lib/transcode/xvid2.cfg
@comment lib/transcode/xvid3.cfg
lib/transcode/xvid4.cfg
@man man/man1/avifix.1
@man man/man1/aviindex.1
@man man/man1/avimerge.1
@man man/man1/avisplit.1
@man man/man1/avisync.1
@man man/man1/tccat.1
@man man/man1/tcdecode.1
@man man/man1/tcdemux.1
@man man/man1/tcextract.1
@man man/man1/tcmodinfo.1
@man man/man1/tcprobe.1
@man man/man1/tcpvmexportd.1
@man man/man1/tcscan.1
@man man/man1/tcxmlcheck.1
@man man/man1/transcode.1
share/doc/transcode/
share/doc/transcode/ChangeLog
share/doc/transcode/DV-to-DVD-HOWTO.txt
share/doc/transcode/OPTIMIZERS
share/doc/transcode/README.Inverse.Telecine.txt
share/doc/transcode/README.cluster
share/doc/transcode/README.dv
share/doc/transcode/README.filter.modfps
share/doc/transcode/README.rip
share/doc/transcode/README.sync
share/doc/transcode/README.vcd
share/doc/transcode/README.xvid-credits
share/doc/transcode/architecture.txt
share/doc/transcode/avi_comments.txt
share/doc/transcode/clone.txt
share/doc/transcode/export-API.txt
share/doc/transcode/export_ffmpeg.txt
share/doc/transcode/export_mp2.txt
@comment share/doc/transcode/export_pvm.txt
share/doc/transcode/faq
share/doc/transcode/filter-API.txt
share/doc/transcode/filter-socket.txt
share/doc/transcode/filter_dnr.txt
share/doc/transcode/filter_logo.txt
share/doc/transcode/filter_logoaway.txt
share/doc/transcode/filter_text.txt
share/doc/transcode/filter_yuvdenoise.txt
share/doc/transcode/framerate.txt
share/doc/transcode/html/
share/doc/transcode/html/about.html
share/doc/transcode/html/anim.html
share/doc/transcode/html/cluster_guide.txt
share/doc/transcode/html/core.html
share/doc/transcode/html/dv.html
share/doc/transcode/html/dvd.html
share/doc/transcode/html/export_af6.html
@comment share/doc/transcode/html/export_divx.html
@comment share/doc/transcode/html/export_divx4.php
@comment share/doc/transcode/html/export_divx5.php
@comment share/doc/transcode/html/export_fame.php
@comment share/doc/transcode/html/export_iv50.html
share/doc/transcode/html/export_null.html
share/doc/transcode/html/export_ogg.php
@comment share/doc/transcode/html/export_opendivx.php
share/doc/transcode/html/export_raw.html
share/doc/transcode/html/export_xvid.php
share/doc/transcode/html/faq.html
share/doc/transcode/html/filter.html
share/doc/transcode/html/import_ac3.html
share/doc/transcode/html/import_avi.html
share/doc/transcode/html/import_dv.html
share/doc/transcode/html/import_dvd.html
share/doc/transcode/html/import_mp3.html
share/doc/transcode/html/import_mpeg2.html
share/doc/transcode/html/import_mpeg3.html
share/doc/transcode/html/import_null.html
share/doc/transcode/html/import_nuv.html
share/doc/transcode/html/import_ogg.php
share/doc/transcode/html/import_raw.html
share/doc/transcode/html/import_vob.html
share/doc/transcode/html/import_yuv4mpeg.html
share/doc/transcode/html/index.html
share/doc/transcode/html/intro.html
share/doc/transcode/html/mes0-00000.png
share/doc/transcode/html/mes4-00000.png
share/doc/transcode/html/mes5-00000.png
share/doc/transcode/html/mes6-00000.png
share/doc/transcode/html/mes7-00000.png
share/doc/transcode/html/misc.html
share/doc/transcode/html/modules.html
share/doc/transcode/html/mpeg.html
share/doc/transcode/html/new.png
share/doc/transcode/html/options.html
share/doc/transcode/html/other.html
share/doc/transcode/html/post.html
share/doc/transcode/html/pre.html
share/doc/transcode/html/smart.html
share/doc/transcode/html/sorry.html
share/doc/transcode/html/sub0-00000.png
share/doc/transcode/html/sub1-00000.png
share/doc/transcode/html/sub2-00000.png
share/doc/transcode/html/sub3-00000.png
share/doc/transcode/html/subtitles.html
share/doc/transcode/html/table.php
share/doc/transcode/html/tc.png
share/doc/transcode/ibp_support.txt
share/doc/transcode/import-API.txt
share/doc/transcode/import-xml.txt
@comment share/doc/transcode/import_nvrec.txt
@comment share/doc/transcode/import_v4l2.txt
@comment share/doc/transcode/pvm.cfg
share/doc/transcode/release-notes/
share/doc/transcode/release-notes/README-0.6.13
share/doc/transcode/template.cfg.txt