fix some bugs

This commit is contained in:
SikongJueluo
2024-05-17 16:47:28 +08:00
parent d345fed4e7
commit 1ad504cb9f
5 changed files with 17 additions and 10 deletions

View File

@@ -150,8 +150,15 @@ module demosaic2 #(
cnt_data <= 0;
pos_x <= 0;
pos_y <= pos_y + 1;
if (pos_y >= IM_HEIGHT - 2 - 1)
if (pos_y >= IM_HEIGHT - 2 - 1) begin
pos_y <= 0;
case (RAW_TYPE)
0: raw_type <= 2;
1: raw_type <= 3;
2: raw_type <= 0;
3: raw_type <= 1;
endcase
end
end
else begin
cnt_data <= 2;