From 1e3475e369c7f3a794234c4c4da69e1df5264e49 Mon Sep 17 00:00:00 2001
From: Xander Victory <x@xandervictory.id.au>
Date: Sat, 12 May 2012 20:39:16 +0800
Subject: [PATCH] enable compilation on mingw32-w64 (64 bit mingw)
---
mythtv/filters/greedyhdeint/mangle.h | 2 +-
mythtv/filters/linearblend/filter_linearblend.c | 4 +-
mythtv/filters/yadif/aclib_template.c | 12 ++++----
mythtv/filters/yadif/filter_yadif.c | 4 +-
mythtv/libs/libmyth/audio/audiooutputbase.cpp | 4 ++
mythtv/libs/libmyth/audio/audiooutpututil.cpp | 8 ++--
mythtv/libs/libmyth/audio/audiooutputwin.cpp | 4 +-
mythtv/libs/libmythbase/compat.h | 2 +-
mythtv/libs/libmythbluray/file/filesystem.h | 6 +++-
mythtv/libs/libmythsoundtouch/FIFOSampleBuffer.cpp | 2 +-
mythtv/libs/libmythsoundtouch/TDStretch.cpp | 2 +-
.../libs/libmythsoundtouch/cpu_detect_x86_gcc.cpp | 2 +-
mythtv/libs/libmythsoundtouch/sse_gcc.cpp | 31 +++++++++++++++----
mythtv/libs/libmythtv/RTjpegN.cpp | 8 ++--
mythtv/libs/libmythtv/nuppeldecoder.cpp | 4 +-
mythtv/libs/libmythtv/signalmonitor.cpp | 2 +-
.../programs/mythfrontend/audiogeneralsettings.cpp | 2 +-
17 files changed, 62 insertions(+), 37 deletions(-)
diff --git a/mythtv/filters/greedyhdeint/mangle.h b/mythtv/filters/greedyhdeint/mangle.h
index a868245..8dd7ff5 100644
|
a
|
b
|
|
| 9 | 9 | |
| 10 | 10 | /* Feel free to add more to the list, eg. a.out IMO */ |
| 11 | 11 | /* Use rip-relative addressing if compiling PIC code on x86-64. */ |
| 12 | | #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \ |
| | 12 | #if defined(__CYGWIN__) || defined(__MINGW32__) && !defined(_WIN64) || defined(__OS2__) || \ |
| 13 | 13 | CONFIG_DARWIN || (defined(__OpenBSD__) && !defined(__ELF__)) |
| 14 | 14 | #if ARCH_X86_64 && defined(PIC) |
| 15 | 15 | #define MANGLE(a) "_" #a"(%%rip)" |
diff --git a/mythtv/filters/linearblend/filter_linearblend.c b/mythtv/filters/linearblend/filter_linearblend.c
index dda046f..5317f66 100644
|
a
|
b
|
void linearBlendMMX(unsigned char *src, int stride)
|
| 82 | 82 | PAVGB(%%mm1, %%mm2) // 2L8 + L7 + L9 |
| 83 | 83 | "movq %%mm2, (%%"REG_d", %1, 2) \n\t" |
| 84 | 84 | |
| 85 | | : : "r" (src), "r" ((long)stride) |
| | 85 | : : "r" (src), "r" ((intptr_t)stride) |
| 86 | 86 | : "%"REG_a, "%"REG_d |
| 87 | 87 | ); |
| 88 | 88 | } |
| … |
… |
void linearBlend3DNow(unsigned char *src, int stride)
|
| 129 | 129 | PAVGUSB(%%mm1, %%mm2) // 2L8 + L7 + L9 |
| 130 | 130 | "movq %%mm2, (%%"REG_d", %1, 2) \n\t" |
| 131 | 131 | |
| 132 | | : : "r" (src), "r" ((long)stride) |
| | 132 | : : "r" (src), "r" ((intptr_t)stride) |
| 133 | 133 | : "%"REG_a, "%"REG_d |
| 134 | 134 | ); |
| 135 | 135 | } |
diff --git a/mythtv/filters/yadif/aclib_template.c b/mythtv/filters/yadif/aclib_template.c
index 436db6a..c80aedd 100644
|
a
|
b
|
If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru.
|
| 78 | 78 | /* for small memory blocks (<256 bytes) this version is faster */ |
| 79 | 79 | #define small_memcpy(to,from,n)\ |
| 80 | 80 | {\ |
| 81 | | register unsigned long int dummy;\ |
| | 81 | register uintptr_t dummy;\ |
| 82 | 82 | __asm__ __volatile__(\ |
| 83 | 83 | "rep; movsb"\ |
| 84 | 84 | :"=&D"(to), "=&S"(from), "=&c"(dummy)\ |
| … |
… |
void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
| 165 | 165 | #endif |
| 166 | 166 | if (len >= MIN_LEN) |
| 167 | 167 | { |
| 168 | | register unsigned long int delta; |
| | 168 | register uintptr_t delta; |
| 169 | 169 | /* Align destinition to MMREG_SIZE -boundary */ |
| 170 | | delta = ((unsigned long int)to)&(MMREG_SIZE-1); |
| | 170 | delta = ((uintptr_t)to)&(MMREG_SIZE-1); |
| 171 | 171 | if (delta) |
| 172 | 172 | { |
| 173 | 173 | delta=MMREG_SIZE-delta; |
| … |
… |
void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
| 186 | 186 | processor's decoders, but it's not always possible. |
| 187 | 187 | */ |
| 188 | 188 | #ifdef HAVE_SSE /* Only P3 (may be Cyrix3) */ |
| 189 | | if (((unsigned long)from) & 15) |
| | 189 | if (((uintptr_t)from) & 15) |
| 190 | 190 | /* if SRC is misaligned */ |
| 191 | 191 | for (; i>0; i--) |
| 192 | 192 | { |
| … |
… |
void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
| 231 | 231 | } |
| 232 | 232 | #else |
| 233 | 233 | // Align destination at BLOCK_SIZE boundary |
| 234 | | for (; ((long)to & (BLOCK_SIZE-1)) && i>0; i--) |
| | 234 | for (; ((intptr_t)to & (BLOCK_SIZE-1)) && i>0; i--) |
| 235 | 235 | { |
| 236 | 236 | __asm__ __volatile__ ( |
| 237 | 237 | #ifndef HAVE_ONLY_MMX1 |
| … |
… |
void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
| 318 | 318 | " jae 1b \n\t" |
| 319 | 319 | MOVX" %6, %%"REG_b" \n\t" |
| 320 | 320 | : "+r" (from), "+r" (to), "+r" (i) |
| 321 | | : "r" ((long)BLOCK_SIZE), "i" (BLOCK_SIZE/64), "i" ((long)CONFUSION_FACTOR), "m" (oldbx) |
| | 321 | : "r" ((intptr_t)BLOCK_SIZE), "i" (BLOCK_SIZE/64), "i" ((intptr_t)CONFUSION_FACTOR), "m" (oldbx) |
| 322 | 322 | : "%"REG_a, "memory" |
| 323 | 323 | ); |
| 324 | 324 | |
diff --git a/mythtv/filters/yadif/filter_yadif.c b/mythtv/filters/yadif/filter_yadif.c
index cd2c1e3..b2b8d58 100644
|
a
|
b
|
static void filter_line_mmx2(struct ThisFilter *p, uint8_t *dst,
|
| 352 | 352 | :[prev] "r"(prev),\ |
| 353 | 353 | [cur] "r"(cur),\ |
| 354 | 354 | [next] "r"(next),\ |
| 355 | | [prefs]"r"((long)refs),\ |
| 356 | | [mrefs]"r"((long)-refs),\ |
| | 355 | [prefs]"r"((intptr_t)refs),\ |
| | 356 | [mrefs]"r"((intptr_t)-refs),\ |
| 357 | 357 | [pw1] "m"(pw_1),\ |
| 358 | 358 | [pb1] "m"(pb_1),\ |
| 359 | 359 | [mode] "g"(mode)\ |
diff --git a/mythtv/libs/libmyth/audio/audiooutputbase.cpp b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
index 4024221..79d3700 100644
|
a
|
b
|
|
| 26 | 26 | #define RPOS audiobuffer + raud |
| 27 | 27 | #define ABUF audiobuffer |
| 28 | 28 | #define STST soundtouch::SAMPLETYPE |
| | 29 | #ifdef _WIN64 |
| | 30 | #define AOALIGN(x) (((long long)&x + 15) & ~0xf); |
| | 31 | #else |
| 29 | 32 | #define AOALIGN(x) (((long)&x + 15) & ~0xf); |
| | 33 | #endif |
| 30 | 34 | |
| 31 | 35 | // 1,2,5 and 7 channels are currently valid for upmixing if required |
| 32 | 36 | #define UPMIX_CHANNEL_MASK ((1<<1)|(1<<2)|(1<<5)|1<<7) |
diff --git a/mythtv/libs/libmyth/audio/audiooutpututil.cpp b/mythtv/libs/libmyth/audio/audiooutpututil.cpp
index 68e882b..2a69f8a 100644
|
a
|
b
|
static int fromFloat8(uchar *out, float *in, int len)
|
| 140 | 140 | float f = (1<<7) - 1; |
| 141 | 141 | |
| 142 | 142 | #if ARCH_X86 |
| 143 | | if (sse_check() && len >= 16 && ((unsigned long)out & 0xf) == 0) |
| | 143 | if (sse_check() && len >= 16 && ((uintptr_t)out & 0xf) == 0) |
| 144 | 144 | { |
| 145 | 145 | int loops = len >> 4; |
| 146 | 146 | i = loops << 4; |
| … |
… |
static int fromFloat16(short *out, float *in, int len)
|
| 245 | 245 | float f = (1<<15) - 1; |
| 246 | 246 | |
| 247 | 247 | #if ARCH_X86 |
| 248 | | if (sse_check() && len >= 16 && ((unsigned long)out & 0xf) == 0) |
| | 248 | if (sse_check() && len >= 16 && ((uintptr_t)out & 0xf) == 0) |
| 249 | 249 | { |
| 250 | 250 | int loops = len >> 4; |
| 251 | 251 | i = loops << 4; |
| … |
… |
static int fromFloat32(AudioFormat format, int *out, float *in, int len)
|
| 352 | 352 | shift = 0; |
| 353 | 353 | |
| 354 | 354 | #if ARCH_X86 |
| 355 | | if (sse_check() && len >= 16 && ((unsigned long)out & 0xf) == 0) |
| | 355 | if (sse_check() && len >= 16 && ((uintptr_t)out & 0xf) == 0) |
| 356 | 356 | { |
| 357 | 357 | float o = 1, mo = -1; |
| 358 | 358 | int loops = len >> 4; |
| … |
… |
static int fromFloatFLT(float *out, float *in, int len)
|
| 417 | 417 | int i = 0; |
| 418 | 418 | |
| 419 | 419 | #if ARCH_X86 |
| 420 | | if (sse_check() && len >= 16 && ((unsigned long)in & 0xf) == 0) |
| | 420 | if (sse_check() && len >= 16 && ((uintptr_t)in & 0xf) == 0) |
| 421 | 421 | { |
| 422 | 422 | int loops = len >> 4; |
| 423 | 423 | float o = 1, mo = -1; |
diff --git a/mythtv/libs/libmyth/audio/audiooutputwin.cpp b/mythtv/libs/libmyth/audio/audiooutputwin.cpp
index ff665dc..0b81e82 100644
|
a
|
b
|
bool AudioOutputWin::OpenDevice(void)
|
| 218 | 218 | |
| 219 | 219 | MMRESULT mmr = waveOutOpen(&m_priv->m_hWaveOut, WAVE_MAPPER, |
| 220 | 220 | (WAVEFORMATEX *)&wf, |
| 221 | | (DWORD)AudioOutputWinPrivate::waveOutProc, |
| 222 | | (DWORD)this, CALLBACK_FUNCTION); |
| | 221 | (DWORD_PTR)AudioOutputWinPrivate::waveOutProc, |
| | 222 | (DWORD_PTR)this, CALLBACK_FUNCTION); |
| 223 | 223 | |
| 224 | 224 | if (mmr == WAVERR_BADFORMAT) |
| 225 | 225 | { |
diff --git a/mythtv/libs/libmythbase/compat.h b/mythtv/libs/libmythbase/compat.h
index 425624a..6e97f73 100644
|
a
|
b
|
inline int statfs(const char* path, struct statfs* buffer)
|
| 202 | 202 | |
| 203 | 203 | #ifdef USING_MINGW |
| 204 | 204 | #define mkfifo(path, mode) \ |
| 205 | | (int)CreateNamedPipeA(path, PIPE_ACCESS_DUPLEX | WRITE_DAC, \ |
| | 205 | (intptr_t)CreateNamedPipeA(path, PIPE_ACCESS_DUPLEX | WRITE_DAC, \ |
| 206 | 206 | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, \ |
| 207 | 207 | 1024, 1024, 10000, NULL) |
| 208 | 208 | #endif // USING_MINGW |
diff --git a/mythtv/libs/libmythbluray/file/filesystem.h b/mythtv/libs/libmythbluray/file/filesystem.h
index c173f4c..b9c5ce8 100644
|
a
|
b
|
struct bd_file_s
|
| 40 | 40 | int64_t (*seek)(BD_FILE_H *file, int64_t offset, int32_t origin); |
| 41 | 41 | int64_t (*tell)(BD_FILE_H *file); |
| 42 | 42 | int (*eof)(BD_FILE_H *file); |
| 43 | | int (*stat)(BD_FILE_H *file, struct stat *buf); |
| | 43 | #ifdef _WIN64 |
| | 44 | int (*_stat64)(BD_FILE_H *file, struct stat *buf);//not sure if this is just my mingw32-w64 install or not |
| | 45 | #else |
| | 46 | int (*stat)(BD_FILE_H *file, struct stat *buf); |
| | 47 | #endif |
| 44 | 48 | int64_t (*read)(BD_FILE_H *file, uint8_t *buf, int64_t size); |
| 45 | 49 | int64_t (*write)(BD_FILE_H *file, const uint8_t *buf, int64_t size); |
| 46 | 50 | }; |
diff --git a/mythtv/libs/libmythsoundtouch/FIFOSampleBuffer.cpp b/mythtv/libs/libmythsoundtouch/FIFOSampleBuffer.cpp
index f88b4f6..ad4573a 100644
|
a
|
b
|
void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement)
|
| 171 | 171 | { |
| 172 | 172 | throw std::runtime_error("Couldn't allocate memory!\n"); |
| 173 | 173 | } |
| 174 | | temp = (SAMPLETYPE *)(((ulong)tempUnaligned + 15) & -16); |
| | 174 | temp = (SAMPLETYPE *)(((intptr_t)tempUnaligned + 15) & -16); |
| 175 | 175 | memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE)); |
| 176 | 176 | delete[] bufferUnaligned; |
| 177 | 177 | buffer = temp; |
diff --git a/mythtv/libs/libmythsoundtouch/TDStretch.cpp b/mythtv/libs/libmythsoundtouch/TDStretch.cpp
index d00b057..9b55468 100644
|
a
|
b
|
void TDStretch::acceptNewOverlapLength(uint newOverlapLength)
|
| 781 | 781 | |
| 782 | 782 | pRefMidBufferUnaligned = new SAMPLETYPE[midBufferLength + 16 / sizeof(SAMPLETYPE)]; |
| 783 | 783 | // ensure that 'pRefMidBuffer' is aligned to 16 byte boundary for efficiency |
| 784 | | pRefMidBuffer = (SAMPLETYPE *)((((ulong)pRefMidBufferUnaligned) + 15) & -16); |
| | 784 | pRefMidBuffer = (SAMPLETYPE *)((((intptr_t)pRefMidBufferUnaligned) + 15) & -16); |
| 785 | 785 | } |
| 786 | 786 | } |
| 787 | 787 | |
diff --git a/mythtv/libs/libmythsoundtouch/cpu_detect_x86_gcc.cpp b/mythtv/libs/libmythsoundtouch/cpu_detect_x86_gcc.cpp
index ac5c284..de82b17 100644
|
a
|
b
|
static int mm_support(void)
|
| 95 | 95 | int rval = 0; |
| 96 | 96 | int eax, ebx, ecx, edx; |
| 97 | 97 | int max_std_level, max_ext_level, std_caps=0, ext_caps=0; |
| 98 | | long a, c; |
| | 98 | intptr_t a, c; |
| 99 | 99 | |
| 100 | 100 | __asm__ __volatile__ ( |
| 101 | 101 | /* See if CPUID instruction is supported ... */ |
diff --git a/mythtv/libs/libmythsoundtouch/sse_gcc.cpp b/mythtv/libs/libmythsoundtouch/sse_gcc.cpp
index acbbcd9..2c8ff53 100644
|
a
|
b
|
double TDStretchSSE3::calcCrossCorrMulti(const float *mPos, const float *cPos) c
|
| 11 | 11 | { |
| 12 | 12 | double corr = 0; |
| 13 | 13 | int count = overlapLength * channels; |
| 14 | | int loops = count >> 4; |
| | 14 | #ifdef _WIN64 |
| | 15 | intptr_t loops = count >> 4; |
| | 16 | #else |
| | 17 | int loops = count >> 4; |
| | 18 | #endif |
| 15 | 19 | int i = loops << 4; |
| 16 | 20 | const float *mp = mPos; |
| 17 | 21 | const float *cp = cPos; |
| … |
… |
double TDStretchSSE2::calcCrossCorrMulti(const float *mPos, const float *cPos) c
|
| 53 | 57 | { |
| 54 | 58 | double corr = 0; |
| 55 | 59 | int count = overlapLength * channels; |
| 56 | | int loops = count >> 4; |
| | 60 | #ifdef _WIN64 |
| | 61 | intptr_t loops = count >> 4; |
| | 62 | #else |
| | 63 | int loops = count >> 4; |
| | 64 | #endif |
| 57 | 65 | int i = loops << 4; |
| 58 | 66 | const float *mp = mPos; |
| 59 | 67 | const float *cp = cPos; |
| … |
… |
double TDStretchSSE3::calcCrossCorrStereo(const float *mPos, const float *cPos)
|
| 99 | 107 | { |
| 100 | 108 | double corr = 0; |
| 101 | 109 | int count = overlapLength <<1; |
| 102 | | int loops = count >> 4; |
| | 110 | #ifdef _WIN64 |
| | 111 | intptr_t loops = count >> 4; |
| | 112 | #else |
| | 113 | int loops = count >> 4; |
| | 114 | #endif |
| 103 | 115 | int i = loops << 4; |
| | 116 | |
| 104 | 117 | const float *mp = mPos; |
| 105 | 118 | const float *cp = cPos; |
| 106 | 119 | |
| … |
… |
double TDStretchSSE2::calcCrossCorrStereo(const float *mPos, const float *cPos)
|
| 141 | 154 | { |
| 142 | 155 | double corr = 0; |
| 143 | 156 | int count = overlapLength <<1; |
| 144 | | int loops = count >> 4; |
| | 157 | #ifdef _WIN64 |
| | 158 | intptr_t loops = count >> 4; |
| | 159 | #else |
| | 160 | int loops = count >> 4; |
| | 161 | #endif |
| 145 | 162 | int i = loops << 4; |
| 146 | 163 | const float *mp = mPos; |
| 147 | 164 | const float *cp = cPos; |
| … |
… |
void TDStretchSSE2::overlapMulti(float *output, const float *input) const
|
| 220 | 237 | "sub $1, %%ecx \n\t" |
| 221 | 238 | "jnz 1b \n\t" |
| 222 | 239 | : |
| 223 | | :"c"(overlapLength),"r"(i),"r"(m),"r"(o),"r"((long)channels) |
| | 240 | :"c"(overlapLength),"r"(i),"r"(m),"r"(o),"r"((intptr_t)channels) |
| 224 | 241 | ); |
| 225 | 242 | else |
| 226 | 243 | __asm__ volatile ( |
| … |
… |
void TDStretchSSE2::overlapMulti(float *output, const float *input) const
|
| 258 | 275 | "sub $1, %%ecx \n\t" |
| 259 | 276 | "jnz 1b \n\t" |
| 260 | 277 | : |
| 261 | | :"c"(overlapLength),"r"(i),"r"(m),"r"(o),"r"((long)channels) |
| | 278 | :"c"(overlapLength),"r"(i),"r"(m),"r"(o),"r"((intptr_t)channels) |
| 262 | 279 | ); |
| 263 | 280 | } |
| 264 | 281 | |
| … |
… |
void FIRFilterSSE2::setCoefficients(const float *coeffs, uint newLen, uint uRDF)
|
| 325 | 342 | // Ensure that filter coeffs array is aligned to 16-byte boundary |
| 326 | 343 | delete[] filterCoeffsUnalign; |
| 327 | 344 | filterCoeffsUnalign = new float[2 * newLen + 16]; |
| 328 | | filterCoeffsAlign = (float *)(((ulong)filterCoeffsUnalign + 15) & -16); |
| | 345 | filterCoeffsAlign = (float *)(((uintptr_t)filterCoeffsUnalign + 15) & -16); |
| 329 | 346 | |
| 330 | 347 | float fdiv = (float)resultDivider; |
| 331 | 348 | |
diff --git a/mythtv/libs/libmythtv/RTjpegN.cpp b/mythtv/libs/libmythtv/RTjpegN.cpp
index 1a3d61c..df6afab 100644
|
a
|
b
|
int RTjpeg::SetSize(int *w, int *h)
|
| 2727 | 2727 | |
| 2728 | 2728 | if (key_rate > 0) |
| 2729 | 2729 | { |
| 2730 | | unsigned long tmp; |
| | 2730 | uintptr_t tmp; |
| 2731 | 2731 | if (old) |
| 2732 | 2732 | delete [] old_start; |
| 2733 | 2733 | old_start = new int16_t[((4*width*height)+32)]; |
| 2734 | 2734 | |
| 2735 | | tmp = (unsigned long)old_start; |
| | 2735 | tmp = (uintptr_t)old_start; |
| 2736 | 2736 | tmp += 32; |
| 2737 | 2737 | tmp = tmp>>5; |
| 2738 | 2738 | |
| … |
… |
int RTjpeg::SetSize(int *w, int *h)
|
| 2749 | 2749 | |
| 2750 | 2750 | int RTjpeg::SetIntra(int *key, int *lm, int *cm) |
| 2751 | 2751 | { |
| 2752 | | unsigned long tmp; |
| | 2752 | uintptr_t tmp; |
| 2753 | 2753 | |
| 2754 | 2754 | if (*key < 0) |
| 2755 | 2755 | *key = 0; |
| … |
… |
int RTjpeg::SetIntra(int *key, int *lm, int *cm)
|
| 2777 | 2777 | if (old) |
| 2778 | 2778 | delete [] old_start; |
| 2779 | 2779 | old_start = new int16_t[((4*width*height)+32)]; |
| 2780 | | tmp = (unsigned long)old_start; |
| | 2780 | tmp = (uintptr_t)old_start; |
| 2781 | 2781 | tmp += 32; |
| 2782 | 2782 | tmp = tmp >> 5; |
| 2783 | 2783 | old = (int16_t *)(tmp << 5); |
diff --git a/mythtv/libs/libmythtv/nuppeldecoder.cpp b/mythtv/libs/libmythtv/nuppeldecoder.cpp
index 33d8061..8aef8a1 100644
|
a
|
b
|
NuppelDecoder::NuppelDecoder(MythPlayer *parent,
|
| 56 | 56 | memset(&extradata, 0, sizeof(extendeddata)); |
| 57 | 57 | memset(&tmppicture, 0, sizeof(AVPicture)); |
| 58 | 58 | planes[0] = planes[1] = planes[2] = 0; |
| 59 | | audioSamples = (short int*) (((long)audioSamples_buf + 15) & ~0xf); |
| | 59 | audioSamples = (short int*) (((intptr_t)audioSamples_buf + 15) & ~0xf); |
| 60 | 60 | memset(audioSamples, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof(short int)); |
| 61 | 61 | |
| 62 | 62 | // set parent class variables |
| … |
… |
int NuppelDecoder::OpenFile(RingBuffer *rbuffer, bool novideo,
|
| 615 | 615 | |
| 616 | 616 | buf = new unsigned char[video_size]; |
| 617 | 617 | strm_buf = new unsigned char[video_size * 2 + 16]; |
| 618 | | strm = (unsigned char*) (((long)strm_buf + 15) & ~0xf); |
| | 618 | strm = (unsigned char*) (((intptr_t)strm_buf + 15) & ~0xf); |
| 619 | 619 | |
| 620 | 620 | if (hasFullPositionMap) |
| 621 | 621 | return 1; |
diff --git a/mythtv/libs/libmythtv/signalmonitor.cpp b/mythtv/libs/libmythtv/signalmonitor.cpp
index 9bfc339..29a8c4d 100644
|
a
|
b
|
SignalMonitor *SignalMonitor::Init(QString cardtype, int db_cardnum,
|
| 167 | 167 | { |
| 168 | 168 | LOG(VB_GENERAL, LOG_ERR, |
| 169 | 169 | QString("Failed to create signal monitor in Init(%1, %2, 0x%3)") |
| 170 | | .arg(cardtype).arg(db_cardnum).arg((long)channel,0,16)); |
| | 170 | .arg(cardtype).arg(db_cardnum).arg((intptr_t)channel,0,16)); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | return signalMonitor; |
diff --git a/mythtv/programs/mythfrontend/audiogeneralsettings.cpp b/mythtv/programs/mythfrontend/audiogeneralsettings.cpp
index 7d40e09..c2d58a2 100644
|
a
|
b
|
void AudioTestThread::run()
|
| 621 | 621 | if (m_audioOutput) |
| 622 | 622 | { |
| 623 | 623 | char *frames_in = new char[m_channels * 1024 * sizeof(int32_t) + 15]; |
| 624 | | char *frames = (char *)(((long)frames_in + 15) & ~0xf); |
| | 624 | char *frames = (char *)(((intptr_t)frames_in + 15) & ~0xf); |
| 625 | 625 | |
| 626 | 626 | m_audioOutput->Pause(false); |
| 627 | 627 | |