From: Good Guy Date: Thu, 5 Jul 2018 01:11:40 +0000 (-0600) Subject: bsd compatibility mods X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=9058f65f71aafbeab023657be0f6b84b629b70c4;p=goodguy%2Fhistory.git bsd compatibility mods --- diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index de121c23..18590e3a 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -505,9 +505,9 @@ CFLAGS += -DUSE_ALPHA else -LDFLAGS1 = -export-dynamic +LDFLAGS1 = -Wl,-export-dynamic -g LDFLAGS2 = -LINKER = g++ -o $(OUTPUT) +LINKER = $(CXX) -o $(OUTPUT) endif diff --git a/cinelerra-5.1/cinelerra/adeviceprefs.C b/cinelerra-5.1/cinelerra/adeviceprefs.C index be7ba2c6..d93cef30 100644 --- a/cinelerra-5.1/cinelerra/adeviceprefs.C +++ b/cinelerra-5.1/cinelerra/adeviceprefs.C @@ -194,14 +194,8 @@ int ADevicePrefs::delete_oss_objs() delete bits_title; delete oss_bits; - if(oss_path) - { - for(int i = 0; i < MAXDEVICES; i++) - { - delete oss_path[i]; - break; - } - } + for(int i = 0; i < MAXDEVICES; i++) + delete oss_path[i]; return 0; } diff --git a/cinelerra-5.1/cinelerra/audioidevice.C b/cinelerra-5.1/cinelerra/audioidevice.C index acc87057..3156dab2 100644 --- a/cinelerra-5.1/cinelerra/audioidevice.C +++ b/cinelerra-5.1/cinelerra/audioidevice.C @@ -42,9 +42,9 @@ #define GET_8BIT(i) ((double)(buffer[(i)])) #define GET_16BIT(i) ((double)(*(int16_t*)&buffer[(i)])) -#define GET_24BIT(i) (zi=(i), ((zi&1) ? \ - ((double)((*(uint8_t*)&buffer[zi]) | (*(int16_t*)&buffer[zi+1] << 8))) : \ - ((double)((*(uint16_t*)&buffer[zi]) | (*(int8_t*)&buffer[zi+2] << 16))))) +#define GET_24BIT(i) ((i&1) ? \ + ((double)((*(uint8_t*)&buffer[i]) | (*(int16_t*)&buffer[i+1] << 8))) : \ + ((double)((*(uint16_t*)&buffer[i]) | (*(int8_t*)&buffer[i+2] << 16)))) #define GET_32BIT(i) ((double)(*(int32_t *)&buffer[(i)])) #define GET_8BITS(j,k) { double sample = gain*GET_8BIT(k); STORE(j); } @@ -103,7 +103,6 @@ int AudioDevice::read_buffer(Samples **data, int channels, int xfr_samples = xfr_size / frame_size; for( int ich=0; ichget_data() + input_offset; if( map51_2 ) { diff --git a/cinelerra-5.1/cinelerra/audiooss.C b/cinelerra-5.1/cinelerra/audiooss.C index f75ff0fb..cb1fc087 100644 --- a/cinelerra-5.1/cinelerra/audiooss.C +++ b/cinelerra-5.1/cinelerra/audiooss.C @@ -80,6 +80,14 @@ OSSThread::~OSSThread() void OSSThread::run() { +// this makes the longest (blocking) write 1024 samples +// if this is not done, the video can be jerky + AudioDevice *audio_device = device->device; + int frame_size = audio_device->get_ochannels() * audio_device->get_obits()/8; + int maxsz = 1024*frame_size, blksz = maxsz; + ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &blksz); + if( blksz > maxsz ) blksz = maxsz; + while(!done) { input_lock->lock("OSSThread::run 1"); if(done) return; @@ -88,11 +96,14 @@ void OSSThread::run() read_lock->unlock(); } else if(wr) { + if( !bytes_written ) + timer->update(); int count = bytes; unsigned char *bp = data; - while( count > 0 ) { + while( count > 0 && !done ) { Thread::enable_cancel(); - int ret = write(fd, bp, bytes); + int len = count>blksz ? blksz : count; + int ret = write(fd, bp, len); Thread::disable_cancel(); if( ret < 0 ) break; bp += ret; @@ -102,6 +113,7 @@ void OSSThread::run() if( !ioctl(fd, SNDCTL_DSP_GETODELAY, &delay) ) this->delay = delay; bytes_written += ret; + timer->update(); timer_lock->unlock(); } write_lock->unlock(); @@ -347,6 +359,14 @@ int AudioOSS::set_cloexec_flag(int desc, int value) int64_t AudioOSS::device_position() { + for (int i = 0; i < MAXDEVICES; i++) { + if( thread[i] ) { + int frame_size = device->get_ochannels() * device->get_obits()/8; + int64_t pos = thread[i]->device_position() / frame_size; + int64_t tmr = thread[i]->timer->get_scaled_difference(device->out_samplerate); + return pos + tmr; + } + } count_info info; if(!ioctl(get_output(0), SNDCTL_DSP_GETOPTR, &info)) { @@ -355,16 +375,8 @@ int64_t AudioOSS::device_position() // the problem is that if the first write to sound device was not full lenght fragment then // _GETOPTR returns insanely large numbers at first moments of play if (info.bytes > 2100000000) return 0; - int frame = device->get_ochannels() * device->get_obits()/8; - return info.bytes / frame; - } - for (int i = 0; i < MAXDEVICES; i++) - { - if (thread[i]) - return thread[i]->device_position() / - device->get_ochannels() / - (device->get_obits()/8) + - thread[i]->timer->get_scaled_difference(device->out_samplerate); + int frame_size = device->get_ochannels() * device->get_obits()/8; + return info.bytes / frame_size; } return 0; } @@ -384,6 +396,17 @@ int AudioOSS::interrupt_playback() return 0; } +int64_t AudioOSS::samples_output() +{ + for( int i=0; iget_ochannels() * device->get_obits()/8; + return thread[i]->bytes_written / frame_size; + } + } + return 0; +} + int AudioOSS::read_buffer(char *buffer, int bytes) { int sample_size = device->get_ibits() / 8; diff --git a/cinelerra-5.1/cinelerra/audiooss.h b/cinelerra-5.1/cinelerra/audiooss.h index b3dd3642..82340b3a 100644 --- a/cinelerra-5.1/cinelerra/audiooss.h +++ b/cinelerra-5.1/cinelerra/audiooss.h @@ -74,6 +74,8 @@ public: int64_t device_position(); int flush_device(); int interrupt_playback(); + int stop_output() { return interrupt_playback(); } + int64_t samples_output(); private: int get_fmt(int bits); diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 54101d5a..186dcc5b 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -1666,7 +1666,7 @@ void AWindowGUI::copy_picons(ArrayList *dst, if( picon->edl ) dst[1].append(item2 = new BC_ListBoxItem(picon->edl->local_session->clip_notes)); else - if( picon->label && picon->label->textstr ) + if( picon->label ) dst[1].append(item2 = new BC_ListBoxItem(picon->label->textstr)); else if( picon->mtime ) { char date_time[BCSTRLEN]; diff --git a/cinelerra-5.1/cinelerra/byteorder.h b/cinelerra-5.1/cinelerra/byteorder.h index acbdb2c8..8925e5ad 100644 --- a/cinelerra-5.1/cinelerra/byteorder.h +++ b/cinelerra-5.1/cinelerra/byteorder.h @@ -58,12 +58,12 @@ inline int get_byte_order() inline int swap_bytes(int wordsize, unsigned char *buffer, long len) { - register unsigned char byte1, byte2, byte3, byte4; - register unsigned char *buffer1 = buffer; - register unsigned char *buffer2 = buffer + 1; - register unsigned char *buffer3 = buffer + 2; - register unsigned char *buffer4 = buffer + 3; - register long i = 0; + unsigned char byte1, byte2, byte3, byte4; + unsigned char *buffer1 = buffer; + unsigned char *buffer2 = buffer + 1; + unsigned char *buffer3 = buffer + 2; + unsigned char *buffer4 = buffer + 3; + long i = 0; //printf("swap bytes\n"); diff --git a/cinelerra-5.1/cinelerra/dbwindow.C b/cinelerra-5.1/cinelerra/dbwindow.C index 5d93549f..780fc650 100644 --- a/cinelerra-5.1/cinelerra/dbwindow.C +++ b/cinelerra-5.1/cinelerra/dbwindow.C @@ -846,7 +846,7 @@ cmpr_##nm(const void *a, const void *b) { \ return n; \ } -extern long timezone; +extern long cin_timezone; CmprFn(id_dn, ap->id - bp->id) CmprFn(id_up, bp->id - ap->id) @@ -860,8 +860,8 @@ CmprFn(Title_dn, strcasecmp(ap->title, bp->title)) CmprFn(title_dn, strcmp(ap->title, bp->title)) CmprFn(Title_up, strcasecmp(bp->title, ap->title)) CmprFn(title_up, strcmp(bp->title, ap->title)) -CmprFn(start_time_dn, fmod(ap->start_time-timezone,24*3600) - fmod(bp->start_time-timezone,24*3600)) -CmprFn(start_time_up, fmod(bp->start_time-timezone,24*3600) - fmod(ap->start_time-timezone,24*3600)) +CmprFn(start_time_dn, fmod(ap->start_time-cin_timezone,24*3600) - fmod(bp->start_time-cin_timezone,24*3600)) +CmprFn(start_time_up, fmod(bp->start_time-cin_timezone,24*3600) - fmod(ap->start_time-cin_timezone,24*3600)) CmprFn(access_time_dn, ap->access_time - bp->access_time) CmprFn(access_time_up, bp->access_time - ap->access_time) CmprFn(access_count_dn, ap->access_count - bp->access_count) diff --git a/cinelerra-5.1/cinelerra/dcraw.C b/cinelerra-5.1/cinelerra/dcraw.C index 1913d982..12e36160 100644 --- a/cinelerra-5.1/cinelerra/dcraw.C +++ b/cinelerra-5.1/cinelerra/dcraw.C @@ -1002,7 +1002,7 @@ void CLASS canon_sraw_load_raw() pix[2] = rp[0] + rp[1]; pix[1] = rp[0] + ((-778*rp[1] - (rp[2] << 11)) >> 12); } - FORC3 rp[c] = CLIP(pix[c] * sraw_mul[c] >> 10); + FORC3 rp[c] = (int)CLIP(pix[c] * sraw_mul[c] >> 10); } ljpeg_end (&jh); maximum = 0x3fff; @@ -8696,7 +8696,7 @@ void CLASS identify() parse_fuji (get4()); if (thumb_offset > 120) { fseek (ifp, 120, SEEK_SET); - is_raw += (i = get4()) && 1; + is_raw += (i = get4()) ? 1 : 0; if (is_raw == 2 && shot_select) parse_fuji (i); } @@ -10533,7 +10533,7 @@ thumbnail: else if (output_tiff && write_fun == &CLASS write_ppm_tiff) write_ext = ".tiff"; else - write_ext = ".pgm\0.ppm\0.ppm\0.pam" + colors*5-5; + write_ext = &".pgm\0.ppm\0.ppm\0.pam"[colors*5-5]; ofname = (char *) malloc (strlen(ifname) + 64); merror (ofname, "main()"); if (write_to_stdout) diff --git a/cinelerra-5.1/cinelerra/formatpopup.C b/cinelerra-5.1/cinelerra/formatpopup.C index 0793e59e..55ffcefa 100644 --- a/cinelerra-5.1/cinelerra/formatpopup.C +++ b/cinelerra-5.1/cinelerra/formatpopup.C @@ -47,7 +47,9 @@ void FormatPopup::create_objects() { if(!use_brender) { post_item(FILE_FFMPEG); +#ifdef HAVE_LIBZMPEG post_item(FILE_AC3); +#endif post_item(FILE_AIFF); post_item(FILE_AU); post_item(FILE_FLAC); @@ -64,8 +66,10 @@ void FormatPopup::create_objects() #endif post_item(FILE_WAV); post_item(FILE_RAWDV); +#ifdef HAVE_LIBZMPEG post_item(FILE_AMPEG); post_item(FILE_VMPEG); +#endif post_item(FILE_VORBIS); post_item(FILE_OGG); post_item(FILE_PCM); diff --git a/cinelerra-5.1/cinelerra/fourier.C b/cinelerra-5.1/cinelerra/fourier.C index a159a411..401a5faa 100644 --- a/cinelerra-5.1/cinelerra/fourier.C +++ b/cinelerra-5.1/cinelerra/fourier.C @@ -237,7 +237,7 @@ uint8_t FFT::rev_bytes[256] = { unsigned int FFT::reverse_bits(unsigned int index, unsigned int bits) { unsigned char b; - union { unsigned int u; uint8_t b[sizeof(u)]; } data; + union { unsigned int u; uint8_t b[sizeof(unsigned int)]; } data; data.u = index; if( bits <= 8 ) { index = rev_bytes[data.b[0]] >> (8-bits); diff --git a/cinelerra-5.1/cinelerra/main.C b/cinelerra-5.1/cinelerra/main.C index e67dd2f4..7f860cef 100644 --- a/cinelerra-5.1/cinelerra/main.C +++ b/cinelerra-5.1/cinelerra/main.C @@ -100,6 +100,7 @@ public: ArrayList *filenames; }; +long cin_timezone; int main(int argc, char *argv[]) { @@ -108,6 +109,12 @@ int main(int argc, char *argv[]) ArrayList filenames; FileSystem fs; + time_t st; time(&st); + struct tm ltm, gtm; + localtime_r(&st, <m); + gmtime_r(&st, >m); + int tzofs = ltm.tm_hour - gtm.tm_hour; + cin_timezone = tzofs * 60*60; int operation = DO_GUI; int deamon_port = DEAMON_PORT; @@ -376,6 +383,9 @@ DISABLE_BUFFER filenames.remove_all_objects(); Units::finit(); + time_t et; time(&et); + long dt = et - st; + printf("Session time: %ld:%02ld:%02ld\n", dt/3600, dt%3600/60, dt%60); return 0; } diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 992e9f34..034b1bd6 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -173,6 +173,7 @@ extern "C" } +extern long cin_timezone; ArrayList* MWindow::plugindb = 0; Commercials* MWindow::commercials = 0; @@ -423,8 +424,8 @@ const char *MWindow::default_std() } } -//__timezone: Seconds west of UTC. 240sec/deg - double tz_deg = -__timezone / 240.; +// cin_timezone: Seconds west of UTC. 240sec/deg + double tz_deg = -cin_timezone / 240.; // from Honolulu = -10, to New York = -5, 15deg/hr lat -150..-75 return tz_deg >= -10*15 && tz_deg <= -5*15 ? "NTSC" : "PAL"; } diff --git a/cinelerra-5.1/cinelerra/renderengine.C b/cinelerra-5.1/cinelerra/renderengine.C index 177f3350..c2bfb365 100644 --- a/cinelerra-5.1/cinelerra/renderengine.C +++ b/cinelerra-5.1/cinelerra/renderengine.C @@ -499,7 +499,7 @@ void RenderEngine::run() render_active->lock("RenderEngine::run"); start_render_threads(); start_lock->unlock(); - interrupt_lock->unlock(); + interrupt_lock->reset(); wait_render_threads(); diff --git a/cinelerra-5.1/cinelerra/renderfarm.C b/cinelerra-5.1/cinelerra/renderfarm.C index c8f19f13..074f0461 100644 --- a/cinelerra-5.1/cinelerra/renderfarm.C +++ b/cinelerra-5.1/cinelerra/renderfarm.C @@ -54,6 +54,9 @@ #include +#ifndef AF_FILE +#define AF_FILE AF_LOCAL +#endif RenderFarmServer::RenderFarmServer( diff --git a/cinelerra-5.1/cinelerra/renderfarmclient.C b/cinelerra-5.1/cinelerra/renderfarmclient.C index aab7fb4e..8b378ac1 100644 --- a/cinelerra-5.1/cinelerra/renderfarmclient.C +++ b/cinelerra-5.1/cinelerra/renderfarmclient.C @@ -51,7 +51,9 @@ #include - +#ifndef AF_FILE +#define AF_FILE AF_LOCAL +#endif // The render client waits for connections from the server. // Then it starts a thread for each connection. diff --git a/cinelerra-5.1/cinelerra/resizetrackthread.h b/cinelerra-5.1/cinelerra/resizetrackthread.h index 32e1642f..568ca73b 100644 --- a/cinelerra-5.1/cinelerra/resizetrackthread.h +++ b/cinelerra-5.1/cinelerra/resizetrackthread.h @@ -20,7 +20,7 @@ */ #ifndef RESIZETRACKTHREAD_H -#define RESIZETRACKTHREAD_h +#define RESIZETRACKTHREAD_H diff --git a/cinelerra-5.1/cinelerra/transportque.inc b/cinelerra-5.1/cinelerra/transportque.inc index c59fddc6..2660361a 100644 --- a/cinelerra-5.1/cinelerra/transportque.inc +++ b/cinelerra-5.1/cinelerra/transportque.inc @@ -48,7 +48,7 @@ // Level of change. Changes have to be inclusive of all the lesser changes. // Delete cache -#define CHANGE_ALL 0xffffffff +#define CHANGE_ALL 0x7fffffff // Delete render engines #define CHANGE_EDL 0x11 // Search EDL and synchronize parameters. diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h index d71fc03e..8ee88002 100644 --- a/cinelerra-5.1/db/tdb.h +++ b/cinelerra-5.1/db/tdb.h @@ -2,7 +2,7 @@ #define __DB_H__ #include #include -#include +#include #include #include diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 50f5aa11..1c3822f3 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -8,6 +8,9 @@ endif ifeq ($(OBJDIR), x86_64) BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\"" endif +ifeq ($(OBJDIR), amd64) +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\"" +endif $(shell mkdir -p $(OBJDIR) ) @@ -100,13 +103,13 @@ $(OUTPUT): $(OBJS) $(BCXFER) ar rs $(OUTPUT) `ls -1 $(dir $(BCXFER))/xfer*.o` $(OBJDIR)/bootstrap: - gcc -O2 $(BOOTSTRAPFLAGS) bootstrap.c -o $(OBJDIR)/bootstrap + $(CC) -O2 $(BOOTSTRAPFLAGS) bootstrap.c -o $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh: pngtoh.c - gcc -O2 pngtoh.c -o $(OBJDIR)/pngtoh + $(CC) -O2 pngtoh.c -o $(OBJDIR)/pngtoh $(OBJDIR)/pngtoraw: pngtoraw.c - gcc -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw -lpng -lz + $(CC) -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw -lpng -lz clean: rm -rf $(OBJDIR) diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C index 8ed4e6f4..e3400600 100644 --- a/cinelerra-5.1/guicast/bcresources.C +++ b/cinelerra-5.1/guicast/bcresources.C @@ -1376,7 +1376,7 @@ int BC_Resources::init_fontconfig(const char *search_path) entry->registry = cstrdup("utf"); entry->encoding = cstrdup("8"); - if(!FcPatternGetString(font, FC_STYLE, 0, &style) == FcResultMatch) + if( FcPatternGetString(font, FC_STYLE, 0, &style) != FcResultMatch ) force_style = 0; // If font has a style unmanaged by titler plugin, force style to be displayed on name diff --git a/cinelerra-5.1/guicast/condition.h b/cinelerra-5.1/guicast/condition.h index 51e4c95a..1143ef03 100644 --- a/cinelerra-5.1/guicast/condition.h +++ b/cinelerra-5.1/guicast/condition.h @@ -51,14 +51,4 @@ public: const char *title; }; -class cLock -{ - Condition &cond; -public: - cLock(Condition &c) : cond(c) { cond.lock(); } - cLock(Condition *c) : cond(*c) { cond.lock(); } - ~cLock() { cond.unlock(); } -}; - - #endif diff --git a/cinelerra-5.1/guicast/rotateframe.C b/cinelerra-5.1/guicast/rotateframe.C index cd2bde6f..63bca1b0 100644 --- a/cinelerra-5.1/guicast/rotateframe.C +++ b/cinelerra-5.1/guicast/rotateframe.C @@ -474,9 +474,9 @@ int RotateEngine::coords_to_pixel(SourceCoord &float_pixel, float &input_y, floa int RotateEngine::create_matrix() { // Polar coords of pixel - register double k, l, magnitude, angle, offset_angle, offset_angle2; - register double x_offset, y_offset; - register int i, j; + double k, l, magnitude, angle, offset_angle, offset_angle2; + double x_offset, y_offset; + int i, j; int *int_row = 0; SourceCoord *float_row = 0; int input_x_i, input_y_i; diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C index c2f3321d..dff53e61 100644 --- a/cinelerra-5.1/guicast/thread.C +++ b/cinelerra-5.1/guicast/thread.C @@ -243,6 +243,6 @@ int Thread::get_realtime() unsigned long Thread::get_tid() { - return tid; + return (unsigned long)tid; } diff --git a/cinelerra-5.1/libzmpeg3/audio/dct.C b/cinelerra-5.1/libzmpeg3/audio/dct.C index fb440d05..5aaea91b 100644 --- a/cinelerra-5.1/libzmpeg3/audio/dct.C +++ b/cinelerra-5.1/libzmpeg3/audio/dct.C @@ -31,7 +31,7 @@ int zaudio_decoder_layer_t:: dct64_1(float *out0, float *out1, float *b1, float *b2, float *samples) { - register float *costab = pnts[0]; + float *costab = pnts[0]; b1[0x00] = samples[0x00] + samples[0x1F]; b1[0x01] = samples[0x01] + samples[0x1E]; @@ -156,8 +156,8 @@ dct64_1(float *out0, float *out1, float *b1, float *b2, float *samples) b1[0x1C] = (b2[0x1C] - b2[0x1B]) * costab[3]; { - register float const cos0 = pnts[3][0]; - register float const cos1 = pnts[3][1]; + float const cos0 = pnts[3][0]; + float const cos1 = pnts[3][1]; b2[0x00] = b1[0x00] + b1[0x03]; b2[0x03] = (b1[0x00] - b1[0x03]) * cos0; @@ -201,7 +201,7 @@ dct64_1(float *out0, float *out1, float *b1, float *b2, float *samples) } { - register float const cos0 = pnts[4][0]; + float const cos0 = pnts[4][0]; b1[0x00] = b2[0x00] + b2[0x01]; b1[0x01] = (b2[0x00] - b2[0x01]) * cos0; @@ -284,7 +284,7 @@ dct64_1(float *out0, float *out1, float *b1, float *b2, float *samples) out1[0x10*14] = b1[0x0F]; { - register float tmp; + float tmp; tmp = b1[0x18] + b1[0x1C]; out0[0x10*15] = tmp + b1[0x10]; out0[0x10*13] = tmp + b1[0x14]; @@ -361,7 +361,7 @@ dct36(float *inbuf, float *o1, float *o2, float *wintab, float *tsbuf) float tmp[18]; { - register float *in = inbuf; + float *in = inbuf; in[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14]; in[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11]; @@ -462,10 +462,10 @@ dct36(float *inbuf, float *o1, float *o2, float *wintab, float *tsbuf) ts[SBLIMIT*(9+(v))] = out1[9+(v)] + tmpval * w[9+(v)]; \ } { - register float *out2 = o2; - register float *w = wintab; - register float *out1 = o1; - register float *ts = tsbuf; + float *out2 = o2; + float *w = wintab; + float *out1 = o1; + float *ts = tsbuf; MACRO(0); MACRO(1); @@ -485,7 +485,7 @@ dct36(float *inbuf, float *o1, float *o2, float *wintab, float *tsbuf) * new DCT12 */ int zaudio_decoder_layer_t:: -dct12(float *in,float *rawout1,float *rawout2,register float *wi,register float *ts) +dct12(float *in,float *rawout1,float *rawout2,float *wi,float *ts) { #define DCT12_PART1 \ in5 = in[5*3]; \ @@ -512,7 +512,7 @@ dct12(float *in,float *rawout1,float *rawout2,register float *wi,register float { float in0,in1,in2,in3,in4,in5; - register float *out1 = rawout1; + float *out1 = rawout1; ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2]; ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5]; @@ -547,7 +547,7 @@ dct12(float *in,float *rawout1,float *rawout2,register float *wi,register float { float in0,in1,in2,in3,in4,in5; - register float *out2 = rawout2; + float *out2 = rawout2; DCT12_PART1 @@ -581,7 +581,7 @@ dct12(float *in,float *rawout1,float *rawout2,register float *wi,register float { float in0,in1,in2,in3,in4,in5; - register float *out2 = rawout2; + float *out2 = rawout2; out2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0; DCT12_PART1 diff --git a/cinelerra-5.1/libzmpeg3/audio/synthesizers.C b/cinelerra-5.1/libzmpeg3/audio/synthesizers.C index d22d4c16..69c1b1c5 100644 --- a/cinelerra-5.1/libzmpeg3/audio/synthesizers.C +++ b/cinelerra-5.1/libzmpeg3/audio/synthesizers.C @@ -6,7 +6,7 @@ int zaudio_decoder_layer_t:: synth_stereo(float *bandPtr, int channel, float *out, int *pnt) { float *samples = out + *pnt; - register float sum; + float sum; float *b0, (*buf)[0x110]; int j, bo1; diff --git a/cinelerra-5.1/libzmpeg3/video/mmx.h b/cinelerra-5.1/libzmpeg3/video/mmx.h index de9aa8cf..a80074f3 100644 --- a/cinelerra-5.1/libzmpeg3/video/mmx.h +++ b/cinelerra-5.1/libzmpeg3/video/mmx.h @@ -67,7 +67,7 @@ mm_support(void) 5 if AMD MMX and 3DNow! instructions are supported 0 if hardware does not support any of these */ - register int rval = 0; + int rval = 0; __asm__ __volatile__ ( /* See if CPUID instruction is supported ... */ diff --git a/cinelerra-5.1/mpeg2enc/fastintfns.h b/cinelerra-5.1/mpeg2enc/fastintfns.h index a52614d0..2eb9ba9b 100644 --- a/cinelerra-5.1/mpeg2enc/fastintfns.h +++ b/cinelerra-5.1/mpeg2enc/fastintfns.h @@ -6,7 +6,7 @@ #define fabsshift ((8*sizeof(unsigned int))-1) #ifdef P6_CPU -static __inline__ int intmax( register int x, register int y ) +static __inline__ int intmax( int x, int y ) { asm( "cmpl %1, %0\n" "cmovl %1, %0\n" @@ -15,7 +15,7 @@ static __inline__ int intmax( register int x, register int y ) return x; } -static __inline__ int intmin( register int x, register int y ) +static __inline__ int intmin( int x, int y ) { asm( "cmpl %1, %0\n" "cmovg %1, %0\n" @@ -24,9 +24,9 @@ static __inline__ int intmin( register int x, register int y ) return x; } -static __inline__ int intabs( register int x ) +static __inline__ int intabs( int x ) { - register int neg = -x; + int neg = -x; asm( "cmpl %1, %0\n" "cmovl %1, %0\n" : "+r" (x) : "r" (neg) diff --git a/cinelerra-5.1/mpeg2enc/fdctref.c b/cinelerra-5.1/mpeg2enc/fdctref.c index 61996dbc..f1694738 100644 --- a/cinelerra-5.1/mpeg2enc/fdctref.c +++ b/cinelerra-5.1/mpeg2enc/fdctref.c @@ -63,7 +63,7 @@ void init_fdct() void fdct(block) short *block; { - register int i, j; + int i, j; double s; double tmp[64]; diff --git a/cinelerra-5.1/mpeg2enc/motion.c b/cinelerra-5.1/mpeg2enc/motion.c index 7431bd9e..2ff48d93 100644 --- a/cinelerra-5.1/mpeg2enc/motion.c +++ b/cinelerra-5.1/mpeg2enc/motion.c @@ -1532,7 +1532,7 @@ static int dist1_00(uint8_t *blk1,uint8_t *blk2, uint8_t *p1,*p2; int j; int s; - register int v; + int v; s = 0; p1 = blk1; @@ -1562,7 +1562,7 @@ static int dist1_01(uint8_t *blk1,uint8_t *blk2, uint8_t *p1,*p2; int i,j; int s; - register int v; + int v; s = 0; p1 = blk1; @@ -1590,7 +1590,7 @@ static int dist1_10(uint8_t *blk1,uint8_t *blk2, uint8_t *p1,*p1a,*p2; int i,j; int s; - register int v; + int v; s = 0; p1 = blk1; @@ -1617,7 +1617,7 @@ static int dist1_11(uint8_t *blk1,uint8_t *blk2, uint8_t *p1,*p1a,*p2; int i,j; int s; - register int v; + int v; s = 0; p1 = blk1; @@ -1845,7 +1845,7 @@ static int dist22( uint8_t *s22blk1, uint8_t *s22blk2,int flx,int fh) for( j = 0; j < fh; ++j ) { - register int diff; + int diff; #define pipestep(o) diff = p1[o]-p2[o]; s += abs(diff) pipestep(0); pipestep(1); pipestep(2); pipestep(3); @@ -1871,10 +1871,10 @@ static int dist22( uint8_t *s22blk1, uint8_t *s22blk2,int flx,int fh) static int dist44( uint8_t *s44blk1, uint8_t *s44blk2,int qlx,int qh) { - register uint8_t *p1 = s44blk1; - register uint8_t *p2 = s44blk2; + uint8_t *p1 = s44blk1; + uint8_t *p2 = s44blk2; int s = 0; - register int diff; + int diff; /* #define pipestep(o) diff = p1[o]-p2[o]; s += abs(diff) */ #define pipestep(o) diff = p1[o]-p2[o]; s += diff < 0 ? -diff : diff; diff --git a/cinelerra-5.1/mpeg2enc/motion.c.unroll b/cinelerra-5.1/mpeg2enc/motion.c.unroll index 055779fb..a899c321 100644 --- a/cinelerra-5.1/mpeg2enc/motion.c.unroll +++ b/cinelerra-5.1/mpeg2enc/motion.c.unroll @@ -1646,8 +1646,8 @@ static int dist2(blk1, blk2, lx, hx, hy, h) unsigned char *blk1,*blk2; int lx,hx,hy,h; { - register unsigned char *p1,*p1a,*p2; - register int v, s; + unsigned char *p1,*p1a,*p2; + int v, s; int j; s = 0; @@ -1827,9 +1827,9 @@ static int bdist2(pf,pb,p2,lx,hxf,hyf,hxb,hyb,h) unsigned char *pf,*pb,*p2; int lx,hxf,hyf,hxb,hyb,h; { - register unsigned char *pfa,*pfb,*pfc,*pba,*pbb,*pbc; + unsigned char *pfa,*pfb,*pfc,*pba,*pbb,*pbc; int j; - register int i, s, v; + int i, s, v; pfa = pf + hxf; pfb = pf + lx*hyf; @@ -1931,7 +1931,7 @@ unsigned char *p; int lx; { int i, j; - register unsigned int v, s, s2; + unsigned int v, s, s2; s = s2 = 0; diff --git a/cinelerra-5.1/mpeg2enc/ratectl.c b/cinelerra-5.1/mpeg2enc/ratectl.c index 1fc465aa..19242cdd 100644 --- a/cinelerra-5.1/mpeg2enc/ratectl.c +++ b/cinelerra-5.1/mpeg2enc/ratectl.c @@ -191,7 +191,7 @@ unsigned char *p; int lx; { int j; - register unsigned int v, s, s2; + unsigned int v, s, s2; s = s2 = 0; diff --git a/cinelerra-5.1/mpeg2enc/transfrm.c b/cinelerra-5.1/mpeg2enc/transfrm.c index ac4127ee..ff9c29c9 100644 --- a/cinelerra-5.1/mpeg2enc/transfrm.c +++ b/cinelerra-5.1/mpeg2enc/transfrm.c @@ -103,7 +103,7 @@ static void add_pred(unsigned char *pred, int lx, short *blk) { - register int j; + int j; for (j=0; j<8; j++) { @@ -132,7 +132,7 @@ static void sub_pred(unsigned char *pred, int lx, short *blk) { - register int j; + int j; for (j=0; j<8; j++) { diff --git a/cinelerra-5.1/plugin_config b/cinelerra-5.1/plugin_config index b05f26d3..0ee88a45 100644 --- a/cinelerra-5.1/plugin_config +++ b/cinelerra-5.1/plugin_config @@ -3,7 +3,7 @@ CFLAGS += -I../ -I$(CINELERRA) -I$(GUICAST) -I../colors -fPIC CFLAGS += $(static_incs) LFLAGS += $(static_libs) -LDLINKER ?= g++ -shared +LDLINKER ?= $(CXX) -shared $(shell mkdir -p $(OBJDIR)) PLUGIN_DIR := $(BINDIR)/plugins diff --git a/cinelerra-5.1/plugins/blur/blur.C b/cinelerra-5.1/plugins/blur/blur.C index c357f943..739e8295 100644 --- a/cinelerra-5.1/plugins/blur/blur.C +++ b/cinelerra-5.1/plugins/blur/blur.C @@ -730,8 +730,8 @@ int BlurEngine::transfer_pixels(pixel_f *src1, int BlurEngine::multiply_alpha(pixel_f *row, int size) { -// register int i; -// register double alpha; +// int i; +// double alpha; // for(i = 0; i < size; i++) // { @@ -745,9 +745,9 @@ int BlurEngine::multiply_alpha(pixel_f *row, int size) int BlurEngine::separate_alpha(pixel_f *row, int size) { -// register int i; -// register double alpha; -// register double result; +// int i; +// double alpha; +// double result; // for(i = 0; i < size; i++) // { diff --git a/cinelerra-5.1/plugins/denoise/denoise.C b/cinelerra-5.1/plugins/denoise/denoise.C index e785e5e9..238f9ad0 100644 --- a/cinelerra-5.1/plugins/denoise/denoise.C +++ b/cinelerra-5.1/plugins/denoise/denoise.C @@ -254,7 +254,7 @@ int DenoiseEffect::tree_copy(double **output, int length, int levels) { - register int i, j, k, l, m; + int i, j, k, l, m; for(i = 0, k = 1; k < levels; i++, k++) { @@ -349,7 +349,7 @@ int DenoiseEffect::convolve_int_2(double *input_sequence, // insert zeros between each element of the input sequence and // convolve with the filter to interpolate the data { - register int i, j; + int i, j; int endpoint = length + filtlen - 2; if (sum_output) diff --git a/cinelerra-5.1/plugins/piano/piano.C b/cinelerra-5.1/plugins/piano/piano.C index 6404fdee..92090d32 100644 --- a/cinelerra-5.1/plugins/piano/piano.C +++ b/cinelerra-5.1/plugins/piano/piano.C @@ -214,7 +214,7 @@ double Piano::solve_eqn(double *output, if(config->level <= INFINITYGAIN) return 0; double result; - register double x; + double x; double power = this->db.fromdb(config->level) * normalize_constant; double phase_offset = config->phase * this->period; double x3 = x1 + phase_offset;