diff --git a/mythtv/filters/denoise3d/filter_denoise3d.c b/mythtv/filters/denoise3d/filter_denoise3d.c index 477a5ed720c..b5ae7c76110 100644 --- a/mythtv/filters/denoise3d/filter_denoise3d.c +++ b/mythtv/filters/denoise3d/filter_denoise3d.c @@ -132,7 +132,7 @@ static void denoiseMMX(uint8_t *Frame, movq_r2r (mm2, mm3); movq_r2r (mm4, mm5); movq_r2r (mm6, mm7); - + punpcklbw_m2r(mz, mm0); punpckhbw_m2r(mz, mm1); punpcklbw_m2r(mz, mm2); @@ -154,7 +154,7 @@ static void denoiseMMX(uint8_t *Frame, movq_m2r (Line[X], mm4); movq_m2r (Line[X+8], mm6); - + for (i = 0; i < 16; i++) cbuf[i] = Temporal[wbuf[i]]; @@ -186,7 +186,7 @@ static void denoiseMMX(uint8_t *Frame, movq_r2r (mm2, mm3); movq_r2r (mm4, mm5); movq_r2r (mm6, mm7); - + punpcklbw_m2r(mz, mm0); punpckhbw_m2r(mz, mm1); punpcklbw_m2r(mz, mm2); @@ -223,7 +223,7 @@ static void denoiseMMX(uint8_t *Frame, movq_r2r (mm2, mm3); movq_r2r (mm4, mm5); movq_r2r (mm6, mm7); - + punpcklbw_m2r(mz, mm0); punpckhbw_m2r(mz, mm1); punpcklbw_m2r(mz, mm2); @@ -411,7 +411,7 @@ static VideoFilter *NewDenoise3DFilter(VideoFrameType inpixfmt, return NULL; } - memset(filter, 0, sizeof(ThisFilter)); /*MS Windows doesn't like bzero()*/ + memset(filter, 0, sizeof(ThisFilter)); filter->vf.filter = &denoise3DFilter; filter->vf.cleanup = &Denoise3DFilterCleanup; @@ -464,13 +464,13 @@ static VideoFilter *NewDenoise3DFilter(VideoFrameType inpixfmt, return (VideoFilter*) filter; } -static FmtConv FmtList[] = +static FmtConv FmtList[] = { { FMT_YV12, FMT_YV12 }, FMT_NULL }; -ConstFilterInfo filter_table[] = +ConstFilterInfo filter_table[] = { { filter_init: &NewDenoise3DFilter, diff --git a/mythtv/filters/ivtc/filter_ivtc.c b/mythtv/filters/ivtc/filter_ivtc.c index ffec2eb279a..a017ab34a19 100644 --- a/mythtv/filters/ivtc/filter_ivtc.c +++ b/mythtv/filters/ivtc/filter_ivtc.c @@ -38,7 +38,7 @@ static inline void * memcpy_pic(void * dst, const void * src, int height, int ds if (dstStride == srcStride) { memcpy(dst, src, srcStride*height); - } + } return retval; } @@ -47,19 +47,19 @@ static int IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) { (void)field; - ThisFilter *filter = (ThisFilter *) vf; + ThisFilter *filter = (ThisFilter *) vf; if (!frame->interlaced_frame) { filter->progressive_frame_seen = 1; } - + if (filter->progressive_frame_seen && frame->interlaced_frame) { filter->interlaced_frame_seen = 1; } - + if (!frame->interlaced_frame && !filter->apply_filter && filter->interlaced_frame_seen && @@ -68,10 +68,10 @@ IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) fprintf(stderr,"turning on inverse telecine filter"); filter->apply_filter = 1; } - + if (!filter->apply_filter) return 1; - + SetupFilter(filter, frame->width, frame->height, (int*)frame->pitches); struct pullup_buffer *b; @@ -85,15 +85,15 @@ IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) struct pullup_context *c = filter->context; if (c->bpp[0] == 0) c->bpp[0] = c->bpp[1] = c->bpp[2] = frame->bpp; - + b = pullup_get_buffer(c,2); if (!b) { f = pullup_get_frame(c); pullup_release_frame(f); - return 0; + return 0; } - + memcpy_pic(b->planes[0], frame->buf + frame->offsets[0], height, ypitch, ypitch); memcpy_pic(b->planes[1], frame->buf + frame->offsets[1], @@ -112,8 +112,8 @@ IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) if (!f) return 0; - - + + if (f->length < 2) { pullup_release_frame(f); @@ -150,7 +150,7 @@ IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) cheight, cpitch, cpitch); memcpy_pic(frame->buf + frame->offsets[2], f->buffer->planes[2], cheight, cpitch, cpitch); - + pullup_release_frame(f); return 1; @@ -159,20 +159,20 @@ IvtcFilter (VideoFilter *vf, VideoFrame *frame, int field) static void IvtcFilterCleanup( VideoFilter * filter) { - pullup_free_context((((ThisFilter *)filter)->context)); + pullup_free_context((((ThisFilter *)filter)->context)); } static void SetupFilter(ThisFilter *vf, int width, int height, int *pitches) { if (vf->width == width && vf->height == height && - vf->context->stride[0] == pitches[0] && + vf->context->stride[0] == pitches[0] && vf->context->stride[1] == pitches[1] && vf->context->stride[2] == pitches[2]) { return; } - + vf->width = width; vf->height = height; @@ -213,7 +213,7 @@ static VideoFilter *NewIvtcFilter(VideoFrameType inpixfmt, return NULL; } - memset(filter, 0, sizeof(ThisFilter)); /*MS Windows doesn't like bzero()*/ + memset(filter, 0, sizeof(ThisFilter)); filter->progressive_frame_seen = 0; filter->interlaced_frame_seen = 0; filter->apply_filter = 0; @@ -256,7 +256,7 @@ ConstFilterInfo filter_table[] = name: "ivtc", descript: "inverse telecine filter", formats: FmtList, - libname: NULL + libname: NULL }, FILT_NULL }; diff --git a/mythtv/filters/quickdnr/filter_quickdnr.c b/mythtv/filters/quickdnr/filter_quickdnr.c index 40966e00817..c90f4aa760b 100644 --- a/mythtv/filters/quickdnr/filter_quickdnr.c +++ b/mythtv/filters/quickdnr/filter_quickdnr.c @@ -2,12 +2,12 @@ * Quick DNR 0.8 * (C)opyright 2003, Debabrata Banerjee * GNU GPL 2 or later - * + * * Pass options as: * quickdnr=quality (0-255 scale adjusted) * quickdnr=Luma_threshold:Chroma_threshold (0-255) for single threshold * quickdnr=Luma_threshold1:Luma_threshold2:Chroma_threshold1:Chroma_threshold2 for double - * + * */ #include @@ -86,7 +86,7 @@ static int init_avg(ThisFilter *filter, VideoFrame *frame) { if (!alloc_avg(filter, frame->size)) return 0; - + if ((filter->offsets[0] != frame->offsets[0]) || (filter->offsets[1] != frame->offsets[1]) || (filter->offsets[2] != frame->offsets[2]) || @@ -130,7 +130,7 @@ static void init_vars(ThisFilter *tf, VideoFrame *frame, static int quickdnr(VideoFilter *f, VideoFrame *frame, int field) { (void)field; - ThisFilter *tf = (ThisFilter *)f; + ThisFilter *tf = (ThisFilter *)f; int thr1[3], thr2[3], height[3]; uint8_t *avg[3], *buf[3]; int i, y; @@ -157,20 +157,20 @@ static int quickdnr(VideoFilter *f, VideoFrame *frame, int field) } TF_END(tf, "QuickDNR: "); - + return 0; } static int quickdnr2(VideoFilter *f, VideoFrame *frame, int field) { (void)field; - ThisFilter *tf = (ThisFilter *)f; + ThisFilter *tf = (ThisFilter *)f; int thr1[3], thr2[3], height[3]; uint8_t *avg[3], *buf[3]; int i, y; TF_VARS; - + TF_START; if (!init_avg(tf, frame)) @@ -198,7 +198,7 @@ static int quickdnr2(VideoFilter *f, VideoFrame *frame, int field) } TF_END(tf, "QuickDNR2: "); - + return 0; } @@ -228,7 +228,7 @@ static int quickdnrMMX(VideoFilter *f, VideoFrame *frame, int field) processor automatically does a prefetchT0 in these cases. The instruction is meant to be used to specify a different prefetch cache level, or to prefetch non-sequental data. - + These prefetches are not available on all MMX processors so if we wanted to use them we would need to test for a prefetch capable processor before using them. -- dtk @@ -321,9 +321,9 @@ static int quickdnr2MMX(VideoFilter *f, VideoFrame *frame, int field) int i, y; TF_VARS; - + TF_START; - + if (!init_avg(tf, frame)) return 0; @@ -364,7 +364,7 @@ static int quickdnr2MMX(VideoFilter *f, VideoFrame *frame, int field) "paddb %%mm4, %%mm3 \n\t" // hack! No proper unsigned mmx compares! "pcmpgtb %%mm5, %%mm3 \n\t" // compare diff with mask - + "movq %%mm2, %%mm0 \n\t" // reload registers "movq %%mm7, %%mm1 \n\t" @@ -477,7 +477,7 @@ static VideoFilter *new_filter(VideoFrameType inpixfmt, return NULL; } - memset(filter, 0, sizeof(ThisFilter)); /*MS Windows doesn't like bzero()*/ + memset(filter, 0, sizeof(ThisFilter)); filter->vf.cleanup = &cleanup; filter->Luma_threshold1 = LUMA_THRESHOLD1_DEFAULT; filter->Chroma_threshold1 = CHROMA_THRESHOLD1_DEFAULT; @@ -556,7 +556,7 @@ static VideoFilter *new_filter(VideoFrameType inpixfmt, #endif TF_INIT(filter); - + #ifdef QUICKDNR_DEBUG fprintf(stderr, "DNR Loaded: 0x%X Params: %u %u \n" "Luma1: %3d 0x%X%X Luma2: 0x%X%X\n" @@ -581,13 +581,13 @@ static VideoFilter *new_filter(VideoFrameType inpixfmt, return (VideoFilter*) filter; } -static FmtConv FmtList[] = +static FmtConv FmtList[] = { { FMT_YV12, FMT_YV12 }, FMT_NULL }; -ConstFilterInfo filter_table[] = +ConstFilterInfo filter_table[] = { { filter_init: &new_filter, diff --git a/mythtv/libs/libmyth/audiooutputbase.cpp b/mythtv/libs/libmyth/audiooutputbase.cpp index 5ce99baa533..5c153005359 100644 --- a/mythtv/libs/libmyth/audiooutputbase.cpp +++ b/mythtv/libs/libmyth/audiooutputbase.cpp @@ -102,7 +102,6 @@ AudioOutputBase::AudioOutputBase(const AudioSettings &settings) : m_spdifenc(NULL) { src_in = (float *)AOALIGN(src_in_buf); - // The following are not bzero() because MS Windows doesn't like it. memset(&src_data, 0, sizeof(SRC_DATA)); memset(src_in, 0, sizeof(float) * kAudioSRCInputSize); memset(audiobuffer, 0, sizeof(char) * kAudioRingBufferSize); diff --git a/mythtv/libs/libmyth/audiooutputca.cpp b/mythtv/libs/libmyth/audiooutputca.cpp index 556e9dde80f..a48c31e3327 100644 --- a/mythtv/libs/libmyth/audiooutputca.cpp +++ b/mythtv/libs/libmyth/audiooutputca.cpp @@ -194,7 +194,7 @@ bool CoreAudioData::OpenAnalog() // Set up the audio output unit AudioStreamBasicDescription conv_in_desc; - bzero(&conv_in_desc, sizeof(AudioStreamBasicDescription)); + memset(&conv_in_desc, 0, sizeof(AudioStreamBasicDescription)); conv_in_desc.mSampleRate = mCA->samplerate; conv_in_desc.mFormatID = kAudioFormatLinearPCM; conv_in_desc.mFormatFlags = formatFlags; @@ -392,7 +392,7 @@ bool AudioOutputCA::RenderAudio(unsigned char *aubuf, if (written_size && (size > written_size)) { // play silence on buffer underrun - bzero(aubuf + written_size, size - written_size); + memset(aubuf + written_size, 0, size - written_size); } //Audio received is in SMPTE channel order, reorder to CA unless passthru @@ -458,7 +458,7 @@ OSStatus RenderCallbackAnalog(void *inRefCon, inTimeStamp->mHostTime)) { // play silence if RenderAudio returns false - bzero(ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize); + memset(ioData->mBuffers[0].mData, 0, ioData->mBuffers[0].mDataByteSize); *ioActionFlags = kAudioUnitRenderAction_OutputIsSilence; } return noErr; @@ -508,7 +508,7 @@ static OSStatus RenderCallbackSPDIF(AudioDeviceID inDevice, outOutputData->mBuffers[index].mDataByteSize, inOutputTime->mHostTime)) // play silence if RenderAudio returns false - bzero(outOutputData->mBuffers[index].mData, + memset(outOutputData->mBuffers[index].mData, 0, outOutputData->mBuffers[index].mDataByteSize); return noErr; @@ -833,7 +833,7 @@ bool *CoreAudioData::ChannelsList(AudioDeviceID d, bool passthru) if ((list = (bool *)malloc((CHANNELS_MAX+1) * sizeof(bool))) == NULL) return NULL; - bzero(list, (CHANNELS_MAX+1) * sizeof(bool)); + memset(list, 0, (CHANNELS_MAX+1) * sizeof(bool)); streams = StreamsList(mDeviceID); if (!streams) @@ -861,7 +861,7 @@ bool *CoreAudioData::ChannelsList(AudioDeviceID d, bool passthru) } } free(formats); - } + } } if (!founddigital) diff --git a/mythtv/libs/libmyth/audiooutputjack.cpp b/mythtv/libs/libmyth/audiooutputjack.cpp index dc9f57c03b4..85bafc84b4e 100644 --- a/mythtv/libs/libmyth/audiooutputjack.cpp +++ b/mythtv/libs/libmyth/audiooutputjack.cpp @@ -393,7 +393,7 @@ int AudioOutputJACK::JackCallback(jack_nframes_t nframes) if (bytes_needed > bytes_read) { // play silence on buffer underrun - bzero(aubuf + bytes_read, bytes_needed - bytes_read); + memset(aubuf + bytes_read, 0, bytes_needed - bytes_read); if (!pauseaudio) VBERROR(QString("Having to insert silence because GetAudioData " "hasn't returned enough data. Wanted: %1 Got: %2") diff --git a/mythtv/libs/libmyth/audiooutputnull.cpp b/mythtv/libs/libmyth/audiooutputnull.cpp index 23d4ad67008..b6e5ff5d2cc 100644 --- a/mythtv/libs/libmyth/audiooutputnull.cpp +++ b/mythtv/libs/libmyth/audiooutputnull.cpp @@ -28,7 +28,7 @@ AudioOutputNULL::AudioOutputNULL(const AudioSettings &settings) : pcm_output_buffer_mutex(QMutex::NonRecursive), current_buffer_size(0) { - bzero(pcm_output_buffer, sizeof(char) * NULLAUDIO_OUTPUT_BUFFER_SIZE); + memset(pcm_output_buffer, 0, sizeof(char) * NULLAUDIO_OUTPUT_BUFFER_SIZE); InitSettings(settings); if (settings.init) Reconfigure(settings); @@ -112,7 +112,7 @@ int AudioOutputNULL::readOutputData(unsigned char *read_buffer, int max_length) current_buffer_size - amount_to_read); current_buffer_size -= amount_to_read; pcm_output_buffer_mutex.unlock(); - + return amount_to_read; } diff --git a/mythtv/libs/libmythdb/mythcoreutil.cpp b/mythtv/libs/libmythdb/mythcoreutil.cpp index 23cddf25895..fd9d5749f38 100644 --- a/mythtv/libs/libmythdb/mythcoreutil.cpp +++ b/mythtv/libs/libmythdb/mythcoreutil.cpp @@ -40,7 +40,7 @@ long long getDiskSpace(const QString &file_on_disk, long long &total, long long &used) { struct statfs statbuf; - bzero(&statbuf, sizeof(statbuf)); + memset(&statbuf, 0, sizeof(statbuf)); long long freespace = -1; QByteArray cstr = file_on_disk.toLocal8Bit(); @@ -82,7 +82,7 @@ bool extractZIP(const QString &zipFile, const QString &outDir) } ec = uz.extractAll(outDir); - + if (ec != UnZip::Ok) { VERBOSE(VB_IMPORTANT, diff --git a/mythtv/libs/libmythupnp/eventing.h b/mythtv/libs/libmythupnp/eventing.h index c81881d05e7..11ebad87bdb 100644 --- a/mythtv/libs/libmythupnp/eventing.h +++ b/mythtv/libs/libmythupnp/eventing.h @@ -3,10 +3,10 @@ // Created : Dec. 22, 2006 // // Purpose : uPnp Eventing Base Class Definition -// +// // Copyright (c) 2006 David Blain -// -// This library is free software; you can redistribute it and/or +// +// This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or at your option any later version of the LGPL. @@ -37,15 +37,15 @@ class QTextStream; ////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////////////// - + class UPNP_PUBLIC SubscriberInfo { public: SubscriberInfo() : nKey( 0 ), nDuration( 0 ) { - bzero( &ttExpires, sizeof( ttExpires ) ); - bzero( &ttLastNotified, sizeof( ttLastNotified ) ); + memset( &ttExpires, 0, sizeof( ttExpires ) ); + memset( &ttLastNotified, 0, sizeof( ttLastNotified ) ); sUUID = QUuid::createUuid().toString(); sUUID = sUUID.mid( 1, sUUID.length() - 2); } @@ -53,8 +53,8 @@ class UPNP_PUBLIC SubscriberInfo SubscriberInfo( const QString &url, unsigned long duration ) : nKey( 0 ), nDuration( duration ) { - bzero( &ttExpires, sizeof( ttExpires ) ); - bzero( &ttLastNotified, sizeof( ttLastNotified ) ); + memset( &ttExpires, 0, sizeof( ttExpires ) ); + memset( &ttLastNotified, 0, sizeof( ttLastNotified ) ); sUUID = QUuid::createUuid().toString(); sUUID = sUUID.mid( 1, sUUID.length() - 2); qURL = url; @@ -112,7 +112,7 @@ class UPNP_PUBLIC StateVariableBase public: - explicit StateVariableBase( const QString &sName, bool bNotify = false ) + explicit StateVariableBase( const QString &sName, bool bNotify = false ) { m_bNotify = bNotify; m_sName = sName; @@ -121,14 +121,14 @@ class UPNP_PUBLIC StateVariableBase virtual QString ToString() = 0; }; - + ////////////////////////////////////////////////////////////////////////////// template< class T > class UPNP_PUBLIC StateVariable : public StateVariableBase { private: - + T m_value; public: @@ -149,14 +149,14 @@ class UPNP_PUBLIC StateVariable : public StateVariableBase virtual QString ToString() { - return QString( "%1" ).arg( m_value ); + return QString( "%1" ).arg( m_value ); } // ------------------------------------------------------------------ - T GetValue() - { - return m_value; + T GetValue() + { + return m_value; } // ------------------------------------------------------------------ @@ -179,7 +179,7 @@ template<> inline QString state_var_init(const QString*) { return QString(); } class UPNP_PUBLIC StateVariables -{ +{ protected: virtual void Notify() = 0; @@ -189,14 +189,14 @@ class UPNP_PUBLIC StateVariables // ------------------------------------------------------------------ - StateVariables() { } + StateVariables() { } virtual ~StateVariables() { SVMap::iterator it = m_map.begin(); for (; it != m_map.end(); ++it) delete *it; m_map.clear(); - } + } // ------------------------------------------------------------------ @@ -284,8 +284,8 @@ class UPNP_PUBLIC Eventing : public HttpServerExtension, virtual void Notify ( ); void NotifySubscriber ( SubscriberInfo *pInfo ); - void HandleSubscribe ( HTTPRequest *pRequest ); - void HandleUnsubscribe( HTTPRequest *pRequest ); + void HandleSubscribe ( HTTPRequest *pRequest ); + void HandleUnsubscribe( HTTPRequest *pRequest ); // Implement UPnpServiceImpl methods that we can diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp index 80e688c740b..ddbd609f702 100644 --- a/mythtv/programs/mythbackend/mainserver.cpp +++ b/mythtv/programs/mythbackend/mainserver.cpp @@ -4163,7 +4163,7 @@ void MainServer::BackendQueryDiskSpace(QStringList &strlist, bool consolidated, { QByteArray cdir = currentDir.toAscii(); getDiskSpace(cdir.constData(), totalKB, usedKB); - bzero(&statbuf, sizeof(statbuf)); + memset(&statbuf, 0, sizeof(statbuf)); localStr = "1"; // Assume local bSize = 0; @@ -5462,7 +5462,7 @@ void MainServer::connectionClosed(MythSocket *socket) { list disconnectedSlaves; bool needsReschedule = false; - + if (ismaster && pbs->isSlaveBackend()) { VERBOSE(VB_IMPORTANT,QString("Slave backend: %1 no longer connected") diff --git a/mythtv/programs/mythcommflag/BorderDetector.cpp b/mythtv/programs/mythcommflag/BorderDetector.cpp index 69788e5ecb4..49ddd5cc7f2 100644 --- a/mythtv/programs/mythcommflag/BorderDetector.cpp +++ b/mythtv/programs/mythcommflag/BorderDetector.cpp @@ -30,7 +30,7 @@ BorderDetector::BorderDetector(void) , debugLevel(0) , time_reported(false) { - bzero(&analyze_time, sizeof(analyze_time)); + memset(&analyze_time, 0, sizeof(analyze_time)); debugLevel = gCoreContext->GetNumSetting("BorderDetectorDebugLevel", 0); if (debugLevel >= 1)