OpenCores
URL https://opencores.org/ocsvn/t6507lp/t6507lp/trunk

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [rtl/] [verilog/] [video_converter.v] - Blame information for rev 218

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 218 creep
////////////////////////////////////////////////////////////////////////////
2
////                                                                    ////
3
//// t2600 IP Core                                                      ////
4
////                                                                    ////
5
//// This file is part of the t2600 project                             ////
6
//// http://www.opencores.org/cores/t2600/                              ////
7
////                                                                    ////
8
//// Description                                                        ////
9
//// Color scheme conversion                                            ////
10
////                                                                    ////
11
//// TODO:                                                              ////
12
//// - Everything?                                                      ////
13
////                                                                    ////
14
//// Author(s):                                                         ////
15
//// - Gabriel Oshiro Zardo, gabrieloshiro@gmail.com                    ////
16
//// - Samuel Nascimento Pagliarini (creep), snpagliarini@gmail.com     ////
17
////                                                                    ////
18
////////////////////////////////////////////////////////////////////////////
19
////                                                                    ////
20
//// Copyright (C) 2001 Authors and OPENCORES.ORG                       ////
21
////                                                                    ////
22
//// This source file may be used and distributed without               ////
23
//// restriction provided that this copyright statement is not          ////
24
//// removed from the file and that any derivative work contains        ////
25
//// the original copyright notice and the associated disclaimer.       ////
26
////                                                                    ////
27
//// This source file is free software; you can redistribute it         ////
28
//// and/or modify it under the terms of the GNU Lesser General         ////
29
//// Public License as published by the Free Software Foundation;       ////
30
//// either version 2.1 of the License, or (at your option) any         ////
31
//// later version.                                                     ////
32
////                                                                    ////
33
//// This source is distributed in the hope that it will be             ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied         ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR            ////
36
//// PURPOSE. See the GNU Lesser General Public License for more        ////
37
//// details.                                                           ////
38
////                                                                    ////
39
//// You should have received a copy of the GNU Lesser General          ////
40
//// Public License along with this source; if not, download it         ////
41
//// from http://www.opencores.org/lgpl.shtml                           ////
42
////                                                                    ////
43
////////////////////////////////////////////////////////////////////////////
44
 
45
 
46
module video_converter(ypbpr, rgb);
47
        input [6:0] ypbpr;
48
        output [23:0] rgb;
49
 
50
        case (ypbpr[2:0]) begin // luminance
51
                3'h0: begin
52
                        case (ypbpr[6:3]) begin
53
                                4'h0: rgb = 24'h000000;
54
                                4'h1: rgb = 24'h444400;
55
                                4'h2: rgb = 24'h702800;
56
                                4'h3: rgb = 24'h841800;
57
                                4'h4: rgb = 24'h880000;
58
                                4'h5: rgb = 24'h78005C;
59
                                4'h6: rgb = 24'h480078;
60
                                4'h7: rgb = 24'h140084;
61
                                4'h8: rgb = 24'h000088;
62
                                4'h9: rgb = 24'h00187C;
63
                                4'hA: rgb = 24'h002C5C;
64
                                4'hB: rgb = 24'h003C2C;
65
                                4'hC: rgb = 24'h003C00;
66
                                4'hD: rgb = 24'h;
67
                                4'hE: rgb = 24'h;
68
                                4'hF: rgb = 24'h;
69
                        endcase
70
                end
71
                3'h1:
72
                3'h2:
73
                3'h3:
74
                3'h4:
75
                3'h5:
76
                3'h6:
77
                3'h7:
78
        endcase
79
 
80
endmodule
81
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.