Skip to content

Commit 514af9c

Browse files
committed
revert unificate to int variables
1 parent 09abe45 commit 514af9c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/unification/unification_pv_model.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
SC_MODULE (unification_module) {
1616

1717
//-----------Internal variables-------------------
18-
unsigned char x, y;
19-
unsigned char *magnitude;
18+
int x, y;
19+
int *magnitude;
2020

2121
//-----------Constructor-------------------
2222
SC_CTOR(unification_module) {
2323
} // End of Constructor
2424

2525
//------------Code Starts Here-------------------------
26-
void unificate(unsigned char x, unsigned char y, unsigned char* magnitude) {
26+
void unificate(int x, int y, int* magnitude) {
2727
this->x = x;
2828
this->y = y;
2929
this->magnitude = magnitude;
@@ -37,10 +37,10 @@ SC_MODULE (unification_module) {
3737

3838
void unificate_img(unsigned char *img_x, unsigned char *img_y, unsigned char *img_unificated, int img_size, int channels){
3939
//Iterate over image
40-
for(unsigned char *x = img_x, *y = img_y, *u = img_unificated; x < img_x + img_size, y < img_y + img_size, u< img_unificated + img_size; x+=channels, y+=channels, u+=channels){
41-
unsigned char pixel_magnitude;
42-
unsigned char pixel_x = *x;
43-
unsigned char pixel_y = *y;
40+
for(unsigned char *x = img_x, *y = img_y, *u = img_unificated; x < img_x + img_size && y < img_y + img_size && u< img_unificated + img_size; x+=channels, y+=channels, u+=channels){
41+
int pixel_magnitude;
42+
int pixel_x = int(*x);
43+
int pixel_y = int(*y);
4444
//printf("Operands: Pixel #%0d -> pixel_x = %0d, pixel_y = %0d\n",int(x-img_x), pixel_x, pixel_y);
4545

4646
this->unificate(pixel_x, pixel_y, &pixel_magnitude);

0 commit comments

Comments
 (0)