求DELPHI版的YV12ToRGB代码?该怎么处理

求DELPHI版的YV12ToRGB代码?
求DELPHI版的YV12ToRGB代码?
YV12 To RGB Delphi

------解决方案--------------------

unit RGBYUV;

interface
uses Windows,Classes,Graphics,Math;
function RGBToColor(R,G,B: Byte): TColor;overload;
function RGBToColor(Color : Longint): TColor;overload;

procedure ColorToYUV(RGB: TColor; out Y, Cb, Cr: byte);
function YUVtoColor(Y, Cb, Cr: Byte): TColor;
implementation

function RGBToColor(R,G,B: Byte): TColor;
begin
  Result := R or (G shl 8) or (B shl 16);
end;

function RGBToColor(Color : Longint): TColor;
var
  R,G,B,A : Byte;
begin
  R := Color and $FF;
  G := (Color shr 8) and $FF;
  B := (Color shr 16) and $FF;
  A := $00;
  Result := R or (G shl 8) or (B shl 16) or (A shl 24);
end;

procedure ColorToRGB(Color: TColor; out R, G, B: Byte);
begin
  R := Color and $FF;
  G := (Color shr 8) and $FF;
  B := (Color shr 16) and $FF;
end; procedure ColorToCMY(Color: TColor; out C, M, Y: Byte);
var
  R,G,B : Byte;
begin
  ColorToRGB(Color, R, G, B);
  C := 255 - R;
  M := 255 - G;
  Y := 255 - B;
end; function CMYToColor(C, M, Y: Byte): TColor;
begin
  Result := (255 - C) or ((255 - M) shl 8) or ((255 - Y) shl 16);
end; function HSLtoColor(H, S, L: Double): TColor;
var
  M1, M2: double;
  function HueToColourValue (Hue: double) : byte;
  var
    V : double;