./autogen.sh
./configure --prefix=/usr --with-exec-name=$pkgname
CFG_VARS="\
-CFLAGS='-Wno-narrowing -O2 -ggdb -fno-omit-frame-pointer' \
-CXXFLAGS='-Wno-narrowing -O2 -ggdb -fno-omit-frame-pointer' \
+CFLAGS='-Wno-narrowing -O2 -g -fno-omit-frame-pointer' \
+CXXFLAGS='-Wno-narrowing -O2 -g -fno-omit-frame-pointer' \
WERROR_CFLAGS='-fpermissive'" \
make 2>&1 | tee log
}
$(CXX) `cat $(OBJDIR)/c_flags` -O3 -c $< -o $@
$(DCRAW): dcraw.c
- $(GCC) `cat $(OBJDIR)/c_flags` dcraw.c -c -o $*.o
+ $(GCC) `cat $(OBJDIR)/c_flags` -Wno-misleading-indentation dcraw.c -c -o $*.o
$(THEME_DATA):
cd $(OBJDIR) && \
void AttachmentPoint::reset_status()
{
- if(!this) printf("AttachmentPoint::reset_status NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::reset_status NULL\n");
start_position = 0;
len = 0;
sample_rate = 0;
int AttachmentPoint::render_init()
{
- if(!this) printf("AttachmentPoint::render_init NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::render_init NULL\n");
if(plugin_server && plugin->on)
{
// Start new plugin servers if the number of nodes changed.
int AttachmentPoint::attach_virtual_plugin(VirtualNode *virtual_plugin)
{
- if(!this) printf("AttachmentPoint::attach_virtual_plugin NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::attach_virtual_plugin NULL\n");
int buffer_number = 0;
if(plugin_server && plugin->on)
int AttachmentPoint::multichannel_shared(int search_new)
{
- if(!this) printf("AttachmentPoint::multichannel_shared NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::multichannel_shared NULL\n");
if(search_new)
{
if(new_virtual_plugins.total &&
int AttachmentPoint::singlechannel()
{
- if(!this) printf("AttachmentPoint::singlechannel NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::singlechannel NULL\n");
if(plugin_server && !plugin_server->multichannel) return 1;
return 0;
}
void AttachmentPoint::render_gui(void *data, PluginServer *server)
{
//printf("AttachmentPoint::render_gui 1 %p %p\n", server, plugin_servers.get(0));
- if(!this) printf("AttachmentPoint::render_gui 1 NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::render_gui 1 NULL\n");
// Discard if not 1st plugin server, so single channel plugins don't get double GUI updates
if(server != plugin_servers.get(0)) return;
void AttachmentPoint::render_gui(void *data, int size, PluginServer *server)
{
- if(!this) printf("AttachmentPoint::render_gui 2 NULL\n");
+ if(!(void *)this) printf("AttachmentPoint::render_gui 2 NULL\n");
// Discard if not 1st plugin server, so single channel plugins don't get double GUI updates
if(server != plugin_servers.get(0)) return;
int AttachmentPoint::dump(FILE *fp)
{
- if(this)
+ if((void *)this)
{
fprintf(fp," Attachmentpoint this=%p virtual_plugins=%d\n", this, new_virtual_plugins.total);
if(plugin_server) plugin_server->dump(fp);
int Garbage::remove_user()
{
- if(!this) return 0;
+ if(!(void *)this) return 0;
//printf("Garbage::remove_user %d lock=%p users=%d\n", __LINE__, lock, users);
if(users <= 0) {
jpeg_start_decompress(&engine->jpeg_decompress);
// Generate colormodel from jpeg sampling
- if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 2 &&
- engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
- mjpeg->jpeg_color_model = BC_YUV420P;
- else
- if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 1 &&
- engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
- mjpeg->jpeg_color_model = BC_YUV422P;
+ if( engine->jpeg_decompress.comp_info[0].v_samp_factor == 2 &&
+ engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
+ mjpeg->jpeg_color_model = BC_YUV420P;
+ else if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 1 &&
+ engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
+ mjpeg->jpeg_color_model = BC_YUV422P;
else
mjpeg->jpeg_color_model = BC_YUV444P;
int Tracks::total_of(int type)
{
int result = 0;
- IntAuto *mute_keyframe = 0;
for(Track *current = first; current; current = NEXT)
{
long unit_start = current->to_units(edl->local_session->get_selectionstart(1), 0);
- mute_keyframe =
- (IntAuto*)current->automation->autos[AUTOMATION_MUTE]->get_prev_auto(
- unit_start,
- PLAY_FORWARD,
- (Auto* &)mute_keyframe);
+ Auto *mute_keyframe = current->automation->autos[AUTOMATION_MUTE]->
+ get_prev_auto(unit_start, PLAY_FORWARD, mute_keyframe);
+ IntAuto *mute_auto = (IntAuto *)mute_keyframe;
result +=
(current->play && type == PLAY) ||
(current->record && type == RECORD) ||
(current->gang && type == GANG) ||
(current->draw && type == DRAW) ||
- (mute_keyframe->value && type == MUTE) ||
+ (mute_auto->value && type == MUTE) ||
(current->expand_view && type == EXPAND);
}
return result;
void VAttachmentPoint::delete_buffer_vector()
{
- if(!this) printf("VAttachmentPoint::delete_buffer_vector NULL\n");
+ if(!(void *)this) printf("VAttachmentPoint::delete_buffer_vector NULL\n");
if(buffer_vector)
{
for(int i = 0; i < virtual_plugins.total; i++)
void VAttachmentPoint::new_buffer_vector(int width, int height, int colormodel)
{
- if(!this) printf("VAttachmentPoint::new_buffer_vector NULL\n");
+ if(!(void *)this) printf("VAttachmentPoint::new_buffer_vector NULL\n");
if(buffer_vector &&
(width != buffer_vector[0]->get_w() ||
height != buffer_vector[0]->get_h() ||
int debug_render,
int use_opengl)
{
- if(!this) printf("VAttachmentPoint::render NULL\n");
+ if(!(void *)this) printf("VAttachmentPoint::render NULL\n");
if(!plugin_server || !plugin->on) return;
if(debug_render)
intercept = 0;
slope = 0;
- PanAuto *prev_keyframe = 0;
- PanAuto *next_keyframe = 0;
- prev_keyframe = (PanAuto*)autos->get_prev_auto(input_position,
- direction,
- (Auto* &)prev_keyframe);
- next_keyframe = (PanAuto*)autos->get_next_auto(input_position,
- direction,
- (Auto* &)next_keyframe);
+ Auto *prev_keyframe = 0, *next_keyframe = 0;
+ prev_keyframe = autos->get_prev_auto(input_position, direction, prev_keyframe);
+ next_keyframe = autos->get_next_auto(input_position, direction, next_keyframe);
+ PanAuto *prev_pan_auto = (PanAuto *)prev_keyframe;
+ PanAuto *next_pan_auto = (PanAuto *)next_keyframe;
if(direction == PLAY_FORWARD)
{
// Two distinct automation points within range
- if(next_keyframe->position > prev_keyframe->position)
+ if(next_pan_auto->position > prev_pan_auto->position)
{
- slope = ((double)next_keyframe->values[channel] - prev_keyframe->values[channel]) /
- ((double)next_keyframe->position - prev_keyframe->position);
- intercept = ((double)input_position - prev_keyframe->position) * slope +
- prev_keyframe->values[channel];
+ slope = ((double)next_pan_auto->values[channel] - prev_pan_auto->values[channel]) /
+ ((double)next_pan_auto->position - prev_pan_auto->position);
+ intercept = ((double)input_position - prev_pan_auto->position) * slope +
+ prev_pan_auto->values[channel];
- if(next_keyframe->position < input_position + slope_len)
- slope_len = next_keyframe->position - input_position;
+ if(next_pan_auto->position < input_position + slope_len)
+ slope_len = next_pan_auto->position - input_position;
}
else
// One automation point within range
{
slope = 0;
- intercept = prev_keyframe->values[channel];
+ intercept = prev_pan_auto->values[channel];
}
}
else
{
// Two distinct automation points within range
- if(next_keyframe->position < prev_keyframe->position)
+ if(next_pan_auto->position < prev_pan_auto->position)
{
- slope = ((double)next_keyframe->values[channel] - prev_keyframe->values[channel]) /
- ((double)next_keyframe->position - prev_keyframe->position);
- intercept = ((double)input_position - prev_keyframe->position) * slope +
- prev_keyframe->values[channel];
+ slope = ((double)next_pan_auto->values[channel] - prev_pan_auto->values[channel]) /
+ ((double)next_pan_auto->position - prev_pan_auto->position);
+ intercept = ((double)input_position - prev_pan_auto->position) * slope +
+ prev_pan_auto->values[channel];
- if(next_keyframe->position > input_position - slope_len)
- slope_len = input_position - next_keyframe->position;
+ if(next_pan_auto->position > input_position - slope_len)
+ slope_len = input_position - next_pan_auto->position;
}
else
// One automation point within range
{
slope = 0;
- intercept = next_keyframe->values[channel];
+ intercept = next_pan_auto->values[channel];
}
}
}
{
if(use_nudge) input_position += track->nudge;
- IntAuto *prev_keyframe = 0;
- IntAuto *next_keyframe = 0;
- prev_keyframe = (IntAuto*)autos->get_prev_auto(input_position,
- direction,
- (Auto* &)prev_keyframe);
- next_keyframe = (IntAuto*)autos->get_next_auto(input_position,
- direction,
- (Auto* &)next_keyframe);
+ Auto *prev_keyframe = 0;
+ Auto *next_keyframe = 0;
+ prev_keyframe = autos->get_prev_auto(input_position,
+ direction, prev_keyframe);
+ next_keyframe = autos->get_next_auto(input_position,
+ direction, next_keyframe);
+ IntAuto *prev_int_auto = (IntAuto *)prev_keyframe;
+ IntAuto *next_int_auto = (IntAuto *)next_keyframe;
if(direction == PLAY_FORWARD)
{
// Two distinct keyframes within range
- if(next_keyframe->position > prev_keyframe->position)
+ if(next_int_auto->position > prev_int_auto->position)
{
- mute_constant = prev_keyframe->value;
+ mute_constant = prev_int_auto->value;
- if(next_keyframe->position < input_position + fragment_len)
- fragment_len = next_keyframe->position - input_position;
+ if(next_int_auto->position < input_position + fragment_len)
+ fragment_len = next_int_auto->position - input_position;
}
else
// One keyframe within range
{
- mute_constant = prev_keyframe->value;
+ mute_constant = prev_int_auto->value;
}
}
else
{
// Two distinct keyframes within range
- if(next_keyframe->position < prev_keyframe->position)
+ if(next_int_auto->position < prev_int_auto->position)
{
- mute_constant = next_keyframe->value;
+ mute_constant = next_int_auto->value;
- if(next_keyframe->position > input_position - fragment_len)
- fragment_len = input_position - next_keyframe->position;
+ if(next_int_auto->position > input_position - fragment_len)
+ fragment_len = input_position - next_int_auto->position;
}
else
// One keyframe within range
{
- mute_constant = next_keyframe->value;
+ mute_constant = next_int_auto->value;
}
}
}
$(CXX) `cat $(OBJDIR)/c_flags` -O3 -c $< -o $@
bcxfer.C: bccmdl.py
- python < ./bccmdl.py > bcxfer.C
+ python2.7 < ./bccmdl.py > bcxfer.C
$(OUTPUT): $(OBJS)
ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
/* mono */
for( i=sblimit; --i>=0 ; alloc1+=(1<<step) )
*bita++ = (char)stream->get_bits(step = alloc1->bits);
- bita = bit_alloc;
- scfsi = scfsi_buf;
- for( i=sblimit; --i>=0 ; )
- if( *bita++ )
- *scfsi++ = (char)stream->get_bits(2);
+ bita = bit_alloc;
+ scfsi = scfsi_buf;
+ for( i=sblimit; --i>=0 ; )
+ if( *bita++ ) *scfsi++ = (char)stream->get_bits(2);
}
bita = bit_alloc;
#define new_memset(s) \
void *operator new(size_t n) { \
- void *t = (void*) new char[n]; \
+ void * volatile t = (void*) new char[n]; \
memset(t,s,n); \
return t; \
} \
delete[](char*)t; \
} \
void *operator new[](size_t n) { \
- void *t = (void*) new char[n]; \
+ void * volatile t = (void*) new char[n]; \
memset(t,s,n); \
return t; \
} \
ifeq ($(OUTPUT_THEME),)
-$(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_PNGS)
- $(LDLINKER) -o $(OUTPUT) $(OBJS) `cat $(OBJDIR)/l_flags`
+$(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_PNGS) $(OUTPUT_BINS)
+ $(LDLINKER) -o $(OUTPUT) $(OBJS) $(OUTPUT_BINS) `cat $(OBJDIR)/l_flags`
$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
float x;
float y;
float LogBodge = 0.346607f;
- x = *(int *)&i;
+ union { float f; int i; } v;
+ v.f = i; x = v.i;
x *= 1.0 / (1 << 23); // 1/pow(2,23);
x = x - 127;
x = i + 127 - y;
x *= (1 << 23);
- *(int*) &x = (int)x;
+ union { float f; int i; } v;
+ v.i = (int)x; x = v.f;
return x;
}
include ../../plugin_defs
PLUGIN = chromakeyhsv
-SHADER := $(OBJDIR)/chromakey_sl.o
+OUTPUT_BINS := $(OBJDIR)/chromakey_sl.o
OBJS := $(OBJDIR)/chromakey.o $(SHADER)
include ../../plugin_config
$(OBJDIR)/chromakey.o: chromakey.C
-$(SHADER): chromakey.sl
+$(OUTPUT_BINS): chromakey.sl
cd $(OBJDIR) && \
../../../guicast/$(OBJDIR)/bootstrap -s chromakey_sl.o ../chromakey.sl
-// Macro for killing denormalled numbers\r
-//\r
-// Written by Jezar at Dreampoint, June 2000\r
-// http://www.dreampoint.co.uk\r
-// Based on IS_DENORMAL macro by Jon Watte\r
-// This code is public domain\r
-\r
-#ifndef _denormals_\r
-#define _denormals_\r
-\r
-#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f\r
-\r
-#endif//_denormals_\r
-\r
-//ends\r
-\r
-\r
-\r
-\r
+// Macro for killing denormalled numbers
+//
+// Written by Jezar at Dreampoint, June 2000
+// http://www.dreampoint.co.uk
+// Based on IS_DENORMAL macro by Jon Watte
+// This code is public domain
+
+#ifndef _denormals_
+#define _denormals_
+
+/*
+#define undenormalise(sample) \
+ if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
+*/
+
+static inline void undenormalise(float &sample) {
+ union { float f; unsigned int u; } v; v.f = sample;
+ if( !(v.u & 0x7f800000) ) sample=0.f;
+}
+
+#endif//_denormals_
+
+//ends
+
+
+
+