@@ -50,25 +50,26 @@ void PredictiveFrame::parallel_function_call(int x, int y) {
5050 return ;
5151 }
5252
53- // // Find (x,y) in frame_2 in frame_1. Note we have to go in the reverse. We can't go frame_1 -> frame_2 since
54- // // the matched blocks may not be on perfect intervals of block_size.
55- // // Since we're going frame_2 -> frame_1, the matched block is "being matched in reverse", so flip the block
56- // // so we can go frame_1 -> frame_2.
57- // Block matched_block = this->block_matcher->match_block(x, y, block_size);
58- // matched_block.reverse_block();
59- //
60- // // Check to see if the current matched block produces a valid match
61- // if (eval->evaluate(this->current_frame,
62- // this->next_frame, this->next_frame_compressed,
63- // matched_block,
64- // block_size)) {
65- //
66- // matched_moving_blocks += 1;
67- // this->matched_blocks[x][y] = make_shared<Block>(matched_block.x_start, matched_block.y_start,
68- // matched_block.x_end, matched_block.y_end,
69- // 1);
70- // return;
71- // }
53+ // Find (x,y) in frame_2 in frame_1. Note we have to go in the reverse. We can't go frame_1 -> frame_2 since
54+ // the matched blocks may not be on perfect intervals of block_size.
55+ // Since we're going frame_2 -> frame_1, the matched block is "being matched in reverse", so flip the block
56+ // so we can go frame_1 -> frame_2.
57+ Block matched_block = this ->block_matcher ->match_block (x, y, block_size);
58+ matched_block.reverse_block ();
59+
60+ // Check to see if the current matched block produces a valid match
61+ if (eval->evaluate (*this ->current_frame ,
62+ *this ->next_frame ,
63+ *this ->next_frame_compressed ,
64+ matched_block,
65+ block_size)) {
66+
67+ matched_moving_blocks += 1 ;
68+ this ->matched_blocks [x][y] = make_shared<Block>(matched_block.x_start , matched_block.y_start ,
69+ matched_block.x_end , matched_block.y_end ,
70+ 1 );
71+ return ;
72+ }
7273
7374 // -1 denotes an invalid block.
7475 this ->matched_blocks [x][y] = make_shared<Block>(x, y,
0 commit comments