mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 12:55:16 +00:00
MP1E configure patch by D. Holm.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3433 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a1bb772c18
commit
35e0c399d1
10
Makefile
10
Makefile
@ -35,12 +35,12 @@ else
|
||||
VO_LIBS = -Llibvo -lvo
|
||||
VO_INC = -Ilibvo
|
||||
endif
|
||||
V_LIBS = $(X_LIB) $(DXR3_LIB) $(GGI_LIB) $(MLIB_LIB) $(PNG_LIB) $(SDL_LIB) $(SVGA_LIB) $(AA_LIB) $(DIRECTFB_LIB)
|
||||
V_LIBS = $(X_LIB) $(MP1E_LIB) $(GGI_LIB) $(MLIB_LIB) $(PNG_LIB) $(SDL_LIB) $(SVGA_LIB) $(AA_LIB) $(DIRECTFB_LIB)
|
||||
|
||||
AO_LIBS = -Llibao2 -lao2
|
||||
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 -Llibmp1e -lmp1e $(AV_LIB)
|
||||
CODEC_LIBS = -Lg72x -lg72x -Lmp3lib -lMP3 -Llibac3 -lac3 -Lliba52 -la52 -Lxa -lxa -Llibmpeg2 -lmpeg2 $(AV_LIB)
|
||||
COMMON_LIBS = -Llinux -losdep -Lpostproc -lpostproc
|
||||
|
||||
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) # -Wall
|
||||
@ -84,7 +84,7 @@ all: $(ALL_PRG)
|
||||
.c.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 libmp1e/libmp1e.a libmpeg2/libmpeg2.a opendivx/libdecore.a linux/libosdep.a postproc/libpostproc.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 ($(VO2),yes)
|
||||
COMMON_DEPS += libvo2/libvo2.a
|
||||
@ -149,8 +149,8 @@ xa/libxa.a:
|
||||
g72x/libg72x.a:
|
||||
$(MAKE) -C g72x
|
||||
|
||||
MPLAYER_DEP = $(OBJS_MPLAYER) $(LOADER_DEP) $(AV_DEP) $(COMMON_DEPS)
|
||||
MENCODER_DEP = $(OBJS_MENCODER) $(LOADER_DEP) $(AV_DEP) $(COMMON_DEPS)
|
||||
MPLAYER_DEP = $(OBJS_MPLAYER) $(LOADER_DEP) $(MP1E_DEP) $(AV_DEP) $(COMMON_DEPS)
|
||||
MENCODER_DEP = $(OBJS_MENCODER) $(LOADER_DEP) $(MP1E_DEP) $(AV_DEP) $(COMMON_DEPS)
|
||||
|
||||
ifeq ($(GUI),yes)
|
||||
MPLAYER_DEP += Gui/libgui.a
|
||||
|
24
configure
vendored
24
configure
vendored
@ -126,6 +126,7 @@ Optional features:
|
||||
--enable-vorbis build with OggVorbis support [autodetect]
|
||||
--disable-iconv do not use iconv(3) function [autodetect]
|
||||
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
|
||||
--disable-mp1e disable libmp1e support (only if it won't compile) [enable]
|
||||
|
||||
Video:
|
||||
--enable-gl build with OpenGL render support [autodetect]
|
||||
@ -640,6 +641,7 @@ _prefix="/usr/local"
|
||||
# If autodetection is available then the third state is: auto
|
||||
_libavcodec=auto
|
||||
_libavcodecso=no # changed default to no as it causes problems - atmos
|
||||
_mp1e=yes
|
||||
_mencoder=auto
|
||||
_x11=auto
|
||||
_dga=auto # 1 2 no auto
|
||||
@ -735,6 +737,7 @@ for ac_option do
|
||||
--disable-iconv) _iconv=no ;;
|
||||
--enable-rtc) _rtc=yes ;;
|
||||
--disable-rtc) _rtc=no ;;
|
||||
--disable-mp1e) _mp1e=no ;;
|
||||
--enable-ossaudio) _ossaudio=yes ;;
|
||||
--disable-ossaudio) _ossaudio=no ;;
|
||||
--enable-mad) _mad=yes ;;
|
||||
@ -1810,6 +1813,22 @@ else
|
||||
fi
|
||||
echores "$_nas"
|
||||
|
||||
if test "$_mmx" = no ; then
|
||||
_mp1e=no
|
||||
fi
|
||||
if test "$_mp1e" = yes ; then
|
||||
_def_mp1e='#define USE_MP1E'
|
||||
_ld_mp1e="-Llibmp1e -lmp1e"
|
||||
_dep_mp1e='libmp1e/libmp1e.a'
|
||||
else
|
||||
echocheck "libmp1e"
|
||||
_mp1e=no
|
||||
_def_mp1e='#undef USE_MP1E'
|
||||
_ld_mp1e=""
|
||||
_dep_mp1e=''
|
||||
echores "$_mp1e"
|
||||
fi
|
||||
|
||||
echocheck "DXR3/H+"
|
||||
if test "$_dxr3" = auto ; then
|
||||
cat > $TMPC << EOF
|
||||
@ -2650,6 +2669,8 @@ DS_DEP = $_dep_dshow
|
||||
DS_LIB = $_ld_dshow
|
||||
AV_DEP = $_dep_libavcodec
|
||||
AV_LIB = $_ld_libavcodec
|
||||
MP1E_DEP = $_dep_mp1e
|
||||
MP1E_LIB = $_ld_mp1e
|
||||
ARCH_LIB = $_ld_arch $_ld_iconv
|
||||
DIVX4LINUX = $_divx4linux
|
||||
DECORE_LIB = $_ld_decore
|
||||
@ -2715,6 +2736,9 @@ $_def_encore
|
||||
Note: REQUIRED for mencoder */
|
||||
$_def_mp3lame
|
||||
|
||||
/* Define libmp1e */
|
||||
$_def_mp1e
|
||||
|
||||
/* Define this to enable avg. byte/sec-based AVI sync method by default:
|
||||
(use -bps or -nobps commandline option for run-time method selection)
|
||||
-bps gives better sync for vbr mp3 audio, it is now default */
|
||||
|
@ -21,7 +21,9 @@
|
||||
#include "config.h"
|
||||
#include "video_out.h"
|
||||
#include "video_out_internal.h"
|
||||
#ifdef USE_MP1E
|
||||
#include "../libmp1e/libmp1e.h"
|
||||
#endif
|
||||
|
||||
#include "../postproc/rgb2rgb.h"
|
||||
#ifdef HAVE_MMX
|
||||
@ -30,9 +32,11 @@
|
||||
|
||||
LIBVO_EXTERN (dxr3)
|
||||
|
||||
#ifdef USE_MP1E
|
||||
rte_context *mp1e_context = NULL;
|
||||
rte_codec *mp1e_codec = NULL;
|
||||
rte_buffer mp1e_buffer;
|
||||
#endif
|
||||
struct { uint16_t Y,U,V; } YUV_s;
|
||||
#define RGBTOY(R,G,B) (uint16_t)( (0.257 * R) + (0.504 * G) + (0.098 * B) + 16 )
|
||||
#define RGBTOU(R,G,B) (uint16_t)( -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128 )
|
||||
@ -66,10 +70,12 @@ static vo_info_t vo_info =
|
||||
""
|
||||
};
|
||||
|
||||
#ifdef USE_MP1E
|
||||
void write_dxr3( rte_context* context, void* data, size_t size, void* user_data )
|
||||
{
|
||||
write( fd_video, data, size );
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint32_t init(uint32_t scr_width, uint32_t scr_height, uint32_t width, uint32_t height, uint32_t fullscreen, char *title, uint32_t format)
|
||||
{
|
||||
@ -116,6 +122,7 @@ static uint32_t init(uint32_t scr_width, uint32_t scr_height, uint32_t width, ui
|
||||
|
||||
if( format == IMGFMT_YV12 || format == IMGFMT_YUY2 || format == IMGFMT_BGR24 )
|
||||
{
|
||||
#ifdef USE_MP1E
|
||||
int size;
|
||||
enum rte_frame_rate frame_rate;
|
||||
|
||||
@ -235,6 +242,8 @@ static uint32_t init(uint32_t scr_width, uint32_t scr_height, uint32_t width, ui
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
else if(format==IMGFMT_MPEGPES)
|
||||
{
|
||||
@ -272,6 +281,7 @@ static uint32_t draw_frame(uint8_t * src[])
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef USE_MP1E
|
||||
else if( img_format == IMGFMT_YUY2 )
|
||||
{
|
||||
int w=v_width,h=v_height;
|
||||
@ -342,12 +352,13 @@ static uint32_t draw_frame(uint8_t * src[])
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void flip_page (void)
|
||||
{
|
||||
#ifdef USE_MP1E
|
||||
if( img_format == IMGFMT_YV12 )
|
||||
{
|
||||
mp1e_buffer.data = picture_data[0];
|
||||
@ -355,6 +366,7 @@ static void flip_page (void)
|
||||
mp1e_buffer.user_data = NULL;
|
||||
rte_push_video_buffer( mp1e_context, &mp1e_buffer );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint32_t draw_slice( uint8_t *srcimg[], int stride[], int w, int h, int x0, int y0 )
|
||||
@ -404,11 +416,15 @@ static uint32_t draw_slice( uint8_t *srcimg[], int stride[], int w, int h, int x
|
||||
static uint32_t
|
||||
query_format(uint32_t format)
|
||||
{
|
||||
if(format==IMGFMT_MPEGPES) return 0x2;0x4;
|
||||
if(format==IMGFMT_MPEGPES) return 0x2|0x4;
|
||||
#ifdef USE_MP1E
|
||||
if(format==IMGFMT_YV12) return 0x1|0x4;
|
||||
if(format==IMGFMT_YUY2) return 0x1|0x4;
|
||||
if(format==IMGFMT_BGR24) { printf( "VO: [dxr3] WARNING\tExperimental output, black&white only and very slow\n\t(will be inproved later, this format is rarely used)\n" ); return 0x1|0x4; }
|
||||
else printf( "VO: [dxr3] Format unsupported, mail dholm@iname.com\n" );
|
||||
#else
|
||||
else printf( "VO: [dxr3] You have disabled libmp1e support, you won't be able to play this format!\n" );
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user