ZxingTest/CVReaderSource.cpp
//243312
/** This is a more efficient implementation. */
243312
This is a more efficient implementation.
243312 This is a more efficient implementation .
zxing::ArrayRef<char> CVReaderSource::getMatrix() const {
    const char* p = &image[0];
    zxing::ArrayRef<char> matrix(getWidth() * getHeight());
    char* m = &matrix[0];
    int count = 0;
    for (int y = 0; y < getHeight(); y++) {
        for (int x = 0; x < getWidth(); x++) {
            count++;
            *m = convertPixel(p);
            m++;
            p += 4;
        }
    }
    return matrix;
}
zxing :: ArrayRef < char > CVReaderSource :: getMatrix ( ) const { const char * p = & image [ 0 ] ; zxing :: ArrayRef < char > matrix ( getWidth ( ) * getHeight ( ) ) ; char * m = & matrix [ 0 ] ; int count = 0 ; for ( int y = 0 ; y < getHeight ( ) ; y ++ ) { for ( int x = 0 ; x < getWidth ( ) ; x ++ ) { count ++ ; * m = convertPixel ( p ) ; m ++ ; p += 4 ; } } return matrix ; }
243312
This is a more efficient implementation.
243312 This is a more efficient implementation .