Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Deinterlacing in Delphi

juriman
Beginner
608 Views
Hello,

I want to try some deinterlacing alghoritmen from IPP in Delphi 7.0.
Is there something like umc_deinterlacing.cpp (\ipp-samples\audio-video-codecs\codec\color_space_converter\src) in Object Pascal?
Or may be a simple unit which shows how to work with ippiMedian_8u_P3C1R or something like that.

edit:
I've tried this:

[delphi]unit deinterlacing;
interface

type

  PIpp16u  = ^Ipp16u;
  Ipp16u   = Word;

  PIpp8u  = ^Ipp8u;
  Ipp8u   = Byte;

  IppiSize = record
    width:  Integer;
    height: Integer;
  end;

function  ippiDeinterlaceFilterCAVT_8u_C1R : Integer;  stdcall;
function MyDeinter (pDataI : PByte; pDataO:PByte) : Integer;

implementation
const
ippcoreDLL = 'ippcore-5.1.dll';

function ippiDeinterlaceFilterCAVT_8u_C1R; external ippcoreDLL;

function MyDeinter (pDataI : PByte; pDataO:PByte) : Integer;
var
    pS,pD : PIpp8u;
    size  : IppiSize;
    mThreshold : Ipp16u;
    srcStep,dstStep : integer;
begin
    pS := PIpp8u(pDataI);
    pD := PIpp8u(pDataO);
    srcStep := 720*2;
    dstStep := 768*2;
    size.width:=768;
    size.height:=576;
    mThreshold:=128;

    MyDeinter:=ippiDeinterlaceFilterCAVT_8u_C1R(pS,srcStep,pD,dstStep,mThreshold,size);
end;

end.
[/delphi]


I get the error "Too many actual parameters".

Need help!!
0 Kudos
2 Replies
dertaurus
Beginner
608 Views
I think that the decleration of the function is wrong, you must compleate the decleration by adding all the parameters to this function prototype.
With your decleration the compiler understand 4 things (the function name, the calling convention is stdcall, the return type is integer and the function dos not take any parameter) so when you try to call the function with the parameters you get this error message "Too many actual parameters".
Quoting - juriman
Hello,

I want to try some deinterlacing alghoritmen from IPP in Delphi 7.0.
Is there something like umc_deinterlacing.cpp (ipp-samplesaudio-video-codecscodeccolor_space_convertersrc) in Object Pascal?
Or may be a simple unit which shows how to work with ippiMedian_8u_P3C1R or something like that.

edit:
I've tried this:

[delphi]unit deinterlacing;
interface

type

  PIpp16u  = ^Ipp16u;
  Ipp16u   = Word;

  PIpp8u  = ^Ipp8u;
  Ipp8u   = Byte;

  IppiSize = record
    width:  Integer;
    height: Integer;
  end;

function  ippiDeinterlaceFilterCAVT_8u_C1R : Integer;  stdcall;
function MyDeinter (pDataI : PByte; pDataO:PByte) : Integer;

implementation
const
ippcoreDLL = 'ippcore-5.1.dll';

function ippiDeinterlaceFilterCAVT_8u_C1R; external ippcoreDLL;

function MyDeinter (pDataI : PByte; pDataO:PByte) : Integer;
var
    pS,pD : PIpp8u;
    size  : IppiSize;
    mThreshold : Ipp16u;
    srcStep,dstStep : integer;
begin
    pS := PIpp8u(pDataI);
    pD := PIpp8u(pDataO);
    srcStep := 720*2;
    dstStep := 768*2;
    size.width:=768;
    size.height:=576;
    mThreshold:=128;

    MyDeinter:=ippiDeinterlaceFilterCAVT_8u_C1R(pS,srcStep,pD,dstStep,mThreshold,size);
end;

end.
[/delphi]


I get the error "Too many actual parameters".

Need help!!

0 Kudos
juriman
Beginner
608 Views
Thanks for the help. I've noticed the fault by myselfe , but I've just forgotten to mention it here.
0 Kudos
Reply