一次作者在开发图像时候,对输入的图像没有打拍,输出给显示终端,时好时坏,或者图像颜色不正确,最终经过打拍解决了此问题。
//配置为16-Bit SDR ITU-R BT.656模式时pixel_data[23:16]为高阻。
always @(posedge pixel_clk ) begin
pixel_data_d1<=pixel_data[15:0];
pixel_data_d2<=pixel_data_d1;
end
always @(posedge pixel_clk ) begin
hs_d1<=hs;
hs_d2<=hs_d1;
end
always @(posedge pixel_clk ) begin
vs_d1<=vs;
vs_d2<=vs_d1;
end
always @(posedge pixel_clk) begin
de_i_d1<=de_i;
de_i_d2<=de_i_d1;
end
assign pixel_o[19:10] = {pixel_data_d2[15:8], 2'b00 } ;//LUMA
assign pixel_o[9:0] = {pixel_data_d2[7:0] , 2'b00 } ;//CHROMA
颜色失真:
输入同步后的图片:颜色正常