mirror of https://github.com/mpv-player/mpv
Configurable VIDIX usage
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4090 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
940ceca1e7
commit
b986aebcc5
28
Makefile
28
Makefile
|
@ -14,8 +14,10 @@ PRG_TV = tvision
|
||||||
PRG_CFG = codec-cfg
|
PRG_CFG = codec-cfg
|
||||||
PRG_MENCODER = mencoder
|
PRG_MENCODER = mencoder
|
||||||
# these subdirectories required installation due binaries within them
|
# these subdirectories required installation due binaries within them
|
||||||
SUBDIRS = libdha vidix
|
ifeq ($(VIDIX),yes)
|
||||||
|
SUBDIRS += libdha vidix
|
||||||
DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
|
DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
|
||||||
|
endif
|
||||||
|
|
||||||
#prefix = /usr/local
|
#prefix = /usr/local
|
||||||
BINDIR = ${prefix}/bin
|
BINDIR = ${prefix}/bin
|
||||||
|
@ -45,12 +47,16 @@ AO_LIBS = -Llibao2 -lao2
|
||||||
A_LIBS = $(ALSA_LIB) $(NAS_LIB) $(MAD_LIB) $(VORBIS_LIB) $(SGIAUDIO_LIB)
|
A_LIBS = $(ALSA_LIB) $(NAS_LIB) $(MAD_LIB) $(VORBIS_LIB) $(SGIAUDIO_LIB)
|
||||||
|
|
||||||
CODEC_LIBS = -Lg72x -lg72x -Lmp3lib -lMP3 -Llibac3 -lac3 -Lliba52 -la52 -Lxa -lxa -Llibmpeg2 -lmpeg2 $(AV_LIB)
|
CODEC_LIBS = -Lg72x -lg72x -Lmp3lib -lMP3 -Llibac3 -lac3 -Lliba52 -la52 -Lxa -lxa -Llibmpeg2 -lmpeg2 $(AV_LIB)
|
||||||
COMMON_LIBS = -Llinux -losdep -Lpostproc -lpostproc -Lvidix -lvidix
|
COMMON_LIBS = -Llinux -losdep -Lpostproc -lpostproc
|
||||||
MISC_LIBS = -Llibdha -ldha
|
ifeq ($(VIDIX),yes)
|
||||||
|
MISC_LIBS += -Llibdha -ldha -Lvidix -lvidix
|
||||||
|
endif
|
||||||
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) # -Wall
|
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) # -Wall
|
||||||
|
|
||||||
PARTS = g72x libmpdemux mp3lib libac3 liba52 libmp1e libmpeg2 opendivx libavcodec libao2 drivers drivers/syncfb linux postproc xa libdha vidix
|
PARTS = g72x libmpdemux mp3lib libac3 liba52 libmp1e libmpeg2 opendivx libavcodec libao2 drivers drivers/syncfb linux postproc xa
|
||||||
|
ifeq ($(VIDIX),yes)
|
||||||
|
PARTS += libdha vidix
|
||||||
|
endif
|
||||||
ifeq ($(VO2),yes)
|
ifeq ($(VO2),yes)
|
||||||
PARTS += libvo2
|
PARTS += libvo2
|
||||||
else
|
else
|
||||||
|
@ -89,8 +95,11 @@ all: $(ALL_PRG)
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
COMMON_DEPS = g72x/libg72x.a libmpdemux/libmpdemux.a libao2/libao2.a libac3/libac3.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a linux/libosdep.a postproc/libpostproc.a libdha/libdha.so vidix/libvidix.a xa/libxa.a
|
COMMON_DEPS = g72x/libg72x.a libmpdemux/libmpdemux.a libao2/libao2.a libac3/libac3.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a opendivx/libdecore.a linux/libosdep.a postproc/libpostproc.a xa/libxa.a
|
||||||
|
|
||||||
|
ifeq ($(VIDIX),yes)
|
||||||
|
COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
|
||||||
|
endif
|
||||||
ifeq ($(VO2),yes)
|
ifeq ($(VO2),yes)
|
||||||
COMMON_DEPS += libvo2/libvo2.a
|
COMMON_DEPS += libvo2/libvo2.a
|
||||||
else
|
else
|
||||||
|
@ -172,7 +181,10 @@ MENCODER_DEP += Gui/libgui.a
|
||||||
GUI_LIBS = -LGui -lgui
|
GUI_LIBS = -LGui -lgui
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VIDIX_LIBS = -Lvidix -lvidix
|
VIDIX_LIBS =
|
||||||
|
ifeq ($(VIDIX),yes)
|
||||||
|
VIDIX_LIBS += -Lvidix -lvidix
|
||||||
|
endif
|
||||||
|
|
||||||
$(PRG): $(MPLAYER_DEP)
|
$(PRG): $(MPLAYER_DEP)
|
||||||
$(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(VO_LIBS) $(AO_LIBS) $(LIB_LOADER) $(GUI_LIBS) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(V_LIBS) $(LIRC_LIB) $(CSS_LIB) $(ARCH_LIB) $(DECORE_LIB) $(TERMCAP_LIB) $(STATIC_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(STREAMING_LIB) $(VIDIX_LIBS) -lm
|
$(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(VO_LIBS) $(AO_LIBS) $(LIB_LOADER) $(GUI_LIBS) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(V_LIBS) $(LIRC_LIB) $(CSS_LIB) $(ARCH_LIB) $(DECORE_LIB) $(TERMCAP_LIB) $(STATIC_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(STREAMING_LIB) $(VIDIX_LIBS) -lm
|
||||||
|
@ -197,7 +209,9 @@ $(PRG_CFG): version.h codec-cfg.c codec-cfg.h
|
||||||
$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
|
$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
|
||||||
|
|
||||||
install: $(ALL_PRG)
|
install: $(ALL_PRG)
|
||||||
|
ifeq ($(VIDIX),yes)
|
||||||
$(DO_MAKE)
|
$(DO_MAKE)
|
||||||
|
endif
|
||||||
if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi
|
if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi
|
||||||
$(INSTALL) -m 755 -s $(PRG) $(BINDIR)/$(PRG)
|
$(INSTALL) -m 755 -s $(PRG) $(BINDIR)/$(PRG)
|
||||||
ifeq ($(GUI),yes)
|
ifeq ($(GUI),yes)
|
||||||
|
|
|
@ -130,7 +130,7 @@ Optional features:
|
||||||
(use this option if it does not compile) [enable]
|
(use this option if it does not compile) [enable]
|
||||||
--disable-streaming disable network streaming support
|
--disable-streaming disable network streaming support
|
||||||
(support for: http/mms/rtp) [enable]
|
(support for: http/mms/rtp) [enable]
|
||||||
|
--disable-vidix disable VIDIX stuff [enable]
|
||||||
Video:
|
Video:
|
||||||
--enable-gl build with OpenGL render support [autodetect]
|
--enable-gl build with OpenGL render support [autodetect]
|
||||||
--enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
|
--enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
|
||||||
|
@ -705,6 +705,7 @@ _select=yes
|
||||||
_tv=yes
|
_tv=yes
|
||||||
_tv_v4l=auto
|
_tv_v4l=auto
|
||||||
_streaming=yes
|
_streaming=yes
|
||||||
|
_vidix=yes
|
||||||
_divx4linux=auto
|
_divx4linux=auto
|
||||||
_lirc=auto
|
_lirc=auto
|
||||||
_gui=no
|
_gui=no
|
||||||
|
@ -801,6 +802,8 @@ for ac_option do
|
||||||
--disable-fastmemcpy) _fastmemcpy=no ;;
|
--disable-fastmemcpy) _fastmemcpy=no ;;
|
||||||
--enable-streaming) _streaming=yes ;;
|
--enable-streaming) _streaming=yes ;;
|
||||||
--disable-streaming) _streaming=no ;;
|
--disable-streaming) _streaming=no ;;
|
||||||
|
--enable-vidix) _vidix=yes ;;
|
||||||
|
--disable-vidix) _vidix=no ;;
|
||||||
--enable-divx4linux) _divx4linux=yes ;;
|
--enable-divx4linux) _divx4linux=yes ;;
|
||||||
--disable-divx4linux) _divx4linux=no ;;
|
--disable-divx4linux) _divx4linux=no ;;
|
||||||
--enable-lirc) _lirc=yes ;;
|
--enable-lirc) _lirc=yes ;;
|
||||||
|
@ -2732,7 +2735,9 @@ test "$_debug" && _def_debug='#define MP_DEBUG 1'
|
||||||
_def_linux='#undef TARGET_LINUX'
|
_def_linux='#undef TARGET_LINUX'
|
||||||
linux && _def_linux='#define TARGET_LINUX 1'
|
linux && _def_linux='#define TARGET_LINUX 1'
|
||||||
|
|
||||||
|
_def_vidix='#define CONFIG_VIDIX 1'
|
||||||
|
test "$_vidix" = no && _def_vidix='#undef CONFIG_VIDIX'
|
||||||
|
echo Checking for vidix ... "$_vidix"
|
||||||
#############################################################################
|
#############################################################################
|
||||||
echo "Creating config.mak"
|
echo "Creating config.mak"
|
||||||
cat > config.mak << EOF
|
cat > config.mak << EOF
|
||||||
|
@ -2752,6 +2757,7 @@ WIN32_PATH = -DWIN32_PATH=\\"$_win32libdir\\"
|
||||||
|
|
||||||
STREAMING = $_streaming
|
STREAMING = $_streaming
|
||||||
STREAMING_LIB = $_ld_streaming
|
STREAMING_LIB = $_ld_streaming
|
||||||
|
VIDIX = $_vidix
|
||||||
|
|
||||||
VO2 = $_vo2
|
VO2 = $_vo2
|
||||||
|
|
||||||
|
@ -3038,6 +3044,9 @@ $_def_vorbis
|
||||||
|
|
||||||
$_def_streaming
|
$_def_streaming
|
||||||
|
|
||||||
|
/* enables / disables vidix usage */
|
||||||
|
$_def_vidix
|
||||||
|
|
||||||
/* Extension defines */
|
/* Extension defines */
|
||||||
$_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
|
$_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
|
||||||
$_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
|
$_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
|
||||||
|
@ -3222,6 +3231,13 @@ If you suspect a bug, please read DOCS/bugreports.html.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if test "$_vidix" = no ; then
|
||||||
|
cat <<EOF
|
||||||
|
You've disabled VIDIX. Although it would be better to PORT it instead.
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Last move:
|
# Last move:
|
||||||
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
|
rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,17 @@ include config.mak
|
||||||
|
|
||||||
LIBNAME = libvo.a
|
LIBNAME = libvo.a
|
||||||
|
|
||||||
SRCS=aspect.c aclib.c osd.c font_load.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c x11_common.c $(OPTIONAL_SRCS) img_format.c vosub_vidix.c sub.c
|
SRCS=aspect.c aclib.c osd.c font_load.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c x11_common.c $(OPTIONAL_SRCS) img_format.c sub.c
|
||||||
OBJS=$(SRCS:.c=.o)
|
OBJS=$(SRCS:.c=.o)
|
||||||
|
|
||||||
CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DVB_INC) -DMPG12PLAY -DVIDIX_PATH='"$(prefix)/lib/mplayer/vidix/"' #-Wall
|
ifeq ($(VIDIX),yes)
|
||||||
|
SRCS += vosub_vidix.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DVB_INC) -DMPG12PLAY #-Wall
|
||||||
|
ifeq ($(VIDIX),yes)
|
||||||
|
CFLAGS += -DVIDIX_PATH='"$(prefix)/lib/mplayer/vidix/"'
|
||||||
|
endif
|
||||||
# -I/usr/X11R6/include/
|
# -I/usr/X11R6/include/
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
#include "fastmemcpy.h"
|
#include "fastmemcpy.h"
|
||||||
#include "sub.h"
|
#include "sub.h"
|
||||||
#include "../postproc/rgb2rgb.h"
|
#include "../postproc/rgb2rgb.h"
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
#include "vosub_vidix.h"
|
#include "vosub_vidix.h"
|
||||||
|
#endif
|
||||||
#include "aspect.h"
|
#include "aspect.h"
|
||||||
|
|
||||||
LIBVO_EXTERN(fbdev)
|
LIBVO_EXTERN(fbdev)
|
||||||
|
@ -42,10 +44,11 @@ static vo_info_t vo_info = {
|
||||||
|
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
/* Name of VIDIX driver */
|
/* Name of VIDIX driver */
|
||||||
static const char *vidix_name = NULL;
|
static const char *vidix_name = NULL;
|
||||||
static int pre_init_err = 0;
|
static int pre_init_err = 0;
|
||||||
|
#endif
|
||||||
/******************************
|
/******************************
|
||||||
* fb.modes support *
|
* fb.modes support *
|
||||||
******************************/
|
******************************/
|
||||||
|
@ -730,13 +733,14 @@ struct fb_cmap *make_directcolor_cmap(struct fb_var_screeninfo *var)
|
||||||
return cmap;
|
return cmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
static uint32_t parseSubDevice(const char *sd)
|
static uint32_t parseSubDevice(const char *sd)
|
||||||
{
|
{
|
||||||
if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */
|
if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */
|
||||||
else { printf(FBDEV "Unknown subdevice: '%s'\n", sd); return -1; }
|
else { printf(FBDEV "Unknown subdevice: '%s'\n", sd); return -1; }
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int fb_preinit(void)
|
static int fb_preinit(void)
|
||||||
{
|
{
|
||||||
|
@ -906,7 +910,11 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
|
||||||
if (!fb_preinit())
|
if (!fb_preinit())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (zoom && !vidix_name) {
|
if (zoom
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
printf(FBDEV "-zoom is not supported\n");
|
printf(FBDEV "-zoom is not supported\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1062,6 +1070,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
|
||||||
fb_size = fb_finfo.smem_len;
|
fb_size = fb_finfo.smem_len;
|
||||||
frame_buffer = NULL;
|
frame_buffer = NULL;
|
||||||
next_frame = NULL;
|
next_frame = NULL;
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
if(vidix_name)
|
if(vidix_name)
|
||||||
{
|
{
|
||||||
unsigned image_width,image_height,x_offset,y_offset;
|
unsigned image_width,image_height,x_offset,y_offset;
|
||||||
|
@ -1099,6 +1108,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if ((frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE,
|
if ((frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE,
|
||||||
MAP_SHARED, fb_dev_fd, 0)) == (uint8_t *) -1) {
|
MAP_SHARED, fb_dev_fd, 0)) == (uint8_t *) -1) {
|
||||||
|
@ -1143,11 +1153,14 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
|
||||||
|
|
||||||
static uint32_t query_format(uint32_t format)
|
static uint32_t query_format(uint32_t format)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
static int first = 1;
|
static int first = 1;
|
||||||
|
#endif
|
||||||
int ret = 0x4; /* osd/sub is supported on every bpp */
|
int ret = 0x4; /* osd/sub is supported on every bpp */
|
||||||
|
|
||||||
if (!fb_preinit())
|
if (!fb_preinit())
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
if(first)
|
if(first)
|
||||||
{
|
{
|
||||||
first = 1;
|
first = 1;
|
||||||
|
@ -1159,6 +1172,7 @@ static uint32_t query_format(uint32_t format)
|
||||||
if(!pre_init_err)
|
if(!pre_init_err)
|
||||||
if(vidix_name)
|
if(vidix_name)
|
||||||
return vidix_query_fourcc(format);
|
return vidix_query_fourcc(format);
|
||||||
|
#endif
|
||||||
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
|
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
|
||||||
int bpp = format & 0xff;
|
int bpp = format & 0xff;
|
||||||
|
|
||||||
|
@ -1280,6 +1294,8 @@ static void uninit(void)
|
||||||
close(fb_tty_fd);
|
close(fb_tty_fd);
|
||||||
close(fb_dev_fd);
|
close(fb_dev_fd);
|
||||||
if(frame_buffer) munmap(frame_buffer, fb_size);
|
if(frame_buffer) munmap(frame_buffer, fb_size);
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
if(vidix_name) vidix_term();
|
if(vidix_name) vidix_term();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
#include "bswap.h"
|
#include "bswap.h"
|
||||||
#include "aspect.h"
|
#include "aspect.h"
|
||||||
#include "vesa_lvo.h"
|
#include "vesa_lvo.h"
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
#include "vosub_vidix.h"
|
#include "vosub_vidix.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../postproc/swscale.h"
|
#include "../postproc/swscale.h"
|
||||||
#include "../postproc/rgb2rgb.h"
|
#include "../postproc/rgb2rgb.h"
|
||||||
|
@ -100,7 +102,9 @@ uint8_t multi_idx=0; /* active buffer */
|
||||||
|
|
||||||
/* Linux Video Overlay */
|
/* Linux Video Overlay */
|
||||||
static const char *lvo_name = NULL;
|
static const char *lvo_name = NULL;
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
static const char *vidix_name = NULL;
|
static const char *vidix_name = NULL;
|
||||||
|
#endif
|
||||||
static int pre_init_err = 0;
|
static int pre_init_err = 0;
|
||||||
|
|
||||||
#define HAS_DGA() (win.idx == -1)
|
#define HAS_DGA() (win.idx == -1)
|
||||||
|
@ -135,7 +139,9 @@ static void vesa_term( void )
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
if(lvo_name) vlvo_term();
|
if(lvo_name) vlvo_term();
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
else if(vidix_name) vidix_term();
|
else if(vidix_name) vidix_term();
|
||||||
|
#endif
|
||||||
if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err);
|
if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err);
|
||||||
if((err=vbeSetMode(init_mode,NULL)) != VBE_OK) PRINT_VBE_ERR("vbeSetMode",err);
|
if((err=vbeSetMode(init_mode,NULL)) != VBE_OK) PRINT_VBE_ERR("vbeSetMode",err);
|
||||||
if(HAS_DGA()) vbeUnmapVideoBuffer((unsigned long)win.ptr,win.high);
|
if(HAS_DGA()) vbeUnmapVideoBuffer((unsigned long)win.ptr,win.high);
|
||||||
|
@ -333,7 +339,11 @@ static void flip_page(void)
|
||||||
if(!HAS_DGA()) __vbeCopyData(dga_buffer);
|
if(!HAS_DGA()) __vbeCopyData(dga_buffer);
|
||||||
flip_trigger = 0;
|
flip_trigger = 0;
|
||||||
}
|
}
|
||||||
if(vo_doublebuffering && multi_size > 1 && !lvo_name && !vidix_name)
|
if(vo_doublebuffering && multi_size > 1 && !lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
if((err=vbeSetDisplayStart(multi_buff[multi_idx],1)) != VBE_OK)
|
if((err=vbeSetDisplayStart(multi_buff[multi_idx],1)) != VBE_OK)
|
||||||
|
@ -391,7 +401,11 @@ static uint32_t draw_frame(uint8_t *src[])
|
||||||
if(verbose > 2)
|
if(verbose > 2)
|
||||||
printf("vo_vesa: rgb2rgb_fnc was called\n");
|
printf("vo_vesa: rgb2rgb_fnc was called\n");
|
||||||
}
|
}
|
||||||
if((!rgb2rgb_fnc || !HAS_DGA()) && !lvo_name && !vidix_name) __vbeCopyData(data);
|
if((!rgb2rgb_fnc || !HAS_DGA()) && !lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
) __vbeCopyData(data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,8 +420,10 @@ static uint32_t parseSubDevice(const char *sd)
|
||||||
if(strcmp(sd,"dga") == 0) { flags &= ~(SUBDEV_NODGA); flags |= SUBDEV_FORCEDGA; }
|
if(strcmp(sd,"dga") == 0) { flags &= ~(SUBDEV_NODGA); flags |= SUBDEV_FORCEDGA; }
|
||||||
else
|
else
|
||||||
if(memcmp(sd,"lvo:",4) == 0) lvo_name = &sd[4]; /* lvo_name will be valid within init() */
|
if(memcmp(sd,"lvo:",4) == 0) lvo_name = &sd[4]; /* lvo_name will be valid within init() */
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
else
|
else
|
||||||
if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */
|
if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */
|
||||||
|
#endif
|
||||||
else { printf("vo_vesa: Unknown subdevice: '%s'\n", sd); return -1; }
|
else { printf("vo_vesa: Unknown subdevice: '%s'\n", sd); return -1; }
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +440,9 @@ static uint32_t query_format(uint32_t format)
|
||||||
printf("vo_vesa: subdevice %s have been initialized\n",vo_subdevice);
|
printf("vo_vesa: subdevice %s have been initialized\n",vo_subdevice);
|
||||||
if(vo_subdevice) parseSubDevice(vo_subdevice);
|
if(vo_subdevice) parseSubDevice(vo_subdevice);
|
||||||
if(lvo_name) pre_init_err = vlvo_preinit(lvo_name);
|
if(lvo_name) pre_init_err = vlvo_preinit(lvo_name);
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
else if(vidix_name) pre_init_err = vidix_preinit(vidix_name,&video_out_vesa);
|
else if(vidix_name) pre_init_err = vidix_preinit(vidix_name,&video_out_vesa);
|
||||||
|
#endif
|
||||||
if(verbose > 2)
|
if(verbose > 2)
|
||||||
printf("vo_subdevice: initialization returns: %i\n",pre_init_err);
|
printf("vo_subdevice: initialization returns: %i\n",pre_init_err);
|
||||||
first = 0;
|
first = 0;
|
||||||
|
@ -432,7 +450,9 @@ static uint32_t query_format(uint32_t format)
|
||||||
if(!pre_init_err)
|
if(!pre_init_err)
|
||||||
{
|
{
|
||||||
if(lvo_name) return vlvo_query_info(format);
|
if(lvo_name) return vlvo_query_info(format);
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
else if(vidix_name) return vidix_query_fourcc(format);
|
else if(vidix_name) return vidix_query_fourcc(format);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
switch(format)
|
switch(format)
|
||||||
{
|
{
|
||||||
|
@ -716,7 +736,11 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
if(sd_flags & SUBDEV_NODGA) video_mode_info.PhysBasePtr = 0;
|
if(sd_flags & SUBDEV_NODGA) video_mode_info.PhysBasePtr = 0;
|
||||||
if( vesa_zoom || fs_mode )
|
if( vesa_zoom || fs_mode )
|
||||||
{
|
{
|
||||||
if(format==IMGFMT_YV12 || lvo_name || vidix_name)
|
if(format==IMGFMT_YV12 || lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
|| vidix_name
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
/* software scale */
|
/* software scale */
|
||||||
if(vesa_zoom > 1)
|
if(vesa_zoom > 1)
|
||||||
|
@ -735,7 +759,11 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
}
|
}
|
||||||
scale_srcW=width;
|
scale_srcW=width;
|
||||||
scale_srcH=height;
|
scale_srcH=height;
|
||||||
if(!lvo_name && !vidix_name) SwScale_Init();
|
if(!lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
) SwScale_Init();
|
||||||
if(verbose) printf("vo_vesa: Using SCALE\n");
|
if(verbose) printf("vo_vesa: Using SCALE\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -744,7 +772,11 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(format != IMGFMT_YV12 && image_bpp != video_mode_info.BitsPerPixel && !lvo_name && !vidix_name)
|
if(format != IMGFMT_YV12 && image_bpp != video_mode_info.BitsPerPixel && !lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if(image_bpp == 24 && video_mode_info.BitsPerPixel == 32) rgb2rgb_fnc = rgb24to32;
|
if(image_bpp == 24 && video_mode_info.BitsPerPixel == 32) rgb2rgb_fnc = rgb24to32;
|
||||||
else
|
else
|
||||||
|
@ -840,7 +872,11 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cpy_blk_fnc = __vbeCopyBlock;
|
cpy_blk_fnc = __vbeCopyBlock;
|
||||||
if((yuv_fmt || rgb2rgb_fnc) && !lvo_name && !vidix_name)
|
if((yuv_fmt || rgb2rgb_fnc) && !lvo_name
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
|
&& !vidix_name
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if(!(dga_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel)))
|
if(!(dga_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*video_mode_info.BitsPerPixel)))
|
||||||
{
|
{
|
||||||
|
@ -878,6 +914,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
}
|
}
|
||||||
else printf("vo_vesa: Using video overlay: %s\n",lvo_name);
|
else printf("vo_vesa: Using video overlay: %s\n",lvo_name);
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_VIDIX
|
||||||
else
|
else
|
||||||
if(vidix_name)
|
if(vidix_name)
|
||||||
{
|
{
|
||||||
|
@ -892,6 +929,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
}
|
}
|
||||||
else printf("vo_vesa: Using VIDIX\n");
|
else printf("vo_vesa: Using VIDIX\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue