Skip to content

Commit 23064e2

Browse files
committed
removed openmp compression test
1 parent 3a6bb73 commit 23064e2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Source/HapCodec/compression.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ CodecInst::CompressBegin(LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut)
2020
CompressEnd();
2121
}
2222
_isStarted = 0;
23+
#ifdef USE_OPENMP_DXT
2324
omp_set_num_threads(NUM_THREADS);
25+
#endif
2426

2527
if ( int error = CompressQuery(lpbiIn, lpbiOut) != ICERR_OK )
2628
{
@@ -105,12 +107,12 @@ void
105107
ConvertBGRAtoRGBA(int width, int height, const unsigned char* a, unsigned char* b)
106108
{
107109
int numPixels = width * height;
108-
#pragma omp parallel
110+
//#pragma omp parallel
109111
{
110-
int id = omp_get_thread_num();
112+
int id = 0;//omp_get_thread_num();
111113
const unsigned char* aa = a + (numPixels * 4 / NUM_THREADS) * id;
112114
unsigned char* bb = b + (numPixels * 4 / NUM_THREADS) * id;
113-
#pragma omp for
115+
// #pragma omp for
114116
for (int i = 0; i < numPixels; i++)
115117
{
116118
bb[0] = aa[2];
@@ -128,12 +130,12 @@ void
128130
Convert24bppTo32bpp(int width, int height, bool swapRedBlue, const unsigned char* a, unsigned char* b)
129131
{
130132
int numPixels = width * height;
131-
#pragma omp parallel
133+
//#pragma omp parallel
132134
{
133-
int id = omp_get_thread_num();
135+
int id = 0;//omp_get_thread_num();
134136
const unsigned char* aa = a + (numPixels * 3 / NUM_THREADS) * id;
135137
unsigned char* bb = b + (numPixels * 4 / NUM_THREADS) * id;
136-
#pragma omp for
138+
//#pragma omp for
137139
for (int i = 0; i < numPixels; i++)
138140
{
139141
bb[0] = aa[0];

0 commit comments

Comments
 (0)