summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-03 16:52:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-03 16:52:37 -0300
commitfbdd925d9be1c4c96d05089d7d5a58cd938b002c (patch)
tree9f4eb2ae7c61450dffb4a86bb5e82cf66e23d496 /drivers
parenteb1f978b1c1693018e9a6d353ca914f8e6586b4e (diff)
-Work in progress visual shader editor *DOES NOT WORK YET*
Diffstat (limited to 'drivers')
-rw-r--r--drivers/builtin_openssl2/openssl/md5.h4
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp3
-rw-r--r--drivers/mpc/audio_stream_mpc.cpp8
-rw-r--r--drivers/theoraplayer/SCsub10
-rw-r--r--drivers/theoraplayer/src/TheoraVideoClip.cpp1
-rw-r--r--drivers/theoraplayer/video_stream_theoraplayer.cpp6
-rw-r--r--drivers/unix/memory_pool_static_malloc.cpp8
-rw-r--r--drivers/webp/dsp/dsp.h2
-rw-r--r--drivers/webp/utils/bit_reader.h1
9 files changed, 25 insertions, 18 deletions
diff --git a/drivers/builtin_openssl2/openssl/md5.h b/drivers/builtin_openssl2/openssl/md5.h
index 8f392f0ec6..765be94335 100644
--- a/drivers/builtin_openssl2/openssl/md5.h
+++ b/drivers/builtin_openssl2/openssl/md5.h
@@ -105,9 +105,9 @@ typedef struct MD5state_st
unsigned int num;
} MD5_CTX;
-#ifdef OPENSSL_FIPS
+//#ifdef OPENSSL_FIPS
int private_MD5_Init(MD5_CTX *c);
-#endif
+//#endif
//#define MD5_Init _SSL_MD5_Init
#define MD5_Final _SSL_MD5_Final
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index ccbba2f51c..0816396385 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -969,7 +969,7 @@ void RasterizerGLES2::texture_set_data(RID p_texture,const Image& p_image,VS::Cu
- if (img.detect_alpha()==Image::ALPHA_BLEND) {
+ if ((!texture->flags&VS::TEXTURE_FLAG_VIDEO_SURFACE) && img.detect_alpha()==Image::ALPHA_BLEND) {
texture->has_alpha=true;
}
@@ -4224,7 +4224,6 @@ void RasterizerGLES2::capture_viewport(Image* r_capture) {
}
w=DVector<uint8_t>::Write();
-
r_capture->create(viewport.width,viewport.height,0,Image::FORMAT_RGBA,pixels);
//r_capture->flip_y();
diff --git a/drivers/mpc/audio_stream_mpc.cpp b/drivers/mpc/audio_stream_mpc.cpp
index d94f57e683..cd8125c9af 100644
--- a/drivers/mpc/audio_stream_mpc.cpp
+++ b/drivers/mpc/audio_stream_mpc.cpp
@@ -8,6 +8,7 @@ Error AudioStreamMPC::_open_file() {
f=NULL;
}
Error err;
+ //printf("mpc open file %ls\n", file.c_str());
f=FileAccess::open(file,FileAccess::READ,&err);
if (err) {
@@ -16,9 +17,10 @@ Error AudioStreamMPC::_open_file() {
return err;
}
- f->seek_end(0);
- streamlen=f->get_pos();
- f->seek(0);
+ //printf("file size is %i\n", f->get_len());
+ //f->seek_end(0);
+ streamlen=f->get_len();
+ //f->seek(0);
if (streamlen<=0) {
memdelete(f);
f=NULL;
diff --git a/drivers/theoraplayer/SCsub b/drivers/theoraplayer/SCsub
index cd8cabcc94..419f2b65ae 100644
--- a/drivers/theoraplayer/SCsub
+++ b/drivers/theoraplayer/SCsub
@@ -61,13 +61,17 @@ src/YUV/C/yuv420_rgb_c.c
src/TheoraVideoFrame.cpp
""")
+env_theora = env.Clone()
+
if env["platform"] == "iphone":
sources.append("src/AVFoundation/TheoraVideoClip_AVFoundation.mm")
env.Append(LINKFLAGS=['-framework', 'CoreVideo', '-framework', 'CoreMedia', '-framework', 'AVFoundation'])
+ if env["target"] == "release":
+ env_theora.Append(CPPFLAGS=["-D_IOS", "-D__ARM_NEON__", "-fstrict-aliasing", "-fmessage-length=210", "-fdiagnostics-show-note-include-stack", "-fmacro-backtrace-limit=0", "-fcolor-diagnostics", "-Wno-trigraphs", "-fpascal-strings", "-fvisibility=hidden", "-fvisibility-inlines-hidden"])
-env_theora = env.Clone()
-
-env_theora.Append(CPPFLAGS=["-D_YUV_C", "-D_LIB", "-D__THEORA"])
+env_theora.Append(CPPFLAGS=["-D_LIB", "-D__THEORA"]) # removed -D_YUV_C
+env_theora.Append(CPPFLAGS=["-D_YUV_LIBYUV", "-DLIBYUV_NEON"])
+#env_theora.Append(CPPFLAGS=["-D_YUV_C"])
if env["platform"] == "iphone":
env_theora.Append(CPPFLAGS=["-D__AVFOUNDATION"])
diff --git a/drivers/theoraplayer/src/TheoraVideoClip.cpp b/drivers/theoraplayer/src/TheoraVideoClip.cpp
index ed9f2c22da..16897ee80e 100644
--- a/drivers/theoraplayer/src/TheoraVideoClip.cpp
+++ b/drivers/theoraplayer/src/TheoraVideoClip.cpp
@@ -249,6 +249,7 @@ int TheoraVideoClip::discardOutdatedFrames(float absTime)
if (nPop > 0)
{
+#define _DEBUG
#ifdef _DEBUG
std::string log = getName() + ": dropped frame ";
diff --git a/drivers/theoraplayer/video_stream_theoraplayer.cpp b/drivers/theoraplayer/video_stream_theoraplayer.cpp
index 62dee1336a..9f4a44ae9d 100644
--- a/drivers/theoraplayer/video_stream_theoraplayer.cpp
+++ b/drivers/theoraplayer/video_stream_theoraplayer.cpp
@@ -215,7 +215,7 @@ public:
channels = p_channels;
freq = p_freq;
total_wrote = 0;
- rb_power = 12;
+ rb_power = 22;
rb.resize(rb_power);
};
@@ -258,10 +258,12 @@ public:
void update(float time_increase)
{
+ float prev_time = mTime;
//mTime = (float)(stream->get_total_wrote()) / freq;
//mTime = MAX(0,mTime-AudioServer::get_singleton()->get_output_delay());
//mTime = (float)sample_count / channels / freq;
mTime += time_increase;
+ if (mTime - prev_time > .02) printf("time increase %f secs\n", mTime - prev_time);
//float duration=mClip->getDuration();
//if (mTime > duration) mTime=duration;
//printf("time at timer is %f, %f, samples %i\n", mTime, time_increase, sample_count);
@@ -386,7 +388,7 @@ void VideoStreamTheoraplayer::pop_frame(Ref<ImageTexture> p_tex) {
{
DVector<uint8_t>::Write wr = data.write();
uint8_t* ptr = wr.ptr();
- copymem(ptr, f->getBuffer(), imgsize);
+ memcpy(ptr, f->getBuffer(), imgsize);
}
/*
for (int i=0; i<h; i++) {
diff --git a/drivers/unix/memory_pool_static_malloc.cpp b/drivers/unix/memory_pool_static_malloc.cpp
index fa1266b2df..4711f4f090 100644
--- a/drivers/unix/memory_pool_static_malloc.cpp
+++ b/drivers/unix/memory_pool_static_malloc.cpp
@@ -40,10 +40,9 @@
* so BE CAREFUL!
*/
-
void* MemoryPoolStaticMalloc::alloc(size_t p_bytes,const char *p_description) {
- #if DFAULT_ALIGNMENT == 1
+ #if DEFAULT_ALIGNMENT == 1
return _alloc(p_bytes, p_description);
@@ -123,7 +122,7 @@ void* MemoryPoolStaticMalloc::_alloc(size_t p_bytes,const char *p_description) {
void* MemoryPoolStaticMalloc::realloc(void *p_memory,size_t p_bytes) {
- #if DFAULT_ALIGNMENT == 1
+ #if DEFAULT_ALIGNMENT == 1
return _realloc(p_memory,p_bytes);
#else
@@ -172,7 +171,6 @@ void* MemoryPoolStaticMalloc::_realloc(void *p_memory,size_t p_bytes) {
bool single_element = (ringptr->next == ringptr) && (ringptr->prev == ringptr);
bool is_list = ( ringlist == ringptr );
-
RingPtr *new_ringptr=(RingPtr*)::realloc(ringptr, p_bytes+sizeof(RingPtr));
ERR_FAIL_COND_V( new_ringptr == 0, NULL ); /// reallocation failed
@@ -213,7 +211,7 @@ void MemoryPoolStaticMalloc::free(void *p_ptr) {
ERR_FAIL_COND( !MemoryPoolStatic::get_singleton());
- #if DFAULT_ALIGNMENT == 1
+ #if DEFAULT_ALIGNMENT == 1
_free(p_ptr);
#else
diff --git a/drivers/webp/dsp/dsp.h b/drivers/webp/dsp/dsp.h
index 9ff53174d4..afe30413c6 100644
--- a/drivers/webp/dsp/dsp.h
+++ b/drivers/webp/dsp/dsp.h
@@ -33,7 +33,7 @@ extern "C" {
#define WEBP_ANDROID_NEON // Android targets that might support NEON
#endif
-#if (defined(__ARM_NEON__) || defined(WEBP_ANDROID_NEON)) && !defined(PSP2_ENABLED)
+#if ( (defined(__ARM_NEON__) && !defined(__aarch64__)) || defined(WEBP_ANDROID_NEON)) && !defined(PSP2_ENABLED)
#define WEBP_USE_NEON
#endif
diff --git a/drivers/webp/utils/bit_reader.h b/drivers/webp/utils/bit_reader.h
index d80b497149..43cd948fd4 100644
--- a/drivers/webp/utils/bit_reader.h
+++ b/drivers/webp/utils/bit_reader.h
@@ -1,3 +1,4 @@
+//
// Copyright 2010 Google Inc. All Rights Reserved.
//
// This code is licensed under the same terms as WebM: