Commit f18a13be authored by Andrey Filippov's avatar Andrey Filippov
Browse files

debugging color conversion

parent de641880
Loading
Loading
Loading
Loading
+85 −81
Original line number Original line Diff line number Diff line
@@ -57,8 +57,10 @@ module cmprs_tile_mode2_decode #(
    reg            jp4_dc_improved_r;
    reg            jp4_dc_improved_r;
    reg            hdr_r;
    reg            hdr_r;
    reg    [3:0]   bayer_phase_onehot;
    reg    [3:0]   bayer_phase_onehot;

    reg            first_in;
    always @ (posedge xclk) if (pre_first_in)begin
    always @ (posedge xclk) begin
        first_in <= pre_first_in;
        if (pre_first_in)begin
            converter_type_r [2:0] <= converter_type[2:0];
            converter_type_r [2:0] <= converter_type[2:0];
            jp4_dc_improved_r      <= jp4_dc_improved;
            jp4_dc_improved_r      <= jp4_dc_improved;
            hdr_r                  <= hdr;
            hdr_r                  <= hdr;
@@ -69,7 +71,8 @@ module cmprs_tile_mode2_decode #(
                                      (bayer_phase[1:0]==2'h2)?1'b1:1'b0,
                                      (bayer_phase[1:0]==2'h2)?1'b1:1'b0,
                                      (bayer_phase[1:0]==2'h1)?1'b1:1'b0,
                                      (bayer_phase[1:0]==2'h1)?1'b1:1'b0,
                                      (bayer_phase[1:0]==2'h0)?1'b1:1'b0};
                                      (bayer_phase[1:0]==2'h0)?1'b1:1'b0};

        end
        if (first_in) begin
            case (converter_type_r)
            case (converter_type_r)
                CMPRS_COLOR18:    begin
                CMPRS_COLOR18:    begin
                            component_numsL  <= 6'h10; // component_num [0]
                            component_numsL  <= 6'h10; // component_num [0]
@@ -139,6 +142,7 @@ module cmprs_tile_mode2_decode #(
                         end
                         end
            endcase
            endcase
        end
        end
    end


endmodule
endmodule
+2 −2
Original line number Original line Diff line number Diff line
@@ -1888,8 +1888,8 @@ task setup_sensor_channel;
        3,                      // num_macro_cols_m1; // number of macroblock colums minus 1
        3,                      // num_macro_cols_m1; // number of macroblock colums minus 1
        1,                      // num_macro_rows_m1; // number of macroblock rows minus 1
        1,                      // num_macro_rows_m1; // number of macroblock rows minus 1
        1,                      // input [31:0] left_margin;       // left margin of the first pixel (0..31) for 32-pixel wide colums in memory access
        1,                      // input [31:0] left_margin;       // left margin of the first pixel (0..31) for 32-pixel wide colums in memory access
        'hc0,                   // input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
        'h120,                  // input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
        'h90,                   // colorsat_red; //color saturation for red (10 bits)   // 'b6 for 100%
        'h16c,                  // colorsat_red; //color saturation for red (10 bits)   // 'b6 for 100%
        0);                     // input [31:0] coring;     // coring value
        0);                     // input [31:0] coring;     // coring value
    // TODO: calculate widths correctly!
    // TODO: calculate widths correctly!
    setup_compressor_memory (
    setup_compressor_memory (