From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- mpeglib/lib/util/abstract/threadQueue.cpp | 16 +++++------ mpeglib/lib/util/abstract/threadQueue.h | 4 +-- mpeglib/lib/util/dynBuffer.cpp | 2 +- mpeglib/lib/util/dynBuffer.h | 2 +- mpeglib/lib/util/mmx/mmx_asm.h | 2 +- .../lib/util/render/dither/colorTableHighBit.cpp | 20 +++++++------- mpeglib/lib/util/render/dither/ditherer_mmx16.cpp | 32 +++++++++++----------- mpeglib/lib/util/render/dither2YUV/rgb2yuvdefs.h | 4 +-- mpeglib/lib/util/render/x11/initDisplay.cpp | 6 ++-- mpeglib/lib/util/render/x11/x11Surface.cpp | 2 +- 10 files changed, 45 insertions(+), 45 deletions(-) (limited to 'mpeglib/lib/util') diff --git a/mpeglib/lib/util/abstract/threadQueue.cpp b/mpeglib/lib/util/abstract/threadQueue.cpp index 1b130ba9..fd8a4a39 100644 --- a/mpeglib/lib/util/abstract/threadQueue.cpp +++ b/mpeglib/lib/util/abstract/threadQueue.cpp @@ -12,7 +12,7 @@ #include "threadQueue.h" -#define _MAX_THREAD_IN_QUEUE 5 +#define _MAX_THREAD_IN_TQUEUE 5 #include @@ -37,9 +37,9 @@ WaitThreadEntry::~WaitThreadEntry() { ThreadQueue::ThreadQueue() { - waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_QUEUE]; + waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_TQUEUE]; int i; - for(i=0;i<_MAX_THREAD_IN_QUEUE;i++) { + for(i=0;i<_MAX_THREAD_IN_TQUEUE;i++) { waitThreadEntries[i]=new WaitThreadEntry(); } abs_thread_mutex_init(&queueMut); @@ -56,7 +56,7 @@ ThreadQueue::~ThreadQueue() { exit(0); } int i; - for(i=0;i<_MAX_THREAD_IN_QUEUE;i++) { + for(i=0;i<_MAX_THREAD_IN_TQUEUE;i++) { delete waitThreadEntries[i]; } delete [] waitThreadEntries; @@ -73,14 +73,14 @@ void ThreadQueue::waitForExclusiveAccess() { } // wait size++; - if (size == _MAX_THREAD_IN_QUEUE) { - cout << "Aieee! ThreadQueue can only buffer:"<<_MAX_THREAD_IN_QUEUE<waitCond); insertPos++; // wrap counter - if (insertPos == _MAX_THREAD_IN_QUEUE) { + if (insertPos == _MAX_THREAD_IN_TQUEUE) { insertPos=0; } abs_thread_cond_wait(waitCond,&queueMut); @@ -98,7 +98,7 @@ void ThreadQueue::releaseExclusiveAccess() { abs_thread_cond_t* waitCond=&(waitThreadEntries[removePos]->waitCond); removePos++; // wrap counter - if (removePos == _MAX_THREAD_IN_QUEUE) { + if (removePos == _MAX_THREAD_IN_TQUEUE) { removePos=0; } size--; diff --git a/mpeglib/lib/util/abstract/threadQueue.h b/mpeglib/lib/util/abstract/threadQueue.h index 4c650e21..765713b6 100644 --- a/mpeglib/lib/util/abstract/threadQueue.h +++ b/mpeglib/lib/util/abstract/threadQueue.h @@ -11,8 +11,8 @@ */ -#ifndef __THREADQUEUE_H -#define __THREADQUEUE_H +#ifndef __THREADTQUEUE_H +#define __THREADTQUEUE_H #include "abs_thread.h" diff --git a/mpeglib/lib/util/dynBuffer.cpp b/mpeglib/lib/util/dynBuffer.cpp index c93d5381..c1eb2a9d 100644 --- a/mpeglib/lib/util/dynBuffer.cpp +++ b/mpeglib/lib/util/dynBuffer.cpp @@ -132,7 +132,7 @@ void DynBuffer::grow(int size) { } -int DynBuffer::find(char zeichen) { +int DynBuffer::tqfind(char zeichen) { int i; int nlen=len(); for(i=0;i> (8 - number_of_bits_set(red_mask)); - r_2_pix_alloc[i + 256] <<= free_bits_at_bottom(red_mask); - g_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(green_mask)); - g_2_pix_alloc[i + 256] <<= free_bits_at_bottom(green_mask); - b_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(blue_mask)); - b_2_pix_alloc[i + 256] <<= free_bits_at_bottom(blue_mask); + r_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(red_tqmask)); + r_2_pix_alloc[i + 256] <<= free_bits_at_bottom(red_tqmask); + g_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(green_tqmask)); + g_2_pix_alloc[i + 256] <<= free_bits_at_bottom(green_tqmask); + b_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(blue_tqmask)); + b_2_pix_alloc[i + 256] <<= free_bits_at_bottom(blue_tqmask); /* * If we have 16-bit output depth, then we double the value * in the top word. This means that we can write out both diff --git a/mpeglib/lib/util/render/dither/ditherer_mmx16.cpp b/mpeglib/lib/util/render/dither/ditherer_mmx16.cpp index 757f0676..1de9cc17 100644 --- a/mpeglib/lib/util/render/dither/ditherer_mmx16.cpp +++ b/mpeglib/lib/util/render/dither/ditherer_mmx16.cpp @@ -26,8 +26,8 @@ static unsigned short MMX16_Vredcoeff[] = {0x66, 0x66, 0x66, 0x66}; static unsigned short MMX16_Ugrncoeff[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; static unsigned short MMX16_Vgrncoeff[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; static unsigned short MMX16_Ycoeff[] = {0x4a, 0x4a, 0x4a, 0x4a}; -static unsigned short MMX16_redmask[] = {0xf800, 0xf800, 0xf800, 0xf800}; -static unsigned short MMX16_grnmask[] = {0x7e0, 0x7e0, 0x7e0, 0x7e0}; +static unsigned short MMX16_redtqmask[] = {0xf800, 0xf800, 0xf800, 0xf800}; +static unsigned short MMX16_grntqmask[] = {0x7e0, 0x7e0, 0x7e0, 0x7e0}; void dummy_dithermmx16() { cout << "MMX16_0"<display; @@ -152,7 +152,7 @@ void CreateFullColorWindow (XWindow* xwindow) { cout << "visual is null"<colormap==0) { xswa.colormap = XCreateColormap(dpy, XRootWindow(dpy, screen), @@ -166,7 +166,7 @@ void CreateFullColorWindow (XWindow* xwindow) { /* xwindow->window = XCreateWindow(dpy, RootWindow(dpy, screen), x, y, w, h, (unsigned int) 1, depth, c_class, - visual, mask, &xswa); + visual, tqmask, &xswa); */ } diff --git a/mpeglib/lib/util/render/x11/x11Surface.cpp b/mpeglib/lib/util/render/x11/x11Surface.cpp index d7b8f052..0aaf7743 100644 --- a/mpeglib/lib/util/render/x11/x11Surface.cpp +++ b/mpeglib/lib/util/render/x11/x11Surface.cpp @@ -183,7 +183,7 @@ int X11Surface::open(int width, int height,const char *title, bool border) { } else { // depth is <= 8 // allocate memory for dithertables - // gets the rgb masks + // gets the rgb tqmasks initColorDisplay(xWindow); // create 8 bit dithertables // create private colormap -- cgit v1.2.1