mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-05 15:30:02 +01:00
wip
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl AC_INIT
|
||||
AC_INIT([lvdshared-plugin],[0.0.1],[veejay-users@lists.sourceforge.net])
|
||||
AC_PREREQ(2.57)
|
||||
AC_PREREQ([2.71])
|
||||
AC_CONFIG_SRCDIR([plugins/lvd_shmin.c])
|
||||
|
||||
LVDGMICMAJOR_VERSION=0
|
||||
@@ -31,31 +31,22 @@ AC_SUBST(LT_AGE)
|
||||
dnl **********************************************************************
|
||||
dnl Options
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
dnl kill CFLAGS
|
||||
CFLAGS=""
|
||||
AC_ARG_ENABLE([strict],
|
||||
AC_HELP_STRING([--enable-strict],
|
||||
[Compile in paranoia assertion checking]))
|
||||
AS_HELP_STRING([--enable-strict],[Compile in paranoia assertion checking]))
|
||||
AC_ARG_ENABLE([debug],
|
||||
AC_HELP_STRING([--enable-debug],
|
||||
[Compile in debugging information]))
|
||||
AS_HELP_STRING([--enable-debug],[Compile in debugging information]))
|
||||
AC_ARG_ENABLE([profile],
|
||||
AC_HELP_STRING([--enable-profiling],
|
||||
[Compile in profiling information]))
|
||||
AS_HELP_STRING([--enable-profiling],[Compile in profiling information]))
|
||||
AC_ARG_ENABLE([compile-warnings],
|
||||
AC_HELP_STRING([--enable-compile-warnings],
|
||||
[Turn on compiler warnings.]))
|
||||
AS_HELP_STRING([--enable-compile-warnings],[Turn on compiler warnings.]))
|
||||
AC_ARG_ENABLE([warnings_as_errors],
|
||||
AC_HELP_STRING([--enable-warnings_as_errors],
|
||||
[Compiler warnings are errors.]))
|
||||
AS_HELP_STRING([--enable-warnings_as_errors],[Compiler warnings are errors.]))
|
||||
AC_ARG_ENABLE([simd-accel],
|
||||
AC_HELP_STRING([--enable-simd-accel],
|
||||
[use SIMD multimedia instructions such as MMX, AltiVec, etc.if possible]))
|
||||
AS_HELP_STRING([--enable-simd-accel],[use SIMD multimedia instructions such as MMX, AltiVec, etc.if possible]))
|
||||
AC_ARG_WITH([extra-cflags],
|
||||
AC_HELP_STRING([--with-extra-cflags=flags],
|
||||
[Options to be added to CFLAGS (optional)]))
|
||||
AS_HELP_STRING([--with-extra-cflags=flags],[Options to be added to CFLAGS (optional)]))
|
||||
|
||||
|
||||
user_specified_target=
|
||||
@@ -65,17 +56,15 @@ AC_ARG_WITH([arch-target], AS_HELP_STRING( [--with-arch-target=CPU_TYPE],
|
||||
|
||||
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
dnl Initialize libtool
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_YACC
|
||||
AM_PROG_LEX
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
@@ -120,8 +109,6 @@ AC_SUBST(LIBAVUTIL_LIBS)
|
||||
|
||||
AC_SUBST(LIBGETOPT_LIB)
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_MSG_NOTICE([The host is $host $host_cpu $host_vendor $host_os .])
|
||||
|
||||
dnl *********************************************************************
|
||||
|
||||
@@ -52,29 +52,10 @@ typedef struct
|
||||
|
||||
|
||||
static inline int lvd_to_ffmpeg( int lvd, int fr ) {
|
||||
switch( lvd ) {
|
||||
case LIVIDO_PALETTE_YUV422P:
|
||||
if( fr )
|
||||
return PIX_FMT_YUVJ422P;
|
||||
return PIX_FMT_YUV422P;
|
||||
case LIVIDO_PALETTE_RGB24:
|
||||
return PIX_FMT_RGB24;
|
||||
case LIVIDO_PALETTE_RGBA32:
|
||||
return PIX_FMT_RGBA;
|
||||
case LIVIDO_PALETTE_YUV444P:
|
||||
if(fr)
|
||||
return PIX_FMT_YUVJ444P;
|
||||
return PIX_FMT_YUV444P;
|
||||
case LIVIDO_PALETTE_YUVA8888:
|
||||
return PIX_FMT_YUVA444P;
|
||||
case LIVIDO_PALETTE_YUVA422:
|
||||
return PIX_FMT_YUVA422P;
|
||||
}
|
||||
|
||||
if( fr )
|
||||
return PIX_FMT_YUVJ422P;
|
||||
|
||||
return PIX_FMT_YUV422P;
|
||||
return PIX_FMT_YUVJ422P;
|
||||
}
|
||||
|
||||
int init_instance( livido_port_t *my_instance )
|
||||
@@ -128,7 +109,7 @@ int init_instance( livido_port_t *my_instance )
|
||||
|
||||
//@ read format and dimensions from shared memory
|
||||
int lvd_shm_palette = data->header[5]; //@ read livido palette format
|
||||
int lvd_shm_width = data->header[0]; //@ read width of frame in shm
|
||||
int lvd_shm_width = data->header[0]; //@ read width of frame in shm
|
||||
int lvd_shm_height = data->header[1]; //@ ... height ...
|
||||
int cpu_flags = 0;
|
||||
cpu_flags = cpu_flags | SWS_FAST_BILINEAR;
|
||||
@@ -240,14 +221,8 @@ livido_process_f process_instance( livido_port_t *my_instance, double timecode
|
||||
int srcW = v->header[0];
|
||||
int srcH = v->header[1];
|
||||
|
||||
int n = 1; //@ stride width
|
||||
if( srcFormat == PIX_FMT_RGB24 )
|
||||
n = 3;
|
||||
if( srcFormat == PIX_FMT_RGB32 )
|
||||
n = 4;
|
||||
|
||||
int strides[4] = { srcW * n, 0, 0, 0 };
|
||||
int dst_strides[4] = { w, w>>1, w>>1, 0 }; //@ width >> 1
|
||||
int strides[4] = { v->header[2], v->header[3], v->header[4], 0 };
|
||||
int dst_strides[4] = { w, w/2, w/2, 0 };
|
||||
|
||||
uint8_t *in[4] = { //@ pointers to planes in shm
|
||||
start_addr,
|
||||
@@ -255,26 +230,9 @@ livido_process_f process_instance( livido_port_t *my_instance, double timecode
|
||||
NULL,
|
||||
NULL };
|
||||
|
||||
if( srcFormat == PIX_FMT_YUVJ422P || srcFormat == PIX_FMT_YUV422P || srcFormat == PIX_FMT_YUVA422P ) {
|
||||
strides[0] = srcW;
|
||||
strides[1] = strides[0] >> 1;
|
||||
strides[2] = strides[1];
|
||||
in[1] = in[0] + ( srcW * srcH );
|
||||
in[2] = in[1] + ( (srcW>>1) * srcH);
|
||||
} else if ( srcFormat == PIX_FMT_YUV444P || srcFormat == PIX_FMT_YUVJ444P || srcFormat == PIX_FMT_YUVA444P ) {
|
||||
strides[0] = srcW;
|
||||
strides[1] = srcW;
|
||||
strides[2] = srcW;
|
||||
in[1] = in[0] + (srcW * srcH);
|
||||
in[2] = in[1] + (srcW * srcH);
|
||||
}
|
||||
in[1] = in[0] + v->header[2] * srcH;
|
||||
in[2] = in[1] + v->header[3] * srcH;
|
||||
|
||||
if( srcFormat == PIX_FMT_YUVA422P || srcFormat == PIX_FMT_YUVA444P ) {
|
||||
strides[3] = strides[0];
|
||||
dst_strides[3] = dst_strides[0];
|
||||
in[3] = in[2] + (strides[1] * srcH);
|
||||
}
|
||||
|
||||
sws_scale( sws, (const uint8_t *const *)in, strides,0, srcH,(uint8_t * const*) O, dst_strides );
|
||||
|
||||
res = pthread_rwlock_unlock( &v->rwlock );
|
||||
@@ -325,13 +283,8 @@ livido_port_t *livido_setup(livido_setup_t list[], int version)
|
||||
|
||||
//@ some palettes veejay-classic uses
|
||||
int palettes0[] = {
|
||||
LIVIDO_PALETTE_YUV422P,
|
||||
LIVIDO_PALETTE_RGB24,
|
||||
LIVIDO_PALETTE_RGBA32,
|
||||
LIVIDO_PALETTE_YUVA422,
|
||||
LIVIDO_PALETTE_YUVA8888,
|
||||
LIVIDO_PALETTE_YUV444P,
|
||||
0
|
||||
LIVIDO_PALETTE_YUV422P,
|
||||
0
|
||||
};
|
||||
|
||||
//@ setup output channel
|
||||
@@ -339,7 +292,7 @@ livido_port_t *livido_setup(livido_setup_t list[], int version)
|
||||
port = out_chans[0];
|
||||
|
||||
livido_set_string_value( port, "name", "Output Channel");
|
||||
livido_set_int_array( port, "palette_list", 4, palettes0);
|
||||
livido_set_int_array( port, "palette_list", 1, palettes0);
|
||||
livido_set_int_value( port, "flags", 0);
|
||||
|
||||
|
||||
|
||||
@@ -335,6 +335,7 @@ livido_port_t *livido_setup(livido_setup_t list[], int version)
|
||||
//@ some palettes veejay-classic uses
|
||||
int palettes0[] = {
|
||||
LIVIDO_PALETTE_YUV422P,
|
||||
LIVIDO_PALETTE_YUV444P,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user