Skip to content

Commit

Permalink
removed openmp compression test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRH committed Jan 25, 2015
1 parent 3a6bb73 commit 23064e2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Source/HapCodec/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ CodecInst::CompressBegin(LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut)
CompressEnd();
}
_isStarted = 0;
#ifdef USE_OPENMP_DXT
omp_set_num_threads(NUM_THREADS);
#endif

if ( int error = CompressQuery(lpbiIn, lpbiOut) != ICERR_OK )
{
Expand Down Expand Up @@ -105,12 +107,12 @@ void
ConvertBGRAtoRGBA(int width, int height, const unsigned char* a, unsigned char* b)
{
int numPixels = width * height;
#pragma omp parallel
//#pragma omp parallel
{
int id = omp_get_thread_num();
int id = 0;//omp_get_thread_num();
const unsigned char* aa = a + (numPixels * 4 / NUM_THREADS) * id;
unsigned char* bb = b + (numPixels * 4 / NUM_THREADS) * id;
#pragma omp for
// #pragma omp for
for (int i = 0; i < numPixels; i++)
{
bb[0] = aa[2];
Expand All @@ -128,12 +130,12 @@ void
Convert24bppTo32bpp(int width, int height, bool swapRedBlue, const unsigned char* a, unsigned char* b)
{
int numPixels = width * height;
#pragma omp parallel
//#pragma omp parallel
{
int id = omp_get_thread_num();
int id = 0;//omp_get_thread_num();
const unsigned char* aa = a + (numPixels * 3 / NUM_THREADS) * id;
unsigned char* bb = b + (numPixels * 4 / NUM_THREADS) * id;
#pragma omp for
//#pragma omp for
for (int i = 0; i < numPixels; i++)
{
bb[0] = aa[0];
Expand Down

0 comments on commit 23064e2

Please sign in to comment.