Commit a865876c authored by matze's avatar matze

Added CV_UNUSED to not used variable when build without SSE2 support.

parent aaa25546
...@@ -1390,6 +1390,8 @@ inline int findStartContourPoint(uchar *src_data, CvSize img_size, int j, bool h ...@@ -1390,6 +1390,8 @@ inline int findStartContourPoint(uchar *src_data, CvSize img_size, int j, bool h
j += 16; j += 16;
} }
} }
#else
CV_UNUSED(haveSIMD);
#endif #endif
for (; j < img_size.width && !src_data[j]; ++j) for (; j < img_size.width && !src_data[j]; ++j)
; ;
...@@ -1437,6 +1439,8 @@ inline int findEndContourPoint(uchar *src_data, CvSize img_size, int j, bool hav ...@@ -1437,6 +1439,8 @@ inline int findEndContourPoint(uchar *src_data, CvSize img_size, int j, bool hav
j += 16; j += 16;
} }
} }
#else
CV_UNUSED(haveSIMD);
#endif #endif
for (; j < img_size.width && src_data[j]; ++j) for (; j < img_size.width && src_data[j]; ++j)
; ;
...@@ -1466,6 +1470,7 @@ icvFindContoursInInterval( const CvArr* src, ...@@ -1466,6 +1470,7 @@ icvFindContoursInInterval( const CvArr* src,
int lower_total; int lower_total;
int upper_total; int upper_total;
int all_total; int all_total;
bool haveSIMD = false;
CvSeq* runs; CvSeq* runs;
CvLinkedRunPoint tmp; CvLinkedRunPoint tmp;
...@@ -1496,7 +1501,7 @@ icvFindContoursInInterval( const CvArr* src, ...@@ -1496,7 +1501,7 @@ icvFindContoursInInterval( const CvArr* src,
if( contourHeaderSize < (int)sizeof(CvContour)) if( contourHeaderSize < (int)sizeof(CvContour))
CV_Error( CV_StsBadSize, "Contour header size must be >= sizeof(CvContour)" ); CV_Error( CV_StsBadSize, "Contour header size must be >= sizeof(CvContour)" );
#if CV_SSE2 #if CV_SSE2
bool haveSIMD = cv::checkHardwareSupport(CPU_SSE2); haveSIMD = cv::checkHardwareSupport(CPU_SSE2);
#endif #endif
storage00.reset(cvCreateChildMemStorage(storage)); storage00.reset(cvCreateChildMemStorage(storage));
storage01.reset(cvCreateChildMemStorage(storage)); storage01.reset(cvCreateChildMemStorage(storage));
...@@ -1540,7 +1545,7 @@ icvFindContoursInInterval( const CvArr* src, ...@@ -1540,7 +1545,7 @@ icvFindContoursInInterval( const CvArr* src,
tmp_prev->next = (CvLinkedRunPoint*)CV_GET_WRITTEN_ELEM( writer ); tmp_prev->next = (CvLinkedRunPoint*)CV_GET_WRITTEN_ELEM( writer );
tmp_prev = tmp_prev->next; tmp_prev = tmp_prev->next;
j = findEndContourPoint(src_data, img_size, j+1, haveSIMD); j = findEndContourPoint(src_data, img_size, j + 1, haveSIMD);
tmp.pt.x = j - 1; tmp.pt.x = j - 1;
CV_WRITE_SEQ_ELEM( tmp, writer ); CV_WRITE_SEQ_ELEM( tmp, writer );
...@@ -1573,7 +1578,7 @@ icvFindContoursInInterval( const CvArr* src, ...@@ -1573,7 +1578,7 @@ icvFindContoursInInterval( const CvArr* src,
tmp_prev->next = (CvLinkedRunPoint*)CV_GET_WRITTEN_ELEM( writer ); tmp_prev->next = (CvLinkedRunPoint*)CV_GET_WRITTEN_ELEM( writer );
tmp_prev = tmp_prev->next; tmp_prev = tmp_prev->next;
j = findEndContourPoint(src_data, img_size, j+1, haveSIMD); j = findEndContourPoint(src_data, img_size, j + 1, haveSIMD);
tmp.pt.x = j - 1; tmp.pt.x = j - 1;
CV_WRITE_SEQ_ELEM( tmp, writer ); CV_WRITE_SEQ_ELEM( tmp, writer );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment