diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/SCsub | 6 | ||||
| -rw-r--r-- | drivers/ogg/SCsub | 3 | ||||
| -rw-r--r-- | drivers/register_driver_types.cpp | 17 | ||||
| -rw-r--r-- | drivers/theora/SCsub | 36 | ||||
| -rw-r--r-- | drivers/theora/encint.h | 1 | ||||
| -rw-r--r-- | drivers/theora/video_stream_theora.cpp | 16 | ||||
| -rw-r--r-- | drivers/vorbis/SCsub | 4 |
7 files changed, 50 insertions, 33 deletions
diff --git a/drivers/SCsub b/drivers/SCsub index b94309013a..8e241830f8 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -31,7 +31,7 @@ SConscript("rtaudio/SCsub"); SConscript("nedmalloc/SCsub"); SConscript("nrex/SCsub"); SConscript("chibi/SCsub"); -if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theora"]=="yes" or env["opus"]=="yes"): +if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theoralib"]=="yes" or env["opus"]=="yes"): SConscript("ogg/SCsub"); if (env["vorbis"]=="yes"): SConscript("vorbis/SCsub"); @@ -40,9 +40,7 @@ if (env["opus"]=="yes"): if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -#if env["theora"]=="yes": -# SConscript("theoraplayer/SCsub") -if (env["theora"]=="yes"): +if (env["theoralib"]=="yes"): SConscript("theora/SCsub"); if (env['speex']=='yes'): SConscript("speex/SCsub"); diff --git a/drivers/ogg/SCsub b/drivers/ogg/SCsub index c85d4404f3..3ee1bb6408 100644 --- a/drivers/ogg/SCsub +++ b/drivers/ogg/SCsub @@ -6,5 +6,4 @@ ogg_sources = [ "ogg/framing.c", ] -if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": - env.drivers_sources+=ogg_sources +env.drivers_sources+=ogg_sources diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index c4ab54d102..11c4e7dd29 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -54,10 +54,6 @@ #include "theora/video_stream_theora.h" #endif -#ifdef THEORAPLAYER_ENABLED -#include "theoraplayer/video_stream_theoraplayer.h" -#endif - #include "drivers/nrex/regex.h" @@ -108,10 +104,6 @@ static ResourceFormatLoaderAudioStreamSpeex *speex_stream_loader=NULL; static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; #endif -#ifdef THEORAPLAYER_ENABLED -static ResourceFormatLoaderVideoStreamTheoraplayer* theoraplayer_stream_loader = NULL; -#endif - #ifdef MUSEPACK_ENABLED static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; #endif @@ -233,12 +225,6 @@ void register_driver_types() { ObjectTypeDB::register_type<VideoStreamTheora>(); #endif -#ifdef THEORAPLAYER_ENABLED - theoraplayer_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheoraplayer ); - ResourceLoader::add_resource_format_loader(theoraplayer_stream_loader); - ObjectTypeDB::register_type<VideoStreamTheoraplayer>(); -#endif - #ifdef TOOLS_ENABLED #ifdef SQUISH_ENABLED @@ -277,9 +263,6 @@ void unregister_driver_types() { memdelete (theora_stream_loader); #endif -#ifdef THEORAPLAYER_ENABLED - memdelete (theoraplayer_stream_loader); -#endif #ifdef MUSEPACK_ENABLED diff --git a/drivers/theora/SCsub b/drivers/theora/SCsub index faa1ede6a7..fa85b49804 100644 --- a/drivers/theora/SCsub +++ b/drivers/theora/SCsub @@ -31,5 +31,37 @@ sources = [ "theora/video_stream_theora.cpp", ] -if env['use_theoraplayer_binary'] != "yes": - env.drivers_sources += sources +sources_x86 = [ + "theora/x86/mmxencfrag.c", + "theora/x86/mmxfdct.c", + "theora/x86/mmxfrag.c", + "theora/x86/mmxidct.c", + "theora/x86/mmxstate.c", + "theora/x86/sse2fdct.c", + "theora/x86/x86enc.c", + "theora/x86/x86state.c", +] + +sources_x86_vc = [ + "theora/x86_vc/mmxencfrag.c", + "theora/x86_vc/mmxfdct.c", + "theora/x86_vc/mmxfrag.c", + "theora/x86_vc/mmxidct.c", + "theora/x86_vc/mmxstate.c", + "theora/x86_vc/x86enc.c", + "theora/x86_vc/x86state.c", +] + +env.drivers_sources += sources + +if (env["x86_opt_gcc"]): + env.Append(CCFLAGS=["-DOC_X86_ASM"]) + env.drivers_sources += sources_x86 + +if (env["x86_opt_vc"]): + env.Append(CCFLAGS=["-DOC_X86_ASM"]) + env.drivers_sources += sources_x86_vc + + + + diff --git a/drivers/theora/encint.h b/drivers/theora/encint.h index 97897d5a04..82338256dc 100644 --- a/drivers/theora/encint.h +++ b/drivers/theora/encint.h @@ -14,6 +14,7 @@ last mod: $Id: encint.h 16503 2009-08-22 18:14:02Z giles $ ********************************************************************/ + #if !defined(_encint_H) # define _encint_H (1) # if defined(HAVE_CONFIG_H) diff --git a/drivers/theora/video_stream_theora.cpp b/drivers/theora/video_stream_theora.cpp index ed2565177a..f301bd7515 100644 --- a/drivers/theora/video_stream_theora.cpp +++ b/drivers/theora/video_stream_theora.cpp @@ -441,8 +441,10 @@ void VideoStreamPlaybackTheora::update(float p_delta) { //print_line("play "+rtos(p_delta)); time+=p_delta; - if (videobuf_time>get_time()) + if (videobuf_time>get_time()) { + return; //no new frames need to be produced + } bool frame_done=false; bool audio_done=false; @@ -541,7 +543,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) { if(ogg_stream_packetout(&to,&op)>0){ - if(pp_inc){ + if(false && pp_inc){ pp_level+=pp_inc; th_decode_ctl(td,TH_DECCTL_SET_PPLEVEL,&pp_level, sizeof(pp_level)); @@ -569,16 +571,20 @@ void VideoStreamPlaybackTheora::update(float p_delta) { keyframing. Soon enough libtheora will be able to deal with non-keyframe seeks. */ - if(videobuf_time>=get_time()) + if(videobuf_time>=get_time()) { frame_done=true; - else{ + print_line("frame!"); + } else{ /*If we are too slow, reduce the pp level.*/ pp_inc=pp_level>0?-1:0; + print_line("skip!"); } } - } else + } else { + print_line("no packet.."); break; + } } if (file && /*!videobuf_ready && */ file->eof_reached()) { diff --git a/drivers/vorbis/SCsub b/drivers/vorbis/SCsub index 4a16e80dfc..87805cc2d8 100644 --- a/drivers/vorbis/SCsub +++ b/drivers/vorbis/SCsub @@ -33,6 +33,4 @@ sources_lib = [ ] env.drivers_sources += sources - -if env['theora'] != "yes" or env['use_theoraplayer_binary'] != "yes": - env.drivers_sources += sources_lib +env.drivers_sources += sources_lib |