initial commit
This commit is contained in:
30
tools/vision/LDV/BW.INI
Normal file
30
tools/vision/LDV/BW.INI
Normal file
@@ -0,0 +1,30 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Black & White
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Black & White Transform
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV converts a colored image into a grey leveled one
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
; No Parameters !
|
||||
;[Parameter1]
|
||||
;Name = Amplitude
|
||||
;Type = 1
|
||||
;MinValue = 1
|
||||
;DefaultValue = 50
|
||||
;MaxValue = 1000
|
||||
BIN
tools/vision/LDV/BW.LDV
Normal file
BIN
tools/vision/LDV/BW.LDV
Normal file
Binary file not shown.
30
tools/vision/LDV/FRANCAIS/BW.INI
Normal file
30
tools/vision/LDV/FRANCAIS/BW.INI
Normal file
@@ -0,0 +1,30 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Noir & Blanc
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Conversion en niveaux de gris
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV transforme une image couleur en niveaux de gris
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
; No Parameters !
|
||||
;[Parameter1]
|
||||
;Name = Amplitude
|
||||
;Type = 1
|
||||
;MinValue = 1
|
||||
;DefaultValue = 50
|
||||
;MaxValue = 1000
|
||||
50
tools/vision/LDV/FRANCAIS/GAMMA.INI
Normal file
50
tools/vision/LDV/FRANCAIS/GAMMA.INI
Normal file
@@ -0,0 +1,50 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Gamma
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Correction Gamma
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Change le facteur Gamma sur les composantes rouge, vert, bleu
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Rouge, Vert, Bleu
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter2]
|
||||
Name = Rouge
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter3]
|
||||
Name = Vert
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter4]
|
||||
Name = Bleu
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
38
tools/vision/LDV/FRANCAIS/INVERT.INI
Normal file
38
tools/vision/LDV/FRANCAIS/INVERT.INI
Normal file
@@ -0,0 +1,38 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Inversion (XOR)...
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Inversion bit a bit d'un raster
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV (exemple) inverse chaque bit de l'image raster
|
||||
|
||||
; Viennent maintenant les dependances pour les parametres
|
||||
;[Parameter1]
|
||||
;Name = Axe X
|
||||
;Type = 1
|
||||
;MinValue = -10
|
||||
;DefaultValue = 1
|
||||
;MaxValue = 10
|
||||
|
||||
;[Parameter2]
|
||||
;Name = Axe Y
|
||||
|
||||
;[Parameter3]
|
||||
;Name = Axe Z
|
||||
|
||||
;[Parameter4]
|
||||
;Name = Axe T
|
||||
50
tools/vision/LDV/FRANCAIS/LIGHT.INI
Normal file
50
tools/vision/LDV/FRANCAIS/LIGHT.INI
Normal file
@@ -0,0 +1,50 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Luminosit<69>
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Luminosit<69>
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Change la luminosit<69> des composantes RVB
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Rouge, Vert, Bleu
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter2]
|
||||
Name = Rouge
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter3]
|
||||
Name = Vert
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter4]
|
||||
Name = Bleu
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
29
tools/vision/LDV/FRANCAIS/PIXEL.INI
Normal file
29
tools/vision/LDV/FRANCAIS/PIXEL.INI
Normal file
@@ -0,0 +1,29 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Pixelisation
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Pixelisation
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Pixelise une image (ou partie)
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Puissance
|
||||
Type = 1
|
||||
MinValue = 2
|
||||
DefaultValue = 4
|
||||
MaxValue = 16
|
||||
29
tools/vision/LDV/FRANCAIS/ROTATE.INI
Normal file
29
tools/vision/LDV/FRANCAIS/ROTATE.INI
Normal file
@@ -0,0 +1,29 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Rotation
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Rotation
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV effectue une rotation sur une image
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Angle
|
||||
Type = 1
|
||||
MinValue = -180
|
||||
DefaultValue = 0
|
||||
MaxValue = 180
|
||||
36
tools/vision/LDV/FRANCAIS/XWAVE.INI
Normal file
36
tools/vision/LDV/FRANCAIS/XWAVE.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Vagues sur X
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Vagues en sinus sur l'axe X
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV g<>n<EFBFBD>re des vagues en sinus sur l'axe X
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Amplitude
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Frequence
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 40
|
||||
MaxValue = 1000
|
||||
36
tools/vision/LDV/FRANCAIS/YPERSC.INI
Normal file
36
tools/vision/LDV/FRANCAIS/YPERSC.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Y-Perspective
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Perspective sur l'axe Y
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV g<>n<EFBFBD>re une perspective sur l'axe Y
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Angle-Y
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 0
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Profondeur
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
36
tools/vision/LDV/FRANCAIS/YWAVE.INI
Normal file
36
tools/vision/LDV/FRANCAIS/YWAVE.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Vagues sur Y
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Vagues en sinus sur l'axe Y
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Ce LDV g<>n<EFBFBD>re des vagues en sinus sur l'axe Y
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Amplitude
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Frequence
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 40
|
||||
MaxValue = 1000
|
||||
51
tools/vision/LDV/FRANCAIS/bhole.ini
Normal file
51
tools/vision/LDV/FRANCAIS/bhole.ini
Normal file
@@ -0,0 +1,51 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Trou Noir
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Trou Noir dans l'image!
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Hommage a Stephen Hawking
|
||||
|
||||
; This section is only meant for bhole.ldv
|
||||
; It controls symetry usage for black hole computations
|
||||
; It should be faster to use symetry property but for
|
||||
; Some reason, this is slower on Aranym, no idea why
|
||||
; So on Aranym, better have 0 here
|
||||
[Private]
|
||||
UseSym=1
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Rotation(V)
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 10
|
||||
MaxValue = 500
|
||||
|
||||
[Parameter2]
|
||||
Name = Centre X(%)
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
|
||||
[Parameter3]
|
||||
Name = Centre Y(%)
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
43
tools/vision/LDV/FRANCAIS/puzzle.ini
Normal file
43
tools/vision/LDV/FRANCAIS/puzzle.ini
Normal file
@@ -0,0 +1,43 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Puzzle
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Puzzle
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Melange des blocs dans l'image
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Diviseur sur X
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 10
|
||||
MaxValue = 50
|
||||
|
||||
[Parameter2]
|
||||
Name = Diviseur sur Y
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 10
|
||||
MaxValue = 50
|
||||
|
||||
[Parameter3]
|
||||
Name = Entropie
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 5
|
||||
MaxValue = 50
|
||||
50
tools/vision/LDV/GAMMA.INI
Normal file
50
tools/vision/LDV/GAMMA.INI
Normal file
@@ -0,0 +1,50 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Gamma
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Gamma Correction
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Changes the Gamma value on red, green, blue
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Red, Green, Blue
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter2]
|
||||
Name = Red
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter3]
|
||||
Name = Green
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter4]
|
||||
Name = Blue
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
BIN
tools/vision/LDV/GAMMA.LDV
Normal file
BIN
tools/vision/LDV/GAMMA.LDV
Normal file
Binary file not shown.
29
tools/vision/LDV/INVERT.INI
Normal file
29
tools/vision/LDV/INVERT.INI
Normal file
@@ -0,0 +1,29 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Invert (XOR)
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Invert bit by bit a raster
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV (example) inverts each bit of an image raster
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
;[Parameter1]
|
||||
;Name = X-Axis
|
||||
;Type = 1
|
||||
;MinValue = -10
|
||||
;DefaultValue = 1
|
||||
;MaxValue = 10
|
||||
BIN
tools/vision/LDV/INVERT.LDV
Normal file
BIN
tools/vision/LDV/INVERT.LDV
Normal file
Binary file not shown.
186
tools/vision/LDV/LDG.H
Normal file
186
tools/vision/LDV/LDG.H
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* LDG : Gem Dynamical Libraries
|
||||
* Copyright (c) 1997-2004 Olivier Landemarre, Dominique Bereziat & Arnaud Bercegeay
|
||||
*
|
||||
* Header file of LDG devel library, should be included after the AES header
|
||||
*
|
||||
* Current version is 2.31
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* $Id: ldg.h 102 2012-10-04 22:31:16Z vriviere $
|
||||
*/
|
||||
|
||||
#ifndef __LDG__
|
||||
#define __LDG__
|
||||
|
||||
|
||||
#ifdef __PUREC__
|
||||
#define CDECL cdecl
|
||||
#else
|
||||
#include <compiler.h>
|
||||
#define CDECL __CDECL
|
||||
#endif
|
||||
|
||||
#ifdef __GEMLIB__
|
||||
#define ldg_global aes_global
|
||||
#else
|
||||
#ifdef __PUREC__ /* For Pure C users using PCGEMLIB */
|
||||
#define ldg_global _GemParBlk.global
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LDG_QUIT 0x4C4A /* ldg->client : a lib discharged */
|
||||
#define LDG_LOST_LIB 0x4C4D /* ldg->client : a lib lost */
|
||||
#define LDG_COOKIE 0x4C44474DL /* 'LDGM' */
|
||||
#define PATHLEN 128
|
||||
|
||||
/*
|
||||
* Data structures
|
||||
*/
|
||||
|
||||
typedef struct entrie {
|
||||
char *name; /* Function name */
|
||||
char *info; /* Describe the prototype of the function */
|
||||
void *func; /* Function address */
|
||||
} PROC;
|
||||
|
||||
/*
|
||||
* The LDG-library descriptor (private)
|
||||
*/
|
||||
|
||||
typedef struct ldg {
|
||||
long magic; /* magic number ('LDGM') */
|
||||
short vers; /* library version */
|
||||
short id; /* AES-id of launcher */
|
||||
short num; /* count of avalaible functions */
|
||||
PROC *list; /* pointer to the functions list */
|
||||
char *infos; /* describe the library */
|
||||
void *baspag; /* basepage of library */
|
||||
/* from version 0.99 */
|
||||
unsigned short flags; /* library flags ( shared, resident, locked) */
|
||||
/* from version 0.99c */
|
||||
void (*close)(void); /* fonction launched by ldg_term() */
|
||||
/* from version 1.00 */
|
||||
short vers_ldg; /* LDG-protocol version */
|
||||
char path[PATHLEN]; /* real path of the lib */
|
||||
long user_ext; /* own library extension */
|
||||
long addr_ext; /* for future extension */
|
||||
} LDG;
|
||||
|
||||
/*
|
||||
* The LDG cookie
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
short version; /* The cookie number version */
|
||||
char path[PATHLEN]; /* Path of LDG-libraries */
|
||||
short garbage; /* The garbage collector time */
|
||||
short idle; /* Obsolet : for backward compatibility */
|
||||
|
||||
LDG* CDECL (*ldg_open) ( const char *lib, short *gl);
|
||||
/* Open a library */
|
||||
short CDECL (*ldg_close) ( LDG *ldg, short *gl);
|
||||
/* Close a library */
|
||||
void* CDECL (*ldg_find) ( char *fnc, LDG *ldg);
|
||||
/* Find a function in a library */
|
||||
LDG* CDECL (*ldg_open_ev)( char *lib, short *gl, void (*)(short*));
|
||||
/* Obsolet : for backward compatibility */
|
||||
short error; /* Last error occuring */
|
||||
void CDECL (*ldg_garbage)( short *gl);
|
||||
/* Release unused libs */
|
||||
void CDECL (*ldg_reset)( short *gl);
|
||||
/* Release all libs */
|
||||
void* internal; /* Reserved */
|
||||
short CDECL (*ldg_libpath)( char *, short *global);
|
||||
/* Find the path of a library */
|
||||
} LDG_INFOS;
|
||||
|
||||
/*
|
||||
* This structure is used by ldg_init() to initiate the
|
||||
* the LDG-protocol inside a LDG-library.
|
||||
*/
|
||||
|
||||
typedef struct ldglib {
|
||||
short vers; /* library version */
|
||||
short num; /* count of avalaible functions */
|
||||
PROC *list; /* pointer to the functions list */
|
||||
char *infos; /* description of the lib */
|
||||
unsigned short flags; /* library flags (shared, locked, resident) */
|
||||
void (*close)(void); /* function executed by ldg_term()*/
|
||||
long user_ext; /* own library extension */
|
||||
} LDGLIB;
|
||||
|
||||
/* value of the 'flag' field */
|
||||
#define LDG_NOT_SHARED 0x1 /* the library is unshareable */
|
||||
#define LDG_LOCKED 0x2 /* the library is locked */
|
||||
#define LDG_RESIDENT 0x4 /* the library is memory resident */
|
||||
#define LDG_STDCALL 0x100 /* a2/d2 are not scratch register - private */
|
||||
|
||||
/* Errors returned by ldg_error() */
|
||||
#define LDG_LIB_FULLED -1
|
||||
#define LDG_APP_FULLED -2
|
||||
#define LDG_ERR_EXEC -3
|
||||
#define LDG_BAD_FORMAT -4
|
||||
#define LDG_LIB_LOCKED -6
|
||||
#define LDG_NO_MANAGER -7
|
||||
#define LDG_NOT_FOUND -8
|
||||
#define LDG_BAD_LIB LDG_BAD_FORMAT
|
||||
#define LDG_NO_MEMORY -9
|
||||
#define LDG_TIME_IDLE -10
|
||||
#define LDG_NO_TSR -11
|
||||
#define LDG_BAD_TSR -12
|
||||
#define LDG_NO_FUNC -13
|
||||
|
||||
/* Client functions */
|
||||
LDG* ldg_open ( const char *name, short *gl);
|
||||
short ldg_close ( LDG *lib, short *gl);
|
||||
short ldg_error ( void);
|
||||
void* ldg_find ( char *name, LDG *ldg);
|
||||
short ldg_libpath ( char *path, short *gl);
|
||||
|
||||
/* Server functions */
|
||||
int ldg_init ( LDGLIB *libldg);
|
||||
char *ldg_getpath ( void);
|
||||
|
||||
/* Diverse functions */
|
||||
int ldg_cookie ( long, long *);
|
||||
void ldg_debug ( char *, ...);
|
||||
void* ldg_Malloc ( long size);
|
||||
void* ldg_Calloc ( long count,long size);
|
||||
int ldg_Free ( void *memory);
|
||||
void* ldg_Realloc ( void *oldblk, long oldsize, long newsize);
|
||||
#ifndef __mcoldfire__
|
||||
void ldg_cpush ( void);
|
||||
#endif
|
||||
long CDECL ldg_callback( void *f, ...);
|
||||
|
||||
/* For backward compatibility */
|
||||
#define ldg_exec(a,b) ldg_open( b, ldg_global)
|
||||
#define ldg_exec_evnt(a,b,c) ldg_open( b, ldg_global)
|
||||
#define ldg_term(a,b) ldg_close( b, ldg_global)
|
||||
#define ldg_libexec_evnt(a,b,c) ldg_open( a, b)
|
||||
#define ldg_libexec(a,b) ldg_open( a, b)
|
||||
#define ldg_libterm(a,b) ldg_close( a,b)
|
||||
|
||||
/* C-library version (currently 1.20) */
|
||||
struct _ldg_version {
|
||||
char *name;
|
||||
short num;
|
||||
};
|
||||
|
||||
extern struct _ldg_version ldg_version;
|
||||
|
||||
#endif /* __LDG__ */
|
||||
BIN
tools/vision/LDV/LDG.LIB
Normal file
BIN
tools/vision/LDV/LDG.LIB
Normal file
Binary file not shown.
1202
tools/vision/LDV/LDV.C
Normal file
1202
tools/vision/LDV/LDV.C
Normal file
File diff suppressed because it is too large
Load Diff
150
tools/vision/LDV/LDV.H
Normal file
150
tools/vision/LDV/LDV.H
Normal file
@@ -0,0 +1,150 @@
|
||||
#ifndef __LDV
|
||||
#define __LDV
|
||||
|
||||
#ifndef __LDG__
|
||||
#include <ldg.h>
|
||||
#endif
|
||||
|
||||
#ifndef __VAPI
|
||||
#include "ldv\vapi.h"
|
||||
#endif
|
||||
|
||||
/* Codes d'erreurs */
|
||||
typedef long LDV_STATUS ; /* Type de status retourne */
|
||||
#define ELDV_NOERROR 0x0 /* Pas d'erreur */
|
||||
#define ELDV_INVALIDPARAMETER 0x1 /* Au moins un parametre transmis est invalide */
|
||||
#define ELDV_NBPLANESNOTSUPPORTED 0x2 /* Nombre de plans non supporte */
|
||||
#define ELDV_NOTENOUGHMEMORY 0x3 /* Memoire insuffisante */
|
||||
#define ELDV_PREVIEWNOTSUPPORTED 0x4 /* Preview non supportee */
|
||||
#define ELDV_RUNNOTSUPPORTED 0x5 /* Run non supporte (!) */
|
||||
#define ELDV_BADVAPIVERSION 0x6 /* VAPI absent ou mauvaise version */
|
||||
#define ELDV_IMGFORMATMISMATCH 0x7 /* Format d'image incompatible */
|
||||
#define ELDV_CANCELLED 0x8 /* Operation annulee par l'utilisateur (GetParams par exemple) */
|
||||
#define ELDV_BADINTERFACE 0x9 /* Impossible : ce LDV ne possede pas la bonne interface */
|
||||
#define ELDV_GENERALFAILURE 0xF /* Echec general, raison non precisee */
|
||||
|
||||
|
||||
/* Pour finir, une petite macro pour tester si */
|
||||
/* Une fonction LDV a retourne une erreur */
|
||||
#define LDV_SUCCESS(x) ((x) == ELDV_NOERROR)
|
||||
|
||||
|
||||
/* Types de LDV */
|
||||
#define TLDV_MODIFYIMG 0x01 /* Modificateur d'image : filtre, deformation, ... */
|
||||
/* Le nombre de plans de l'image reste inchange */
|
||||
#define TLDV_LOADIMG 0x02 /* Module de chargement d'image */
|
||||
#define TLDV_SAVEIMG 0x04 /* Module de sauvegarde d'image */
|
||||
|
||||
/* Structure de definition du LDV */
|
||||
/* Pour un nombre de plans defini */
|
||||
/* Masques de bits pour le champ Flags */
|
||||
#define LDVF_STDFORMAT 0x00000001UL /* Donnees image au format standard */
|
||||
#define LDVF_ATARIFORMAT 0x00000002UL /* Donnees image au format ATARI (Falcon) */
|
||||
#define LDVF_SPECFORMAT 0x00000004UL /* Donnees image au format specifique a la machine */
|
||||
#define LDVF_SUPPORTPREVIEW 0x00000008UL /* Support de la pre-visualisation */
|
||||
#define LDVF_AFFECTPALETTE 0x00000010UL /* Le module affecte la palette (si NbPlanes <= 8) */
|
||||
#define LDVF_SUPPORTPROG 0x00000020UL /* Le module appelera la fonction de progression */
|
||||
#define LDVF_OPINPLACE 0x00000040UL /* Le module modifie la source (param out ignore) */
|
||||
#define LDVF_REALTIMEPARAMS 0x00000080UL /* Le module supporte la modification en temps reel */
|
||||
/* Des parametres (mode Preview) */
|
||||
#define LDVF_SUPPORTCANCEL 0x00000100UL /* Le module gere l'annulation (voir PrSetProgEx) */
|
||||
#define LDVF_NOSELECTION 0x00000200UL /* Le module ne peut pas g<>rer la selection */
|
||||
|
||||
/* Cette structure definit ce que ce LDV sait faire, */
|
||||
/* Pour un nombre donne de plans en entree */
|
||||
typedef struct
|
||||
{
|
||||
char NbPlanes ; /* Nombre de plans de l'image : */
|
||||
/* 0 : Fin de cette structure */
|
||||
/* 1, 2, 4, 8, 16, 24, ou 32 */
|
||||
|
||||
char NbPlanesOut ; /* Nombre de plans en sortie */
|
||||
|
||||
unsigned long Flags ; /* LDVF_... */
|
||||
}
|
||||
LDV_CAPS ;
|
||||
|
||||
/* Cette structure rassemble les infos du module qui sont */
|
||||
/* Suceptibles de pouvoir etre traduites dans d'autres langues */
|
||||
/* Un fichier .INI doit etre associe (voir SMP_LDV.INI pour exemple) */
|
||||
|
||||
#define LDVNBMAX_PARAMETERS 4 /* Nombre maximal de parametres pouvant etre gere */
|
||||
/* Depuis VISION et passes au travers de LDV_PARAMS */
|
||||
|
||||
typedef union
|
||||
{
|
||||
short s ;
|
||||
float f ;
|
||||
}
|
||||
LDV_BASICPARAM ;
|
||||
|
||||
#define LDVT_SHORT 1
|
||||
#define LDVT_FLOAT 2
|
||||
typedef struct
|
||||
{
|
||||
char Name[1+15] ;
|
||||
char Type ;
|
||||
LDV_BASICPARAM MinValue ;
|
||||
LDV_BASICPARAM DefaultValue ;
|
||||
LDV_BASICPARAM MaxValue ;
|
||||
float FloatIncrement ;
|
||||
}
|
||||
LDV_DEF_PARAM ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short StrSize ; /* Taille de la structure LDV_INFOS */
|
||||
short Type ; /* TLDV_... */
|
||||
char Authors[1+45] ; /* Liste du ou des auteurs */
|
||||
|
||||
LDV_CAPS Caps[10] ; /* Ce que ce LDV sait faire, pour */
|
||||
/* Chaque type d'image */
|
||||
/* Mettre cette structure a zero */
|
||||
/* Des que la liste est terminee */
|
||||
/* Un maximum de 9 elements utiles */
|
||||
/* Est donc disponible */
|
||||
|
||||
char RFU[16] ; /* Usage futur */
|
||||
}
|
||||
LDV_INFOS ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short Red ; /* 0...1000 */
|
||||
short Green ; /* 0...1000 */
|
||||
short Blue ; /* 0...1000 */
|
||||
}
|
||||
VDI_ELEMENTPAL ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short NbColors ; /* Nombre d'index dans cette palette */
|
||||
VDI_ELEMENTPAL *Pal ; /* ATTENTION : Palette indexee sur les indices VDI */
|
||||
}
|
||||
LDV_PALETTE ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short x1, y1, x2, y2 ; /* Rectangle definissant la partie du MFDB a traiter */
|
||||
short NbParams ;
|
||||
LDV_BASICPARAM Param[LDVNBMAX_PARAMETERS] ;
|
||||
void *UserParam ; /* Peut etre utilise avec GetParams */
|
||||
}
|
||||
LDV_PARAMS ;
|
||||
|
||||
/* Parametres d'entree de la fonction a effectuer par le LDV */
|
||||
typedef struct
|
||||
{
|
||||
short RasterFormat ; /* LDVF_STDFORMAT, LDVF_ATARIFORMAT ou LDVF_SPECFORMAT */
|
||||
/* VISION choisit automatiquement le format optimal en */
|
||||
/* Fonction des capacites du LDV fournies par la */
|
||||
/* Fonction GetLDVCapabilities */
|
||||
|
||||
MFDB Raster ; /* Image */
|
||||
|
||||
LDV_PALETTE Palette ; /* Structure fournie si Raster.fd_nplanes > 8 */
|
||||
}
|
||||
LDV_IMAGE ;
|
||||
|
||||
|
||||
#endif
|
||||
102
tools/vision/LDV/LDVCOM.H
Normal file
102
tools/vision/LDV/LDVCOM.H
Normal file
@@ -0,0 +1,102 @@
|
||||
#ifndef __LDVCOM
|
||||
#define __LDVCOM
|
||||
|
||||
#ifndef __LDV
|
||||
#include "ldv\ldv.h"
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *ShortName ; /* Nom court du module (15 carac. max) */
|
||||
char *LongName ; /* Nom long du module (31 carac. max) */
|
||||
char *Description ; /* Description du module (79 carac. max) */
|
||||
|
||||
/* Definition des parametres pouvant etre applique */
|
||||
LDV_DEF_PARAM Params[LDVNBMAX_PARAMETERS] ;
|
||||
}
|
||||
LDV_INI_SPEC ;
|
||||
|
||||
/* Interface pour la modification d'image */
|
||||
typedef struct
|
||||
{
|
||||
/* Permet a VISION d'allouer les ressources */
|
||||
/* Necessaires a la fonction assuree par le LDV */
|
||||
/* Renvoyer dans out->Raster les dimensions */
|
||||
/* Voulues et/ou renseigner le champ out->Palette.NbColors */
|
||||
/* Renvoyer dans params, la totalite de la zone a envoyer */
|
||||
/* Dans le Undo */
|
||||
LDV_STATUS cdecl (*PreRun)(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
/* Effectue la fonction du LDV */
|
||||
/* VISION a deja alloue la memoire voulue grace a la fonction precedente */
|
||||
/* NE SURTOUT PAS ALLOUER OU LIBERER DE LA MEMOIRE QUI SERA UTILISEE PAR */
|
||||
/* VISION ! */
|
||||
LDV_STATUS cdecl (*Run)(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
/* Identique a la fonction precedente, mais en mode Preview */
|
||||
LDV_STATUS cdecl (*Preview)(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
/* Optionnel : Si cette fonction est presente, VISION l'appelera a la place */
|
||||
/* de la fonction interne pour parametrer le module */
|
||||
/* Si la valeur de retour est differente de ELDV_NOERROR, VISION consderera */
|
||||
/* Que la saisie a ete annulee (comme si vous aviez appuye sur "Cancel" dans */
|
||||
/* Le formulaire standard de saisie. */
|
||||
LDV_STATUS cdecl (*GetParams)(LDV_IMAGE *img, LDV_PARAMS *params, char *path) ;
|
||||
}
|
||||
ILDVModifImg ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long RFU[10] ;
|
||||
}
|
||||
ILDVLoadImg ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long RFU[10] ;
|
||||
}
|
||||
ILDVSaveImg ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LDG *Ldg ; /* Le module LDG */
|
||||
|
||||
char *FileName ; /* Nom uniquement, sans le chemin */
|
||||
short Version ; /* Idem que Ldg->vers */
|
||||
|
||||
LDV_INFOS Infos ; /* Informations sur ce module */
|
||||
LDV_INI_SPEC IniSpec ; /* Specifique au .INI */
|
||||
|
||||
/* Indique a VISION ce que ce LDV sait faire */
|
||||
/* VISION fournit son interface de programmation vapi */
|
||||
LDV_INFOS * cdecl (*GetLDVCapabilities)(VAPI *vapi) ;
|
||||
|
||||
int NbReferences ; /* Nombre de references en cours sur ce module */
|
||||
ILDVModifImg *IModifImg ; /* Interface pour le type TLDV_MODIFYIMG */
|
||||
ILDVLoadImg *ILoadImg ; /* Interface pour le type TLDV_LOADIMG */
|
||||
ILDVSaveImg *ISaveImg ; /* Interface pour le type TLDV_SAVEIMG */
|
||||
long RFUInterfaces[10] ; /* Interfaces de reserve */
|
||||
}
|
||||
LDV_MODULE ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long prerun_ms ;
|
||||
unsigned long pre_ldv_ms ;
|
||||
unsigned long run_ms ;
|
||||
unsigned long post_ldv_ms ;
|
||||
unsigned long total_ms ;
|
||||
}
|
||||
LDV_PERF ;
|
||||
|
||||
LDV_CAPS *LDVGetNPlanesCaps(LDV_MODULE *mod, int nplanes) ;
|
||||
LDV_MODULE *LDVGetModuleList(char *path, int *nb_ldv) ;
|
||||
void LDVFreeModuleList(LDV_MODULE *module_list) ;
|
||||
LDV_MODULE *GetLdvByLdg(LDV_MODULE *ldv_list, LDG *ldg) ;
|
||||
LDV_STATUS LDVAlloc(LDV_IMAGE *img) ;
|
||||
LDV_STATUS LDVDo(LDV_MODULE *ldv, LDV_PARAMS *ldv_params, LDV_IMAGE *ldv_img, int preview, LDV_PERF *perfs) ;
|
||||
|
||||
LDV_STATUS LDVLoadFunctions(char *path, LDV_MODULE *mod) ;
|
||||
void LDVUnloadFunctions(LDV_MODULE *mod) ;
|
||||
|
||||
#endif
|
||||
50
tools/vision/LDV/LIGHT.INI
Normal file
50
tools/vision/LDV/LIGHT.INI
Normal file
@@ -0,0 +1,50 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Light
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = RGB Light
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Changes the light on red, green and blue components
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Red, Green, Blue
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter2]
|
||||
Name = Red
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter3]
|
||||
Name = Green
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
|
||||
[Parameter4]
|
||||
Name = Blue
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 100
|
||||
MaxValue = 200
|
||||
BIN
tools/vision/LDV/LIGHT.LDV
Normal file
BIN
tools/vision/LDV/LIGHT.LDV
Normal file
Binary file not shown.
54
tools/vision/LDV/MT_AES.H
Normal file
54
tools/vision/LDV/MT_AES.H
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* MT_AES library
|
||||
* initied by A. Kromke
|
||||
* this version (for LDG) comes from GemLib pl36
|
||||
* tabulation size : 4 characters
|
||||
* New version (with LDG v1.2)
|
||||
*/
|
||||
|
||||
#ifndef _MT_AES_H_
|
||||
#define _MT_AES_H_
|
||||
|
||||
#ifndef MENU_T
|
||||
#define MENU_T MENU
|
||||
#endif
|
||||
|
||||
#ifndef XFSL_FILTER
|
||||
typedef int cdecl (*XFSL_FILTER)(char *path, char *name, void /*XATTR*/ *xa);
|
||||
#endif
|
||||
|
||||
#ifndef EVNT
|
||||
typedef struct {
|
||||
int mwhich;
|
||||
int mx;
|
||||
int my;
|
||||
int mbutton;
|
||||
int kstate;
|
||||
int key;
|
||||
int mclicks;
|
||||
int reserved[9];
|
||||
int mesg[16];
|
||||
} EVNT;
|
||||
#endif
|
||||
|
||||
int mt_appl_bvset ( int bvdisk, int bvhard, WORD *pb);
|
||||
int mt_appl_control ( int ap_cid, int ap_cwhat, void *ap_cout, WORD *pb);
|
||||
int mt_appl_exit ( WORD *pb);
|
||||
int mt_appl_find ( const char *Name, WORD *pb);
|
||||
int mt_appl_getinfo ( int type, int *out1, int *out2,int *out3, int *out4, WORD *pb);
|
||||
int mt_appl_init ( WORD *pb);
|
||||
int mt_appl_read ( int ApId, int Length, void *ApPbuff, WORD *pb);
|
||||
int mt_appl_search ( int mode, char *fname, int *type, int *ap_id, WORD *pb);
|
||||
int mt_appl_tplay ( void *Mem, int Num, int Scale, WORD *pb);
|
||||
int mt_appl_trecord ( void *Mem, int Count, WORD *pb);
|
||||
int mt_appl_write ( int ApId, int Length, void *ApPbuff, WORD *pb);
|
||||
int mt_appl_yield ( WORD *pb);
|
||||
|
||||
int mt_evnt_button ( int Clicks, int WhichButton, int WhichState, int *Mx, int *My,
|
||||
int *ButtonState, int *KeyState, WORD *pb);
|
||||
int mt_evnt_dclick ( int ToSet, int SetGet, WORD *pb);
|
||||
int mt_evnt_keybd ( WORD *pb);
|
||||
int mt_evnt_mesag ( int MesagBuf[], WORD *pb);
|
||||
int mt_evnt_mouse ( int EnterExit, int InX, int InY, int InW, int InH,
|
||||
int *OutX, int *OutY, int *ButtonState, int *KeyState, WORD *pb);
|
||||
#ifdef __OLD_WAY__
|
||||
BIN
tools/vision/LDV/MT_AES.LIB
Normal file
BIN
tools/vision/LDV/MT_AES.LIB
Normal file
Binary file not shown.
29
tools/vision/LDV/PIXEL.INI
Normal file
29
tools/vision/LDV/PIXEL.INI
Normal file
@@ -0,0 +1,29 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Pixelization
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Pixelization
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Pixelize an image (or part of it)
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Power
|
||||
Type = 1
|
||||
MinValue = 2
|
||||
DefaultValue = 4
|
||||
MaxValue = 16
|
||||
BIN
tools/vision/LDV/PIXEL.LDV
Normal file
BIN
tools/vision/LDV/PIXEL.LDV
Normal file
Binary file not shown.
29
tools/vision/LDV/ROTATE.INI
Normal file
29
tools/vision/LDV/ROTATE.INI
Normal file
@@ -0,0 +1,29 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Rotate
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Rotate
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV rotates an image
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Angle
|
||||
Type = 1
|
||||
MinValue = -180
|
||||
DefaultValue = 0
|
||||
MaxValue = 180
|
||||
BIN
tools/vision/LDV/ROTATE.LDV
Normal file
BIN
tools/vision/LDV/ROTATE.LDV
Normal file
Binary file not shown.
254
tools/vision/LDV/SMLLDV.H
Normal file
254
tools/vision/LDV/SMLLDV.H
Normal file
@@ -0,0 +1,254 @@
|
||||
#ifndef __SMLLDV
|
||||
#define __SMLLDV
|
||||
|
||||
#pragma warn -par
|
||||
LDV_MODULE *SmlLDVGetModuleList(char *path_ldv)
|
||||
{
|
||||
long size ;
|
||||
LDV_MODULE *mods ;
|
||||
LDV_MODULE tab_module[] = {
|
||||
/* Module 1 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_STDFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_STDFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_STDFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT | LDVF_SUPPORTPROG | LDVF_SUPPORTPREVIEW },
|
||||
{ 16, 16, LDVF_ATARIFORMAT | LDVF_SUPPORTPREVIEW },
|
||||
{ 32, 32, LDVF_ATARIFORMAT | LDVF_SUPPORTPROG },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 2 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT | LDVF_SPECFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT | LDVF_SPECFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT | LDVF_SPECFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 3 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_SPECFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 4 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 5 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 6 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 7 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 8 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 9 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 1 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 2 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 3 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 4 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 5 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 6 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 1, 1, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
/* Module 7 */
|
||||
{ (LDG *) 0x00000001UL, "Mod.LDV",
|
||||
sizeof(LDV_INFOS), TLDV_MODIFYIMG,
|
||||
"Jean Lusetti",
|
||||
{
|
||||
{ 4, 4, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 8, 8, LDVF_ATARIFORMAT | LDVF_AFFECTPALETTE },
|
||||
{ 15, 15, LDVF_ATARIFORMAT },
|
||||
{ 16, 16, LDVF_ATARIFORMAT },
|
||||
{ 32, 32, LDVF_ATARIFORMAT },
|
||||
{ 0, 0, 0 },
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/* Dernier module (marqueur de fin) */
|
||||
{ NULL, "",
|
||||
0, 0,
|
||||
"", "",
|
||||
{
|
||||
{ 0, 0 },
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
size = (long) sizeof(tab_module) ;
|
||||
mods = (LDV_MODULE *) Xalloc( size ) ;
|
||||
if ( mods ) memcpy( mods, tab_module, size ) ;
|
||||
|
||||
return( mods ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
#endif
|
||||
21
tools/vision/LDV/SMP_LDV.INI
Normal file
21
tools/vision/LDV/SMP_LDV.INI
Normal file
@@ -0,0 +1,21 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName =
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName =
|
||||
; Description should not exceed 79 caracters
|
||||
Description =
|
||||
289
tools/vision/LDV/SRC/BW/BW.C
Normal file
289
tools/vision/LDV/SRC/BW/BW.C
Normal file
@@ -0,0 +1,289 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0102, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_AFFECTPALETTE)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_SUPPORTCANCEL)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti/Olivier Landemarre", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, BP_CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, BP_CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, BP_CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, TC_CAPS }, /* Capacites pour 16 plans */
|
||||
{ 24, 24, TC_CAPS }, /* Capacites pour 24 plans */
|
||||
{ 32, 32, TC_CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
/* Petites macros bien utiles ... */
|
||||
#define RVB16( r, v, b ) ( (r << 11) + (v << 5) + (b) )
|
||||
#define RVB32( r, v, b ) ( ((long)r << 24) + ((long)v << 16) + ((long)b << 8) )
|
||||
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
int R4[256],G4[256],B4[256]; /*pr<70>calcul de luminescence 256 niveaux */
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{ float valR=0,valG=0,valB=0; int i;
|
||||
Vapi = vapi ;
|
||||
for(i=0;i<256;i++)
|
||||
{
|
||||
R4[i]=(int)valR; /* methode rapide */
|
||||
G4[i]=(int)valG;
|
||||
B4[i]=(int)valB;
|
||||
valR+=0.302;
|
||||
valG+=0.589;
|
||||
valB+=0.114;
|
||||
|
||||
}
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_PALETTE *vdi_palette = &in->Palette ;
|
||||
VDI_ELEMENTPAL *vdi_epal ;
|
||||
short vdi_index ;
|
||||
short bw_value ;
|
||||
short cancel = 0 ;
|
||||
|
||||
if ( in->Raster.fd_nplanes <= 8 )
|
||||
{
|
||||
if ( vdi_palette == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
vdi_epal = vdi_palette->Pal ;
|
||||
if ( vdi_epal == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
|
||||
for ( vdi_index = 0; vdi_index < vdi_palette->NbColors; vdi_index++, vdi_epal++ )
|
||||
{
|
||||
bw_value = ( vdi_epal->Red + vdi_epal->Green + vdi_epal->Blue ) / 3 ;
|
||||
vdi_epal->Red = bw_value ;
|
||||
vdi_epal->Green = bw_value ;
|
||||
vdi_epal->Blue = bw_value ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MFDB *img = &in->Raster ;
|
||||
long nb_pts_in_line ;
|
||||
short x, y, pc ;
|
||||
|
||||
if ( Vapi == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
|
||||
/* Convertir l'image au format True Color "standard" ATARI */
|
||||
/* Format specifique --> format "ATARI True Color" */
|
||||
Vapi->RaTCInvConvert( img ) ;
|
||||
|
||||
nb_pts_in_line = img->fd_w ;
|
||||
if ( nb_pts_in_line % 16 ) nb_pts_in_line = (16+nb_pts_in_line) & 0xFFF0 ; /* Toujours aligne sur 16 pixels ! */
|
||||
|
||||
if ( img->fd_nplanes == 16 )
|
||||
{
|
||||
unsigned short *ptu, red, green, blue, ugris, val, ubr ;
|
||||
|
||||
for ( y = params->y1; !cancel && (y <= params->y2); y++ )
|
||||
{
|
||||
ptu = (unsigned short *) img->fd_addr ;
|
||||
ptu += nb_pts_in_line * y ;
|
||||
ptu += params->x1 ;
|
||||
for ( x = params->x1; x <= params->x2; x++ )
|
||||
{
|
||||
val = *ptu ;
|
||||
red = ( val & 0x01F ) << 1 ; /* Sur 6 bits */
|
||||
green = ( val & 0x07E0 ) >> 6 ; /* Sur 6 bits */
|
||||
blue = ( val & 0xF800 ) >> 10 ; /* Sur 6 bits */
|
||||
ugris = ( R4[red] + G4[green] + B4[blue] ) ;
|
||||
ubr = ( ugris >> 1 ) ;
|
||||
*ptu++ = RVB16( ubr, ugris, ubr ) ;
|
||||
}
|
||||
if ( ( y & 0x0F ) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * ( y - params->y1 ) ) / ( params->y2 - params->y1 ) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( img->fd_nplanes == 24 ) /* NON teste ! */
|
||||
{
|
||||
unsigned char *ptu ;
|
||||
unsigned short red, green, blue, ugris ;
|
||||
|
||||
for ( y = params->y1; !cancel && (y <= params->y2); y++ )
|
||||
{
|
||||
ptu = (unsigned char *) img->fd_addr ;
|
||||
ptu += 3 * nb_pts_in_line * y ;
|
||||
ptu += 3 * params->x1 ;
|
||||
for ( x = params->x1; x <= params->x2; x++ )
|
||||
{
|
||||
red = (unsigned short) (*ptu++) ;
|
||||
green = (unsigned short) (*ptu++) ;
|
||||
blue = (unsigned short) (*ptu++) ;
|
||||
ugris = ( R4[red] + G4[green] + B4[blue] ) ;
|
||||
*ptu-- = ugris ;
|
||||
*ptu-- = ugris ;
|
||||
*ptu-- = ugris ;
|
||||
ptu += 3 ;
|
||||
}
|
||||
if ( ( y & 0x0F ) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * ( y - params->y1 ) ) / ( params->y2 - params->y1 ) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( img->fd_nplanes == 32 )
|
||||
{
|
||||
unsigned long *ptu, val ;
|
||||
unsigned short red, green, blue, ugris ;
|
||||
|
||||
for ( y = params->y1; !cancel && (y <= params->y2); y++ )
|
||||
{
|
||||
ptu = (unsigned long *)img->fd_addr ;
|
||||
ptu += nb_pts_in_line * y ;
|
||||
ptu += params->x1 ;
|
||||
for ( x = params->x1; x <= params->x2; x++ )
|
||||
{
|
||||
val = *ptu ;
|
||||
val >>= 8 ;
|
||||
blue = (unsigned short) (val & 0xFF) ;
|
||||
val >>= 8 ;
|
||||
green = (unsigned short) (val & 0xFF) ;
|
||||
val >>= 8 ;
|
||||
red = (unsigned short) (val & 0xFF) ;
|
||||
ugris = ( R4[red] + G4[green] + B4[blue] ) ;
|
||||
*ptu++ = RVB32( ugris, ugris, ugris ) ;
|
||||
}
|
||||
if ( ( y & 0x0F ) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * ( y - params->y1 ) ) / ( params->y2 - params->y1 ) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Format "ATARI True Color" --> format specifique */
|
||||
Vapi->RaTCConvert( img ) ;
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/BW/BW.LDV
Normal file
BIN
tools/vision/LDV/SRC/BW/BW.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/BW/BW.PRJ
Normal file
12
tools/vision/LDV/SRC/BW/BW.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
bw.ldv
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
bw.c
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
156
tools/vision/LDV/SRC/INVERT/INVERT.C
Normal file
156
tools/vision/LDV/SRC/INVERT/INVERT.C
Normal file
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
} ;
|
||||
/* Enlever le commentaire de la ligne suivante */
|
||||
/* Pour que le LDV ne supporte plus la */
|
||||
/* Transformation sur place (but uniquement */
|
||||
/* Pedagogique ! */
|
||||
/*#define NOTOPINPLACE*/
|
||||
#ifndef NOTOPINPLACE
|
||||
#define CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_OPINPLACE)
|
||||
#else
|
||||
#define CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW)
|
||||
#endif
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, CAPS }, /* Capacites pour 16 plans */
|
||||
{ 32, 32, CAPS }, /* Capacites pour 24 plans */
|
||||
{ 24, 24, CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
int xy[8] ;
|
||||
|
||||
if ( VDIHandle == -1 ) VDIHandle = vdihandle() ;
|
||||
#ifndef NOTOPINPLACE
|
||||
{
|
||||
/* Recopie le raster source vers la destination */
|
||||
xy[0] = xy[4] = 0 ;
|
||||
xy[1] = xy[5] = 0 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
xy[0] = params->x1 ;
|
||||
xy[1] = params->y1 ;
|
||||
xy[2] = params->x2 ;
|
||||
xy[3] = params->y2 ;
|
||||
memcpy( &xy[4], xy, 4*sizeof(int) ) ;
|
||||
|
||||
vro_cpyfm( VDIHandle, D_INVERT, xy, &out->Raster, &out->Raster ) ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/INVERT/INVERT.LDV
Normal file
BIN
tools/vision/LDV/SRC/INVERT/INVERT.LDV
Normal file
Binary file not shown.
11
tools/vision/LDV/SRC/INVERT/INVERT.PRJ
Normal file
11
tools/vision/LDV/SRC/INVERT/INVERT.PRJ
Normal file
@@ -0,0 +1,11 @@
|
||||
invert.ldv
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
invert.c
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
346
tools/vision/LDV/SRC/PIXEL/PIXEL.C
Normal file
346
tools/vision/LDV/SRC/PIXEL/PIXEL.C
Normal file
@@ -0,0 +1,346 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl GetParams(LDV_IMAGE *in, LDV_PARAMS *params, char *path) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
NULL, /* Fermeture, liberation de VDIHandle (inutilise) */
|
||||
};
|
||||
|
||||
#define CAPS (LDVF_ATARIFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_OPINPLACE | LDVF_SUPPORTCANCEL)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 16, 16, CAPS }, /* Capacites pour 16 plans */
|
||||
/* Qui le fera ? { 24, 24, CAPS }, */
|
||||
{ 32, 32, CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
/* Ce LDV ne peut marcher qu'avec une versio de VAPI >= 1.02 */
|
||||
/* Du <20> un bug dans la version 1.01 */
|
||||
#define CHK_VAPIVERSION(vapi) if ( ( vapi == NULL ) || ( vapi->Header.Version < 0x102 ) ) return( ELDV_BADVAPIVERSION ) ;
|
||||
|
||||
/* Petites macros bien utiles ... */
|
||||
#define RVB16( r, v, b ) ( (r << 11) + (v << 5) + (b) )
|
||||
#define RVB32( r, v, b ) ( ((long)(r) << 24) + ((long)(v) << 16) + ((long)(b << 8)) )
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
unsigned short powerx, powery ;
|
||||
unsigned long p2 ;
|
||||
|
||||
/*
|
||||
Notez que ce LDV ne se sert pas de VDIHandle, OnClose... puisque aucune fonction VDI (vo_cpyfm par ex.) n'est utilisee
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
CHK_VAPIVERSION( Vapi ) ;
|
||||
|
||||
/* La transformation se fait "sur place" */
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
unsigned short Pixelize16(unsigned short *pt, long nb_lpts)
|
||||
{
|
||||
unsigned short *last_pt = pt ;
|
||||
unsigned long rsum = 0 ;
|
||||
unsigned long gsum = 0 ;
|
||||
unsigned long bsum = 0 ;
|
||||
unsigned short pixel, *ptu ;
|
||||
unsigned short red, green, blue ;
|
||||
short x, y ;
|
||||
|
||||
for ( y = 0; y < powery; y++, last_pt += nb_lpts )
|
||||
{
|
||||
ptu = last_pt ;
|
||||
for ( x = 0; x < powerx; x++, ptu++ )
|
||||
{
|
||||
pixel = *ptu ;
|
||||
red = pixel >> 11 ; /* Sur 5 bits */
|
||||
green = ( pixel >> 5 ) & 0x3F ; /* Sur 6 bits */
|
||||
blue = pixel & 0x1F ; /* Sur 5 bits */
|
||||
rsum += (unsigned long) red ;
|
||||
gsum += (unsigned long) green ;
|
||||
bsum += (unsigned long) blue ;
|
||||
}
|
||||
}
|
||||
|
||||
red = (unsigned short) (rsum / p2) ;
|
||||
green = (unsigned short) (gsum / p2) ;
|
||||
blue = (unsigned short) (bsum / p2) ;
|
||||
pixel = RVB16( red, green, blue ) ;
|
||||
|
||||
return( pixel ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS Run16(LDV_IMAGE *in, LDV_PARAMS *params)
|
||||
{
|
||||
unsigned short new_pixel, *pt, *tmp_pt, *dpix ;
|
||||
unsigned long po2 ;
|
||||
long yoffset, nb_lpts ;
|
||||
short power, x, y ;
|
||||
short pc, cancel = 0 ;
|
||||
short iter = 0 ;
|
||||
|
||||
power = params->Param[0].s ;
|
||||
po2 = power * power ;
|
||||
nb_lpts = in->Raster.fd_w ;
|
||||
if ( nb_lpts % 16 ) nb_lpts++ ;
|
||||
yoffset = nb_lpts * (long)(params->y1) ;
|
||||
for ( y = params->y1; !cancel && (y < params->y2); y += power, yoffset += nb_lpts*power )
|
||||
{
|
||||
powerx = power ;
|
||||
if ( y + power - 1 > params->y2 )
|
||||
{
|
||||
powery = 1 + params->y2 - y ;
|
||||
p2 = powerx * powery ;
|
||||
}
|
||||
else
|
||||
{
|
||||
powery = power ;
|
||||
p2 = po2 ;
|
||||
}
|
||||
pt = (unsigned short *)(in->Raster.fd_addr) + yoffset + params->x1 ;
|
||||
for ( x = params->x1; x < params->x2 - powerx; x += powerx, pt += powerx )
|
||||
{
|
||||
new_pixel = Pixelize16( pt, nb_lpts ) ;
|
||||
for ( tmp_pt = pt; tmp_pt < pt + powery*nb_lpts; tmp_pt += nb_lpts )
|
||||
for ( dpix = tmp_pt; dpix < tmp_pt + powerx; dpix++ ) *dpix = new_pixel ;
|
||||
}
|
||||
/* Residuel sur x (evite un test pour chaque paquet power x power) */
|
||||
if ( x < params->x2 )
|
||||
{
|
||||
powerx = params->x2 - x ;
|
||||
p2 = powerx * powery ;
|
||||
new_pixel = Pixelize16( pt, nb_lpts ) ;
|
||||
for ( tmp_pt = pt; tmp_pt < pt + powery*nb_lpts; tmp_pt += nb_lpts )
|
||||
for ( dpix = tmp_pt; dpix < tmp_pt + powerx; dpix++ ) *dpix = new_pixel ;
|
||||
}
|
||||
if ( Vapi && ( ( iter++ & 0x0F ) == 0x0F ) )
|
||||
{
|
||||
pc = (short) ( ( 100L * (long)(y - params->y1) ) / (long)(params->y2 - power- params->y1) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
unsigned long Pixelize32(unsigned long *pt, long nb_lpts)
|
||||
{
|
||||
unsigned long *last_pt = pt ;
|
||||
unsigned long rsum = 0 ;
|
||||
unsigned long gsum = 0 ;
|
||||
unsigned long bsum = 0 ;
|
||||
unsigned long pixel, *ptu ;
|
||||
unsigned long red, green, blue ;
|
||||
short x, y ;
|
||||
|
||||
for ( y = 0; y < powery; y++, last_pt += nb_lpts )
|
||||
{
|
||||
ptu = last_pt ;
|
||||
for ( x = 0; x < powerx; x++, ptu++ )
|
||||
{
|
||||
pixel = *ptu ;
|
||||
pixel >>= 8 ;
|
||||
bsum += pixel & 0xFF ;
|
||||
pixel >>= 8 ;
|
||||
gsum += pixel & 0xFF ;
|
||||
pixel >>= 8 ;
|
||||
rsum += pixel ;
|
||||
}
|
||||
}
|
||||
|
||||
red = rsum / p2 ;
|
||||
green = gsum / p2 ;
|
||||
blue = bsum / p2 ;
|
||||
pixel = RVB32( red, green, blue ) ;
|
||||
|
||||
return( pixel ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS Run32(LDV_IMAGE *in, LDV_PARAMS *params)
|
||||
{
|
||||
unsigned long new_pixel, *pt, *tmp_pt, *dpix ;
|
||||
unsigned long po2 ;
|
||||
long yoffset, nb_lpts ;
|
||||
short power, x, y ;
|
||||
short pc, cancel = 0 ;
|
||||
short iter = 0 ;
|
||||
|
||||
power = params->Param[0].s ;
|
||||
po2 = power * power ;
|
||||
nb_lpts = in->Raster.fd_w ;
|
||||
if ( nb_lpts % 16 ) nb_lpts++ ;
|
||||
yoffset = nb_lpts * (long)(params->y1) ;
|
||||
for ( y = params->y1; !cancel && (y < params->y2); y += power, yoffset += nb_lpts*power )
|
||||
{
|
||||
powerx = power ;
|
||||
if ( y + power - 1 > params->y2 )
|
||||
{
|
||||
powery = 1 + params->y2 - y ;
|
||||
p2 = powerx * powery ;
|
||||
}
|
||||
else
|
||||
{
|
||||
powery = power ;
|
||||
p2 = po2 ;
|
||||
}
|
||||
pt = (unsigned long *)(in->Raster.fd_addr) + yoffset + params->x1 ;
|
||||
for ( x = params->x1; x < params->x2 - powerx; x += powerx, pt += powerx )
|
||||
{
|
||||
new_pixel = Pixelize32( pt, nb_lpts ) ;
|
||||
for ( tmp_pt = pt; tmp_pt < pt + powery*nb_lpts; tmp_pt += nb_lpts )
|
||||
for ( dpix = tmp_pt; dpix < tmp_pt + powerx; dpix++ ) *dpix = new_pixel ;
|
||||
}
|
||||
/* Residuel sur x (evite un test pour chaque paquet power x power) */
|
||||
if ( x < params->x2 )
|
||||
{
|
||||
powerx = params->x2 - x ;
|
||||
p2 = powerx * powery ;
|
||||
new_pixel = Pixelize32( pt, nb_lpts ) ;
|
||||
for ( tmp_pt = pt; tmp_pt < pt + powery*nb_lpts; tmp_pt += nb_lpts )
|
||||
for ( dpix = tmp_pt; dpix < tmp_pt + powerx; dpix++ ) *dpix = new_pixel ;
|
||||
}
|
||||
if ( Vapi && ( ( iter++ & 0x0F ) == 0x0F ) )
|
||||
{
|
||||
pc = (short) ( ( 100L * (long)(y - params->y1) ) / (long)(params->y2 - power- params->y1) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_STATUS status ;
|
||||
|
||||
CHK_VAPIVERSION( Vapi ) ;
|
||||
|
||||
if ( ( in->RasterFormat & CAPS ) == 0 ) return( ELDV_IMGFORMATMISMATCH ) ;
|
||||
|
||||
/* if ( VDIHandle == -1 ) VDIHandle = vdihandle() ; (inutile) */
|
||||
|
||||
switch( in->Raster.fd_nplanes )
|
||||
{
|
||||
case 16 : status = Run16( in, params ) ;
|
||||
break ;
|
||||
/*
|
||||
case 24 : status = Run24( in, params ) ;
|
||||
break ;
|
||||
*/
|
||||
case 32 : status = Run32( in, params ) ;
|
||||
break ;
|
||||
|
||||
default : status = ELDV_NBPLANESNOTSUPPORTED ;
|
||||
break ;
|
||||
}
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/PIXEL/PIXEL.LDV
Normal file
BIN
tools/vision/LDV/SRC/PIXEL/PIXEL.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/PIXEL/PIXEL.PRJ
Normal file
12
tools/vision/LDV/SRC/PIXEL/PIXEL.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
PIXEL.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
PIXEL.C
|
||||
;PIXEL.S
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
74
tools/vision/LDV/SRC/PIXEL/PIXEL.S
Normal file
74
tools/vision/LDV/SRC/PIXEL/PIXEL.S
Normal file
@@ -0,0 +1,74 @@
|
||||
.EXPORT Pixelize16
|
||||
|
||||
MACRO GET_FRGB16
|
||||
|
||||
MOVE.W (A0),D0
|
||||
MOVE.W D0,D1
|
||||
ROL.W #5,D1
|
||||
ANDI.W #$1F,D1 ; D1.W = Composante ROUGE
|
||||
|
||||
MOVE.W D0,D2
|
||||
LSR.W #5,D2
|
||||
ANDI.W #$3F,D2 ; D2.W = Composante VERTE (0...63)
|
||||
|
||||
MOVE.W D0,D3
|
||||
ANDI.W #$1F,D3 ; D3.W = Composante BLEU (0...31)
|
||||
|
||||
ENDM
|
||||
|
||||
MACRO SET_FRGB16
|
||||
|
||||
MOVE.W D3,D0 ; D3 = Composante Bleu
|
||||
LSL.W #5,D2
|
||||
ADD.W D2,D0 ; D0 += Composante Verte
|
||||
ROR.W #5,D1
|
||||
ADD.W D1,D0 ; D0 += Composante Rouge
|
||||
|
||||
ENDM
|
||||
|
||||
*unsigned short Pixelize16(unsigned short *pt, long nb_lpts, short powerx, short powery)
|
||||
*
|
||||
*{
|
||||
* unsigned long rsum = 0 ;
|
||||
* unsigned long gsum = 0 ;
|
||||
* unsigned long bsum = 0 ;
|
||||
* unsigned long p2 = powerx * powery ;
|
||||
* unsigned short val, pixel, *ptu ;
|
||||
* unsigned short red, green, blue ;
|
||||
* short x, y ;
|
||||
*
|
||||
* for ( y = 0; y < powery; y++ )
|
||||
* {
|
||||
* ptu = pt + y * nb_lpts ;
|
||||
* for ( x = 0; x < powerx; x++, ptu++ )
|
||||
* {
|
||||
* val = *ptu ;
|
||||
* red = val >> 11 ; /* Sur 5 bits */
|
||||
* green = ( val >> 5 ) & 0x3F ; /* Sur 6 bits */
|
||||
* blue = val & 0x1F ; /* Sur 5 bits */
|
||||
* rsum += (unsigned long) red ;
|
||||
* gsum += (unsigned long) green ;
|
||||
* bsum += (unsigned long) blue ;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* red = (unsigned short) (rsum / p2) ;
|
||||
* green = (unsigned short) (gsum / p2) ;
|
||||
* blue = (unsigned short) (bsum / p2) ;
|
||||
* pixel = RVB16( red, green, blue ) ;
|
||||
*
|
||||
* return( pixel ) ;
|
||||
}
|
||||
|
||||
* unsigned short Pixelize16(unsigned short *pt, long nb_lpts, long power)
|
||||
* D0 A0 D0 D1
|
||||
Pixelize16:
|
||||
MOVEM.L D0-D7/A0-A6,-(SP)
|
||||
|
||||
MOVE.L D0,D4
|
||||
MOVE.L D1,D5
|
||||
MOVE.L A0,A1
|
||||
GET_FRGB16
|
||||
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A0-A6 ; Restauration du contexte
|
||||
187
tools/vision/LDV/SRC/XWAVE/XWAVE.C
Normal file
187
tools/vision/LDV/SRC/XWAVE/XWAVE.C
Normal file
@@ -0,0 +1,187 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0101, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, CAPS }, /* Capacites pour 16 plans */
|
||||
{ 24, 24, CAPS }, /* Capacites pour 24 plans */
|
||||
{ 32, 32, CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
float angle, phi ;
|
||||
float amplitude ;
|
||||
int xy[8] ;
|
||||
short line ;
|
||||
short xoffset ;
|
||||
short pc, cancel = 0 ;
|
||||
|
||||
if ( VDIHandle == -1 ) VDIHandle = vdihandle() ;
|
||||
|
||||
if (
|
||||
( params->x1 != 0 ) || ( params->x2 != in->Raster.fd_w -1 ) ||
|
||||
( params->y1 != 0 ) || ( params->y2 != in->Raster.fd_h -1 )
|
||||
)
|
||||
{
|
||||
/* Bloc a l'interieur de l'image */
|
||||
xy[0] = xy[4] = 0 ;
|
||||
xy[1] = xy[5] = 0 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
else
|
||||
if ( Vapi && Vapi->RaImgWhite ) Vapi->RaImgWhite( &out->Raster ) ;
|
||||
|
||||
amplitude = (float)params->Param[0].s / 10.0 ;
|
||||
phi = M_PI * (float)params->Param[1].s / 10.0 / (float)(params->y2 - params->y1) ;
|
||||
for ( line = params->y1 ; !cancel && (line <= params->y2); line++ )
|
||||
{
|
||||
angle = (float) (line - params->y1) * phi ;
|
||||
xoffset = (short) (amplitude * ( 1+ sin( angle ) ) ) ;
|
||||
if ( params->x2 - xoffset < params->x1 ) xoffset = params->x2 - params->x1 ;
|
||||
if ( params->x2 - xoffset > in->Raster.fd_w - 1 ) xoffset = params->x2 - in->Raster.fd_w + 1 ;
|
||||
if ( params->x1 + xoffset > out->Raster.fd_w - 1 ) xoffset = out->Raster.fd_w - params->x1 - 1 ;
|
||||
if ( params->x2 < params->x1 + xoffset ) xoffset = params->x2 - params->x1 ;
|
||||
xy[0] = params->x1 ;
|
||||
xy[1] = line ;
|
||||
xy[2] = params->x2 - xoffset ;
|
||||
xy[3] = line ;
|
||||
xy[4] = params->x1 + xoffset ;
|
||||
xy[5] = line ;
|
||||
xy[6] = params->x2 ;
|
||||
xy[7] = line ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
if ( Vapi && ( line & 0x0F) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * (long)(line - params->y1) ) / (long)(params->y2 - params->y1) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/XWAVE/XWAVE.LDV
Normal file
BIN
tools/vision/LDV/SRC/XWAVE/XWAVE.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/XWAVE/XWAVE.PRJ
Normal file
12
tools/vision/LDV/SRC/XWAVE/XWAVE.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
xwave.ldv
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
xwave.c
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
269
tools/vision/LDV/SRC/YPERSC/YPERSC.C
Normal file
269
tools/vision/LDV/SRC/YPERSC/YPERSC.C
Normal file
@@ -0,0 +1,269 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_ATARIFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, BP_CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, BP_CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, BP_CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, TC_CAPS }, /* Capacites pour 16 plans */
|
||||
{ 32, 32, TC_CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
MFDB dst_line ;
|
||||
int xy[8] ;
|
||||
long *pt32_in, *pt32_out ;
|
||||
short *pt16_in, *pt16_out ;
|
||||
unsigned char *pt8_in = NULL, *pt8_out ;
|
||||
long wscale, wout, wpixel, xpixel ;
|
||||
long angle, depth, src_line32, yoffset, lo_line_in, lo_line_out ;
|
||||
short line, y1, y2 ;
|
||||
short wlen, pc, cancel = 0 ;
|
||||
|
||||
if ( Vapi->Header.Version < 0x102 ) return( ELDV_BADVAPIVERSION ) ;
|
||||
|
||||
if ( VDIHandle == -1 ) VDIHandle = vdihandle() ;
|
||||
|
||||
if (
|
||||
( params->x1 != 0 ) || ( params->x2 != in->Raster.fd_w -1 ) ||
|
||||
( params->y1 != 0 ) || ( params->y2 != in->Raster.fd_h -1 )
|
||||
)
|
||||
{
|
||||
xy[0] = xy[4] = 0 ;
|
||||
xy[1] = xy[5] = 0 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
xy[0] = params->x1 ; xy[1] = params->y1 ;
|
||||
xy[2] = params->x2 ; xy[3] = params->y2 ;
|
||||
xy[4] = params->x1 ; xy[5] = params->y1 ;
|
||||
xy[6] = params->x2 ; xy[7] = params->y2 ;
|
||||
vro_cpyfm( VDIHandle, ALL_WHITE, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
else
|
||||
Vapi->RaImgWhite( &out->Raster ) ;
|
||||
|
||||
wpixel = 1+params->x2-params->x1 ;
|
||||
lo_line_in = ALIGN16( in->Raster.fd_w ) ;
|
||||
lo_line_out = ALIGN16( out->Raster.fd_w ) ;
|
||||
angle = (long) params->Param[0].s ;
|
||||
depth = (long) params->Param[1].s ;
|
||||
y1 = (long) params->y1 + (long) ( ((long)(params->y2 - params->y1)*angle) / 1000 ) ;
|
||||
y2 = (long) params->y1 + params->y2 - y1 ;
|
||||
|
||||
yoffset = ((long) (params->y2 - params->y1)) << 16 ;
|
||||
yoffset /= (long) (y2 - y1 ) ;
|
||||
if ( y1 > y2 )
|
||||
{
|
||||
short tmp ;
|
||||
|
||||
tmp = y1 ;
|
||||
y1 = y2 ;
|
||||
y2 = tmp ;
|
||||
src_line32 = params->y2 ;
|
||||
src_line32 <<= 16 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
src_line32 = params->y1 ;
|
||||
src_line32 <<= 16 ;
|
||||
}
|
||||
|
||||
/* Mode bitplan : allocation memoire pour conversion index <--> format ATARI */
|
||||
/* pt16_... est utilise pour le mode 16 bits et le mode bit-plan (avec reajustement) */
|
||||
if ( in->Raster.fd_nplanes <= 8 )
|
||||
{
|
||||
size_t win, wout ;
|
||||
|
||||
win = ALIGN16( in->Raster.fd_w ) ;
|
||||
wout = ALIGN16( out->Raster.fd_w ) ;
|
||||
pt8_in = (unsigned char *) malloc( win + wout ) ; /* Car on alloue aussi pour la remise a l'echelle */
|
||||
if ( pt8_in == NULL ) return ELDV_NOTENOUGHMEMORY ;
|
||||
pt8_out = pt8_in + in->Raster.fd_w ;
|
||||
|
||||
/* Pour conversions conversion index --> format ATARI (Vapi->RaInd2raster) */
|
||||
memcpy( &dst_line, &out->Raster, sizeof(MFDB) ) ;
|
||||
dst_line.fd_h = 1 ;
|
||||
|
||||
lo_line_in /= ( 16 / in->Raster.fd_nplanes ) ;
|
||||
lo_line_out /= ( 16 / in->Raster.fd_nplanes ) ;
|
||||
pt16_in = (short *) in->Raster.fd_addr ;
|
||||
pt16_out = (short *) out->Raster.fd_addr ;
|
||||
pt16_out += (long)(y1) * lo_line_out ;
|
||||
}
|
||||
else if ( in->Raster.fd_nplanes == 16 )
|
||||
{
|
||||
pt16_in = (short *) in->Raster.fd_addr ;
|
||||
pt16_out = (short *) out->Raster.fd_addr ;
|
||||
pt16_out += (long)(y1) * lo_line_out ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pt32_in = (long *) in->Raster.fd_addr ;
|
||||
pt32_out = (long *) out->Raster.fd_addr ;
|
||||
pt32_out += (long)(y1) * lo_line_out ;
|
||||
}
|
||||
|
||||
wscale = ( wpixel * depth ) / 100L ;
|
||||
wlen = ALIGN16( 1+params->x2 ) ;
|
||||
for ( line = y1 ; !cancel && (line <= y2); line++, src_line32 += yoffset )
|
||||
{
|
||||
wout = wpixel - ( wscale * (line-y1) / (y2-y1) ) ;
|
||||
xpixel = params->x1 + ( ( wpixel - wout ) >> 1 ) ;
|
||||
switch( in->Raster.fd_nplanes )
|
||||
{
|
||||
case 1 :
|
||||
case 2 :
|
||||
case 4 :
|
||||
case 8 :
|
||||
Vapi->RaRaster2Ind( pt16_in + (src_line32 >> 16) * lo_line_in, wlen, in->Raster.fd_nplanes, pt8_in ) ;
|
||||
memset( pt8_out, 0, xpixel ) ;
|
||||
Vapi->MeSCopyMemory8( pt8_out + xpixel, pt8_in + params->x1, wout, wpixel ) ;
|
||||
dst_line.fd_addr = pt16_out ;
|
||||
Vapi->RaInd2RasterInit( &dst_line, xpixel+wout-1 ) ;
|
||||
Vapi->RaInd2Raster( pt8_out, xpixel+wout-1 ) ;
|
||||
pt16_out += lo_line_out ;
|
||||
break ;
|
||||
|
||||
case 16 : Vapi->MeSCopyMemory16( pt16_out + xpixel,
|
||||
pt16_in + (long)params->x1 + (src_line32 >> 16) * lo_line_in,
|
||||
wout, wpixel ) ;
|
||||
pt16_out += lo_line_out ;
|
||||
break ;
|
||||
|
||||
case 32 : Vapi->MeSCopyMemory32( pt32_out + xpixel,
|
||||
pt32_in + (long)params->x1 + (src_line32 >> 16) * lo_line_in,
|
||||
wout, wpixel ) ;
|
||||
pt32_out += lo_line_out ;
|
||||
default: break ;
|
||||
}
|
||||
if ( Vapi && ( line & 0x0F) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * (long)(line - y1) ) / (long)(y2 - y1) ) ;
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pt8_in ) free( pt8_in ) ;
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/YPERSC/YPERSC.LDV
Normal file
BIN
tools/vision/LDV/SRC/YPERSC/YPERSC.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/YPERSC/YPERSC.PRJ
Normal file
12
tools/vision/LDV/SRC/YPERSC/YPERSC.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
YPERSC.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
YPERSC.C
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
187
tools/vision/LDV/SRC/YWAVE/YWAVE.C
Normal file
187
tools/vision/LDV/SRC/YWAVE/YWAVE.C
Normal file
@@ -0,0 +1,187 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, CAPS }, /* Capacites pour 16 plans */
|
||||
{ 24, 24, CAPS }, /* Capacites pour 24 plans */
|
||||
{ 32, 32, CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
float angle, phi ;
|
||||
float amplitude ;
|
||||
int xy[8] ;
|
||||
short row ;
|
||||
short yoffset ;
|
||||
short pc, cancel = 0 ;
|
||||
|
||||
if ( VDIHandle == -1 ) VDIHandle = vdihandle() ;
|
||||
|
||||
if (
|
||||
( params->x1 != 0 ) || ( params->x2 != in->Raster.fd_w -1 ) ||
|
||||
( params->y1 != 0 ) || ( params->y2 != in->Raster.fd_h -1 )
|
||||
)
|
||||
{
|
||||
/* Bloc a l'interieur de l'image */
|
||||
xy[0] = xy[4] = 0 ;
|
||||
xy[1] = xy[5] = 0 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
else
|
||||
if ( Vapi && Vapi->RaImgWhite ) Vapi->RaImgWhite( &out->Raster ) ;
|
||||
|
||||
amplitude = (float)params->Param[0].s / 10.0 ;
|
||||
phi = M_PI * (float)params->Param[1].s / 10.0 / (float)(params->x2 - params->x1) ;
|
||||
for ( row = params->x1 ; !cancel && (row <= params->x2); row++ )
|
||||
{
|
||||
angle = (float) (row - params->x1) * phi ;
|
||||
yoffset = (short) (amplitude * ( 1+ sin( angle ) ) ) ;
|
||||
if ( params->y2 - yoffset < params->y1 ) yoffset = params->y2 - params->y1 ;
|
||||
if ( params->y2 - yoffset > in->Raster.fd_h - 1 ) yoffset = params->y2 - in->Raster.fd_h + 1 ;
|
||||
if ( params->y1 + yoffset > out->Raster.fd_h - 1 ) yoffset = out->Raster.fd_h - params->y1 - 1 ;
|
||||
if ( params->y2 < params->y1 + yoffset ) yoffset = params->y2 - params->y1 ;
|
||||
xy[0] = row ;
|
||||
xy[1] = params->y1 ;
|
||||
xy[2] = row ;
|
||||
xy[3] = params->y2 - yoffset ;
|
||||
xy[4] = row ;
|
||||
xy[5] = params->y1 + yoffset ;
|
||||
xy[6] = row ;
|
||||
xy[7] = params->y2 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
if ( Vapi && ( row & 0x0F) == 0x0F )
|
||||
{
|
||||
/* Appelle la routine de progression une fois sur 16 */
|
||||
/* NB : en mode preview, VISION ignorera cet appel, */
|
||||
/* inutile donc de s'en soucier */
|
||||
pc = (short) ( ( 100L * (long)(row - params->x1) ) / (long)(params->x2 - params->x1) ) ;
|
||||
if ( Vapi->PrSetProgEx )
|
||||
{
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
else
|
||||
Vapi->PrSetProg( pc ) ;
|
||||
}
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/YWAVE/YWAVE.LDV
Normal file
BIN
tools/vision/LDV/SRC/YWAVE/YWAVE.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/YWAVE/YWAVE.PRJ
Normal file
12
tools/vision/LDV/SRC/YWAVE/YWAVE.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
ywave.ldv
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
ywave.c
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
852
tools/vision/LDV/SRC/bhole/bhole.c
Normal file
852
tools/vision/LDV/SRC/bhole/bhole.c
Normal file
@@ -0,0 +1,852 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <stdio.h> /* Forget this and sprintf will badly format numbers */
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "LDV Capabilities", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Run Initiliaze", (void *)PreRun,
|
||||
"Run", "LDV Feature", (void *)Run,
|
||||
"Preview", "Preview", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* LDV version */
|
||||
4, /* Number of functions in the lib */
|
||||
Proc, /* Pointers to LDV functions */
|
||||
Info, /* Library Information */
|
||||
0x0, /* Lib flags, mandatory */
|
||||
OnClose, /* Closing, free VDIHandle */
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_ATARIFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Size of this structure */
|
||||
TLDV_MODIFYIMG, /* LDV Type */
|
||||
"Jean Lusetti", /* Authors */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* 1 bit-plane capabilities */
|
||||
{ 2, 2, BP_CAPS }, /* 2 bit-plane capabilities */
|
||||
{ 4, 4, BP_CAPS }, /* 4 bit-plane capabilities */
|
||||
{ 8, 8, BP_CAPS }, /* 8 bit-plane capabilities */
|
||||
{ 16, 16, TC_CAPS }, /* 16 bit-plane capabilities */
|
||||
{ 32, 32, TC_CAPS }, /* 32 bit-plane capabilities */
|
||||
{ 0, 0, 0UL } /* End of capabilities list */
|
||||
},
|
||||
} ;
|
||||
VAPI *Vapi = NULL ;
|
||||
|
||||
#define ITRIGO_ARRAY_NBITS 14
|
||||
#define ITRIGO_ARRAY_SIZE (1 << ITRIGO_ARRAY_NBITS)
|
||||
#define ITRIGO_ANGLE_MAX (ITRIGO_ARRAY_SIZE-1)
|
||||
|
||||
#define QUARTER (ITRIGO_ARRAY_SIZE/4)
|
||||
#define ANGLE_ADD (M_PI/2.0/(double)QUARTER) ;
|
||||
|
||||
long* pre_cosin = NULL ; /* Array of pre-computed cosinus/sinus values */
|
||||
long* pre_loffset = NULL ; /* To hold pre-computation of line offsets */
|
||||
int lo_w=0, lo_h=0, lo_nplanes=0 ; /* Current parameters for line offset */
|
||||
unsigned long VapiLogLevel = LL_DISABLED ;
|
||||
unsigned long ProcMask = 0L ;
|
||||
short UseSym = -1 ; /* By default use symmetry to save CPU calculations */
|
||||
/* On Aranym, this is usually slower, so there is a */
|
||||
/* Setting in bhole.ini to force no symetry usage */
|
||||
|
||||
/* Macro to access pre-computed cosinus/sinus array */
|
||||
/* Sinus is right after cosinus value */
|
||||
#define COS(i) (pre_cosin[(i)<<1])
|
||||
#define SIN(i) (pre_cosin[1 + ( (i)<<1 )])
|
||||
|
||||
/* Back Hole computation parameters are not passed to speed up calculations, */
|
||||
/* They are global to the module */
|
||||
/* Black Hole symmetry rotation */
|
||||
typedef struct _RECT
|
||||
{
|
||||
short x ;
|
||||
short y ;
|
||||
short w ;
|
||||
short h ;
|
||||
}
|
||||
RECT, *PRECT ;
|
||||
|
||||
typedef struct _BH_SPROPERTIES
|
||||
{
|
||||
short estdpc ; /* Estimated duration in % (100 being the one without using symmetry) */
|
||||
short nrect ;
|
||||
short nsym ;
|
||||
RECT rect[9] ;
|
||||
}
|
||||
BH_SPROPERTIES, *PBH_SPROPERTIES ;
|
||||
|
||||
extern long bh_xd, bh_yd, bh_rd2, bh_xs, bh_ys, bh_ref ;
|
||||
extern long bh_xc, bh_yc ;
|
||||
extern short bh_out_w, bh_out_h, bh_in_w, bh_in_h ;
|
||||
extern short bh_out_x, bh_out_y ;
|
||||
short bh_pc, bh_nrect ;
|
||||
|
||||
/* This is the routine address that will operate on a line basis */
|
||||
static void (*BHLRoutine)(short use_sym, void* in, void* out) ;
|
||||
|
||||
/* Specific 68030 and FPU routines */
|
||||
/* In BHOLE.S */
|
||||
extern void BHL32_68030(short use_sym, void* in, void* out) ;
|
||||
extern void BHL16_68030(short use_sym, void* in, void* out) ;
|
||||
extern void BHLInd_68030(short use_sym, void* in, void* out) ;
|
||||
extern void BHL32_F68030(short use_sym, void* in, void* out) ;
|
||||
extern void BHL16_F68030(short use_sym, void* in, void* out) ;
|
||||
extern void BHLInd_F68030(short use_sym, void* in, void* out) ;
|
||||
extern void lcosin_fpu(long i, long* pcs) ;
|
||||
|
||||
|
||||
/* GET/SET pixel macros for True Color 16 and 32bit */
|
||||
#define SET_TCPIXEL(p,x,y,val) (p[pre_loffset[y]+x]=val)
|
||||
#define GET_TCPIXEL(p,x,y) (p[pre_loffset[y]+x])
|
||||
|
||||
/* Rotation by 90° macro */
|
||||
#define R90(x,y) { long _x=x; x=-y; y=_x; }
|
||||
|
||||
/* Macro to initialize calculations for a line */
|
||||
#define BH_INIT_LINE\
|
||||
bh_xd = bh_out_x-bh_xc ;\
|
||||
bh_rd2 = (bh_xd*bh_xd + bh_yd*bh_yd) ;\
|
||||
|
||||
/* This is the routine that computes the resulting pixel (bh_xs,bh_ys) in source image */
|
||||
/* From the pixel (bh_xd, bh_yd) in destination image */
|
||||
/* (bh_xc,bh_yc) is the center pixel of the back hole */
|
||||
/* This routine also returns if the resulting pixel is in the source image */
|
||||
int rBH_68000(void)
|
||||
{
|
||||
int not_in_range = 1 ;
|
||||
long alpha ;
|
||||
|
||||
bh_rd2 += ( bh_xd << 1 ) + 1 ;
|
||||
alpha = bh_ref / (1+bh_rd2) ;
|
||||
alpha &= ITRIGO_ANGLE_MAX ;
|
||||
bh_xs = bh_xd * COS(alpha) - bh_yd * SIN(alpha) ;
|
||||
bh_xs >>= 16 ;
|
||||
if ( (bh_xs >= -bh_xc) && (bh_xs < -bh_xc+bh_in_w) )
|
||||
{
|
||||
bh_ys = bh_xd * SIN(alpha) + bh_yd * COS(alpha) ;
|
||||
bh_ys >>= 16 ;
|
||||
if ( (bh_ys >= -bh_yc) && (bh_ys < -bh_yc+bh_in_h) )
|
||||
not_in_range = 0 ;
|
||||
}
|
||||
|
||||
return not_in_range ;
|
||||
}
|
||||
|
||||
/* For 68000/bit-planes organization: */
|
||||
/* This routine returns the value of the pixel index in the source image */
|
||||
/* Assuming (bh_xs,bh_ys) is within the source image */
|
||||
#pragma warn -par
|
||||
void BHLInd_68000(short use_sym, void* in, void* out)
|
||||
{
|
||||
unsigned char* in_ptr = (unsigned char*) in ;
|
||||
unsigned char* out_ptr = (unsigned char*) out ;
|
||||
short x ;
|
||||
|
||||
for ( x = bh_out_x; x < bh_out_w; x++, bh_xd++ )
|
||||
{
|
||||
if ( rBH_68000() == 0 )
|
||||
out_ptr[x] = in_ptr[pre_loffset[bh_ys+bh_yc] + bh_xs+bh_xc] ;
|
||||
else
|
||||
out_ptr[x] = 0 ;
|
||||
}
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
/* For 68000/16bit TrueColor organization: */
|
||||
/* This routine returns the value of the pixel index in the source image */
|
||||
/* Assuming (bh_xs,bh_ys) is within the source image */
|
||||
void BHL16_68000(short use_sym, void* in, void* out)
|
||||
{
|
||||
unsigned int* in_ptr = (unsigned int*) in ;
|
||||
unsigned int* out_ptr = (unsigned int*) out ;
|
||||
short x ;
|
||||
|
||||
if (use_sym)
|
||||
{
|
||||
unsigned long save_bh_xd, save_bh_yd ;
|
||||
short n ;
|
||||
|
||||
for ( x = bh_out_x; x <= bh_out_x+bh_out_w/2; x++, bh_xd++ )
|
||||
{
|
||||
/* Save bh_xd and bh_yd as they will change */
|
||||
save_bh_xd = bh_xd ;
|
||||
save_bh_yd = bh_yd ;
|
||||
|
||||
if ( rBH_68000() == 0 ) /* Compute 1st pixel with Black Hole formula */
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)) ;
|
||||
else
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, 0xFFFF) ;
|
||||
|
||||
/* Deduce 2nd, 3rd and 4th pixel */
|
||||
for (n=0; n < 3; n++)
|
||||
{
|
||||
R90(bh_xd, bh_yd) ;
|
||||
R90(bh_xs, bh_ys) ;
|
||||
if ( (bh_xd>=-bh_xc) && (bh_xd < -bh_xc+bh_in_w) && (bh_yd >= -bh_yc) && (bh_yd < -bh_yc+bh_in_h))
|
||||
{
|
||||
if ( (bh_xs>=-bh_xc) && (bh_xs < -bh_xc+bh_in_w) && (bh_ys >= -bh_yc) && (bh_ys < -bh_yc+bh_in_h))
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)) ;
|
||||
else
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, 0xFFFF) ;
|
||||
}
|
||||
}
|
||||
/* Restore bh_xd and bh_yd */
|
||||
bh_xd = save_bh_xd ;
|
||||
bh_yd = save_bh_yd ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( x = bh_out_x; x < bh_out_x+bh_out_w; x++, bh_xd++ )
|
||||
{
|
||||
if ( rBH_68000() == 0 )
|
||||
out_ptr[x] = in_ptr[pre_loffset[bh_ys+bh_yc] + bh_xs+bh_xc] ;
|
||||
else
|
||||
out_ptr[x] = 0xFFFF ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* For 68000/32bit TrueColor organization: */
|
||||
/* This routine returns the value of the pixel index in the source image */
|
||||
/* Assuming (bh_xs,bh_ys) is within the source image */
|
||||
void BHL32_68000(short use_sym, void* in, void* out)
|
||||
{
|
||||
unsigned long* in_ptr = (unsigned long*) in ;
|
||||
unsigned long* out_ptr = (unsigned long*) out ;
|
||||
short x ;
|
||||
|
||||
if (use_sym)
|
||||
{
|
||||
unsigned long save_bh_xd, save_bh_yd ;
|
||||
short n ;
|
||||
|
||||
for ( x = bh_out_x; x <= bh_out_x+bh_out_w/2; x++, bh_xd++ )
|
||||
{
|
||||
/* Save bh_xd and bh_yd as they will change */
|
||||
save_bh_xd = bh_xd ;
|
||||
save_bh_yd = bh_yd ;
|
||||
|
||||
if ( rBH_68000() == 0 ) /* Compute 1st pixel with Black Hole formula */
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)) ;
|
||||
else
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, 0xFFFFFFFFL) ;
|
||||
|
||||
/* Deduce 2nd, 3rd and 4th pixel */
|
||||
for (n=0; n < 3; n++)
|
||||
{
|
||||
R90(bh_xd, bh_yd) ;
|
||||
R90(bh_xs, bh_ys) ;
|
||||
if ( (bh_xd>=-bh_xc) && (bh_xd < -bh_xc+bh_in_w) && (bh_yd >= -bh_yc) && (bh_yd < -bh_yc+bh_in_h))
|
||||
{
|
||||
if ( (bh_xs>=-bh_xc) && (bh_xs < -bh_xc+bh_in_w) && (bh_ys >= -bh_yc) && (bh_ys < -bh_yc+bh_in_h))
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)) ;
|
||||
else
|
||||
SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, 0xFFFFFFFFL) ;
|
||||
}
|
||||
}
|
||||
/* Restore bh_xd and bh_yd */
|
||||
bh_xd = save_bh_xd ;
|
||||
bh_yd = save_bh_yd ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( x = bh_out_x; x < bh_out_x+bh_out_w; x++, bh_xd++ )
|
||||
{
|
||||
if ( rBH_68000() == 0 )
|
||||
out_ptr[x] = in_ptr[pre_loffset[bh_ys+bh_yc] + bh_xs+bh_xc] ;
|
||||
else
|
||||
out_ptr[x] = 0xFFFFFFFFL ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void lcosin(long i, long* pcs)
|
||||
{
|
||||
double angle = i*ANGLE_ADD ;
|
||||
|
||||
pcs[0] = (long) (65536.0 * cos(angle)) ;
|
||||
pcs[1] = (long) (65536.0 * sin(angle)) ;
|
||||
}
|
||||
|
||||
int InitTrigo(int fpu)
|
||||
{
|
||||
void (*rlcosin)(long i, long* pcs) ;
|
||||
long cs[2] ;
|
||||
long q, i;
|
||||
clock_t t0 ;
|
||||
|
||||
/* if ( pre_cosin[0] == 65536L ) return 0 ; Used to detect init done before dynamic allocation design */
|
||||
if ( pre_cosin ) return 0 ;
|
||||
pre_cosin = (long*) calloc( ITRIGO_ARRAY_SIZE, 2*sizeof(long) ) ;
|
||||
if ( pre_cosin == NULL ) return -1 ;
|
||||
|
||||
t0 = clock() ;
|
||||
if (fpu) rlcosin = lcosin_fpu ;
|
||||
else rlcosin = lcosin ;
|
||||
for ( i = 0; i < QUARTER; i++ )
|
||||
{
|
||||
rlcosin( i, cs ) ;
|
||||
COS(i) = cs[0] ;
|
||||
SIN(i) = cs[1] ;
|
||||
|
||||
q = QUARTER ;
|
||||
/* Set [PI/2;PI] */
|
||||
COS(q+i) = -SIN(i) ;
|
||||
SIN(q+i) = COS(i) ;
|
||||
|
||||
q += QUARTER ;
|
||||
/* Set [PI;3*PI/2] */
|
||||
COS(q+i) = -COS(i) ;
|
||||
SIN(q+i) = -SIN(i) ;
|
||||
|
||||
q += QUARTER ;
|
||||
/* Set [3*PI/2; 2*PI] */
|
||||
COS(q+i) = COS(i) ;
|
||||
SIN(q+i) = -SIN(i) ;
|
||||
}
|
||||
if (Vapi && Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_INFO, "IniTrigo%s done in %ldms", fpu ? "(FPU)":"", 1000L * (clock()-t0)/CLK_TCK) ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
/* Called when LDV is loaded, take this opportunity to get some */
|
||||
/* Info about system: VAPI version and CPU/FPU availability */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
VapiLogLevel = LL_DISABLED ;
|
||||
if ( Vapi && (Vapi->Header.Version >= 0x0104) && Vapi->LoDoLog && Vapi->LoGetLogLevel )
|
||||
{
|
||||
VapiLogLevel = Vapi->LoGetLogLevel() ;
|
||||
if (Vapi->CoGetProcessors)
|
||||
ProcMask = Vapi->CoGetProcessors() ;
|
||||
|
||||
if (ProcMask & CO_HAS_030)
|
||||
Vapi->LoDoLog(LL_INFO, "%s", "68030 processor available") ;
|
||||
|
||||
if (ProcMask & CO_HAS_FPU)
|
||||
Vapi->LoDoLog(LL_INFO, "%s", "Floating Point unit available") ;
|
||||
}
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
/* Free allocated RunTime stuff */
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( pre_cosin ) free( pre_cosin ) ;
|
||||
pre_cosin = NULL ;
|
||||
if ( pre_loffset ) free( pre_loffset ) ;
|
||||
pre_loffset = NULL ;
|
||||
}
|
||||
|
||||
/* Pre-compute line offsets from source to speed-up computations */
|
||||
int compute_loffset(MFDB* in, long** ppre_lo, int* plo_w, int* plo_h, int* plo_nplanes)
|
||||
{
|
||||
/* Sanity checks */
|
||||
if ( (ppre_lo == NULL) || (plo_w == NULL) || (plo_h == NULL) || (plo_nplanes == NULL) )
|
||||
return -2 ;
|
||||
|
||||
if ( *ppre_lo && (*plo_w == in->fd_w) && (*plo_h == in->fd_h) && (*plo_nplanes == in->fd_nplanes) )
|
||||
{
|
||||
/* Current line offsets are still valid */
|
||||
return 0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Need to compute line offsets */
|
||||
*plo_w = *plo_h = *plo_nplanes = 0 ;
|
||||
if (*ppre_lo) free(*ppre_lo) ;
|
||||
*ppre_lo = (long*) malloc(sizeof(long) * (long)in->fd_h) ;
|
||||
if (*ppre_lo)
|
||||
{
|
||||
long* pt_off ;
|
||||
long add = (long) ALIGN16( in->fd_w ) ;
|
||||
long offset = 0L ;
|
||||
int y ;
|
||||
|
||||
pt_off = *ppre_lo ;
|
||||
for ( y = 0; y < in->fd_h; y++ )
|
||||
{
|
||||
*pt_off++ = offset ;
|
||||
offset += add ;
|
||||
}
|
||||
*plo_w = in->fd_w ;
|
||||
*plo_h = in->fd_h ;
|
||||
*plo_nplanes = in->fd_nplanes ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
/* Just say that output image has same width/length than source */
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
/* Update progression window 1 time on 16 */
|
||||
char check_prog(short y, short ymax)
|
||||
{
|
||||
char cancel = 0 ;
|
||||
|
||||
if ( ( y & 0x0F ) == 0 )
|
||||
{
|
||||
int pc = (short) ( ( 100L * (long)y ) / (long)ymax ) ;
|
||||
|
||||
cancel = Vapi->PrSetProgEx( bh_pc+pc/bh_nrect ) ;
|
||||
}
|
||||
|
||||
return cancel ;
|
||||
}
|
||||
|
||||
/* Initialize global variables for calculation */
|
||||
void init_computation(short xc, short yc, long angle, MFDB* in, RECT* rect)
|
||||
{
|
||||
long maxrd2 ;
|
||||
|
||||
bh_xd = -xc ;
|
||||
bh_yd = -yc ;
|
||||
maxrd2 = bh_xd*bh_xd + bh_yd*bh_yd ;
|
||||
if ( (ProcMask & (CO_HAS_030|CO_HAS_FPU)) == (CO_HAS_030|CO_HAS_FPU) )
|
||||
maxrd2 = (long) sqrt(maxrd2) ;
|
||||
bh_ref = (angle * maxrd2) ;
|
||||
bh_xc = xc ;
|
||||
bh_yc = yc ;
|
||||
bh_in_w = in->fd_w ;
|
||||
bh_in_h = in->fd_h ;
|
||||
bh_out_x = rect->x ;
|
||||
bh_out_y = rect->y ;
|
||||
bh_out_w = rect->w ;
|
||||
bh_out_h = rect->h ;
|
||||
|
||||
bh_yd = bh_out_y-bh_yc ;
|
||||
}
|
||||
|
||||
/* 68000 routine for bit-plane images */
|
||||
LDV_STATUS bpRun(MFDB *in, long angle, short xc, short yc, MFDB *out, RECT* rect, short use_sym)
|
||||
{
|
||||
MFDB dst_line ;
|
||||
LDV_STATUS status = ELDV_NOERROR ;
|
||||
size_t size_indexes, size_dst_line ;
|
||||
short y ;
|
||||
long wout, sizelout ;
|
||||
unsigned char *index_in, *index_out, *out_ptr ;
|
||||
char cancel = 0 ;
|
||||
|
||||
/* We will convert the whole image in indexes */
|
||||
/* Allocate memory to convert then to bitplanes */
|
||||
/* A line to destination tion */
|
||||
size_indexes = (long) ALIGN16( in->fd_w ) ;
|
||||
size_indexes *= (long) in->fd_h ;
|
||||
size_dst_line = (long) ALIGN16( out->fd_w ) ;
|
||||
index_in = (unsigned char *) malloc( size_indexes ) ;
|
||||
if ( index_in == NULL ) return ELDV_NOTENOUGHMEMORY ;
|
||||
index_out = (unsigned char *) malloc(size_dst_line) ;
|
||||
if ( index_out == NULL )
|
||||
{
|
||||
free(index_in) ;
|
||||
return ELDV_NOTENOUGHMEMORY ;
|
||||
}
|
||||
|
||||
/* Convert all source to indexes */
|
||||
Vapi->RaRaster2Ind( in->fd_addr, size_indexes, (long)in->fd_nplanes, index_in ) ;
|
||||
|
||||
memcpy( &dst_line, out, sizeof(MFDB) ) ;
|
||||
dst_line.fd_wdwidth = out->fd_w / 16 ;
|
||||
if ( out->fd_w % 16 ) dst_line.fd_wdwidth++ ;
|
||||
dst_line.fd_h = 1 ;
|
||||
wout = (long) ALIGN16( out->fd_w ) ;
|
||||
out_ptr = out->fd_addr ;
|
||||
sizelout = Vapi->RaGetImgSize( (long) dst_line.fd_w, (long) dst_line.fd_h, (long) out->fd_nplanes ) ;
|
||||
init_computation(xc, yc, angle, in, rect) ;
|
||||
for ( y = 0; !cancel && (y < out->fd_h); y++, bh_yd++, out_ptr += sizelout )
|
||||
{
|
||||
BH_INIT_LINE ;
|
||||
BHLRoutine(use_sym, index_in, index_out) ;
|
||||
dst_line.fd_addr = out_ptr ;
|
||||
Vapi->RaInd2RasterInit( &dst_line, wout ) ;
|
||||
Vapi->RaInd2Raster( index_out, wout ) ;
|
||||
cancel = check_prog(y, out->fd_h) ;
|
||||
}
|
||||
|
||||
free(index_in) ;
|
||||
free(index_out) ;
|
||||
if ( cancel ) status = ELDV_CANCELLED ;
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
/* 68000 routine for 16bit True Color images */
|
||||
LDV_STATUS Run16(MFDB *in, long angle, short xc, short yc, MFDB *out, RECT* rect, short use_sym)
|
||||
{
|
||||
LDV_STATUS status = ELDV_NOERROR ;
|
||||
unsigned int *in_ptr, *out_ptr ;
|
||||
unsigned long sizelout = 0 ;
|
||||
short y, hy ;
|
||||
char cancel = 0 ;
|
||||
|
||||
in_ptr = (unsigned int*) in->fd_addr ;
|
||||
out_ptr = (unsigned int*) out->fd_addr ;
|
||||
init_computation(xc, yc, angle, in, rect) ;
|
||||
hy = bh_out_y+bh_out_h/2 ;
|
||||
if (!use_sym)
|
||||
{
|
||||
sizelout = (long) ALIGN16( out->fd_w ) ;
|
||||
out_ptr += sizelout*(long)rect->y ;
|
||||
hy = bh_out_y+bh_out_h ;
|
||||
}
|
||||
for ( y = bh_out_y; !cancel && (y < hy); y++, bh_yd++, out_ptr += sizelout )
|
||||
{
|
||||
BH_INIT_LINE ;
|
||||
BHLRoutine(use_sym, in_ptr, out_ptr) ;
|
||||
cancel = check_prog(y, hy-bh_out_y) ;
|
||||
}
|
||||
|
||||
if ( cancel ) status = ELDV_CANCELLED ;
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
/* 68000 routine for 32bit True Color images */
|
||||
LDV_STATUS Run32(MFDB *in, long angle, short xc, short yc, MFDB *out, RECT* rect, short use_sym)
|
||||
{
|
||||
LDV_STATUS status = ELDV_NOERROR ;
|
||||
unsigned long *in_ptr, *out_ptr ;
|
||||
unsigned long sizelout = 0 ;
|
||||
short y, hy ;
|
||||
char cancel = 0 ;
|
||||
|
||||
in_ptr = (unsigned long*) in->fd_addr ;
|
||||
out_ptr = (unsigned long*) out->fd_addr ;
|
||||
init_computation(xc, yc, angle, in, rect) ;
|
||||
hy = bh_out_y+bh_out_h/2 ;
|
||||
if (!use_sym)
|
||||
{
|
||||
sizelout = (long) ALIGN16( out->fd_w ) ;
|
||||
out_ptr += sizelout*(long)rect->y ;
|
||||
hy = bh_out_y+bh_out_h ;
|
||||
}
|
||||
for ( y = bh_out_y; !cancel && (y < hy); y++, bh_yd++, out_ptr += sizelout )
|
||||
{
|
||||
BH_INIT_LINE ;
|
||||
BHLRoutine(use_sym, in_ptr, out_ptr) ;
|
||||
cancel = check_prog(y, hy-bh_out_y) ;
|
||||
}
|
||||
|
||||
if ( cancel ) status = ELDV_CANCELLED ;
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
int MayAddRect(RECT* subRect, BH_SPROPERTIES* sgProps)
|
||||
{
|
||||
int add = (subRect->w && subRect->h) ;
|
||||
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"MayAddRect (%d,%d,%d,%d)", subRect->x, subRect->y, subRect->w, subRect->h);
|
||||
if ( add ) /* Sub Rectangle not empty */
|
||||
memcpy( &sgProps->rect[sgProps->nrect++], subRect, sizeof(RECT) ) ;
|
||||
|
||||
return( add ) ;
|
||||
}
|
||||
|
||||
/* Estimation of the expected gain by using rotation symmetry */
|
||||
void SymmetrySplit(MFDB* img, short xc, short yc, BH_SPROPERTIES* sgProps)
|
||||
{
|
||||
long npts_insym, npts_total, npts_to_compute ;
|
||||
short sw = 0 ;
|
||||
|
||||
if ( UseSym && ( (img->fd_nplanes == 16) || (img->fd_nplanes == 32) ) )
|
||||
{
|
||||
/* Bitplane organization would have make things too complicated */
|
||||
/* By the way, who is using bitplanes nowadays ? */
|
||||
sw = xc ;
|
||||
if ( img->fd_w-xc < sw ) sw = img->fd_w-xc ;
|
||||
if ( yc < sw ) sw = yc ;
|
||||
if ( img->fd_h-yc < sw ) sw = img->fd_h-yc ;
|
||||
if ( img->fd_h-yc < sw ) sw = img->fd_h-yc ;
|
||||
|
||||
/* Let's build the rectangle arrays to define the image */
|
||||
/* First rectangle (square actually) is the one to use for symmetry */
|
||||
/* On this one only 25% of pixels will be computed with Black Hole formula */
|
||||
sgProps->nrect = 1 ;
|
||||
sgProps->nsym = 0 ;
|
||||
|
||||
sgProps->rect[0].x = xc-sw ;
|
||||
sgProps->rect[0].y = yc-sw ;
|
||||
sgProps->rect[0].w = 2*sw ;
|
||||
sgProps->rect[0].h = 2*sw ;
|
||||
}
|
||||
|
||||
npts_total = (long)img->fd_w*(long)img->fd_h ;
|
||||
npts_insym = 4L*(long)sw*(long)sw ;
|
||||
npts_to_compute = npts_total-((3L*npts_insym)/4L) ;
|
||||
sgProps->estdpc = (100L*npts_to_compute)/npts_total ;
|
||||
if ( sgProps->estdpc > 70 )
|
||||
{
|
||||
/* Not worth make things complicated for that gain */
|
||||
sgProps->nrect = 1 ;
|
||||
sgProps->nsym = -1 ;
|
||||
sgProps->rect[0].x = 0 ;
|
||||
sgProps->rect[0].y = 0 ;
|
||||
sgProps->rect[0].w = img->fd_w ;
|
||||
sgProps->rect[0].h = img->fd_h ;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Let's build the remaining rectangles */
|
||||
RECT* sRect = &sgProps->rect[0] ; /* Symmetry Rectangle */
|
||||
RECT subRect ;
|
||||
/*
|
||||
|----------------------------------------|
|
||||
| R1 | R2 | R3 |
|
||||
|----------------------------------------|
|
||||
| ****** |
|
||||
| R4 ****** R5 |
|
||||
| ****** |
|
||||
| ****** |
|
||||
|----------------------------------------|
|
||||
| R6 | R7 | R8 |
|
||||
|----------------------------------------|
|
||||
*/
|
||||
|
||||
/* R1 */
|
||||
subRect.x = 0 ; subRect.y = 0 ;
|
||||
subRect.w = sRect->x ; subRect.h = sRect->y ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R1(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R2 */
|
||||
subRect.x = sRect->x ; subRect.y = 0 ;
|
||||
subRect.w = sRect->w ; subRect.h = sRect->y ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R2(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R3 */
|
||||
subRect.x = sRect->x+sRect->w ; subRect.y = 0 ;
|
||||
subRect.w = img->fd_w-sRect->x-sRect->w ; subRect.h = sRect->y ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R3(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R4 */
|
||||
subRect.x = 0 ; subRect.y = sRect->y ;
|
||||
subRect.w = sRect->x ; subRect.h = sRect->h ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R4(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R5 */
|
||||
subRect.x = sRect->x+sRect->w ; subRect.y = sRect->y ;
|
||||
subRect.w = img->fd_w-sRect->x-sRect->w ; subRect.h = sRect->h ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R5(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R6 */
|
||||
subRect.x = 0 ; subRect.y = sRect->y+sRect->h ;
|
||||
subRect.w = sRect->x ; subRect.h = img->fd_h-sRect->y-sRect->h ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R6(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R7 */
|
||||
subRect.x = sRect->x ; subRect.y = sRect->y+sRect->h ;
|
||||
subRect.w = sRect->w ; subRect.h = img->fd_h-sRect->y-sRect->h ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R7(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
|
||||
/* R8 */
|
||||
subRect.x = sRect->x+sRect->w ; subRect.y = sRect->y+sRect->h ;
|
||||
subRect.w = img->fd_w-sRect->x-sRect->w ; subRect.h = img->fd_h-sRect->y-sRect->h ;
|
||||
if (MayAddRect( &subRect, sgProps ))
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG,"Adding R8(%d,%d,%d,%d)", subRect.x, subRect.y, subRect.w, subRect.h);
|
||||
}
|
||||
}
|
||||
|
||||
short GetSymetryUsageFromIni(void)
|
||||
{
|
||||
short use_sym = 1 ; /* Unless INI file say no, assume symetry usage */
|
||||
long found = 0 ;
|
||||
char *path_ldv, *language ;
|
||||
char val_key[64] ;
|
||||
|
||||
path_ldv = Vapi->CoGetLDVPath() ;
|
||||
language = Vapi->CoGetCurrentLanguage() ;
|
||||
if ( path_ldv && language && Vapi->InGetKeyFromFile )
|
||||
{
|
||||
char filename[256] ;
|
||||
|
||||
sprintf( filename, "%s\\%s\\BHOLE.INI", path_ldv, language ) ;
|
||||
if ( Vapi->LoDoLog ) Vapi->LoDoLog(LL_INFO,"Looking into %s to see symetry usage...", filename) ;
|
||||
found = Vapi->InGetKeyFromFile( filename, "Private", "UseSym", val_key ) ;
|
||||
if ( !found )
|
||||
{
|
||||
sprintf( filename, "%s\\BHOLE.INI", path_ldv ) ;
|
||||
if ( Vapi->LoDoLog ) Vapi->LoDoLog(LL_INFO,"Looking into non language specific %s to see symetry usage...", filename) ;
|
||||
found = Vapi->InGetKeyFromFile( filename, "Private", "UseSym", val_key ) ;
|
||||
}
|
||||
}
|
||||
else if ( Vapi->LoDoLog ) Vapi->LoDoLog(LL_WARNING,"Can't access LDV (%s) or language path (%s)!", path_ldv, language) ;
|
||||
|
||||
if ( found ) use_sym = atoi( val_key ) ;
|
||||
if ( Vapi->LoDoLog ) Vapi->LoDoLog(LL_INFO,"Symetry usage: %d (found=%ld)", use_sym, found) ;
|
||||
|
||||
return use_sym ;
|
||||
}
|
||||
|
||||
/* LDV Run routine */
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
BH_SPROPERTIES sgProps ;
|
||||
LDV_STATUS (*RunRoutine)(MFDB *in, long angle, short xc, short yc, MFDB *out, RECT* rect, short use_sym) ;
|
||||
LDV_STATUS status = ELDV_NOERROR ;
|
||||
long angle, np=0 ;
|
||||
short xc, yc, n ;
|
||||
|
||||
if ( Vapi->Header.Version < 0x102 ) return ELDV_BADVAPIVERSION ;
|
||||
|
||||
if ( InitTrigo((ProcMask & CO_HAS_FPU) == CO_HAS_FPU) != 0 ) return ELDV_NOTENOUGHMEMORY ;
|
||||
if ( compute_loffset(&in->Raster, &pre_loffset, &lo_w, &lo_h, &lo_nplanes) ) return ELDV_NOTENOUGHMEMORY ;
|
||||
if ( UseSym == -1 ) UseSym = GetSymetryUsageFromIni() ;
|
||||
|
||||
if ( in->Raster.fd_nplanes <= 8 ) { BHLRoutine = BHLInd_68000 ; RunRoutine = bpRun ; }
|
||||
else if ( in->Raster.fd_nplanes == 16 ) { BHLRoutine = BHL16_68000 ; RunRoutine = Run16 ; }
|
||||
else if ( in->Raster.fd_nplanes == 32 ) { BHLRoutine = BHL32_68000 ; RunRoutine = Run32 ; }
|
||||
else return ELDV_IMGFORMATMISMATCH ;
|
||||
|
||||
if (ProcMask & CO_HAS_030)
|
||||
{
|
||||
if (ProcMask & CO_HAS_FPU)
|
||||
{
|
||||
/* Note that FPU requires also a 68030 here */
|
||||
/* To avoid having another set of macros in bhole.s */
|
||||
/* And convert even 68000 routines to ASM */
|
||||
/* FPU won't speed-up computations; it will just */
|
||||
/* Make the angle proportional to the distance to */
|
||||
/* Black Hole Center instead of its square */
|
||||
Vapi->PrOptimize(0x05) ;
|
||||
if ( in->Raster.fd_nplanes <= 8 ) BHLRoutine = BHLInd_F68030 ;
|
||||
else if ( in->Raster.fd_nplanes == 16 ) BHLRoutine = BHL16_F68030 ;
|
||||
else if ( in->Raster.fd_nplanes == 32 ) BHLRoutine = BHL32_F68030 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* CPU 030 'only', note that it is about 2 times faster than 68000 */
|
||||
/* Routine mostly because of 32x32x-->32 MULS.L instruction */
|
||||
Vapi->PrOptimize(0x01) ;
|
||||
if ( in->Raster.fd_nplanes <= 8 ) BHLRoutine = BHLInd_68030 ;
|
||||
else if ( in->Raster.fd_nplanes == 16 ) BHLRoutine = BHL16_68030 ;
|
||||
else if ( in->Raster.fd_nplanes == 32 ) BHLRoutine = BHL32_68030 ;
|
||||
}
|
||||
}
|
||||
|
||||
angle = (long) params->Param[0].s ;
|
||||
xc = ((long)params->Param[1].s * (long)in->Raster.fd_w)/100L ;
|
||||
yc = ((long)params->Param[2].s * (long)in->Raster.fd_h)/100L ;
|
||||
|
||||
SymmetrySplit(&in->Raster, xc, yc, &sgProps) ;
|
||||
if (Vapi->LoDoLog)
|
||||
{
|
||||
Vapi->LoDoLog(LL_DEBUG, "100 being the time without using symmetry, using symmetry would be %d", sgProps.estdpc) ;
|
||||
Vapi->LoDoLog(LL_DEBUG, "Image source : (0,0,+%d,+%d); %ld pixels", in->Raster.fd_w, in->Raster.fd_h, (long)in->Raster.fd_w * (long)in->Raster.fd_h) ;
|
||||
Vapi->LoDoLog(LL_DEBUG, "Symmetry zone : (%d,%d,+%d,+%d), index:%d", sgProps.rect[0].x, sgProps.rect[0].y, sgProps.rect[0].w, sgProps.rect[0].h, sgProps.nsym) ;
|
||||
}
|
||||
|
||||
bh_nrect = sgProps.nrect ;
|
||||
for ( n=0; (status != ELDV_CANCELLED) && (n < sgProps.nrect); n++)
|
||||
{
|
||||
long npix ;
|
||||
|
||||
bh_pc = (100*n)/sgProps.nrect ; /* For progression indicator as we may have multiple loops */
|
||||
npix = (long)sgProps.rect[n].w * (long)sgProps.rect[n].h ;
|
||||
np += npix ;
|
||||
if ( VapiLogLevel >= LL_PERF)
|
||||
{
|
||||
size_t t0, tms ;
|
||||
|
||||
t0 = clock() ;
|
||||
status = RunRoutine( &in->Raster, angle, xc, yc, &out->Raster, &sgProps.rect[n], (sgProps.nsym == n) ) ;
|
||||
tms = (1000L * (clock() - t0) ) / CLK_TCK ;
|
||||
if (tms == 0 ) tms = 1 ;
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_PERF, "Run zone %d: (%d,%d,+%d,+%d), use_sym=%d, %ld pixels, done in %ldms, %ld Kpixels/s",
|
||||
n, sgProps.rect[n].x, sgProps.rect[n].y, sgProps.rect[n].w, sgProps.rect[n].h, (sgProps.nsym == n), (long)sgProps.rect[n].w * (long)sgProps.rect[n].h, tms, npix/tms) ;
|
||||
}
|
||||
else
|
||||
status = RunRoutine( &in->Raster, angle, xc, yc, &out->Raster, &sgProps.rect[n], (sgProps.nsym == n) ) ;
|
||||
}
|
||||
if (Vapi->LoDoLog)
|
||||
Vapi->LoDoLog(LL_DEBUG, "%ld pixels computed or deduced", np) ;
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/bhole/bhole.ldv
Normal file
BIN
tools/vision/LDV/SRC/bhole/bhole.ldv
Normal file
Binary file not shown.
1054
tools/vision/LDV/SRC/bhole/bhole.lst
Normal file
1054
tools/vision/LDV/SRC/bhole/bhole.lst
Normal file
File diff suppressed because it is too large
Load Diff
13
tools/vision/LDV/SRC/bhole/bhole.prj
Normal file
13
tools/vision/LDV/SRC/bhole/bhole.prj
Normal file
@@ -0,0 +1,13 @@
|
||||
BHOLE.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
BHOLE.C
|
||||
BHOLE.S
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
;..\..\mt_aes.lib
|
||||
635
tools/vision/LDV/SRC/bhole/bhole.s
Normal file
635
tools/vision/LDV/SRC/bhole/bhole.s
Normal file
@@ -0,0 +1,635 @@
|
||||
.IMPORT pre_cosin ; array of 2*ITRIGO_ARRAY_SIZE longs
|
||||
.IMPORT pre_loffset ; long*
|
||||
.EXPORT bh_xd, bh_yd, bh_rd2 ; long
|
||||
.EXPORT bh_xs, bh_ys, bh_ref ; long
|
||||
.EXPORT bh_xc, bh_yc ; long
|
||||
.EXPORT bh_out_w, bh_out_h ; short
|
||||
.EXPORT bh_in_w, bh_in_h ; short
|
||||
.EXPORT bh_out_x, bh_out_y ; short
|
||||
.EXPORT BHL32_68030,BHL16_68030,BHLInd_68030
|
||||
.EXPORT BHL32_F68030,BHL16_F68030,BHLInd_F68030
|
||||
.EXPORT lcosin_fpu
|
||||
|
||||
ITRIGO_ARRAY_SIZE EQU (1 << 14)
|
||||
ITRIGO_ANGLE_MAX EQU (ITRIGO_ARRAY_SIZE-1)
|
||||
QUARTER EQU (ITRIGO_ARRAY_SIZE/4)
|
||||
|
||||
; The black hole transformation consists of:
|
||||
; Rotate the destination pixel around the black hole center
|
||||
; The closest we are to the black hole, the bigger the rotation angle is
|
||||
; We have 2 or 3 parts of computation angle for black hole transformation:
|
||||
; 1: Just before dividing the maximum possible angle (depending on LDV paramter Rotation angle) by:
|
||||
; CPU: the square of distance to black hole center
|
||||
; FPU: the distance to black hole center; here we need 68881 instruction FSQRT
|
||||
; So there are 3 parts in macro calculations:
|
||||
; 1. Before dividing by distance or its square
|
||||
; 1a. (FPU only) Compute distance
|
||||
; 3. Divide by either distance or its square and state if the resulting pixel is in source image
|
||||
; Dividing by distance instead of its square gives better visual results
|
||||
MACRO BH_COMP_1
|
||||
MOVE.L A6,D0 ; Remember A6=bh_xd
|
||||
ADD.L D0,D0
|
||||
ADDQ.L #1,D0
|
||||
MOVE.L A5,D1 ; Remember A5=bh_rd2
|
||||
ADD.L D0,D1 ; bh_rd2(D1)=1+2*bh_xd(D0)
|
||||
MOVE.L bh_ref(PC),D2
|
||||
MOVE.L D1,A5 ; Save bh_rd2, free D1
|
||||
ADDQ.L #1,D1 ; We need bh_rd2+1 for divide
|
||||
ENDM
|
||||
|
||||
MACRO BH_COMP_2 bail_out_addr
|
||||
DIVU.L D1,D2 ; alpha(D2)=bh_ref/(1+bh_rd2)
|
||||
ANDI.L #ITRIGO_ANGLE_MAX,D2 ; alpha &= ITRIGO_ANGLE_MAX
|
||||
|
||||
LSL.L #3,D2 ; D2=offset for pre_cosin array
|
||||
MOVE.L A6,D0 ; D0=bh_xd
|
||||
MOVE.L bh_yd(PC),D1 ; D1=bh_yd
|
||||
MOVE.L 4(A2,D2.L),D3 ; A2->pre_cosin, D3.L=SIN(alpha)
|
||||
MOVE.L (A2,D2.L),D2 ; A2->pre_cosin, D2.L=COS(alpha)
|
||||
|
||||
MOVEQ.L #16,D6 ; Prepare shifts/assume not in range
|
||||
|
||||
MOVE.L D0,D4
|
||||
MULS.L D2,D4 ; D4=bh_xd * pre_cos[alpha]
|
||||
MOVE.L D1,D5
|
||||
MULS.L D3,D5 ; D5=bh_yd * pre_sin[alpha]
|
||||
SUB.L D5,D4 ; D4=bh_xd * pre_cos[alpha] - bh_yd * pre_sin[alpha]
|
||||
ASR.L D6,D4
|
||||
ADD.L bh_xc(PC),D4 ; D6=16, assume pixel not in range
|
||||
BLT.S bail_out_addr ; xs < 0: not in range
|
||||
CMP.W bh_in_w(PC),D4
|
||||
BGE.S bail_out_addr ; xs >= bh_in_w: not in range
|
||||
MOVE.L D4,A3 ; A3=bh_xs= (D4 >> 16)
|
||||
|
||||
MOVE.L D0,D4
|
||||
MULS.L D3,D4 ; D4=bh_xd * pre_sin[alpha]
|
||||
MOVE.L D1,D5
|
||||
MULS.L D2,D5 ; D5=bh_yd * pre_cos[alpha]
|
||||
ADD.L D5,D4 ; D4=bh_xd * pre_sin[alpha] + bh_yd * pre_cos[alpha]
|
||||
ASR.L D6,D4
|
||||
ADD.L bh_yc(PC),D4 ; D4.L=bh_ys
|
||||
BLT.S bail_out_addr ; ys < 0: not in range
|
||||
CMP.W bh_in_h(PC),D4
|
||||
BGE.S bail_out_addr ; ys >= bh_in_h: not in range
|
||||
MOVEQ.L #0,D6 ; pixel in range
|
||||
ENDM
|
||||
|
||||
; Macro for CPU 68030
|
||||
MACRO BH_COMPUTE_CPU bail_out_addr
|
||||
BH_COMP_1
|
||||
BH_COMP_2 bail_out_addr
|
||||
ENDM
|
||||
|
||||
; Macro for using FPU
|
||||
; What we do with FPU is to compute the square root of D1 which
|
||||
; Is then the distance to the back hole center instead of its square
|
||||
MACRO BH_COMPUTE_FPU bail_out_addr
|
||||
BH_COMP_1
|
||||
FMOVE.L D1,FP0
|
||||
FSQRT FP0
|
||||
FMOVE.L FP0,D1
|
||||
BH_COMP_2 bail_out_addr
|
||||
ENDM
|
||||
|
||||
; Init parameters valid for the entire call
|
||||
MACRO INIT_BHL
|
||||
MOVE.L pre_cosin,A2
|
||||
MOVE.L pre_loffset,A4 ; A4-->preoffset
|
||||
MOVE.L bh_rd2(PC),A5 ; A5=bh_rd2
|
||||
MOVE.L bh_xd(PC),A6 ; A6=bh_xd
|
||||
MOVE.W bh_out_w(PC),D7
|
||||
SUBQ.W #1,D7 ; For DBF
|
||||
ENDM
|
||||
|
||||
MACRO INIT_BHL_SYM
|
||||
MOVE.L pre_cosin,A2
|
||||
MOVE.L pre_loffset,A4 ; A4-->preoffset
|
||||
MOVE.L bh_rd2(PC),A5 ; A5=bh_rd2
|
||||
MOVE.L bh_xd(PC),A6 ; A6=bh_xd
|
||||
MOVE.W bh_out_w(PC),D7
|
||||
LSR.W #1,D7 ; loop to bh_out_w/2 counts
|
||||
ADD.W A6,D7 ; starting from bh_xd
|
||||
MOVE.W D7,last_xd
|
||||
ENDM
|
||||
|
||||
; Get pixel TC32 -->dest (Dx)
|
||||
; A4-->pre_loffset
|
||||
MACRO GET_TCPIXEL32 p,x,y,dest
|
||||
MOVE.L (A4,y.L*4),dest
|
||||
ADD.L x,dest
|
||||
MOVE.L (p,dest.L*4),dest
|
||||
ENDM
|
||||
|
||||
; Set pixel TC32 val(Dx) -->dest
|
||||
; A4-->pre_loffset
|
||||
; scratch_Dx scratch variable
|
||||
MACRO SET_TCPIXEL32 p,x,y,val,scratch_Dx
|
||||
MOVE.L (A4,y.L*4),scratch_Dx
|
||||
ADD.L x,scratch_Dx
|
||||
MOVE.L val,(p,scratch_Dx.L*4)
|
||||
ENDM
|
||||
|
||||
; Get pixel TC16 -->dest (Dx)
|
||||
; A4-->pre_loffset
|
||||
MACRO GET_TCPIXEL16 p,x,y,dest
|
||||
MOVE.L (A4,y.L*4),dest
|
||||
ADD.L x,dest
|
||||
MOVE.W (p,dest.L*2),dest
|
||||
ENDM
|
||||
|
||||
; Set pixel TC16 val(Dx) -->dest
|
||||
; A4-->pre_loffset
|
||||
; scratch_Dx scratch variable
|
||||
MACRO SET_TCPIXEL16 p,x,y,val,scratch_Dx
|
||||
MOVE.L (A4,y.L*4),scratch_Dx
|
||||
ADD.L x,scratch_Dx
|
||||
MOVE.W val,(p,scratch_Dx.L*2)
|
||||
ENDM
|
||||
|
||||
; Rotate 90
|
||||
; x,y,scratch_Dx : registers, y has to be Dx
|
||||
; #define R90(x,y) { long _x=x; x=-y; y=_x; }
|
||||
MACRO R90 x,y,scratch_Dx
|
||||
MOVE.L x,scratch_Dx
|
||||
NEG.L y
|
||||
MOVE.L y,x
|
||||
MOVE.L scratch_Dx,y
|
||||
ENDM
|
||||
|
||||
MACRO PIXINIMG x,y,w,h,bailout
|
||||
TST.W x
|
||||
BLT.S bailout
|
||||
TST.W y
|
||||
BLT.S bailout
|
||||
CMP.W w,x
|
||||
BGE.S bailout
|
||||
CMP.W h,y
|
||||
BGE.S bailout
|
||||
ENDM
|
||||
|
||||
; On sample file 00_1480ms.jpg, Aranym 32bit:
|
||||
; BHL32_68000 takes about 1450ms
|
||||
; BHL32_68030 takes about 740ms
|
||||
|
||||
; 68030 routine for True Color 32bit
|
||||
; BHL32_68030(short use_sym, void* in, void* out)
|
||||
; D0, A0 A1
|
||||
BHL32_68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
|
||||
TST.W D0
|
||||
BNE BHL32_68030_sym
|
||||
|
||||
MOVEQ.L #0,D7
|
||||
MOVE.W bh_out_x(PC),D7
|
||||
LSL.L #2,D7
|
||||
ADD.L D7,A1 ; A1-->&out[bh_out_x]
|
||||
INIT_BHL
|
||||
bhl32_l030:
|
||||
BH_COMPUTE_CPU bhl32_tpir_030 ; -->D6=0:pixel in range
|
||||
bhl32_tpir_030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl32_setpix_030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
MOVE.L (A0,D0.L*4),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhl32_setpix_030:
|
||||
MOVE.L D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhl32_l030
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
BHL32_68030_sym:
|
||||
INIT_BHL_SYM
|
||||
bhl32_l030_sym:
|
||||
BH_COMPUTE_CPU bhl32_tpir_030_sym ; -->D6=0:pixel in range
|
||||
bhl32_tpir_030_sym:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl32_setpix_030_sym
|
||||
GET_TCPIXEL32 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
bhl32_setpix_030_sym:
|
||||
MOVE.L A6,-(SP) ; Save bh_xd
|
||||
MOVE.L bh_xc(PC),D2 ; D2=bh_xc
|
||||
MOVE.L bh_yc(PC),D3 ; D3=bh_yc
|
||||
ADD.L D2,A6 ; A6=bh_xd+bh_xc
|
||||
MOVE.L bh_yd(PC),D7
|
||||
ADD.L D3,D7 ; D7=bh_yd+bh_yc
|
||||
SET_TCPIXEL32 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
|
||||
MOVEQ.L #2,D1 ; 3 loops, -1 for DBF
|
||||
deduc32_030:
|
||||
SUB.L D2,A3 ; We need now bh_xs(A3) and bh_ys(D4) relative to
|
||||
SUB.L D3,D4 ; Black Hole center to use R90
|
||||
SUB.L D2,A6 ; We need now bh_xd(A6) and bh_yd(D7) relative to
|
||||
SUB.L D3,D7 ; Black Hole center to use R90
|
||||
|
||||
R90 A6,D7,D0 ; Rotate (xd,yd) by PI/4
|
||||
R90 A3,D4,D0 ; Rotate (xs,ys) by PI/4
|
||||
|
||||
ADD.L D2,A3 ; Now we need coords in image raster
|
||||
ADD.L D3,D4
|
||||
ADD.L D2,A6
|
||||
ADD.L D3,D7
|
||||
|
||||
PIXINIMG A6,D7,bh_in_w(PC),bh_in_h(PC),dnotinimg32_030 ; Check if pixel in dest is within bounds
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
PIXINIMG A3,D4,bh_in_w(PC),bh_in_h(PC),plotdest32_030 ; Check if pixel in src is within bounds
|
||||
GET_TCPIXEL32 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
plotdest32_030:
|
||||
SET_TCPIXEL32 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
dnotinimg32_030:
|
||||
DBF D1,deduc32_030
|
||||
|
||||
MOVE.L (SP)+,A6 ; Restore bh_xd
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
CMP.W last_xd(PC),A6
|
||||
BLE bhl32_l030_sym
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
; 68030 routine for True Color 16bit
|
||||
; BHL16_68030(short use_sym, void* in, void* out)
|
||||
; D0, A0 A1
|
||||
BHL16_68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
|
||||
TST.W D0
|
||||
BNE BHL16_68030_sym
|
||||
|
||||
MOVEQ.L #0,D7
|
||||
MOVE.W bh_out_x(PC),D7
|
||||
ADD.L D7,D7
|
||||
ADD.L D7,A1 ; A1-->&out[bh_out_x]
|
||||
INIT_BHL
|
||||
bhl16_l030:
|
||||
BH_COMPUTE_CPU bhl16_tpir_030 ; -->D6=0:pixel in range
|
||||
bhl16_tpir_030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl16_setpix_030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
MOVE.W (A0,D0.L*2),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhl16_setpix_030:
|
||||
MOVE.W D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhl16_l030
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
BHL16_68030_sym:
|
||||
INIT_BHL_SYM
|
||||
bhl16_l030_sym:
|
||||
BH_COMPUTE_CPU bhl16_tpir_030_sym ; -->D6=0:pixel in range
|
||||
bhl16_tpir_030_sym:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl16_setpix_030_sym
|
||||
GET_TCPIXEL16 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
bhl16_setpix_030_sym:
|
||||
MOVE.L A6,-(SP) ; Save bh_xd
|
||||
MOVE.L bh_xc(PC),D2 ; D2=bh_xc
|
||||
MOVE.L bh_yc(PC),D3 ; D3=bh_yc
|
||||
ADD.L D2,A6 ; A6=bh_xd+bh_xc
|
||||
MOVE.L bh_yd(PC),D7
|
||||
ADD.L D3,D7 ; D7=bh_yd+bh_yc
|
||||
SET_TCPIXEL16 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
|
||||
MOVEQ.L #2,D1 ; 3 loops, -1 for DBF
|
||||
deduc16_030:
|
||||
SUB.L D2,A3 ; We need now bh_xs(A3) and bh_ys(D4) relative to
|
||||
SUB.L D3,D4 ; Black Hole center to use R90
|
||||
SUB.L D2,A6 ; We need now bh_xd(A6) and bh_yd(D7) relative to
|
||||
SUB.L D3,D7 ; Black Hole center to use R90
|
||||
|
||||
R90 A6,D7,D0 ; Rotate (xd,yd) by PI/4
|
||||
R90 A3,D4,D0 ; Rotate (xs,ys) by PI/4
|
||||
|
||||
ADD.L D2,A3 ; Now we need coords in image raster
|
||||
ADD.L D3,D4
|
||||
ADD.L D2,A6
|
||||
ADD.L D3,D7
|
||||
|
||||
PIXINIMG A6,D7,bh_in_w(PC),bh_in_h(PC),dnotinimg16_030 ; Check if pixel in dest is within bounds
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
PIXINIMG A3,D4,bh_in_w(PC),bh_in_h(PC),plotdest16_030 ; Check if pixel in src is within bounds
|
||||
GET_TCPIXEL16 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
plotdest16_030:
|
||||
SET_TCPIXEL16 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
dnotinimg16_030:
|
||||
DBF D1,deduc16_030
|
||||
|
||||
MOVE.L (SP)+,A6 ; Restore bh_xd
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
CMP.W last_xd(PC),A6
|
||||
BLE bhl16_l030_sym
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
; 68030 routine for bitplances images, converted to indexes
|
||||
; BHLInd_68030(short use_sym, void* in, void* out)
|
||||
; D0, A0 A1
|
||||
BHLInd_68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
|
||||
INIT_BHL
|
||||
bhlind_l030:
|
||||
BH_COMPUTE_CPU bhlind_tpir_030 ; -->D6=0:pixel in range
|
||||
bhlind_tpir_030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhlind_setpix_030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
MOVE.B (A0,D0.L),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhlind_setpix_030:
|
||||
MOVE.B D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhlind_l030
|
||||
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
.EVEN
|
||||
bh_xd:
|
||||
DC.L 0
|
||||
bh_yd:
|
||||
DC.L 0
|
||||
bh_rd2:
|
||||
DC.L 0
|
||||
bh_xs:
|
||||
DC.L 0
|
||||
bh_ys:
|
||||
DC.L 0
|
||||
bh_ref:
|
||||
DC.L 0
|
||||
bh_xc:
|
||||
DC.L 0
|
||||
bh_yc:
|
||||
DC.L 0
|
||||
bh_out_w:
|
||||
DC.W 0
|
||||
bh_out_h:
|
||||
DC.W 0
|
||||
bh_in_w:
|
||||
DC.W 0
|
||||
bh_in_h:
|
||||
DC.W 0
|
||||
bh_out_x:
|
||||
DC.W 0
|
||||
bh_out_y:
|
||||
DC.W 0
|
||||
last_xd:
|
||||
DC.W 0
|
||||
|
||||
; 68030/FPU routine for True Color 32bit
|
||||
; BHL32_F68030(short use_sym, void* in, void* out)
|
||||
; D0, A0 A1
|
||||
;BHL32_F68030:
|
||||
; MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
; FMOVE.X FP0,-(SP)
|
||||
;
|
||||
; INIT_BHL
|
||||
;bhl32_lf030:
|
||||
; BH_COMPUTE_FPU bhl32_tpir_f030 ; -->D6=0:pixel in range
|
||||
;bhl32_tpir_f030:
|
||||
; MOVEQ.L #-1,D0 ; Assume out of range
|
||||
; TST.W D6
|
||||
; BNE.S bhl32_setpix_f030
|
||||
; MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
; ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
; MOVE.L (A0,D0.L*4),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
;bhl32_setpix_f030:
|
||||
; MOVE.L D0,(A1)+
|
||||
; ADD.L #1,A6 ; bh_xd++
|
||||
; DBF D7,bhl32_lf030
|
||||
;
|
||||
; FMOVE.X (SP)+,FP0
|
||||
; MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
; RTS
|
||||
|
||||
BHL32_F68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
FMOVE.X FP0,-(SP)
|
||||
|
||||
TST.W D0
|
||||
BNE BHL32_F68030_sym
|
||||
|
||||
MOVEQ.L #0,D7
|
||||
MOVE.W bh_out_x(PC),D7
|
||||
LSL.L #2,D7
|
||||
ADD.L D7,A1 ; A1-->&out[bh_out_x]
|
||||
INIT_BHL
|
||||
bhl32_lf030:
|
||||
BH_COMPUTE_FPU bhl32_tpir_f030 ; -->D6=0:pixel in range
|
||||
bhl32_tpir_f030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl32_setpix_f030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
MOVE.L (A0,D0.L*4),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhl32_setpix_f030:
|
||||
MOVE.L D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhl32_lf030
|
||||
|
||||
FMOVE.X (SP)+,FP0
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
BHL32_F68030_sym:
|
||||
INIT_BHL_SYM
|
||||
bhl32_lf030_sym:
|
||||
BH_COMPUTE_FPU bhl32_tpir_f030_sym ; -->D6=0:pixel in range
|
||||
bhl32_tpir_f030_sym:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl32_setpix_f030_sym
|
||||
GET_TCPIXEL32 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
bhl32_setpix_f030_sym:
|
||||
MOVE.L A6,-(SP) ; Save bh_xd
|
||||
MOVE.L bh_xc(PC),D2 ; D2=bh_xc
|
||||
MOVE.L bh_yc(PC),D3 ; D3=bh_yc
|
||||
ADD.L D2,A6 ; A6=bh_xd+bh_xc
|
||||
MOVE.L bh_yd(PC),D7
|
||||
ADD.L D3,D7 ; D7=bh_yd+bh_yc
|
||||
SET_TCPIXEL32 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
|
||||
MOVEQ.L #2,D1 ; 3 loops, -1 for DBF
|
||||
deduc32_f030:
|
||||
SUB.L D2,A3 ; We need now bh_xs(A3) and bh_ys(D4) relative to
|
||||
SUB.L D3,D4 ; Black Hole center to use R90
|
||||
SUB.L D2,A6 ; We need now bh_xd(A6) and bh_yd(D7) relative to
|
||||
SUB.L D3,D7 ; Black Hole center to use R90
|
||||
|
||||
R90 A6,D7,D0 ; Rotate (xd,yd) by PI/4
|
||||
R90 A3,D4,D0 ; Rotate (xs,ys) by PI/4
|
||||
|
||||
ADD.L D2,A3 ; Now we need coords in image raster
|
||||
ADD.L D3,D4
|
||||
ADD.L D2,A6
|
||||
ADD.L D3,D7
|
||||
|
||||
PIXINIMG A6,D7,bh_in_w(PC),bh_in_h(PC),dnotinimg32_f030 ; Check if pixel in dest is within bounds
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
PIXINIMG A3,D4,bh_in_w(PC),bh_in_h(PC),plotdest32_f030 ; Check if pixel in src is within bounds
|
||||
GET_TCPIXEL32 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
plotdest32_f030:
|
||||
SET_TCPIXEL32 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
dnotinimg32_f030:
|
||||
DBF D1,deduc32_f030
|
||||
|
||||
MOVE.L (SP)+,A6 ; Restore bh_xd
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
CMP.W last_xd(PC),A6
|
||||
BLE bhl32_lf030_sym
|
||||
|
||||
FMOVE.X (SP)+,FP0
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
BHL16_F68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
FMOVE.X FP0,-(SP)
|
||||
|
||||
TST.W D0
|
||||
BNE BHL16_f68030_sym
|
||||
|
||||
MOVEQ.L #0,D7
|
||||
MOVE.W bh_out_x(PC),D7
|
||||
ADD.L D7,D7
|
||||
ADD.L D7,A1 ; A1-->&out[bh_out_x]
|
||||
INIT_BHL
|
||||
bhl16_lf030:
|
||||
BH_COMPUTE_FPU bhl16_tpir_f030 ; -->D6=0:pixel in range
|
||||
bhl16_tpir_f030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl16_setpix_f030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs(A3)
|
||||
MOVE.W (A0,D0.L*2),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhl16_setpix_f030:
|
||||
MOVE.W D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhl16_lf030
|
||||
|
||||
FMOVE.X (SP)+,FP0
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
BHL16_f68030_sym:
|
||||
INIT_BHL_SYM
|
||||
bhl16_lf030_sym:
|
||||
BH_COMPUTE_FPU bhl16_tpir_f030_sym ; -->D6=0:pixel in range
|
||||
bhl16_tpir_f030_sym:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhl16_setpix_f030_sym
|
||||
GET_TCPIXEL16 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
bhl16_setpix_f030_sym:
|
||||
MOVE.L A6,-(SP) ; Save bh_xd
|
||||
MOVE.L bh_xc(PC),D2 ; D2=bh_xc
|
||||
MOVE.L bh_yc(PC),D3 ; D3=bh_yc
|
||||
ADD.L D2,A6 ; A6=bh_xd+bh_xc
|
||||
MOVE.L bh_yd(PC),D7
|
||||
ADD.L D3,D7 ; D7=bh_yd+bh_yc
|
||||
SET_TCPIXEL16 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
|
||||
MOVEQ.L #2,D1 ; 3 loops, -1 for DBF
|
||||
deduc16_f030:
|
||||
SUB.L D2,A3 ; We need now bh_xs(A3) and bh_ys(D4) relative to
|
||||
SUB.L D3,D4 ; Black Hole center to use R90
|
||||
SUB.L D2,A6 ; We need now bh_xd(A6) and bh_yd(D7) relative to
|
||||
SUB.L D3,D7 ; Black Hole center to use R90
|
||||
|
||||
R90 A6,D7,D0 ; Rotate (xd,yd) by PI/4
|
||||
R90 A3,D4,D0 ; Rotate (xs,ys) by PI/4
|
||||
|
||||
ADD.L D2,A3 ; Now we need coords in image raster
|
||||
ADD.L D3,D4
|
||||
ADD.L D2,A6
|
||||
ADD.L D3,D7
|
||||
|
||||
PIXINIMG A6,D7,bh_in_w(PC),bh_in_h(PC),dnotinimg16_f030 ; Check if pixel in dest is within bounds
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
PIXINIMG A3,D4,bh_in_w(PC),bh_in_h(PC),plotdest16_f030 ; Check if pixel in src is within bounds
|
||||
GET_TCPIXEL16 A0,A3,D4,D0 ; A0-->in_ptr, A3=bh_xs+bh_xc, D4=bh_ys+bh_yc
|
||||
; D0=GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc)
|
||||
plotdest16_f030:
|
||||
SET_TCPIXEL16 A1,A6,D7,D0,D5 ; SET_TCPIXEL(out_ptr, bh_xd+bh_xc, bh_yd+bh_yc, GET_TCPIXEL(in_ptr, bh_xs+bh_xc, bh_ys+bh_yc))
|
||||
dnotinimg16_f030:
|
||||
DBF D1,deduc16_f030
|
||||
|
||||
MOVE.L (SP)+,A6 ; Restore bh_xd
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
CMP.W last_xd(PC),A6
|
||||
BLE bhl16_lf030_sym
|
||||
|
||||
FMOVE.X (SP)+,FP0
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
; 68030/FPU routine for bitplances images, converted to indexes
|
||||
; BHLInd_F68030(short use_sym, void* in, void* out)
|
||||
; D0, A0 A1
|
||||
BHLInd_F68030:
|
||||
MOVEM.L D0-D7/A2-A6,-(SP) ; Save context
|
||||
FMOVE.X FP0,-(SP)
|
||||
|
||||
INIT_BHL
|
||||
bhlInd_lf030:
|
||||
BH_COMPUTE_FPU bhlInd_tpir_f030 ; -->D6=0:pixel in range
|
||||
bhlInd_tpir_f030:
|
||||
MOVEQ.L #-1,D0 ; Assume out of range
|
||||
TST.W D6
|
||||
BNE.S bhlInd_setpix_f030
|
||||
MOVE.L (A4,D4.L*4),D0 ; D4=bh_ys, D0=pre_loffset[bh_ys]
|
||||
ADD.L A3,D0 ; D0=pre_loffset[bh_ys] + bh_xs
|
||||
MOVE.B (A0,D0.L),D0 ; D0=in_ptr[pre_loffset[bh_ys] + bh_xs]
|
||||
bhlInd_setpix_f030:
|
||||
MOVE.B D0,(A1)+
|
||||
ADD.L #1,A6 ; bh_xd++
|
||||
DBF D7,bhlInd_lf030
|
||||
|
||||
FMOVE.X (SP)+,FP0
|
||||
MOVEM.L (SP)+,D0-D7/A2-A6 ; Restore context
|
||||
RTS
|
||||
|
||||
|
||||
; Pre-calculation of cosinus/sinus table using FPU
|
||||
; void lcosin_fpu(long i, long* pcs)
|
||||
; D0 A0
|
||||
; double angle = i*ANGLE_ADD ;
|
||||
; pcs[0] = 65536.0 * cos( angle ) ;
|
||||
; pcs[1] = 65536.0 * sin( angle ) ;
|
||||
lcosin_fpu:
|
||||
FMOVEM.X FP0-FP2,-(SP)
|
||||
|
||||
FMOVE D0,FP0
|
||||
; 3.8349519697141030742952189737299e-4=M_PI/2.0/(double)QUARTER
|
||||
; For some reason, I did not manage to use EQU with floating point constants
|
||||
FMUL.X #3.8349519697141030742952189737299e-4,FP0
|
||||
FSINCOS.X FP0,FP1:FP2
|
||||
FMUL.X #65536.0,FP1
|
||||
FMUL.X #65536.0,FP2
|
||||
FMOVE.L FP1,(A0)+
|
||||
FMOVE.L FP2,(A0)
|
||||
|
||||
FMOVEM.X (SP)+,FP0-FP2
|
||||
RTS
|
||||
86
tools/vision/LDV/SRC/bhole/perf_r51.txt
Normal file
86
tools/vision/LDV/SRC/bhole/perf_r51.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
68000, TC32, 2016x1508
|
||||
MagicC, SYM:
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (0,0,254,0)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (254,0,1508,0)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (1762,0,254,0)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (0,0,254,1508)
|
||||
25/02/18 18:31:38 [INFO] Adding R4(0,0,254,1508)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (1762,0,254,1508)
|
||||
25/02/18 18:31:38 [INFO] Adding R5(1762,0,254,1508)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (0,1508,254,0)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (254,1508,1508,0)
|
||||
25/02/18 18:31:38 [INFO] MayAddRect (1762,1508,254,0)
|
||||
25/02/18 18:31:38 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 18:31:38 [INFO] Image source : (0,0,+2016,+1508); 3040128 pixels
|
||||
25/02/18 18:31:38 [INFO] Symmetry zone : (254,0,+1508,+1508), index:0
|
||||
25/02/18 18:31:40 [INFO] Run zone 0: (254,0,+1508,+1508), use_sym=1, 2274064 pixels, done in 850ms, 2675 Kpixels/s
|
||||
25/02/18 18:31:40 [INFO] Run zone 1: (0,0,+254,+1508), use_sym=0, 383032 pixels, done in 295ms, 1298 Kpixels/s
|
||||
25/02/18 18:31:40 [INFO] Run zone 2: (1762,0,+254,+1508), use_sym=0, 383032 pixels, done in 295ms, 1298 Kpixels/s
|
||||
25/02/18 18:31:40 [INFO] 3040128 pixels computed or deduced
|
||||
25/02/18 18:31:40 [PERF] LDV Run took 1445ms
|
||||
|
||||
MagicC, NO SYM:
|
||||
25/02/18 18:36:52 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 18:36:52 [INFO] Image source : (0,0,+2016,+1508); 3040128 pixels
|
||||
25/02/18 18:36:52 [INFO] Symmetry zone : (0,0,+2016,+1508), index:-1
|
||||
25/02/18 18:36:54 [INFO] Run zone 0: (0,0,+2016,+1508), use_sym=0, 3040128 pixels, done in 2270ms, 1339 Kpixels/s
|
||||
25/02/18 18:36:54 [INFO] 3040128 pixels computed or deduced
|
||||
25/02/18 18:36:54 [PERF] LDV Run took 2275ms
|
||||
|
||||
Aranym, NO SYM:
|
||||
25/02/18 18:38:54 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 18:38:54 [INFO] Image source : (0,0,+2016,+1508); 3040128 pixels
|
||||
25/02/18 18:38:54 [INFO] Symmetry zone : (0,0,+2016,+1508), index:-1
|
||||
25/02/18 18:38:54 [INFO] Run zone 0: (0,0,+2016,+1508), use_sym=0, 3040128 pixels, done in 1710ms, 1777 Kpixels/s
|
||||
25/02/18 18:38:54 [INFO] 3040128 pixels computed or deduced
|
||||
25/02/18 18:38:54 [PERF] LDV Run took 1710ms
|
||||
|
||||
Aranym, SYM:
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (0,0,254,0)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (254,0,1508,0)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (1762,0,254,0)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (0,0,254,1508)
|
||||
25/02/18 18:41:12 [INFO] Adding R4(0,0,254,1508)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (1762,0,254,1508)
|
||||
25/02/18 18:41:12 [INFO] Adding R5(1762,0,254,1508)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (0,1508,254,0)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (254,1508,1508,0)
|
||||
25/02/18 18:41:12 [INFO] MayAddRect (1762,1508,254,0)
|
||||
25/02/18 18:41:12 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 18:41:12 [INFO] Image source : (0,0,+2016,+1508); 3040128 pixels
|
||||
25/02/18 18:41:12 [INFO] Symmetry zone : (254,0,+1508,+1508), index:0
|
||||
25/02/18 18:41:14 [INFO] Run zone 0: (254,0,+1508,+1508), use_sym=1, 2274064 pixels, done in 500ms, 4548 Kpixels/s
|
||||
25/02/18 18:41:14 [INFO] Run zone 1: (0,0,+254,+1508), use_sym=0, 383032 pixels, done in 900ms, 425 Kpixels/s
|
||||
25/02/18 18:41:14 [INFO] Run zone 2: (1762,0,+254,+1508), use_sym=0, 383032 pixels, done in 890ms, 430 Kpixels/s
|
||||
25/02/18 18:41:14 [INFO] 3040128 pixels computed or deduced
|
||||
25/02/18 18:41:14 [PERF] LDV Run took 2300ms
|
||||
|
||||
HATARI, Falcon 32Mhz, TC16, SYM:
|
||||
25/02/18 19:07:02 [DEBUG] Running LDV with w=1008, h=754, P0=10, P1=50, P2=50
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (0,0,127,0)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (127,0,754,0)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (881,0,127,0)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (0,0,127,754)
|
||||
25/02/18 19:07:04 [INFO] Adding R4(0,0,127,754)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (881,0,127,754)
|
||||
25/02/18 19:07:04 [INFO] Adding R5(881,0,127,754)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (0,754,127,0)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (127,754,754,0)
|
||||
25/02/18 19:07:04 [INFO] MayAddRect (881,754,127,0)
|
||||
25/02/18 19:07:04 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 19:07:04 [INFO] Image source : (0,0,+1008,+754); 760032 pixels
|
||||
25/02/18 19:07:04 [INFO] Symmetry zone : (127,0,+754,+754), index:0
|
||||
25/02/18 19:07:20 [INFO] Run zone 0: (127,0,+754,+754), use_sym=1, 568516 pixels, done in 17260ms, 32 Kpixels/s
|
||||
25/02/18 19:07:26 [INFO] Run zone 1: (0,0,+127,+754), use_sym=0, 95758 pixels, done in 6350ms, 15 Kpixels/s
|
||||
25/02/18 19:07:34 [INFO] Run zone 2: (881,0,+127,+754), use_sym=0, 95758 pixels, done in 6400ms, 14 Kpixels/s
|
||||
25/02/18 19:07:34 [INFO] 760032 pixels computed or deduced
|
||||
25/02/18 19:07:34 [PERF] LDV Run took 30030ms
|
||||
|
||||
HATARI, Falcon 32Mhz, TC16, NO SYM:
|
||||
25/02/18 19:11:00 [DEBUG] Running LDV with w=1008, h=754, P0=10, P1=50, P2=50
|
||||
25/02/18 19:11:00 [INFO] 100 being the time without using symmetry, using symmetry would be 43
|
||||
25/02/18 19:11:00 [INFO] Image source : (0,0,+1008,+754); 760032 pixels
|
||||
25/02/18 19:11:00 [INFO] Symmetry zone : (0,0,+1008,+754), index:-1
|
||||
25/02/18 19:11:46 [INFO] Run zone 0: (0,0,+1008,+754), use_sym=0, 760032 pixels, done in 46625ms, 16 Kpixels/s
|
||||
25/02/18 19:11:46 [INFO] 760032 pixels computed or deduced
|
||||
25/02/18 19:11:46 [PERF] LDV Run took 46901ms
|
||||
222
tools/vision/LDV/SRC/gamma/GAMMA.C
Normal file
222
tools/vision/LDV/SRC/gamma/GAMMA.C
Normal file
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
NULL, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_AFFECTPALETTE | LDVF_REALTIMEPARAMS)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_SUPPORTCANCEL | LDVF_REALTIMEPARAMS)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, BP_CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, BP_CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, BP_CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, TC_CAPS }, /* Capacites pour 16 plans */
|
||||
{ 32, 32, TC_CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
double gamma_rgb = 100.0 ;
|
||||
double gamma_red = -1.0 ;
|
||||
double gamma_green = -1.0 ;
|
||||
double gamma_blue = -1.0 ;
|
||||
|
||||
unsigned char RedRemap[256] ; /* Tables de reaffectation des couleurs en True Color */
|
||||
unsigned char GreenRemap[256] ;
|
||||
unsigned char BlueRemap[256] ;
|
||||
|
||||
#define CHECK_VAPI(vapi) if ( (vapi == NULL ) || (vapi->Header.Version < 0x103) ) return( ELDV_BADVAPIVERSION ) ;
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
double GammaFunc(double val, double val_max, double gamma)
|
||||
{
|
||||
return( val_max * pow( val/val_max, gamma ) ) ;
|
||||
}
|
||||
|
||||
void ChangeColors(double gamma, unsigned char *tab, unsigned short nb_bits)
|
||||
{
|
||||
unsigned char *pnew_val = tab ;
|
||||
double max_val = (double) ((1 << nb_bits) - 1) ;
|
||||
unsigned short i ;
|
||||
|
||||
for ( i = 0; i <= max_val; i++, pnew_val++ )
|
||||
*pnew_val = (short) ( 0.5 + GammaFunc( i, max_val, gamma ) ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_PALETTE *vdi_palette = &in->Palette ;
|
||||
VDI_ELEMENTPAL *vdi_epal ;
|
||||
double rgamma, ggamma, bgamma ;
|
||||
short vdi_index ;
|
||||
short cancel = 0 ;
|
||||
|
||||
if ( (params->Param[0].s / 100.0) != gamma_rgb )
|
||||
{
|
||||
gamma_rgb = params->Param[0].s / 100.0 ;
|
||||
params->Param[1].s = params->Param[0].s ;
|
||||
params->Param[2].s = params->Param[0].s ;
|
||||
params->Param[3].s = params->Param[0].s ;
|
||||
}
|
||||
|
||||
rgamma = params->Param[1].s / 100.0 ;
|
||||
ggamma = params->Param[2].s / 100.0 ;
|
||||
bgamma = params->Param[3].s / 100.0 ;
|
||||
if ( in->Raster.fd_nplanes <= 8 )
|
||||
{
|
||||
if ( vdi_palette == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
vdi_epal = vdi_palette->Pal ;
|
||||
if ( vdi_epal == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
for ( vdi_index = 0; vdi_index < vdi_palette->NbColors; vdi_index++, vdi_epal++ )
|
||||
{
|
||||
vdi_epal->Red = (short) ( 0.5 + GammaFunc( vdi_epal->Red, 1000.0, rgamma ) ) ;
|
||||
if ( ggamma == rgamma ) vdi_epal->Green = vdi_epal->Red ;
|
||||
else vdi_epal->Green = (short) ( 0.5 + GammaFunc( vdi_epal->Green, 1000.0, ggamma ) ) ;
|
||||
if ( bgamma == rgamma ) vdi_epal->Blue = vdi_epal->Red ;
|
||||
else vdi_epal->Blue = (short) ( 0.5 + GammaFunc( vdi_epal->Blue, 1000.0, bgamma ) ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
REMAP_COLORS rc ;
|
||||
MFDB *img = &in->Raster ;
|
||||
long *pt_line32, nb_pts_in_line ;
|
||||
short *pt_line16, y, pc, is_15bits, cancel=0 ;
|
||||
unsigned short nb_bits_red=8, nb_bits_green=8, nb_bits_blue=8 ; /* Sur 32 bits par defaut */
|
||||
|
||||
CHECK_VAPI(Vapi) ;
|
||||
|
||||
rc.red = RedRemap ;
|
||||
rc.green = GreenRemap ;
|
||||
rc.blue = BlueRemap ;
|
||||
rc.nb_pts = (long) (1 + params->x2 - params->x1) ;
|
||||
is_15bits = Vapi->RaIs15Bits() ;
|
||||
if ( img->fd_nplanes == 16 )
|
||||
{
|
||||
nb_bits_red = 5 ;
|
||||
nb_bits_green = is_15bits ? 5:6 ;
|
||||
nb_bits_blue = 5 ;
|
||||
}
|
||||
/* Remet a jour les precalculs de pourcentage sur les composantes si necessaire */
|
||||
if ( rgamma != gamma_red ) ChangeColors( rgamma, RedRemap, nb_bits_red ) ;
|
||||
if ( ggamma != gamma_green ) ChangeColors( ggamma, GreenRemap, nb_bits_green ) ;
|
||||
if ( bgamma != gamma_blue ) ChangeColors( bgamma, BlueRemap, nb_bits_blue ) ;
|
||||
|
||||
nb_pts_in_line = ALIGN16(img->fd_w) ;
|
||||
pt_line16 = (short *) img->fd_addr ;
|
||||
pt_line16 += (long)(params->y1) * nb_pts_in_line ;
|
||||
pt_line16 += params->x1 ;
|
||||
pt_line32 = (long *) img->fd_addr ;
|
||||
pt_line32 += (long)(params->y1) * nb_pts_in_line ;
|
||||
pt_line32 += params->x1 ;
|
||||
for ( y = params->y1; !cancel && (y <= params->y2); y++ )
|
||||
{
|
||||
if ( img->fd_nplanes == 16 )
|
||||
{
|
||||
rc.pt_img = pt_line16 ;
|
||||
pt_line16 += nb_pts_in_line ;
|
||||
if ( is_15bits ) Vapi->RaTC15RemapColors( &rc ) ;
|
||||
else Vapi->RaTC16RemapColors( &rc ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rc.pt_img = pt_line32 ;
|
||||
pt_line32 += nb_pts_in_line ;
|
||||
Vapi->RaTC32RemapColors( &rc ) ;
|
||||
}
|
||||
if ( ( y & 0x0F ) == 0x0F )
|
||||
{
|
||||
pc = (short) ( ( 100L * (long)(y - params->y1) ) / (long)(params->y2 - params->y1) ) ;
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
gamma_red = rgamma ;
|
||||
gamma_green = ggamma ;
|
||||
gamma_blue = bgamma ;
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/gamma/GAMMA.LDV
Normal file
BIN
tools/vision/LDV/SRC/gamma/GAMMA.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/gamma/GAMMA.PRJ
Normal file
12
tools/vision/LDV/SRC/gamma/GAMMA.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
GAMMA.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
GAMMA.C
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
223
tools/vision/LDV/SRC/light/LIGHT.C
Normal file
223
tools/vision/LDV/SRC/light/LIGHT.C
Normal file
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0101, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
NULL, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_AFFECTPALETTE | LDVF_REALTIMEPARAMS)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_OPINPLACE | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_SUPPORTCANCEL | LDVF_REALTIMEPARAMS)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, BP_CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, BP_CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, BP_CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, TC_CAPS }, /* Capacites pour 16 plans */
|
||||
{ 32, 32, TC_CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
short pc_rgb = 100 ;
|
||||
short pc_red = -1 ; /* Pourcentages de lumiere sur les comosantes rouge, verte et bleue */
|
||||
short pc_green = -1 ;
|
||||
short pc_blue = -1 ;
|
||||
|
||||
unsigned char RedRemap[256] ; /* Tables de reaffectation des couleurs en True Color */
|
||||
unsigned char GreenRemap[256] ;
|
||||
unsigned char BlueRemap[256] ;
|
||||
|
||||
#define CHECK_VAPI(vapi) if ( (vapi == NULL ) || (vapi->Header.Version < 0x103) ) return( ELDV_BADVAPIVERSION ) ;
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
void ChangeColors(unsigned short percent, unsigned char *tab, unsigned short nb_bits)
|
||||
{
|
||||
unsigned char *pnew_val = tab ;
|
||||
unsigned short max_val = (1 << nb_bits) - 1 ;
|
||||
unsigned short val, i ;
|
||||
|
||||
for ( i = 0; i <= max_val; i++, pnew_val++ )
|
||||
{
|
||||
val = ( i * percent ) / 100 ;
|
||||
if ( val > max_val ) *pnew_val = max_val ;
|
||||
else *pnew_val = val ;
|
||||
}
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_PALETTE *vdi_palette = &in->Palette ;
|
||||
VDI_ELEMENTPAL *vdi_epal ;
|
||||
short vdi_index ;
|
||||
short cancel = 0 ;
|
||||
|
||||
if ( params->Param[0].s != pc_rgb )
|
||||
{
|
||||
pc_rgb = params->Param[0].s ;
|
||||
params->Param[1].s = pc_rgb ;
|
||||
params->Param[2].s = pc_rgb ;
|
||||
params->Param[3].s = pc_rgb ;
|
||||
}
|
||||
|
||||
if ( in->Raster.fd_nplanes <= 8 )
|
||||
{
|
||||
long red_pc, green_pc, blue_pc ; /* Pour la palette */
|
||||
|
||||
if ( vdi_palette == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
vdi_epal = vdi_palette->Pal ;
|
||||
if ( vdi_epal == NULL ) return( ELDV_GENERALFAILURE ) ;
|
||||
red_pc = (long) params->Param[1].s ;
|
||||
green_pc = (long) params->Param[2].s ;
|
||||
blue_pc = (long) params->Param[3].s ;
|
||||
for ( vdi_index = 0; vdi_index < vdi_palette->NbColors; vdi_index++, vdi_epal++ )
|
||||
{
|
||||
/* Le calcul se fait sur des entiers 32 bits pour eviter d'exploser la plage -32K...32K */
|
||||
vdi_epal->Red = (short) ( ( (long)vdi_epal->Red * red_pc ) / 100L ) ;
|
||||
if ( vdi_epal->Red > 1000 ) vdi_epal->Red = 1000 ;
|
||||
vdi_epal->Green = (short) ( ( (long)vdi_epal->Green * green_pc ) / 100L ) ; ;
|
||||
if ( vdi_epal->Green > 1000 ) vdi_epal->Green = 1000 ;
|
||||
vdi_epal->Blue = (short) ( ( (long)vdi_epal->Blue * blue_pc ) / 100L ) ; ;
|
||||
if ( vdi_epal->Blue > 1000 ) vdi_epal->Blue = 1000 ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
REMAP_COLORS rc ;
|
||||
MFDB *img = &in->Raster ;
|
||||
long *pt_line32, nb_pts_in_line ;
|
||||
short *pt_line16, y, pc, is_15bits, cancel=0 ;
|
||||
unsigned short nb_bits_red=8, nb_bits_green=8, nb_bits_blue=8 ; /* Sur 32 bits par defaut */
|
||||
|
||||
CHECK_VAPI(Vapi) ;
|
||||
|
||||
rc.red = RedRemap ;
|
||||
rc.green = GreenRemap ;
|
||||
rc.blue = BlueRemap ;
|
||||
rc.nb_pts = (long) (1 + params->x2 - params->x1) ;
|
||||
is_15bits = Vapi->RaIs15Bits() ;
|
||||
if ( img->fd_nplanes == 16 )
|
||||
{
|
||||
nb_bits_red = 5 ;
|
||||
nb_bits_green = is_15bits ? 5:6 ;
|
||||
nb_bits_blue = 5 ;
|
||||
}
|
||||
/* Remet a jour les precalculs de pourcentage sur les composantes si necessaire */
|
||||
if ( pc_red != params->Param[1].s ) ChangeColors( (unsigned short) (params->Param[1].s), RedRemap, nb_bits_red ) ;
|
||||
if ( pc_green != params->Param[2].s ) ChangeColors( (unsigned short) (params->Param[2].s), GreenRemap, nb_bits_green ) ;
|
||||
if ( pc_blue != params->Param[3].s ) ChangeColors( (unsigned short) (params->Param[3].s), BlueRemap, nb_bits_blue ) ;
|
||||
pc_red = params->Param[1].s ;
|
||||
pc_green = params->Param[2].s ;
|
||||
pc_blue = params->Param[3].s ;
|
||||
|
||||
nb_pts_in_line = ALIGN16(img->fd_w) ;
|
||||
pt_line16 = (short *) img->fd_addr ;
|
||||
pt_line16 += (long)(params->y1) * nb_pts_in_line ;
|
||||
pt_line16 += params->x1 ;
|
||||
pt_line32 = (long *) img->fd_addr ;
|
||||
pt_line32 += (long)(params->y1) * nb_pts_in_line ;
|
||||
pt_line32 += params->x1 ;
|
||||
for ( y = params->y1; !cancel && (y <= params->y2); y++ )
|
||||
{
|
||||
if ( img->fd_nplanes == 16 )
|
||||
{
|
||||
rc.pt_img = pt_line16 ;
|
||||
pt_line16 += nb_pts_in_line ;
|
||||
if ( is_15bits ) Vapi->RaTC15RemapColors( &rc ) ;
|
||||
else Vapi->RaTC16RemapColors( &rc ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rc.pt_img = pt_line32 ;
|
||||
pt_line32 += nb_pts_in_line ;
|
||||
Vapi->RaTC32RemapColors( &rc ) ;
|
||||
}
|
||||
if ( ( y & 0x0F ) == 0x0F )
|
||||
{
|
||||
pc = (short) ( ( 100L * (long)(y - params->y1) ) / (long)(params->y2 - params->y1) ) ;
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( cancel ? ELDV_CANCELLED : ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/light/LIGHT.LDV
Normal file
BIN
tools/vision/LDV/SRC/light/LIGHT.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/light/LIGHT.PRJ
Normal file
12
tools/vision/LDV/SRC/light/LIGHT.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
LIGHT.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
LIGHT.C
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
224
tools/vision/LDV/SRC/puzzle/puzzle.c
Normal file
224
tools/vision/LDV/SRC/puzzle/puzzle.c
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
OnClose, /* Fermeture, liberation de VDIHandle */
|
||||
};
|
||||
|
||||
#define CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, CAPS }, /* Capacites pour 16 plans */
|
||||
{ 24, 24, CAPS }, /* Capacites pour 24 plans */
|
||||
{ 32, 32, CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
int VDIHandle = -1 ;
|
||||
short *ToBeMixed = NULL ; /* Tableau (1,2,...) a melanger */
|
||||
short Nw, Nh, Entropy ;
|
||||
|
||||
void OnClose(void)
|
||||
{
|
||||
if ( VDIHandle != -1 ) v_clsvwk( VDIHandle ) ;
|
||||
VDIHandle = -1 ;
|
||||
if ( ToBeMixed ) free( ToBeMixed ) ;
|
||||
ToBeMixed = NULL ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS * cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
int vdihandle(void)
|
||||
{
|
||||
int work_in[11], work_out[57], i ;
|
||||
|
||||
for ( i = 0; i < 10; work_in[i++] = 1 ) ;
|
||||
work_in[10] = 2 ;
|
||||
v_opnvwk( work_in, &i, work_out ) ;
|
||||
|
||||
return( i ) ;
|
||||
}
|
||||
|
||||
void SetMixedArray(short Nw, short Nh, short entropy)
|
||||
{
|
||||
short nb = Nw * Nh ;
|
||||
|
||||
if ( ToBeMixed ) free( ToBeMixed ) ;
|
||||
ToBeMixed = (short *) malloc( nb * sizeof(short) ) ;
|
||||
if ( ToBeMixed )
|
||||
{
|
||||
short i, j, k, l, *pt ;
|
||||
|
||||
pt = ToBeMixed ;
|
||||
for ( i = 0; i < nb; i++ ) *pt++ = i ; /* Un tableau bien trie ... */
|
||||
for ( i = 0; i < entropy*entropy; i++ )
|
||||
{
|
||||
j = rand() % nb ; /* On prend 2 elements au hasard */
|
||||
k = rand() % nb ;
|
||||
l = ToBeMixed[j] ; /* Et on les permute ... */
|
||||
ToBeMixed[j] = ToBeMixed[k] ;
|
||||
ToBeMixed[k] = l ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
Nw = params->Param[0].s ;
|
||||
Nh = params->Param[1].s ;
|
||||
Entropy = params->Param[2].s ;
|
||||
|
||||
out->Raster.fd_w = in->Raster.fd_w ;
|
||||
out->Raster.fd_h = in->Raster.fd_h ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_STATUS status = ELDV_NOERROR ;
|
||||
long cancel, pc ;
|
||||
short *src_num = ToBeMixed ;
|
||||
short dst_num ;
|
||||
int xy[8] ;
|
||||
int x, y, w, h ;
|
||||
int nw, nh, mw, mh ;
|
||||
|
||||
if ( ToBeMixed == NULL ) return( ELDV_NOTENOUGHMEMORY ) ;
|
||||
|
||||
if ( VDIHandle == -1 ) VDIHandle = vdihandle() ;
|
||||
|
||||
cancel = 0 ;
|
||||
w = in->Raster.fd_w / Nw ;
|
||||
h = in->Raster.fd_h / Nh ;
|
||||
mw = in->Raster.fd_w % Nw ;
|
||||
if ( mw )
|
||||
{
|
||||
/* Les "restes" de bloc sont recopies tels quels */
|
||||
xy[0] = xy[4] = in->Raster.fd_w - mw - 1 ;
|
||||
xy[1] = xy[5] = 0 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
mh = in->Raster.fd_h % Nh ;
|
||||
if ( mh )
|
||||
{
|
||||
/* Les "restes" de bloc sont recopies tels quels */
|
||||
xy[0] = xy[4] = 0 ;
|
||||
xy[1] = xy[5] = in->Raster.fd_h - mh - 1 ;
|
||||
xy[2] = xy[6] = in->Raster.fd_w - 1 ;
|
||||
xy[3] = xy[7] = in->Raster.fd_h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
y = 0 ;
|
||||
for ( nh = 0; !cancel && ( nh < Nh ); nh++, y += h )
|
||||
{
|
||||
xy[1] = y ;
|
||||
xy[3] = y + h - 1 ;
|
||||
x = 0 ;
|
||||
for ( nw = 0; nw < Nw; nw++, x += w )
|
||||
{
|
||||
dst_num = *src_num++ ;
|
||||
xy[0] = x ;
|
||||
xy[2] = x + w - 1 ;
|
||||
xy[4] = ( dst_num % Nw ) * w ;
|
||||
xy[5] = ( dst_num / Nw ) * h ;
|
||||
xy[6] = xy[4] + w - 1 ;
|
||||
xy[7] = xy[5] + h - 1 ;
|
||||
vro_cpyfm( VDIHandle, S_ONLY, xy, &in->Raster, &out->Raster ) ;
|
||||
}
|
||||
pc = ( 100L * y ) / in->Raster.fd_h ;
|
||||
cancel = Vapi->PrSetProgEx( pc ) ;
|
||||
}
|
||||
|
||||
if ( cancel ) status = ELDV_CANCELLED ;
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
SetMixedArray( Nw, Nh, Entropy ) ;
|
||||
if ( ToBeMixed == NULL ) return( ELDV_NOTENOUGHMEMORY ) ;
|
||||
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
srand( 256 ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/puzzle/puzzle.ldv
Normal file
BIN
tools/vision/LDV/SRC/puzzle/puzzle.ldv
Normal file
Binary file not shown.
11
tools/vision/LDV/SRC/puzzle/puzzle.prj
Normal file
11
tools/vision/LDV/SRC/puzzle/puzzle.prj
Normal file
@@ -0,0 +1,11 @@
|
||||
PUZZLE.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
PUZZLE.C
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
128
tools/vision/LDV/SRC/rotate/ROTATE.C
Normal file
128
tools/vision/LDV/SRC/rotate/ROTATE.C
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Version PureC / Gcc
|
||||
*/
|
||||
|
||||
#define PCGEMLIB 1 /* mettre 1 si les utilisateurs de Pure C
|
||||
* utilise les librairies GEM Pure C */
|
||||
|
||||
/* Fichiers headers */
|
||||
|
||||
#include <portab.h>
|
||||
#if PCGEMLIB
|
||||
#include <aes.h>
|
||||
#include <vdi.h>
|
||||
#else
|
||||
#include <aesbind.h>
|
||||
#include <vdibind.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "..\..\ldg.h"
|
||||
#include "..\..\vapi.h"
|
||||
#include "..\..\ldv.h"
|
||||
#include "..\..\mt_aes.h"
|
||||
|
||||
/* Prototypages */
|
||||
LDV_INFOS* cdecl GetLDVCapabilities(VAPI *vapi) ;
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out) ;
|
||||
|
||||
void OnClose(void) ;
|
||||
|
||||
/* Variables globales */
|
||||
PROC Proc[] = {
|
||||
"GetLDVCapabilities", "Capacit<EFBFBD>s du LDV", (void *)GetLDVCapabilities,
|
||||
"PreRun", "Init du Run", (void *)PreRun,
|
||||
"Run", "Fonction du LDV", (void *)Run,
|
||||
"Preview", "Pre-Visu", (void *)Preview,
|
||||
} ;
|
||||
|
||||
char Info[] = "LDV";
|
||||
|
||||
LDGLIB Ldg[] = {
|
||||
0x0100, /* version de la lib, recommand<6E> */
|
||||
4, /* nombre de fonction dans la lib */
|
||||
Proc, /* Pointeurs vers nos fonctions */
|
||||
Info, /* Information sur la lib */
|
||||
0x0, /* Flags de la lib, obligatoire */
|
||||
NULL,
|
||||
};
|
||||
|
||||
#define BP_CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
#define TC_CAPS (LDVF_SPECFORMAT | LDVF_SUPPORTPREVIEW | LDVF_SUPPORTPROG | LDVF_REALTIMEPARAMS | LDVF_SUPPORTCANCEL | LDVF_NOSELECTION)
|
||||
|
||||
LDV_INFOS LdvInfos = {
|
||||
(short) sizeof(LDV_INFOS), /* Taille de cette structure */
|
||||
TLDV_MODIFYIMG, /* Type du LDV */
|
||||
"Jean Lusetti", /* Auteurs */
|
||||
{
|
||||
{ 1, 1, BP_CAPS }, /* Capacites pour 1 plan */
|
||||
{ 2, 2, BP_CAPS }, /* Capacites pour 2 plans */
|
||||
{ 4, 4, BP_CAPS }, /* Capacites pour 4 plans */
|
||||
{ 8, 8, BP_CAPS }, /* Capacites pour 8 plans */
|
||||
{ 16, 16, TC_CAPS }, /* Capacites pour 16 plans */
|
||||
{ 32, 32, TC_CAPS }, /* Capacites pour 32 plans */
|
||||
{ 0, 0, 0UL } /* Fin de la liste des capacites */
|
||||
},
|
||||
} ;
|
||||
|
||||
VAPI *Vapi = NULL ;
|
||||
|
||||
/* Petite macro de verification pour VAPI */
|
||||
#define CHECK_VAPI(vapi) if ( ( vapi == NULL ) || ( vapi->Header.Version < 0x0103 ) ) return( ELDV_BADVAPIVERSION ) ;
|
||||
|
||||
|
||||
/*
|
||||
* Fonctions de la librairie
|
||||
*/
|
||||
|
||||
LDV_INFOS* cdecl GetLDVCapabilities(VAPI *vapi)
|
||||
{
|
||||
Vapi = vapi ;
|
||||
|
||||
return( &LdvInfos ) ;
|
||||
}
|
||||
|
||||
#pragma warn -par
|
||||
LDV_STATUS cdecl PreRun(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
long angle ;
|
||||
|
||||
CHECK_VAPI( Vapi ) ;
|
||||
|
||||
angle = (long) params->Param[0].s ;
|
||||
Vapi->RaRasterRotateGetDstMFDB( &in->Raster, &out->Raster, angle ) ;
|
||||
|
||||
return( ELDV_NOERROR ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Run(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
LDV_STATUS status ;
|
||||
long angle ;
|
||||
|
||||
CHECK_VAPI( Vapi ) ;
|
||||
|
||||
angle = (long) params->Param[0].s ;
|
||||
status = Vapi->RaRasterRotate( &in->Raster, &out->Raster, angle, 0x03 ) ; /* 0x03 = 0x01 (progress) | 0x02 (cancel) */
|
||||
|
||||
return( status ) ;
|
||||
}
|
||||
|
||||
LDV_STATUS cdecl Preview(LDV_IMAGE *in, LDV_PARAMS *params, LDV_IMAGE *out)
|
||||
{
|
||||
return( Run( in, params, out ) ) ;
|
||||
}
|
||||
#pragma warn +par
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ldg_init( Ldg ) ;
|
||||
|
||||
return( 0 ) ;
|
||||
}
|
||||
BIN
tools/vision/LDV/SRC/rotate/ROTATE.LDV
Normal file
BIN
tools/vision/LDV/SRC/rotate/ROTATE.LDV
Normal file
Binary file not shown.
12
tools/vision/LDV/SRC/rotate/ROTATE.PRJ
Normal file
12
tools/vision/LDV/SRC/rotate/ROTATE.PRJ
Normal file
@@ -0,0 +1,12 @@
|
||||
ROTATE.LDV
|
||||
;.C[-Y- -G+]
|
||||
;.L[-Y-]
|
||||
=
|
||||
pcstart.o
|
||||
ROTATE.C
|
||||
pcgemlib.lib
|
||||
pcstdlib.lib
|
||||
pctoslib.lib
|
||||
pcfltlib.lib
|
||||
..\..\ldg.lib
|
||||
..\..\mt_aes.lib
|
||||
148
tools/vision/LDV/VAPI.H
Normal file
148
tools/vision/LDV/VAPI.H
Normal file
@@ -0,0 +1,148 @@
|
||||
#ifndef __VAPI
|
||||
#define __VAPI
|
||||
|
||||
#ifndef __VDI__
|
||||
#include <vdi.h>
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short Version ; /* 0x0100 for example */
|
||||
unsigned short StrSize ;
|
||||
|
||||
void *Global ; /* Global VISION array for AES, useful with MT_AES */
|
||||
|
||||
void cdecl (*GEMMessageLoop)(void *msg) ; /* Call this if your LDV uses AES and */
|
||||
/* you want VISION to handle some AES */
|
||||
/* messages (redraws for examples) */
|
||||
char RFU[116] ;
|
||||
}
|
||||
VAPI_HEADER ;
|
||||
|
||||
/* For RaTCxxRemapColors */
|
||||
#ifndef __RASTEROP /* Dont worry, it's for VISION's compile */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char *red ;
|
||||
unsigned char *green ;
|
||||
unsigned char *blue ;
|
||||
void *pt_img ;
|
||||
long nb_pts ;
|
||||
}
|
||||
REMAP_COLORS ;
|
||||
|
||||
/* Log levels for LoDoLog */
|
||||
/* Make sure they are in sync with logging.h */
|
||||
#define BIT(x) (1L << (x))
|
||||
/* Bit# 24 16 8 0 */
|
||||
/* |--------|--------|--------|--------| */
|
||||
/* | | | | | | |||||| ||----TMP1 */
|
||||
/* | | | | | | |||||| |-----TMP2 */
|
||||
/* | | | | | | ||||||-------KEYCODE */
|
||||
/* | | | | | | |||||--------DEBUG */
|
||||
/* | | | | | | ||||---------GW1 */
|
||||
/* | | | | | | |||----------GW2 */
|
||||
/* | | | | | | ||-----------MEM */
|
||||
/* | | | | | | |------------IMG */
|
||||
/* | | | | | |---------------PERF */
|
||||
/* | | | | |------------------INFO */
|
||||
/* | | | |---------------------WARNING */
|
||||
/* | | |------------------------ERROR */
|
||||
/* | |--------------------------FATAL */
|
||||
/* Bit# 22 17 12 8 5 2 */
|
||||
/* Bit# 20 15 3 0 */
|
||||
/* */
|
||||
#define LL_DISABLED 0x0
|
||||
#define LL_FATAL BIT(22)
|
||||
#define LL_ERROR BIT(20)
|
||||
#define LL_WARNING BIT(17)
|
||||
#define LL_INFO BIT(15)
|
||||
#define LL_PERF BIT(12)
|
||||
#define LL_IMG BIT(9)
|
||||
#define LL_MEM BIT(8)
|
||||
#define LL_GW2 BIT(7)
|
||||
#define LL_GW1 BIT(6)
|
||||
#define LL_DEBUG BIT(5)
|
||||
#define LL_KEYCODE BIT(4)
|
||||
#define LL_TMP2 BIT(3)
|
||||
#define LL_TMP1 BIT(2)
|
||||
|
||||
|
||||
#define LF_CLRLOGSONSTART 0x0001
|
||||
/* Little macro that increases a number to its first multiple of 16 */
|
||||
#define ALIGN16(x) ( ((x) & 0x0F) ? ((16+(x)) & 0xFFF0) : (x) )
|
||||
|
||||
#endif
|
||||
|
||||
/* For CoGetProcessors */
|
||||
#define CO_HAS_030 0x02
|
||||
#define CO_HAS_FPU 0x20
|
||||
#define CO_HAS_DSP 0x200
|
||||
|
||||
#ifndef __INI_H
|
||||
typedef void* HINI ;
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
VAPI_HEADER Header ;
|
||||
|
||||
/* Progress Interface */
|
||||
void cdecl (*PrSetProg)(long pc) ;
|
||||
void cdecl (*PrOptimize)(long mask) ;
|
||||
void cdecl (*PrSetText)(long no_line, char *text) ;
|
||||
long cdecl (*PrSetProgEx)(long pc) ;
|
||||
long PrRFU[8] ;
|
||||
|
||||
/* Raster Interface */
|
||||
void cdecl (*RaImgWhite)(MFDB *img) ;
|
||||
void cdecl (*RaTCConvert)(MFDB *img) ;
|
||||
void cdecl (*RaTCInvConvert)(MFDB *img) ;
|
||||
void cdecl (*RaInd2RasterInit)(MFDB *out, long width) ;
|
||||
void cdecl (*RaInd2Raster)(unsigned char *indexes, long nb_indexes) ;
|
||||
void cdecl (*RaRaster2Ind)(short *pt_raster, long nb_pts, long nplans, unsigned char *out) ;
|
||||
unsigned char* cdecl (*RaGetTOS2VDIArray)(long nplanes) ;
|
||||
unsigned char* cdecl (*RaGetVDI2TOSArray)(long nplanes) ;
|
||||
long cdecl (*RaIs15Bits)(void) ;
|
||||
unsigned long cdecl (*RaGetImgSize)(long width, long height, long nplanes) ;
|
||||
long cdecl (*RaRasterAlloc)(MFDB *raster) ;
|
||||
void cdecl (*RaRasterFree)(MFDB *raster) ;
|
||||
void cdecl (*RaTC15RemapColors)(REMAP_COLORS *rc) ;
|
||||
void cdecl (*RaTC16RemapColors)(REMAP_COLORS *rc) ;
|
||||
void cdecl (*RaTC32RemapColors)(REMAP_COLORS *rc) ;
|
||||
void cdecl (*RaRasterRotateGetDstMFDB)(MFDB *in, MFDB *out, long angle) ;
|
||||
long cdecl (*RaRasterRotate)(MFDB *in, MFDB *out, long angle, long flags) ;
|
||||
long RaRFU[42] ;
|
||||
|
||||
/* Config Interface */
|
||||
char* cdecl (*CoGetLDVPath)(void) ;
|
||||
char* cdecl (*CoGetCurrentLanguage)(void) ;
|
||||
unsigned long cdecl (*CoGetFunctionOptimizations)(void *function) ;
|
||||
unsigned long cdecl (*CoGetProcessors)(void) ;
|
||||
long CoRFU[18] ;
|
||||
|
||||
/* INI Interface */
|
||||
long cdecl (*InOpen)(char *file) ;
|
||||
long cdecl (*InClose)(HINI h_ini) ;
|
||||
long cdecl (*InSaveAndClose)(HINI h_ini, char *new_name) ;
|
||||
long cdecl (*InGetKey)(HINI h_ini, char *section, char *key, char *val_key) ;
|
||||
long cdecl (*InSetKey)(HINI h_ini, char *section, char *key, char *val_key) ;
|
||||
long cdecl (*InGetOrSetKey)(HINI h_ini, char *section, char *key, char *val_default_key) ;
|
||||
long cdecl (*InGetKeyFromFile)(char *file, char *section, char *key, char *val_key) ;
|
||||
long InRFU[19] ;
|
||||
|
||||
/* MEM Interface */
|
||||
void cdecl (*MeSCopyMemory8)(void *dst, void *src, unsigned long nb_elems_dst, unsigned long nb_elems_src) ;
|
||||
void cdecl (*MeSCopyMemory16)(void *dst, void *src, unsigned long nb_elems_dst, unsigned long nb_elems_src) ;
|
||||
void cdecl (*MeSCopyMemory32)(void *dst, void *src, unsigned long nb_elems_dst, unsigned long nb_elems_src) ;
|
||||
long MeRFU[30] ;
|
||||
|
||||
/* Logging Interface */
|
||||
long cdecl (*LoDoLog)(unsigned long level, char* format, ...) ;
|
||||
unsigned long cdecl (*LoGetLogLevel)(void) ;
|
||||
long LoRFU[8] ;
|
||||
|
||||
/* More interfaces to come ! */
|
||||
}
|
||||
VAPI ;
|
||||
|
||||
#endif
|
||||
36
tools/vision/LDV/XWAVE.INI
Normal file
36
tools/vision/LDV/XWAVE.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = X-Wave
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Sinus Wave on X-Axis
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV generates sinus waves on the X-Axis
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Amplitude
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Frequency
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 40
|
||||
MaxValue = 1000
|
||||
BIN
tools/vision/LDV/XWAVE.LDV
Normal file
BIN
tools/vision/LDV/XWAVE.LDV
Normal file
Binary file not shown.
36
tools/vision/LDV/YPERSC.INI
Normal file
36
tools/vision/LDV/YPERSC.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Y-Perspective
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Perspective on Y axis
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV generates perspective on Y-Axis
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Y-Angle
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 0
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Depth
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
BIN
tools/vision/LDV/YPERSC.LDV
Normal file
BIN
tools/vision/LDV/YPERSC.LDV
Normal file
Binary file not shown.
36
tools/vision/LDV/YWAVE.INI
Normal file
36
tools/vision/LDV/YWAVE.INI
Normal file
@@ -0,0 +1,36 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Y-Wave
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Sinus Wave on Y-Axis
|
||||
; Description should not exceed 79 caracters
|
||||
Description = This LDV generates sinus waves on the Y-Axis
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Amplitude
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 50
|
||||
MaxValue = 1000
|
||||
|
||||
[Parameter2]
|
||||
Name = Frequency
|
||||
Type = 1
|
||||
MinValue = 1
|
||||
DefaultValue = 40
|
||||
MaxValue = 1000
|
||||
BIN
tools/vision/LDV/YWAVE.LDV
Normal file
BIN
tools/vision/LDV/YWAVE.LDV
Normal file
Binary file not shown.
51
tools/vision/LDV/bhole.ini
Normal file
51
tools/vision/LDV/bhole.ini
Normal file
@@ -0,0 +1,51 @@
|
||||
; This is a basic INI file used
|
||||
; To setup a language for a LDV
|
||||
; Module for VISION 4.0 or older
|
||||
; For example, if your module is
|
||||
; Named SOGOOD.LDV, you should create
|
||||
; SOGOOD.INI (default file, this may be the English version) in LDV folder
|
||||
; SOGOOD.INI in the FRANCAIS folder for the French version
|
||||
; SOGOOD.INI in the ENGLISH folder for the English version
|
||||
; SOGOOD.INI in the SVENSKA folder for the Swedish version
|
||||
; ... and so on ...
|
||||
; Now you just have to fill in the ShortName, LongName and Description fields
|
||||
; Note that VISION will search for the INI file associated to the LDV file
|
||||
; In the folder defined by the language setup (same as in LANGUES folder)
|
||||
|
||||
[Informations]
|
||||
; ShortName should not exceed 15 caracters
|
||||
ShortName = Black Hole
|
||||
; LongName should not exceed 31 caracters
|
||||
LongName = Black Hole on image!
|
||||
; Description should not exceed 79 caracters
|
||||
Description = Tribute to Stephen Hawking
|
||||
|
||||
; This section is only meant for bhole.ldv
|
||||
; It controls symetry usage for black hole computations
|
||||
; It should be faster to use symetry property but for
|
||||
; Some reason, this is slower on Aranym, no idea why
|
||||
; So on Aranym, better have 0 here
|
||||
[Private]
|
||||
UseSym=1
|
||||
|
||||
; Here comes the language parameters dependencies
|
||||
[Parameter1]
|
||||
Name = Rotation speed
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 10
|
||||
MaxValue = 500
|
||||
|
||||
[Parameter2]
|
||||
Name = X-Center (%)
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
|
||||
[Parameter3]
|
||||
Name = Y-Center (%)
|
||||
Type = 1
|
||||
MinValue = 0
|
||||
DefaultValue = 50
|
||||
MaxValue = 100
|
||||
BIN
tools/vision/LDV/bhole.ldv
Normal file
BIN
tools/vision/LDV/bhole.ldv
Normal file
Binary file not shown.
329
tools/vision/LDV/doc/defines.htm
Normal file
329
tools/vision/LDV/doc/defines.htm
Normal file
@@ -0,0 +1,329 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (LDV) : Defines</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="descrip.htm"><img
|
||||
src="images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="struct.htm"><img
|
||||
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->24/07/01<!--webbot
|
||||
bot="Timestamp" i-checksum="12454" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>4.
|
||||
D E F I N E S</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a name="LDV_STATUS"></a><font size="4"><strong>4.1 Type de
|
||||
code de retour</strong></font></p>
|
||||
|
||||
<p><font size="4"><strong>typedef long LDV_STATUS</strong></font></p>
|
||||
|
||||
<p><font size="3">Le type de code de retour des fonctions LDV est
|
||||
un entier 32 bits. Pourquoi ? Tout d'abord parce que certains
|
||||
compilateurs (GCC par exemple) retournent un entier 32 bits m<>me
|
||||
si on sp<73>cifie une entier 16 bits (short). Ensuite, cela permet
|
||||
de pr<70>voir une extension du code de retour, pour une <20>volution
|
||||
future, dans les bits restant.</font></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="ELDV"></a><font size="4"><strong>4.2 Codes de retour</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_NOERROR</td>
|
||||
<td width="75%">Pas d'erreur. La fonction a fonctionn<6E>
|
||||
correctement</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_INVALIDPARAMETER</td>
|
||||
<td width="75%">Au moins un des param<61>tres est invalide</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_NBPLANESNOTSUPPORTED</td>
|
||||
<td width="75%">La fonction ne supporte pas le nombre de
|
||||
plans pass<73> en param<61>tre</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_NOTENOUGHMEMORY</td>
|
||||
<td>M<EFBFBD>moire insuffisante</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_PREVIEWNOTSUPPORTED</td>
|
||||
<td>La fonction Preview n'est pas d<>finie (pointe sur
|
||||
NULL)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_RUNNOTSUPPORTED</td>
|
||||
<td>La fonction Run n'est pas d<>finie (pointe sur NULL).
|
||||
Je me demande bien qui serait suffisamment naze pour
|
||||
<20>crire un LDV ne faisant rien !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_BADVAPIVERSION</td>
|
||||
<td>La version de <a href="vapi/index.htm#Pr<50>sentation">VAPI</a>
|
||||
disponible ne permet pas d'utiliser le LDV (il manque
|
||||
certaines fonctions ou interfaces)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_IMGFORMATMISMATCH</td>
|
||||
<td>Les formats d'images g<>r<EFBFBD>s par le LDV ne permettent
|
||||
pas <20> <em><strong>VISION</strong></em> de fournir une
|
||||
image compatible avec un des formats attendus. Cela est
|
||||
<20> priori une erreur du LDV.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_CANCELLED</td>
|
||||
<td>L'op<6F>ration en cours a <20>t<EFBFBD> annul<75>e par
|
||||
l'utilisateur</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_GENERALFAILURE</td>
|
||||
<td>Echec g<>n<EFBFBD>ral, raison non pr<70>cis<69>e</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p>Ces codes peuvent <20>tre renvoy<6F>s par les fonctions du LDV ou
|
||||
par <em><strong>VISION</strong></em> vers l'utilisateur afin
|
||||
d'afficher le message d'erreur correspondant. Pensez aussi <20>
|
||||
utiliser la macro LDV_SUCCESS qui vous indique si le code pass<73>
|
||||
en param<61>tre correspond <20> un succes ou une erreur.</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="TLDV"></a><font size="4"><strong>4.3 Types de modules</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_MODIFYIMG</td>
|
||||
<td width="75%">Module modificateur d'image. Peut
|
||||
<20>galement servir <20> initialiser une image en <20>crasant
|
||||
compl<70>tement son contenu afin d'en g<>n<EFBFBD>rer une
|
||||
nouvelle, sans prendre en compte les donn<6E>es actuelles.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_LOADIMG</td>
|
||||
<td width="75%">Module de chargement d'image. <em><strong>VISION</strong></em>
|
||||
ne le g<>re pas encore</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_SAVEIMG</td>
|
||||
<td width="75%">Module de sauvegarde d'image. <em><strong>VISION</strong></em>
|
||||
ne le g<>re pas encore</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDVF"></a><font size="4"><strong>4.4 Informations sur
|
||||
les capacit<69>s</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">LDVF_STDFORMAT</td>
|
||||
<td width="75%">Le LDV accepte le format image standard
|
||||
d<>fini par ATARI (bit-plans <20> la suite les uns des
|
||||
autres). Ce format n'est pas valable en True Color.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">LDVF_ATARIFORMAT</td>
|
||||
<td width="75%">Le LDV accepte le format ATARI (bit-plans
|
||||
entrelac<61>s (ST), modes True Color du Falcon)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SPECFORMAT</td>
|
||||
<td>Le LDV accepte le format sp<73>cifique de la carte
|
||||
graphique</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SUPPORTPREVIEW</td>
|
||||
<td>Le LDV fournit la fonction Preview (fortement
|
||||
conseill<6C> m<>me si elle appelle Run)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_AFFECTPALETTE</td>
|
||||
<td>Le LDV modifie la palette (modes bit-plans
|
||||
uniquement). En ce cas, l'op<6F>ration sur la palette doit
|
||||
toujours se faire "sur place". <em><strong>VISION</strong></em>
|
||||
sauvegardera syst<73>matiquement la palette de l'image dans
|
||||
le tampon undo.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SUPPORTPROG</td>
|
||||
<td>Le LDV appellera la fonction <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> de l'interface
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a>
|
||||
(conseill<6C> si le traitement dure plus de 2 secondes).
|
||||
Avant d'appeler <a href="descrip.htm#run">Run</a>, <em><strong>VISION</strong></em>
|
||||
affichera une fen<65>tre de progression pour le LDV et la
|
||||
fera disparaitre ensuite. En appelant <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> de l'interface
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a>, le LDV
|
||||
pourra informer l'utilisateur de la progression du
|
||||
traitement.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_OPINPLACE</td>
|
||||
<td>Le LDV sait travailler sur l'image source, sans que <em><strong>VISION</strong></em>
|
||||
alloue la destination (on dit que la transformation se
|
||||
fait sur place). En ce cas, le param<61>tre out de la
|
||||
fonction <a href="descrip.htm#run">Run</a> est le m<>me
|
||||
que in. Dans la mesure du possible, utilisez ce flag,
|
||||
cela <20>conomise de la m<>moire. La pr<70>sence de ce flag
|
||||
impose <20>videmment que le LDV ne modifie pas la taille de
|
||||
l'image.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_REALTIMEPARAMS</td>
|
||||
<td>Le LDV effectue assez rapidement la fonction <a
|
||||
href="descrip.htm#run">Run</a> en mode Preview (image
|
||||
petite affich<63>e par la boite de dialogue de <em><strong>VISION</strong></em>),
|
||||
pour que la modification des param<61>tres du LDV par les
|
||||
ascenseurs soit suffisamment fluide (au moins 1 image par
|
||||
seconde). En ce cas, <em><strong>VISION</strong></em>
|
||||
appelera la fonction Preview lorsque l'utilisateur agira
|
||||
sur un ascenseur de contr<74>le de param<61>tre, sans que
|
||||
celui-ci soit oblig<69> d'appuyer sur le bouton
|
||||
"Pr<EFBFBD>-Viualisation"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SUPPORTCANCEL</td>
|
||||
<td>La fonction <a href="descrip.htm#run">Run</a> peut
|
||||
<20>tre annul<75>e en cours d'ex<65>cution. <em><strong>VISION</strong></em>
|
||||
permet alors <20> la fen<65>tre de progression d'<27>tre
|
||||
ferm<72>e par le bouton de fermeture de fen<65>tre GEM
|
||||
(CLOSER) et par Control-C. D<>s que le LDV supporte la
|
||||
progression, je vous conseille d'ajouter (et de g<>rer
|
||||
..) ce flag, c'est bien utile et <a
|
||||
href="descrip.htm#run">pas compliqu<71> <20> impl<70>menter</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p align="center">LDVF_NOSELECTION</p>
|
||||
</td>
|
||||
<td>Ce LDV ne peut pas travailler sur un bloc <20>
|
||||
l'int<6E>rieur de l'image (s<>lection). En ce cas, <em><strong>VISION</strong></em>
|
||||
invalide la possibilit<69> de sp<73>cifier la s<>lection lors
|
||||
de l'application du LDV.<br>
|
||||
Remarque : depuis la version 4.0e, <em><strong>VISION</strong></em>
|
||||
cr<63>e une image "bloc" faisant ainsi croire au
|
||||
LDV qu'il travaille sur un bloc. <em><strong>VISION</strong></em>
|
||||
replace ensuite le bloc modifi<66> dans l'image d'origine
|
||||
sans que le LDV ait <20> se pr<70>occuper des sp<73>cificit<69>s
|
||||
du travail sur un bloc. En bref, si vous ne voulez pas
|
||||
vous emb<6D>ter <20> g<>rer le travail sur un bloc,
|
||||
positionnez ce flag, <em><strong>VISION</strong></em> se
|
||||
charge de tout !</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p><font size="3">Ces flags sont <20> combiner avec le "ou
|
||||
logique" (|).</font></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="descrip.htm"><img
|
||||
src="images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="struct.htm"><img
|
||||
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->24/07/01<!--webbot
|
||||
bot="Timestamp" i-checksum="12454" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>D
|
||||
E F I N E S</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
523
tools/vision/LDV/doc/descrip.htm
Normal file
523
tools/vision/LDV/doc/descrip.htm
Normal file
@@ -0,0 +1,523 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (LDV) : Description</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="notions.htm"><img
|
||||
src="images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="defines.htm"><img
|
||||
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->06/05/01<!--webbot
|
||||
bot="Timestamp" i-checksum="12424" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||||
D E S C R I P T I O N</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Pour r<>sumer, voici ce qui se passe entre <em><strong>VISION</strong></em>
|
||||
et un LDV :</p>
|
||||
|
||||
<p>0. Init (fait une seule fois au premier appel de l'utilisateur
|
||||
mettant en oeuvre les LDV). <em><strong>VISION</strong></em>
|
||||
charge la fonction <a href="#capacit<69>s">GetLDVCapabilities</a>
|
||||
de chaque LDV, appelle la fonction et m<>morise les capacit<69>s de
|
||||
chaque LDV afin de limiter les futurs acc<63>s disque, puis
|
||||
d<EFBFBD>charge chaque LDV</p>
|
||||
|
||||
<p>1. <em><strong>VISION</strong></em> charge le LDV</p>
|
||||
|
||||
<p>2. Si sp<73>cifi<66>e, <em><strong>VISION</strong></em> appelle la
|
||||
fonction GetParams</p>
|
||||
|
||||
<p>3. <em><strong>VISION</strong></em> appelle la fonction PreRun</p>
|
||||
|
||||
<p>4. <em><strong>VISION</strong></em> appelle la fonction Run
|
||||
(ou Preview)</p>
|
||||
|
||||
<p>5. <em><strong>VISION</strong></em> d<>charge le LDV</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="capacit<69>s"></a><font size="4"><strong>3.1 Capacit<69>s
|
||||
du LDV</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="struct.htm#LDV_INFOS">LDV_INFOS</a>
|
||||
* cdecl GetLDVCapabilities(<a href="vapi/struct.htm#VAPI">VAPI</a>
|
||||
*vapi)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN] </strong>vapi : pointeur sur
|
||||
l'interface <a href="vapi/index.htm#Pr<50>sentation">VAPI</a>
|
||||
fournie par <em><strong>VISION</strong></em>. Ce pointeur
|
||||
doit <20>tre m<>moris<69> pour un usage futur.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Un pointeur sur la structure <a
|
||||
href="struct.htm#LDV_INFOS">LDV_INFOS</a> stock<63>e dans
|
||||
le LDV (le squelette d<>clare la variable LdvInfos de
|
||||
type <a href="struct.htm#LDV_INFOS">LDV_INFOS</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsabilit<EFBFBD>s</strong></td>
|
||||
<td width="85%">Cette fonction est enti<74>rement ecrie
|
||||
dans le squelette, le travail <20> faire r<>side dans le
|
||||
remplissage de la structure de type <a
|
||||
href="struct.htm#LDV_INFOS">LDV_INFOS</a> du squelette
|
||||
LDV.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="prerun"></a><font size="4"><strong>3.2 Fonction
|
||||
PreRun</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl PreRun(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in : pointeur sur
|
||||
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
d<>crivant l'image de <em><strong>VISION<br>
|
||||
</strong></em><strong>[IN / OUT]</strong> params :
|
||||
pointeur sur une structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a> indiquant la
|
||||
zone <20> modifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">Un code de
|
||||
succ<63>s ou d'erreur</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsabilit<EFBFBD>s</strong></td>
|
||||
<td width="85%">Doit signaler <20> <em><strong>VISION</strong></em>
|
||||
la m<>moire <20> allouer et la partie <20> sauvegarder pour
|
||||
la fonction UNDO :<ol>
|
||||
<li>Si le LDV en a besoin (<a href="defines.htm#LDVF">LDVF_OPINPLACE</a>
|
||||
non d<>fini dans la structure <a
|
||||
href="struct.htm#LDV_CAPS">LDV_CAPS</a>),
|
||||
out->Raster.fd_w et out->Raster.fd_h
|
||||
doivent contenir la taille de l'image <20> allouer
|
||||
pour la destination. C'est cette image qui sera
|
||||
ensuite affich<63>e par <em><strong>VISION</strong></em>
|
||||
dans la fen<65>tre associ<63>e.</li>
|
||||
<li>Au besoin, indiquer dans les champs x1, x2, y1 et
|
||||
y2 de la structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>, la
|
||||
zone <20> sauvegarde dans le buffer UNDO de l'image
|
||||
afin de pouvoir revenir en arri<72>re. Avant
|
||||
l'appel, <em><strong>VISION</strong></em>
|
||||
positionne ces champs en fonction de la
|
||||
s<>lection de l'utilisateur (bloc ou image
|
||||
enti<74>re)</li>
|
||||
</ol>
|
||||
<p>Par d<>faut :</p>
|
||||
<ol>
|
||||
<li><em><strong>VISION</strong></em> n'allouera
|
||||
aucune m<>moire pour le LDV et supposera que la
|
||||
transformation se fera "sur place"</li>
|
||||
<li><em><strong>VISION</strong></em> sauvegardera
|
||||
dans le buffer UNDO la partie pr<70>cis<69>e par
|
||||
champs x1, x2, y1 et y2 de la structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
(image enti<74>re ou s<>lection si un bloc est
|
||||
s<>lectionn<6E>)</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="run"></a><font size="4"><strong>3.3 Fonction Run</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl Run(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in : pointeur sur
|
||||
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
d<>crivant l'image source de <em><strong>VISION<br>
|
||||
</strong></em><strong>[IN]</strong> params : pointeur sur
|
||||
une structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
indiquant la zone <20> modifier<br>
|
||||
<strong>[OUT]</strong> out : pointeur sur l'image
|
||||
destination, allou<6F>e par <em><strong>VISION</strong></em>
|
||||
gr<67>ce <20> un appel pr<70>c<EFBFBD>dent <20> PreRun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">Un code de
|
||||
succ<63>s ou d'erreur</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsabilit<EFBFBD>s / Remarques</strong></td>
|
||||
<td width="85%">Doit effectuer l'op<6F>ration pr<70>vue pour
|
||||
le LDV.<br>
|
||||
<em><strong>VISION</strong></em> choisit automatiquement
|
||||
le format le plus adapt<70> en essayant de minimiser la
|
||||
m<>moire et en tenant compte du ou des formats g<>r<EFBFBD>s
|
||||
par le LDV (sachant que le plus <20>conome est <a
|
||||
href="defines.htm#LDVF">LDVF_SPECFORMAT</a>)<br>
|
||||
Le LDV peut modifier une autre zone que celle donn<6E>e
|
||||
dans les champs x1, y1, x2 et y2 de params <20> condition
|
||||
de l'avoir signal<61> auparavant par la fonction PreRun<br>
|
||||
Ne <strong><u>JAMAIS</u></strong> allouer dans le LDV de
|
||||
la m<>moire <20> destination de <em><strong>VISION</strong></em>,
|
||||
car celle-ci sera lib<69>r<EFBFBD>e d<>s que <em><strong>VISION</strong></em>
|
||||
d<>chargera le LDV (m<>me si vous ne le faites pas
|
||||
explicitement, le compilateur ou le syst<73>me s'en
|
||||
chargera).Par contre, rien ne vous interdit d'allouer de
|
||||
la m<>moire <20> usage interne pour effectuer cette
|
||||
fonction, n'oubliez pas de la lib<69>rer !<br>
|
||||
Depuis la version 1.02 de <a
|
||||
href="vapi/index.htm#Pr<50>sentation">VAPI</a>, on peut
|
||||
maintenant annuler le traitement en cours depuis
|
||||
l'interface utilisateur (il suffit de fermer la fen<65>tre
|
||||
de progression ou d'appuyer sur Control-C), pour cela :<br>
|
||||
* Ajouter <a href="defines.htm#LDVF">LDVF_SUPPORTCANCEL</a>
|
||||
dans le champ Flags de la structure <a
|
||||
href="struct.htm#LDV_CAPS">LDV_CAPS</a> pr<70>sente dans la
|
||||
variable LdvInfos du LDV<br>
|
||||
* Tester la valeur renvoy<6F>e par la fonction <a
|
||||
href="vapi/pr.htm#PrSetProgEx">PrSetProgEx</a>, si elle
|
||||
est non nulle, l'annulation est demand<6E>e<br>
|
||||
* Sortir du traitement du LDV (ne pas oublier de lib<69>rer
|
||||
l'<27>ventuelle m<>moire allou<6F>e en interne)<br>
|
||||
* Sortir de la fonction Run en renvoyant <a
|
||||
href="defines.htm#ELDV">ELDV_CANCELLED</a><br>
|
||||
Notes :<br>
|
||||
D<>s que la fonction <a href="vapi/pr.htm#PrSetProgEx">PrSetProgEx</a>
|
||||
a retourn<72> une valeur non nulle, la fen<65>tre de
|
||||
progression est d<>truite, la demande d'annulation n'est
|
||||
donc pas seulement une demande mais une obligation !<br>
|
||||
Ne vous souciez pas de la lib<69>ration de l'image
|
||||
destination ou de restaurer l'image source, <em><strong>VISION</strong></em>
|
||||
g<>re cela au travers du Undo.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="preview"></a><font size="4"><strong>3.4 Fonction
|
||||
Preview</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl Preview(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%">Identiques <20> ceux de la fonction <a
|
||||
href="#run">Run</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">Un code de
|
||||
succ<63>s ou d'erreur</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsabilit<EFBFBD>s / Remarques</strong></td>
|
||||
<td width="85%">Cette fonction est identique <20> la
|
||||
fonction <a href="#run">Run</a>, sauf qu'elle op<6F>re sur
|
||||
des images plus petites (112 x 112 en moyenne). Si la
|
||||
fonction <a href="#run">Run</a> est suffisamment rapide
|
||||
pour afficher le r<>sultat en moins de 1 seconde, la
|
||||
fonction Preview devrait simplement l'appeler. Dans le
|
||||
cas contraire, on peut se permettre certaines
|
||||
approximations ou pr<70>-calculs pour revenir en de<64>a de
|
||||
la seconde.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="getparams"></a><font size="4"><strong>3.5 Fonction
|
||||
GetParams</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl GetParams(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*img, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, char *path)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> img : pointeur sur
|
||||
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
d<>crivant l'image source de <em><strong>VISION<br>
|
||||
</strong></em><strong>[IN]</strong> params : pointeur sur
|
||||
une structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
indiquant la zone <20> modifier<br>
|
||||
<strong>[IN]</strong> path: chemin de chargement du LDV</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">ELDV_NOERROR</a>
|
||||
ou <a href="defines.htm#ELDV">ELDV_CANCELLED</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsabilit<EFBFBD>s / Remarques</strong></td>
|
||||
<td width="85%">Cette fonction est <strong><u>optionnelle</u></strong>.
|
||||
Si votre LDV l'exporte, <em><strong>VISION</strong></em>
|
||||
l'appellera en lieu et place de sa fonction interne de
|
||||
saisie des param<61>tres.<br>
|
||||
Si <a href="defines.htm#ELDV">ELDV_NOERROR</a> est
|
||||
renvoy<6F>, <em><strong>VISION</strong></em> appellera
|
||||
ensuite la fonction <a href="#run">Run</a><br>
|
||||
Si <a href="defines.htm#ELDV">ELDV_CANCELLED</a> est
|
||||
renvoy<6F>, la saisie est annul<75>e (comme si vous aviez
|
||||
annul<75> la saisie au travers du formulaire standard
|
||||
propos<6F> par <em><strong>VISION</strong></em>).<br>
|
||||
Le param<61>tre params devient transparent pour <em><strong>VISION</strong></em>,
|
||||
il sera renvoy<6F> sans changement lors de l'appel <20> la
|
||||
fonction <a href="#run">Run</a>. Votre LDV peut s'en
|
||||
servir pour stocker ses param<61>tres ou peut choisir de
|
||||
les m<>moriser en interne.<br>
|
||||
path permet de r<>cup<75>rer le fichier INI associ<63> pour
|
||||
la description multi-langue des param<61>tres. Vous pouvez
|
||||
au choix utiliser un fichier INI (ou tout autre, c'est
|
||||
maintenant vous qui <20>tes ma<6D>tre). Si vous voulez g<>rer
|
||||
la description multi-langues, n'oubliez pas de scruter
|
||||
les r<>pertoires de langues <20> partir de path.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="fichier ini"></a><font size="4"><strong>3.6 Le
|
||||
fichier INI associ<63></strong></font></p>
|
||||
|
||||
<p><font size="3">Le fichier INI associ<63> <20> un LDV a deux buts:</font></p>
|
||||
|
||||
<ol>
|
||||
<li><font size="3">Rassembler toutes les informations
|
||||
relatives <20> la langue comme son nom et sa description</font></li>
|
||||
<li><font size="3">D<EFBFBD>finir le param<61>trage du LDV</font></li>
|
||||
</ol>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="langues"></a><font size="4"><strong>3.6.1
|
||||
Informations sur la langue</strong></font></p>
|
||||
|
||||
<p><font size="3">Les LDV sont multi-langues, c'est <20> dire que
|
||||
si vous avez d<>fini une langue dans les pr<70>f<EFBFBD>rences, <em><strong>VISION</strong></em>
|
||||
est capable d'exploiter cette information <20>galement pour les
|
||||
LDV, si l'information est disponible. Dans le r<>pertoire LDV de <em><strong>VISION</strong></em>,
|
||||
on trouve les .LDV ainsi que les .INI associ<63>s. Par exemple, le
|
||||
fichier INVERT.INI est associ<63> au fichier INVERT.LDV.Dans ce
|
||||
dossier LDV, doivent figurer les .INI les plus standards, c'est
|
||||
<EFBFBD> dire en langue anglaise. Si par exemple, vous avez d<>fini la
|
||||
langue "Fran<EFBFBD>ais" dans les pr<70>f<EFBFBD>rences de <em><strong>VISION</strong></em>,
|
||||
il suffit de cr<63>er le sous-r<>pertoire "Fran<EFBFBD>ais"
|
||||
dans le dossier LDV, et d'y inclure le fichier INVERT.INI traduit
|
||||
en fran<61>ais pour que <em><strong>VISION</strong></em> aille le
|
||||
chercher <20> la place de son <20>quivalent directement sous le
|
||||
r<EFBFBD>pertoire LDV.</font></p>
|
||||
|
||||
<p><font size="3">Dans la section [Informations], <em><strong>VISION</strong></em>
|
||||
attend les cl<63>s suivantes:</font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong>Nom de la cl<63></strong></td>
|
||||
<td align="center" width="10%"><strong>Taille</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">ShortName</font></td>
|
||||
<td align="center" width="10%">15 caract<63>res max.</td>
|
||||
<td width="75%">Nom court du module apparaissant dans la
|
||||
liste des modules <20> s<>lectionner</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">LongName</font></td>
|
||||
<td align="center" width="10%">31 caract<63>res max.</td>
|
||||
<td width="75%">Nom apparaissant lorsque on demande des
|
||||
d<>tails sur ce LDV</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Description</font></td>
|
||||
<td align="center" width="10%">79 caract<63>res max.</td>
|
||||
<td width="75%">Description compl<70>te du module sur 3
|
||||
lignes</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="parametrage"></a><font size="4"><strong>3.6.2
|
||||
Param<EFBFBD>trage du LDV</strong></font></p>
|
||||
|
||||
<p><font size="3"><em><strong>VISION</strong></em> permet la
|
||||
saisie de jusqu'<27> 4 param<61>tres pour un LDV. Ces param<61>tres
|
||||
sont saisis <20> l'aide d'ascenseurs GEM apparaissant ou non
|
||||
suivant le nombre de param<61>tres que le LDV accepte en entr<74>e.<br>
|
||||
Pour que <em><strong>VISION</strong></em> accepte d'afficher un
|
||||
param<EFBFBD>tre,une section nomm<6D>e [ParameterN] (1 <= N <= 4)
|
||||
doit <20>tre cr<63>ee avec les cl<63>s suivantes:</font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong>Nom de la cl<63></strong></td>
|
||||
<td align="center" width="85%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Name</font></td>
|
||||
<td width="85%">Nom de ce param<61>tre (15 caract<63>res
|
||||
max.). Si le nom est absent, ce param<61>tre n'apparaitra
|
||||
pas</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Type</font></td>
|
||||
<td width="85%">1 : entier 16 bits (-32768 --> +32767)<br>
|
||||
2 : float (non g<>r<EFBFBD> actuellement)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">MinValue</font></td>
|
||||
<td width="85%">Valeur minimale admissible pour ce
|
||||
param<61>tre</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">DefautValue</td>
|
||||
<td>Valeur par d<>faut pr<70>sent<6E> avec l'interface de <em><strong>VISION</strong></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">MaxValue</td>
|
||||
<td>Valeur maximale admissible pour ce param<61>tre</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p>Si cela ne peut convenir au LDV que vous d<>veloppez, vous
|
||||
pouvez sp<73>cifier une fonction de saisie sp<73>cifique avec la
|
||||
fonction <a href="#getparams">GetParams</a>.</p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="notions.htm"><img
|
||||
src="images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="defines.htm"><img
|
||||
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->06/05/01<!--webbot
|
||||
bot="Timestamp" i-checksum="12424" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||||
D E S C R I P T I O N</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
290
tools/vision/LDV/doc/english/defines.htm
Normal file
290
tools/vision/LDV/doc/english/defines.htm
Normal file
@@ -0,0 +1,290 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Defines</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="descrip.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="struct.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>4.
|
||||
D E F I N E S</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a name="LDV_STATUS"></a><font size="4"><strong>4.1 Type of return codes
|
||||
</strong></font></p>
|
||||
|
||||
<p><font size="4"><strong>typedef long LDV_STATUS</strong></font></p>
|
||||
|
||||
<p><font size="3">The type of LDV functions return code is a 32 bits
|
||||
integer. Why? First, because some compilers (e.g., GCC) return a 32 bits
|
||||
integer even when specifying a 16 bits integer (short). Secondly, this
|
||||
allows for future extensions of the return code in the remaining bits.
|
||||
</font></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="ELDV"></a><font size="4"><strong>4.2 Return codes</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_NOERROR</td>
|
||||
<td width="75%">No error. The function worked correctly
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_INVALIDPARAMETER</td>
|
||||
<td width="75%">At least one of the parameters is not valid</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">ELDV_NBPLANESNOTSUPPORTED</td>
|
||||
<td width="75%">The function does not support the number of planes
|
||||
passed in parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_NOTENOUGHMEMORY</td>
|
||||
<td>Not enough memory</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_PREVIEWNOTSUPPORTED</td>
|
||||
<td>The Preview function is not defined (points to
|
||||
NULL)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_RUNNOTSUPPORTED</td>
|
||||
<td>The Run function is not defined (points to NULL
|
||||
I wonder who would be dumb enough to write an LDV that does
|
||||
nothing!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_BADVAPIVERSION</td>
|
||||
<td>The available version of <a href="vapi/index.htm#Pr<50>sentation">VAPI</a>
|
||||
does not allow to use the LDV (some functions or interfaces
|
||||
are missing)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_IMGFORMATMISMATCH</td>
|
||||
<td>The image formats handled by the LDV do not allow VISION to
|
||||
provide an image compatible with one of the expected formats.
|
||||
Normally, the error comes from the LDV.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">ELDV_GENERALFAILURE</td>
|
||||
<td>General failure, reason not specified.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p>These codes can be sent back by LDV functions or by
|
||||
<em><strong>VISION</strong></em> to the user to display the corresponding
|
||||
error messsage. Think also to use the LDV_SUCCESS macro which indicates
|
||||
whether the code passed as a parameter is a success or an error.
|
||||
</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="TLDV"></a><font size="4"><strong>4.3 Module types</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_MODIFYIMG</td>
|
||||
<td width="75%">Image modifier module. Can also be used to
|
||||
initialise an image by overwriting completely its content, without
|
||||
taking into account the current data.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_LOADIMG</td>
|
||||
<td width="75%">Image loader module.
|
||||
<em><strong>VISION</strong></em>
|
||||
does not handle it yet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">TLDV_SAVEIMG</td>
|
||||
<td width="75%">Image saving module. <em><strong>VISION</strong></em>
|
||||
does not handle it yet</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDVF"></a><font size="4"><strong>4.4 Information on possibilities</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Define</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">LDVF_STDFORMAT</td>
|
||||
<td width="75%">The LDV accepts the standard image format as
|
||||
defined by ATARI (bitplanes one after the others). This format is
|
||||
not available in True Color.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">LDVF_ATARIFORMAT</td>
|
||||
<td width="75%">The LDV accept ATARI format (interlaced bitplanes
|
||||
(ST), Falcon True Color mode)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SPECFORMAT</td>
|
||||
<td>The LDV accepts the specific format of the graphic card</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SUPPORTPREVIEW</td>
|
||||
<td>The LDV provides a Preview function (highly recommanded, even
|
||||
if it calls Run)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_AFFECTPALETTE</td>
|
||||
<td>The LDV modifies the palette (bitplanes modes only). In this
|
||||
case, operation on palette must always be done "in
|
||||
place". <em><strong>VISION</strong></em> will systematically
|
||||
save the palette of the image in the Undo buffer.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_SUPPORTPROG</td>
|
||||
<td>The LDV will call function <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> of the
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a> interface
|
||||
(recommanded is the process takes more than 2 secondes).
|
||||
Before calling <a href="descrip.htm#run">Run</a>, <em><strong>VISION</strong></em>
|
||||
will display a progess bar for the LDV and will make it disapear
|
||||
afterwards. By calling <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> from the
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a> interface, the LDV
|
||||
will be able to inform user on the progress of the process.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_OPINPLACE</td>
|
||||
<td>The LDV knows how to work on the source image, without
|
||||
<em><strong>VISION</strong></em> having to allocate the
|
||||
destination (the transformation is said to occur in place). In
|
||||
this case, the out parameter of the <a
|
||||
href="descrip.htm#run">Run</a> function is the same as in. As far
|
||||
as possible, use this flag, this spares memory. The presence of
|
||||
this flag impose obviously that the LDV does not modify the size
|
||||
of the image.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">LDVF_REALTIMEPARAMS</td>
|
||||
<td>The LDV does the <a
|
||||
href="descrip.htm#run">Run</a> function fast enough in Preview
|
||||
mode (small image displayed by the
|
||||
<em><strong>VISION</strong></em>) dialog box for the modification
|
||||
of the LDV parameters done with the sliders to be smooth enough
|
||||
(at least 1 image per second). In this case,
|
||||
<em><strong>VISION</strong></em> will call the Prewiew function
|
||||
when the user modifies a parameter control slider, without any
|
||||
need to press the "Preview" button</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p><font size="3">These flags must be combined with the "logical
|
||||
or" (|).
|
||||
</font></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="descrip.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="struct.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>D
|
||||
E F I N E S</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
427
tools/vision/LDV/doc/english/descrip.htm
Normal file
427
tools/vision/LDV/doc/english/descrip.htm
Normal file
@@ -0,0 +1,427 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Description</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="notions.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="defines.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||||
D E S C R I P T I O N</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>To summarise, here is what happens between
|
||||
<em><strong>VISION</strong></em> and an LDV:</p>
|
||||
|
||||
<p>0. Init (done a single time at the first user call using LDVs).
|
||||
<em><strong>VISION</strong></em>
|
||||
loads the <a href="#capacit<69>s">GetLDVCapabilities</a> function of each
|
||||
LDV, calls the function and memorizes the capabilities of each LDV to limit
|
||||
future hard drive accesses, then launches each LDV</p>
|
||||
|
||||
<p>1. <em><strong>VISION</strong></em> loads the LDV</p>
|
||||
|
||||
<p>2. <em><strong>VISION</strong></em> calls the PreRun function</p>
|
||||
|
||||
<p>3. <em><strong>VISION</strong></em> calls the Run
|
||||
(or Preview) function</p>
|
||||
|
||||
<p>4. <em><strong>VISION</strong></em> unloads the LDV</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="capacit<69>s"></a><font size="4"><strong>3.1 LDV Capabilities
|
||||
</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="struct.htm#LDV_INFOS">LDV_INFOS</a>
|
||||
* cdecl GetLDVCapabilities(<a href="vapi/struct.htm#VAPI">VAPI</a>
|
||||
*vapi)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN] </strong>vapi: pointer on the
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a> interface
|
||||
provided by <em><strong>VISION</strong></em>. This pointer must
|
||||
be memorized for future use.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">A pointer on the structure <a
|
||||
href="struct.htm#LDV_INFOS">LDV_INFOS</a> stored in the
|
||||
LDV (the skeleton declares the LdvInfos variable of the type
|
||||
<a href="struct.htm#LDV_INFOS">LDV_INFOS</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsibilities</strong></td>
|
||||
<td width="85%">This function is completely written in the
|
||||
skeleton. The works to be done is to fill the structure of the
|
||||
type <ahref="struct.htm#LDV_INFOS">LDV_INFOS</a> of the LDV
|
||||
skeleton.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="prerun"></a><font size="4"><strong>3.2 PreRun function
|
||||
</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl PreRun(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in: pointer on
|
||||
the structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
describing the image of <em><strong>VISION<br>
|
||||
</strong></em><strong>[IN / OUT]</strong> params:
|
||||
pointeur on a structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a> indicating the
|
||||
area to modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||||
code</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsibilities</strong></td>
|
||||
<td width="85%">Must mention to <em><strong>VISION</strong></em>
|
||||
the memory to allocate and the part to be saved by the UNDO
|
||||
function:<ol>
|
||||
<li>If the LDV needs it (<a href="defines.htm#LDVF">LDVF_OPINPLACE</a>
|
||||
not defined in the structure <a
|
||||
href="struct.htm#LDV_CAPS">LDV_CAPS</a>),
|
||||
out->Raster.fd_w and out->Raster.fd_h
|
||||
must contain the size of the image to allocate for the
|
||||
destination. This is this image that will be displayed by
|
||||
<em><strong>VISION</strong></em>
|
||||
in the associated window.</li>
|
||||
<li>If needed, indicate in the fields, x1, x2, y1 and
|
||||
y2 of the structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>, the
|
||||
area to be backed up in the UNDO buffer of the image to
|
||||
be able to undo. Before the call,
|
||||
<em><strong>VISION</strong></em>
|
||||
sets these fields according to the user selection (block
|
||||
or full image)</li>
|
||||
</ol>
|
||||
<p>By default:</p>
|
||||
<ol>
|
||||
<li><em><strong>VISION</strong></em> will allow
|
||||
no memory for the LDV and will suppose the
|
||||
transformation will take place "in place"</li>
|
||||
<li><em><strong>VISION</strong></em> will backup in the
|
||||
UNDO buffer the part specified by the fields
|
||||
x1, x2, y1 and y2 of the structure <a
|
||||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
(full image or selection if a block is selected)</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="run"></a><font size="4"><strong>3.3 Run function</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl Run(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in: pointer on the
|
||||
structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
describing the source image of
|
||||
<em><strong>VISION<br>
|
||||
</strong></em><strong>[IN]</strong> params: pointer on
|
||||
a structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
indicating the area to modify<br>
|
||||
<strong>[OUT]</strong> out: pointer of the destination image
|
||||
, allocate by <em><strong>VISION</strong></em>
|
||||
with a previous call to PreRun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||||
code</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsibilities / Comments</strong></td>
|
||||
<td width="85%">Must do the operation forecasted for
|
||||
the LDV.<br>
|
||||
<em><strong>VISION</strong></em> choses automatically
|
||||
the most adapted format while trying to minimise the memory,
|
||||
taking into account the format(s) handled by the LDV (knowing the
|
||||
most economical is <a
|
||||
href="defines.htm#LDVF">LDVF_SPECFORMAT</a>)<br>
|
||||
The LDV can modify another area than the one given in the fields
|
||||
x1, y1, x2 and y2 of params if it was mentionned previously by
|
||||
the PreRun function<br>
|
||||
<strong><u>NEVER</u></strong> allocate in the LDV memory for
|
||||
<em><strong>VISION</strong></em>,
|
||||
because it will be freed as soon as
|
||||
<em><strong>VISION</strong></em> will unload the LDV (even if you
|
||||
do not do it explicitely, the compiler of the system will do it).
|
||||
On the other hand, nothing prevents you from allocating memory for
|
||||
internal usage related to this function, but do not forget to free
|
||||
it!</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="preview"></a><font size="4"><strong>3.4 Preview
|
||||
function</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="15%"><strong>Prototype</strong></td>
|
||||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||||
cdecl Preview(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||||
*out)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">Identical to those of the function <a
|
||||
href="#run">Run</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||||
code</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Responsibilities / Comments</strong></td>
|
||||
<td width="85%">This function is identical to the
|
||||
function <a href="#run">Run</a>, but it operates on
|
||||
smaller images (112 x 112 on average). If the function
|
||||
<a href="#run">Run</a> is fast enough to display the result
|
||||
in less than 1 second, the Preview function should simply call
|
||||
it. Otherwise, it is possible to do some approximations or
|
||||
pre-computation to be back below a second.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="fichier ini"></a><font size="4"><strong>3.5 The
|
||||
associated INI file</strong></font></p>
|
||||
|
||||
<p><font size="3">The INI file associated to an LDV has two purposes:</font></p>
|
||||
|
||||
<ol>
|
||||
<li><font size="3">Gather all the information related to the language
|
||||
such as its name and description</font></li>
|
||||
<li><font size="3">Define parameters of the LDV</font></li>
|
||||
</ol>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="langues"></a><font size="4"><strong>3.5.1
|
||||
Language information</strong></font></p>
|
||||
|
||||
<p><font size="3">LDVs are multi-lingual, i.e., if a language has been
|
||||
defined in preferences,
|
||||
<em><strong>VISION</strong></em>
|
||||
is able to use this information also for the LDVs, provided the information is
|
||||
available. The .LDV and the associated .INI are located in the LDV
|
||||
directory of <em><strong>VISION</strong></em>. For instance, the file
|
||||
INVERT.INI is associated to the file INVERT.LDV. In the LDV folder, the
|
||||
more standard LDVs must be found, i.e., in English. If, for instance, you
|
||||
have defined "Fran<EFBFBD>ais" in the preferences of <em><strong>VISION</strong></em>,
|
||||
you just have to create the directory "Fran<EFBFBD>ais"
|
||||
in the folder LDV, and to include the file INVERT.INI translated in French
|
||||
in this directory, for <em><strong>VISION</strong></em> to seek this file
|
||||
instead of the one included directly in the LDV directory.</font></p>
|
||||
|
||||
<p><font size="3">In the [Informations] section, <em><strong>VISION</strong></em>
|
||||
expects the following entries:</font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong>Name of entry</strong></td>
|
||||
<td align="center" width="10%"><strong>Size</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">ShortName</font></td>
|
||||
<td align="center" width="10%">Max. 15 characters</td>
|
||||
<td width="75%">Short name of the module appearing in the list of
|
||||
modules to select</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">LongName</font></td>
|
||||
<td align="center" width="10%">Max. 31 characters</td>
|
||||
<td width="75%">Name appearing when details are required on this
|
||||
LDV</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Description</font></td>
|
||||
<td align="center" width="10%">Max. 79 characters</td>
|
||||
<td width="75%">Complete description of the module on 3 lines</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="parametrage"></a><font size="4"><strong>3.5.2
|
||||
Parameters of the LDV</strong></font></p>
|
||||
|
||||
<p><font size="3"><em><strong>VISION</strong></em> allows to enter up to 4
|
||||
parameters in an LDV. These parameters are entered using GEM sliders that
|
||||
appear or not according to the number of input parameters of the LDV.<br>
|
||||
|
||||
For <em><strong>VISION</strong></em> to accept to display a parameter,
|
||||
a section named [ParameterN] (1 <= N <= 4)
|
||||
must be created with the following entries:</font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong>Name of entry</strong></td>
|
||||
<td align="center" width="85%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Name</font></td>
|
||||
<td width="85%">Name of this parameter (max. 15 characters). If
|
||||
the name is not given, this parameter will not appear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">Type</font></td>
|
||||
<td width="85%">0: 16 bits integer(-32768 --> +32767)<br>
|
||||
1: float (not handled currently)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><font size="3">MinValue</font></td>
|
||||
<td width="85%">Minimum allowed value for this parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">DefautValue</td>
|
||||
<td>Default value given in <em><strong>VISION</strong></em> GUI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">MaxValue</td>
|
||||
<td>Maximum allowed value for this parameter</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="notions.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="defines.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||||
D E S C R I P T I O N</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</center></div>
|
||||
286
tools/vision/LDV/doc/english/hints.htm
Normal file
286
tools/vision/LDV/doc/english/hints.htm
Normal file
@@ -0,0 +1,286 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Recommendations</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="kitdev.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="preambule.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->17/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12363" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>7.
|
||||
R E C O M M E N D A T I O N S</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Even if managing and programming LDVs is simple, it must respect some
|
||||
common sense rules, one cannot simply do whatever he wants!
|
||||
Here are some rules and clarification on some points which might be
|
||||
troubling when one programs his first LDVs:</p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>#</strong></td>
|
||||
<td align="center" width="95%"><strong>Recommendations /
|
||||
Advises</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>1</strong></td>
|
||||
<td width="95%">If you write an LDV, send it to me!
|
||||
I would like <em><strong>VISION</strong></em> site to centralise
|
||||
all the LDVs created. Verify also that your LDV is not compiled
|
||||
with debug information!
|
||||
It would be to no use, except reduce the performances!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>2</strong></td>
|
||||
<td width="95%">It would be nice and useful for everyone to give
|
||||
the sources of the LDV with the LDV itself... This could give some
|
||||
good ideas to some people...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>3</strong></td>
|
||||
<td width="95%">Do not forget that, by the means of the functions
|
||||
called by <em><strong>VISION</strong></em>, you have
|
||||
a direct access to <em><strong>VISION</strong></em> internal
|
||||
memory. Thus, if you act a little randomly with the pointers
|
||||
provided, <em><strong>VISION</strong></em> will most likely crash
|
||||
sooner or later...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>4</strong></td>
|
||||
<td width="95%">If you use <a href="vapi/index.htm">VAPI</a>
|
||||
(recommended!), the same remark applies, the global Vapi variable
|
||||
of the LDV points directly on <em><strong>VISION</strong></em>
|
||||
memory. If you write into this structure, your LDV might crash!
|
||||
I let you imagine the consequences if you modify the address of
|
||||
the function <a href="vapi/pr.htm#PrSetProg">PrSetProg</a>
|
||||
and then try and call it!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>5</strong></td>
|
||||
<td width="95%">The ERROR to avoid in the function
|
||||
<a href="descrip.htm#run">Run</a> is to allocate yourself the
|
||||
memory for the image passed in the out parameter. Why? Doing this,
|
||||
first, you overwrite the pointer <em><strong>VISION</strong></em>
|
||||
has already allocated to that. Furthermore, as soon as <em><strong>VISION</strong></em>
|
||||
will try to use it, it will crash. If fact, your LDV is more or
|
||||
less "a PRG" launched by
|
||||
<em><strong>VISION</strong></em> and terminated when
|
||||
<em><strong>VISION</strong></em> (more excactly the LDG manager)
|
||||
decides it. At this moment, the compiler or the system will free
|
||||
the memory allocated by this module, even if you do not do it
|
||||
explicitely. That is why that is always
|
||||
<em><strong>VISION</strong></em>, using the function
|
||||
<a href="descrip.htm#prerun">PreRun</a> that will allocate the
|
||||
memory for the LDV, since it will use it after that. The function
|
||||
<a href="descrip.htm#prerun">PreRun</a> is really essential!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>6</strong></td>
|
||||
<td width="95%">If you use the function <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> from <a
|
||||
href="vapi/index.htm">VAPI</a> (really WARMLY recommended, unless
|
||||
your LDV is fast as light!), try not to call it too often, for
|
||||
instance inside a loop, it has no use (it may happen that the
|
||||
percentage has not even changed!) and this will slow unecesseraly
|
||||
your LDV. Before your call, put a test such as <strong>if ( ( iter & 0x0F )
|
||||
== x0F )</strong>, it will call the progress function only one out
|
||||
of sixteen times, this should be largely enough.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>7</strong></td>
|
||||
<td>The function <a href="vapi/pr.htm#PrSetProg">PrSetProg</a>
|
||||
from <a href="vapi/index.htm">VAPI</a>, gives control temporarily
|
||||
to the AES. This will allow to move windows at that moment. That
|
||||
is also one of the reasons why this function must be called a
|
||||
little... but not too much!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>8</strong></td>
|
||||
<td width="95%">If your LDV has parameters (at most 4 parameters),
|
||||
you must use an <a
|
||||
href="descrip.htm#fichier ini">associated INI file</a>.
|
||||
I recommend to associate systematically an INI file to your LDV.
|
||||
It's really handy for translations, and not difficult at all!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>9</strong></td>
|
||||
<td width="95%">If you use an
|
||||
<a
|
||||
href="descrip.htm#fichier ini">INI file</a>, your LDV must control
|
||||
the validity of passed parameters, and not crash stupidely if one
|
||||
of them is out of bounds... In such a case, just return the
|
||||
<a href="defines.htm#ELDV">ELDV_INVALIDPARAMETER</a> error code.
|
||||
Do not forget that the<a href="descrip.htm#fichier ini">
|
||||
INI file</a> is a text file, which can be easily modified by a
|
||||
user...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>10</strong></td>
|
||||
<td width="95%">Floating numbers, while forecasted for a future
|
||||
exxtension, are not necessary for LDV parameters. Let's say you
|
||||
must enter a value between 0.0 and 1.0. All you have to do is to
|
||||
indicate a range of [0;1000] in the <a
|
||||
href="descrip.htm#fichier ini">INI file</a> (which still gives you
|
||||
more precision that what can be entered in the GUI), to convert
|
||||
the parameter given by <em><strong>VISION</strong></em> to float,
|
||||
and then to divide it by 1000. There must exist weird cases where
|
||||
floats are necessary, but one should do without them in 99% of
|
||||
the cases!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>11</strong></td>
|
||||
<td width="95%">I advise, for memory performances reasons, to
|
||||
allways use <a href="defines.htm#LDVF">LDVF_OPINPLACE</a> and <a
|
||||
href="defines.htm#LDVF">LDVF_SPECFORMAT</a> flags. Allocate the
|
||||
memory you want in the LDV (if you can...) and free it after its
|
||||
execution.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>12</strong></td>
|
||||
<td width="95%">If you work only on lines and columns, use the
|
||||
<a href="defines.htm#LDVF">LDVF_SPECFORMAT</a> flag.
|
||||
|
||||
The VDI function vr_cpyfm is made for that purpose. Using the
|
||||
<a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a>
|
||||
or <a href="defines.htm#LDVF">LDVF_STDFORMAT</a> flags would
|
||||
oblige
|
||||
<em><strong>VISION</strong></em> to allocate memory unecessarily
|
||||
(furthermore, the VDI functions ALWAYS work on the machine
|
||||
specific format: <a href="defines.htm#LDVF">LDVF_SPECFORMAT</a>!)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>13</strong></td>
|
||||
<td width="95%">If you have to handle TOS and/or VDI indexes:<ul>
|
||||
<li>You can work by lines or packets of n lines:<br>
|
||||
Use the format <a href="defines.htm#LDVF">LDVF_SPECFORMAT</a>,
|
||||
and the functions of the <a href="vapi/ra.htm">
|
||||
Raster interface</a>. This will minimise the memory to
|
||||
allocate</li>
|
||||
<li>You are obliged to have access to any index at any time:<br>
|
||||
Use the format <a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a>,
|
||||
and the functions of the <a href="vapi/ra.htm">
|
||||
Raster interface</a>. <em><strong>VISION</strong></em>
|
||||
will convert the image from the specific format to the
|
||||
ATARI bitplan format before calling <a
|
||||
href="descrip.htm#prerun">PreRun</a> or <a
|
||||
href="descrip.htm#run">Run</a>.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>14</strong></td>
|
||||
<td width="95%">Even if the user has selected a block as an area
|
||||
to apply the LDV on the image, you are not limited to the area
|
||||
defined by this block. You have access to the whole image, even
|
||||
more if you decide to enlarge its size (fields out->fd_w and
|
||||
out->fd_h of the function <a
|
||||
But do not forget to update the fields x1, x2, y1 and
|
||||
y2 of the structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||||
given by the function <a href="descrip.htm#prerun">PreRun</a>,
|
||||
and also to UNDO buffer, to be able to go back.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>15</strong></td>
|
||||
<td width="95%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="5%"><strong>16</strong></td>
|
||||
<td width="95%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="kitdev.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="preambule.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->17/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12363" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>7.
|
||||
R E C O M M E N D A T I O N S</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
BIN
tools/vision/LDV/doc/english/images/conc2.gif
Normal file
BIN
tools/vision/LDV/doc/english/images/conc2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
BIN
tools/vision/LDV/doc/english/images/cprev.jpg
Normal file
BIN
tools/vision/LDV/doc/english/images/cprev.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 726 B |
BIN
tools/vision/LDV/doc/english/images/csom.jpg
Normal file
BIN
tools/vision/LDV/doc/english/images/csom.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 518 B |
BIN
tools/vision/LDV/doc/english/images/csuiv.jpg
Normal file
BIN
tools/vision/LDV/doc/english/images/csuiv.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 703 B |
BIN
tools/vision/LDV/doc/english/images/icointro.gif
Normal file
BIN
tools/vision/LDV/doc/english/images/icointro.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 492 B |
BIN
tools/vision/LDV/doc/english/images/icoprinc.gif
Normal file
BIN
tools/vision/LDV/doc/english/images/icoprinc.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 413 B |
159
tools/vision/LDV/doc/english/index.htm
Normal file
159
tools/vision/LDV/doc/english/index.htm
Normal file
@@ -0,0 +1,159 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Content</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a href="intro.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->17/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12363" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>
|
||||
C O N T E N T</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVision"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p align="left"><a href="intro.htm"><strong>1. INTRODUCTION</strong></a></p>
|
||||
|
||||
<p align="left"><a href="notions.htm"><strong>2. ESSENTIAL NOTIONS
|
||||
</strong></a></p>
|
||||
|
||||
<blockquote>
|
||||
<p align="left"><a href="notions.htm#formats d'images">2.1
|
||||
Images formats</a></p>
|
||||
<p align="left"><a href="notions.htm#prog">2.2 Programmation</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="descrip.htm"><strong>3. DESCRIPTION</strong></a></p>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="descrip.htm#capacit<69>s">3.1 Possibilities of LDV</a></p>
|
||||
<p><a href="descrip.htm#prerun">3.2 PreRun function</a></p>
|
||||
<p><a href="descrip.htm#run">3.3 Run function</a></p>
|
||||
<p><a href="descrip.htm#preview">3.4 Preview function</a></p>
|
||||
<p><a href="descrip.htm#fichier ini">3.5 Associated INI
|
||||
file</a></p>
|
||||
<blockquote>
|
||||
<p><a href="descrip.htm#langues"><em>3.5.1 Information
|
||||
on language</em></a></p>
|
||||
<p><a href="descrip.htm#parametrage"><em>3.5.2
|
||||
Configuration of LDV</em></a></p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="defines.htm"><font size="3"><strong>4. DEFINES</strong></font></a></p>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="defines.htm#ELDV">4.1 Type of return codes</a></p>
|
||||
<p><a href="defines.htm#ELDV">4.2 Return codes</a></p>
|
||||
<p><a href="defines.htm#TLDV">4.3 Module types</a></p>
|
||||
<p><a href="defines.htm#LDVF">4.4 Information on possibilities
|
||||
</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="struct.htm"><strong>5. STRUCTURES</strong></a></p>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="struct.htm#LDV_INFOS">5.1 LDV_INFOS</a></p>
|
||||
<p><a href="struct.htm#LDV_CAPS">5.2 LDV_CAPS</a></p>
|
||||
<p><a href="struct.htm#LDV_IMAGE">5.3 LDV_IMAGE</a></p>
|
||||
<p><a href="struct.htm#LDV_PALETTE">5.4 LDV_PALETTE</a></p>
|
||||
<p><a href="struct.htm#LDV_VDIELEMENTALPAL">5.5
|
||||
LDV_VDIELEMENTALPAL</a></p>
|
||||
<p><a href="struct.htm#LDV_PARAMS">5.6 LDV_PARAMS</a></p>
|
||||
<p><a href="struct.htm#LDV_BASICPARAM">5.7 LDV_BASICPARAM</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="kitdev.htm"><strong>6. DEVELOPMENT KIT</strong></a></p>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="kitdev.htm#install">6.1 Installation</a></p>
|
||||
<p><a href="kitdev.htm#squelette">6.2 Skeleton</a></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a href="hints.htm"><strong>7. RECOMMANDATIONS</strong></a></p>
|
||||
|
||||
<p><a href="vapi/index.htm"><strong>APPENDIX: VAPI</strong></a></p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a href="intro.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->17/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12363" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\download/dvision.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>
|
||||
C O N T E N T</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
177
tools/vision/LDV/doc/english/intro.htm
Normal file
177
tools/vision/LDV/doc/english/intro.htm
Normal file
@@ -0,0 +1,177 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Introduction</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a
|
||||
href="notions.htm"><img src="images/csuiv.jpg"
|
||||
alt="Next Chapter " border="0" hspace="2" width="43"
|
||||
height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->02/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12216" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>1.
|
||||
I N T R O D U C T I O N</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>At last! After several years, <em><strong>VISION</strong></em>
|
||||
eventually becomes modular! Roughly, the essential purpose of LDVs
|
||||
(Librairies Dynamiques for <em><strong>VISION</strong></em>) is to allow
|
||||
to add your own functions.
|
||||
Typically, an LDV allows to enhance the functions of <em><strong>VISION</strong></em>,
|
||||
for instance by adding an image distortion module.
|
||||
Here are the characteristics of LDVs:</p>
|
||||
|
||||
<ul>
|
||||
<li>Direct access to <em><strong>VISION</strong></em> images</li>
|
||||
<li>Multi-lingual (with optionnal INI file)</li>
|
||||
<li>UNDO management (transparent for LDV programmer)</li>
|
||||
<li>Management of the input of 4 parameters by
|
||||
<em><strong>VISION</strong></em>, which can be sent to the LDV</li>
|
||||
<li>Progress bar management during LDV computation</li>
|
||||
<li>Preview management</li>
|
||||
<li>Can be applied on an image or on a block inside an image</li>
|
||||
<li><em><strong>VISION</strong></em> provides an API (VAPI)
|
||||
giving image modification functions</li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>At the development level, the programmer must:</p>
|
||||
|
||||
<ul>
|
||||
<li>Know what he wants to do!</li>
|
||||
<li>Define the capabilities of the LDV (number of plans that can be
|
||||
managed, expected image format, ...)</li>
|
||||
<li>Write 4 functions (2 of them being written 100% by an LDV
|
||||
skeleton!):</li>
|
||||
</ul>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td width="20%">GetLDVCapabilities</td>
|
||||
<td width="80%">Already written. Return to <em><strong>VISION</strong></em>
|
||||
what the LDV can do</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%">PreRun</td>
|
||||
<td width="80%">To be written. Ask <em><strong>VISION</strong></em>
|
||||
to allocate the resources necessary to the function
|
||||
Run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%">Run</td>
|
||||
<td width="80%">To be written. The function that does something!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%">Preview</td>
|
||||
<td width="80%">To be written or not. Similar to Run, but in
|
||||
Preview mode, if computation time is too long, and if it is
|
||||
possible to do less computation. Very often, Run is called instead
|
||||
(this is what the skeleton does).</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Of course, writing an LDV requires some notions on images, their
|
||||
formats and programming. See <a
|
||||
href="notions.htm">essential notions</a>.</p>
|
||||
|
||||
<p>Last, I do hope to extend that principle by proposing LDV to load and
|
||||
save images (possibly even more...).
|
||||
However, given the time needed to include this concept in
|
||||
<em><strong>VISION</strong></em>, it will require some persons to be
|
||||
interested before I start with it!</p>
|
||||
|
||||
<p>LDVs are based on LDGs (Librairies Dynamiques GEM) developed by
|
||||
Olivier Landemarre and Dominique B<>r<EFBFBD>ziat: <a
|
||||
href="http://ldg.atari.org">ldg.atari.org</a></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a
|
||||
href="notions.htm"><img src="images/csuiv.jpg"
|
||||
alt="Next Chapter " border="0" hspace="2" width="43"
|
||||
height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->02/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12216" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>1.
|
||||
I N T R O D U C T I O N</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
506
tools/vision/LDV/doc/english/kitdev.htm
Normal file
506
tools/vision/LDV/doc/english/kitdev.htm
Normal file
@@ -0,0 +1,506 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Development kit</title></head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="struct.htm"><img src="images/cprev.jpg" alt="Previous Chapter " border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="hints.htm"><img src="images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="images/icoprinc.gif" height="71" width="59"></p>
|
||||
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</em></strong></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update: 05/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>6.
|
||||
DEVELOPMENT KIT</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <br></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>.<a name="install"></a><font size="4"><strong>6.1 INSTALLATION</strong></font></p>
|
||||
|
||||
<p>First, I recommend to install the LDG kit available on the
|
||||
<a href="http://ldg.atari.org">official LDG site</a>.<br>
|
||||
Next, download the<a href="..%5C..%5Cdownload/dvldv.zip">
|
||||
LDV kit+documentation</a><br>
|
||||
To make an LDV, you need:
|
||||
|
||||
</p><ul>
|
||||
<li>Files "header" LDG.H and MT_AES.H. .</li>
|
||||
<li>"Library" files LDG.LIB and
|
||||
MT_AES.LIB. These files are to be taken in the LDG kit in the
|
||||
folder associated to your C compiler.</li>
|
||||
</ul>
|
||||
|
||||
<p>Warning! By default, the development kit provided by
|
||||
<em><strong>VISION</strong></em> includes these files for the PureC
|
||||
compiler. I strongly recommend to update regularly the .H and .LIB
|
||||
according to the evolution of LDGs.</p>
|
||||
|
||||
<p>The tree proposed in <em><strong>VISION</strong></em> LDV kit is the
|
||||
following:</p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="15%"><strong>Folder / Sub
|
||||
folder</strong></td>
|
||||
<td align="center" width="85%"><strong>Files</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong><..>/LDV</strong></td>
|
||||
<td width="85%"><em>For LDG management:</em><br>
|
||||
LDG.H: Librairies dynamiques GEM, header file .H<br>
|
||||
MT_AES.H: To use LDG/LDV under a multi tasking OS. In fact, this
|
||||
file is useful only if you use AES in the LDV, which is unlikely
|
||||
at the moment, but perhaps soon...<br>
|
||||
LDG.LIB, MT_AES.LIB: to be linked with your LDV<br>
|
||||
<em>For LDV management:</em><br>
|
||||
LDV.H: Definition of structures and interfaces with <em><strong>VISION</strong></em><br>
|
||||
VAPI.H: Definition of structures and interfaces with <a href="vapi/index.htm">VAPI</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong><...>/LDV/SRC</strong></td>
|
||||
<td width="85%">Each LDV is there in a directory associated with
|
||||
its name. In such a directory, there is:<br>
|
||||
<name of ldv>.C: the "source" file of the
|
||||
LDV<br>
|
||||
<name of ldv>.PRJ: the project file (Pure C)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong><...>/LDV/DOC</strong></td>
|
||||
<td>This documentation</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>.<a name="squelette"></a><font size="4"><strong>6.2 SKELETON</strong></font></p>
|
||||
|
||||
<p>You can use for the skeleton of an LDV any source of an LDV found in
|
||||
the kit. It is up to you to see which file suits best the LDV you want to
|
||||
make!</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>.<a name="exemples"></a><font size="4"><strong>6.3 EXAMPLES</strong></font></p>
|
||||
|
||||
<p>The <em><strong>VISION</strong></em> kit provides the following LDVs
|
||||
as well as the sources (in PureC). Here are their characteristics:</p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><strong>INVERT.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Inversion of bits of an image</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capabilities</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Does not modify the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Transformation type
|
||||
</strong></td>
|
||||
<td width="80%">In place. This property can also be suppressed
|
||||
from the CAPS define, and <em><strong>VISION</strong></em> can be
|
||||
forced to allocate memory for the destination (teaching only
|
||||
purpose!)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Uses VAPI</strong></td>
|
||||
<td width="80%">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>INI file</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Comment</strong></td>
|
||||
<td width="80%">Very simple! Uses only vro_cpyfm VDI function<br>
|
||||
Not really useful: <em><strong>VISION</strong></em>
|
||||
already provides the "N<>gative" function since version
|
||||
1.0!</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><strong>XWAVE.LDV
|
||||
/ YWAVE.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Waves on X / Y axis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capabilities</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Does not modify the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Transformation
|
||||
type</strong></td>
|
||||
<td width="80%">Forces <em><strong>VISION</strong></em> to
|
||||
allocate memory for destination. It must be possible to do
|
||||
without, but this complicates a little the LDV...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Uses VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="vapi/pr.htm">Progress</a> +
|
||||
<a href="vapi/ra.htm">Raster Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>INI file</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Comment</strong></td>
|
||||
<td width="80%">Amusing and quite simple. Presents <a href="vapi/pr.htm">the VAPI progress interface</a> and the
|
||||
function to "clear" an image (<a href="vapi/ra.htm#RaImgWhite">RaImgWhite</a>).</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><strong>BW.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Conversion of an image (or part in True colour) to
|
||||
an image in shades of grey</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capabilities</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Modifies the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Transformation
|
||||
type</strong></td>
|
||||
<td width="80%">In place</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Uses VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="vapi/pr.htm">Progress</a> +
|
||||
<a href="vapi/ra.htm">Raster Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>INI file</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Comment</strong></td>
|
||||
<td width="80%">Uses True colour conversion format functions (<a href="vapi/ra.htm#RaTCConvert">RaTCConvert</a> and <a href="vapi/ra.htm#RaTCInvConvert">RaTCInvConvert</a>).
|
||||
Shows also how to modify the palette. Compared to the equivalent <em><strong>VISION</strong></em>
|
||||
(B&W conversion) function, this LDV allows to do it on a
|
||||
block (True Colour mode only)</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="pixel"></a><strong>PIXEL.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Performs a pixelization on an image or part of it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">True Color modes only (16 and 32
|
||||
planes). ATARI. format</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">In place</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">Nice
|
||||
effect and good for learning: this LDV only considers True Color
|
||||
ATARI format and it will nevertheless run on your MagicPC ! It makes
|
||||
use of <em><strong>VISION</strong></em> feature to deal with format handling and only focuses on a specific format. Hadnles cancel feature.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="ypersc"></a><strong>YPERSC.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Performs a perspective effect on an image or part of it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). ATARI format. Does not change palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">Forces <em><strong>VISION</strong></em> to
|
||||
allocate memory for destination.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Oui (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>+ <a href="../../ldv/vapi/ra.htm">Raster Interface</a>
|
||||
+ <a href="../../ldv/vapi/me.htm">MEM Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">Nice perspective effect. When operating on selection, the allocation bloc is set thanks to <a href="../../ldv/defines.htm#LDVF">LDVF_NOSELECTION</a>
|
||||
flag (pretty painful to handle in bitplane mode). This LDV only gets an image and not bloc selection.<a href="../../ldv/vapi/me.htm">MEM Interface</a> function <a href="../../ldv/vapi/me.htm#MeSCopyMemory8">MeCopyMemoryxx</a> is used to scale lines.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="light"></a><strong>LIGHT.LDV / </strong><a name="gamma"></a><strong>GAMMA.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Change red, green, blue color spreading using a line (light) or a gamma curve (gamma).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Modifies the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">In place</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>+ <a href="../../ldv/vapi/ra.htm">Raster Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">Smart replace for old embedded functions in
|
||||
<em><strong>VISION</strong></em>..In bitplane mode, palette is changed. Handles cancel.<br>
|
||||
These LDVs are pretty optimized for memory performances: they operate
|
||||
in place on machine specific format and can work on a bloc inside the
|
||||
image.(true colro only).<br>
|
||||
These LDVs are very similar : only internal function ChangeColors is specific to a LDV.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="rotate"></a><strong>ROTATE.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Performs a rotation on the image or part of it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Does not change the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">Forces <em><strong>VISION</strong></em> to
|
||||
allocate memory for destination.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>+ <a href="../../ldv/vapi/ra.htm">Raster Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">This LDV is very simple. Actually it just calls <a href="../../ldv/vapi/ra.htm#RaRasterRotateGetDstMFDB">RaRasterRotateGetDstMFDB</a> and <a href="../../ldv/vapi/ra.htm#RaRasterRotate">RaRasterRotate</a>
|
||||
functions in <a href="../../ldv/vapi/index.htm">VAPI</a> <a href="../../ldv/vapi/ra.htm">Raster interface</a> <a href="../../ldv/vapi/index.htm"></a>.<br>
|
||||
Have a look how <a href="../../ldv/defines.htm#LDVF">LDVF_NOSELECTION</a> flag is used in order to not complicate things with blocs.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="puzzle"></a><strong>PUZZLE.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Mix image blocs to generate a puzzle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Does not change the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">Forces <em><strong>VISION</strong></em> to
|
||||
allocate memory for destination.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">Fun LDV easy to code. Smartest thing is entropy handling i.e. how much disorder there is in the mix.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center" width="20%"><a name="bhole"></a><strong>BHOLE.LDV</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Description</strong></td>
|
||||
<td width="80%">Simulates a black hole in an image. Consider it as a tribute to <a href="https://www.youtube.com/watch?v=A6HhDFskbXs">Stephen Hawking</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Capacit<EFBFBD>s</strong></td>
|
||||
<td width="80%">Any number of bitplans (1, 2, 4, 8, 16, 24
|
||||
and 32). Machine format. Does not change the palette.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Type de
|
||||
transformation</strong></td>
|
||||
<td width="80%">Forces <em><strong>VISION</strong></em> to
|
||||
allocate memory for destination.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Utilise VAPI</strong></td>
|
||||
<td width="80%">Yes (<a href="../../ldv/vapi/pr.htm">Progress
|
||||
Interface</a>+<a href="../../ldv/vapi/co.htm">Config Interface</a>+<a href="../../ldv/vapi/lo.htm">Logging Interface</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong>Fichier INI</strong></td>
|
||||
<td>Yes (English / French)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="20%"><strong>Remarque</strong></td>
|
||||
<td width="80%">Most complicated LDV so far. Has its own optimzations for 68030 and 68881. Uses black hole symetry to speed up computations.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="struct.htm"><img src="images/cprev.jpg" alt="Previous chapter " border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="hints.htm"><img src="images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</em></strong></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update: 05/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>6.
|
||||
DEVELOPMENT KIT</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
107
tools/vision/LDV/doc/english/modele.htm
Normal file
107
tools/vision/LDV/doc/english/modele.htm
Normal file
@@ -0,0 +1,107 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Content</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
hspace="2" width="46" height="26"><a href="sommaire.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a
|
||||
href="preambule.htm"><img src="images/csuiv.jpg"
|
||||
alt="Next Chapter " border="0" hspace="2" width="43"
|
||||
height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->09/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12366" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>C O N T
|
||||
E N T</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
hspace="2" width="46" height="26"><a href="sommaire.htm"><img
|
||||
src="images/csom.jpg" alt="Back to content " border="0"
|
||||
hspace="2" width="26" height="26"></a><a
|
||||
href="preambule.htm"><img src="images/csuiv.jpg"
|
||||
alt="Next Chapter " border="0" hspace="2" width="43"
|
||||
height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->09/09/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12366" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>C O N T
|
||||
E N T</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
218
tools/vision/LDV/doc/english/notions.htm
Normal file
218
tools/vision/LDV/doc/english/notions.htm
Normal file
@@ -0,0 +1,218 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Essential notions</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="intro.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="descrip.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->01/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12214" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>2.
|
||||
ESSENTIAL NOTIONS</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a name="formats d'images"></a><font size="4"><strong>2.1 Images
|
||||
formats</strong></font></p>
|
||||
|
||||
<p>I cannot explain here the bit to bit encoding of an image. Roughly, for
|
||||
a number of plans up to 8, a pixel is associated to a colour index in a
|
||||
palette. Thus, this index points to the true colour of the pixel. Starting
|
||||
with 15 plans, we are in True Color, i.e., each pixel is associated with
|
||||
its colour value (thus with 15, 16, 24 or 32 bits). While in True Color,
|
||||
it's fairly easy, in palette mode (bit-plane) it becomes quickly complex,
|
||||
because each pixel has one of its bits coded in a 16 bits word. This bit
|
||||
should be searched, the different bits from one pixel should be put
|
||||
together, etc... This becomes quickly tiring and, to be fast, this
|
||||
requires assembly optimisation. Thankfully, <em><strong>VISION</strong></em>
|
||||
proposes functions to simplify your work with
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a>.</p>
|
||||
|
||||
<p><em><strong>VISION</strong></em>'s LDVs can work in any of the 3
|
||||
following formats (note that there is no interesst for your LDV to handle
|
||||
the 3 formats, <em><strong>VISION</strong></em> will transmit the required
|
||||
format):</p>
|
||||
|
||||
<ul>
|
||||
<li>Standard format</li>
|
||||
<li>ATARI format</li>
|
||||
<li>Specific format</li>
|
||||
</ul>
|
||||
|
||||
<p>This little table specifies these different formats ((R = Red, G =
|
||||
Green, B = Blue):</p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="15%"><strong>Format</strong></td>
|
||||
<td align="center" width="10%"><strong>Number of bits /
|
||||
pixel</strong></td>
|
||||
<td align="center" width="75%"><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%">Standard</td>
|
||||
<td align="center" width="10%">1, 2, 4, 8</td>
|
||||
<td width="75%">Standard format defined by ATARI. The pixel planes
|
||||
(16 pixels) are following each other. In True-Color, this format
|
||||
maybe exists, but I prefer not to know!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%">ATARI</td>
|
||||
<td align="center" width="10%">1, 2, 4, 8</td>
|
||||
<td width="75%">ATARI bit-plane format. Very classical,
|
||||
this is the format of ST-Low, ST-Medium and ST-High, then, by
|
||||
extension, the format of Falcon's bit-plane modes. Contrary to
|
||||
Standard mode, planes are interlaced ((Plan0 - Plan1 - Plan2 -
|
||||
Plan 3, for instance for 16 colours))</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"> </td>
|
||||
<td align="center" width="10%">16</td>
|
||||
<td width="75%">FALCON True Color mode. Each pixel
|
||||
is coded in a 16 bits word such as the following:<br>
|
||||
RRRRRVVVVV0BBBBB<br>
|
||||
15 --> 0 Bit #<br>
|
||||
In fact, the actual encoding is on 15 or 1 pixels. The level of
|
||||
green can be coded on 6 bits (65K) instead of 5 (32K).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"> </td>
|
||||
<td align="center" width="10%">24</td>
|
||||
<td width="75%">Sadly <em><strong>VISION</strong></em>
|
||||
does not handle this format!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%"> </td>
|
||||
<td align="center" width="10%">32</td>
|
||||
<td width="75%">RGB0, R, G, B = red, green or
|
||||
blue component on 8 bits (0...255)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="15%">Specific</td>
|
||||
<td align="center" width="10%">1, 2, 4, 8, 16, 24, 32</td>
|
||||
<td width="75%">Specific to the graphic card. No
|
||||
hypothesis on the bit encoding for a pixel can be made.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p>As far as possible, use the specific format, because it uses the less
|
||||
memory. If your LDV has only to handle lines and columns, you don't have
|
||||
to pay attention to internal pixel coding, the vro_... VDI functions will
|
||||
handle it.</p>
|
||||
|
||||
<p>If you have to handle pixels, I recommand to use the ATARI format,
|
||||
because <em><strong>VISION</strong></em> allows to get very easily the
|
||||
indexes through its <a
|
||||
href="vapi/index.htm#Pr<50>sentation">VAPI</a>.</p>
|
||||
|
||||
<p>The standard format is not very useful, except internally in
|
||||
<em><strong>VISION</strong></em> to display the images correctly. except
|
||||
if you have developed equivalent functions to those proposed in
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a>, I would advise not to use
|
||||
this format.</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="prog"></a><font size="4"><strong>2.2 Programing</strong></font></p>
|
||||
|
||||
<p>You have to know how to program in C! Normally, LDVs do not depend on
|
||||
the compiler (I did my best but, as I use only Pure C, I cannot be really
|
||||
sure).</p>
|
||||
|
||||
<p>You have to be fluent in C and not be afraid of handling pointers on
|
||||
structures and functions.</p>
|
||||
|
||||
<p>If you know LDGs, this will be useful but it is not mandatory, the LDV
|
||||
skeleton hides them fairly well.</p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="intro.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="descrip.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->01/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12214" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>2.
|
||||
ESSENTIAL NOTIONS</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
464
tools/vision/LDV/doc/english/struct.htm
Normal file
464
tools/vision/LDV/doc/english/struct.htm
Normal file
@@ -0,0 +1,464 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (LDV): Structures</title>
|
||||
</head>
|
||||
|
||||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="defines.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous Chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="kitdev.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>5.
|
||||
S T R U C T U R E S</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>.<a name="LDV_INFOS"></a><font size="4"><strong>5.1 LDV_INFOS</strong></font></p>
|
||||
|
||||
<p><font size="3"><strong>typedef struct<br>
|
||||
{<br>
|
||||
short StrSize ;<br>
|
||||
short Type ;<br>
|
||||
char Authors[1+45] ;<br>
|
||||
<br>
|
||||
LDV_CAPS Caps[10] ;<br>
|
||||
<br>
|
||||
char RFU[16] ;<br>
|
||||
}<br>
|
||||
LDV_INFOS ;</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">StrSize</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">LDV_INFOS structure size. Must be
|
||||
initialised with sizeof(LDV_INFOS). The aim of this field
|
||||
is to prevent <em><strong>VISION</strong></em> from exploding its
|
||||
internal data if the size of this structure should change.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Type</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">Must be equal to <a href="defines.htm#TLDV">TLDV_MODIFYIMG</a>,
|
||||
<a href="defines.htm#TLDV">TLDV_LOADIMG</a> or <a
|
||||
href="defines.htm#TLDV">TLDV_SAVEIMG</a>, or even more in the
|
||||
future. Currently, only the <a
|
||||
href="defines.htm#TLDV">TLDV_MODIFYIMG</a> type is accepted
|
||||
by <em><strong>VISION</strong></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Authors</td>
|
||||
<td align="center" width="15%">char[1+45]</td>
|
||||
<td width="75%">Name of the author(s). 45 characters are available
|
||||
for this purpose.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Caps</td>
|
||||
<td align="center" width="15%"><a href="#LDV_CAPS">LDV_CAPS</a>[10]</td>
|
||||
<td width="75%">Table describing the capabilities of the LDV for
|
||||
each number of plane. The LDV can handle a maximum of 9 differents
|
||||
planes because the structure table must end with a structure where
|
||||
fields are initialised with 0.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">RFU</td>
|
||||
<td align="center" width="15%">char[16]</td>
|
||||
<td width="75%">Reserved for future use. Don't touch!</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_CAPS"></a><font size="4"><strong>5.2 LDV_CAPS</strong></font></p>
|
||||
|
||||
<p><font size="3"><strong>typedef struct<br>
|
||||
{<br>
|
||||
char NbPlanes ; <br>
|
||||
char NbPlanesOut ;<br>
|
||||
unsigned long Flags ; <br>
|
||||
}<br>
|
||||
LDV_CAPS ;</strong></font></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">NbPlanes</td>
|
||||
<td align="center" width="15%">char</td>
|
||||
<td width="75%">Number of planes for this capability (1,
|
||||
2, 4, 8 , 16, 24 (not handled), 32)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">NbPlanesOut</td>
|
||||
<td align="center" width="15%">char</td>
|
||||
<td width="75%">Number of planes on output for this capability.
|
||||
For a <a href="defines.htm#TLDV">TLDV_MODIFYIMG</a> LDV type,
|
||||
this field must be equal to NbPlanes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Flags</td>
|
||||
<td align="center" width="15%">unsigned long</td>
|
||||
<td width="75%">Combination (| symbol) of the following masks:<ul>
|
||||
<li><a href="defines.htm#LDVF">LDVF_STDFORMAT</a>:
|
||||
LDV accepts the standard format</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a>:
|
||||
LDV accepts the ATARI format</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_SPECFORMAT</a>:
|
||||
LDV accepts the format specific to the graphic
|
||||
card</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_SUPPORTPREVIEW</a>:
|
||||
LDV has a Preview function (highly recommanded,
|
||||
even if it only calls Run)</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_AFFECTPALETTE</a>:
|
||||
LDV modifies the palette (NbPlanes must be less than or
|
||||
equal to 8)</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_SUPPORTPROG</a>:
|
||||
LDV will call the <a
|
||||
href="vapi/pr.htm#PrSetProg">PrSetProg</a> function of
|
||||
<a
|
||||
href="vapi/index.htm#Pr<50>sentation">VAPI</a> interface
|
||||
(recommanded if the processing takes more than 2 seconds)</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_OPINPLACE</a>:
|
||||
LDV knows how to work on the source image, without the
|
||||
need for <em><strong>VISION</strong></em> to allocate the
|
||||
destination (it is said the transformation in done in
|
||||
place). In this case, the out parameter of the Run
|
||||
function is the same as the in parameter. As far as
|
||||
possible, use this flag, this will lessen the memory
|
||||
consumption.</li>
|
||||
<li><a href="defines.htm#LDVF">LDVF_REALTIMEPARAMS</a>:
|
||||
LDV does Preview (small image displayed by the
|
||||
<em><strong>VISION</strong></em> dialogue) fast enough for
|
||||
the modification of LDV's parameters by the sliders to be
|
||||
smooth (at least 1 image per second)</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_IMAGE"></a><font size="4"><strong>5.3 LDV_IMAGE</strong></font></p>
|
||||
|
||||
<p><strong>typedef struct<br>
|
||||
{<br>
|
||||
short RasterFormat ;<br>
|
||||
MFDB Raster ; <br>
|
||||
LDV_PALETTE Palette ; /* Structure given if Raster.fd_nplanes
|
||||
<= 8 */<br>
|
||||
}<br>
|
||||
LDV_IMAGE ;</strong></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">RasterFormat</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%"><a href="defines.htm#LDVF">LDVF_STDFORMAT</a>,
|
||||
<a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a> or <a
|
||||
href="defines.htm#LDVF">LDVF_SPECFORMAT</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Raster</td>
|
||||
<td align="center" width="15%">MFDB</td>
|
||||
<td width="75%">The classical ATARI MFDB describing
|
||||
the image data (excluding the palette)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Palette</td>
|
||||
<td align="center" width="15%"><a href="#LDV_PALETTE">LDV_PALETTE</a></td>
|
||||
<td width="75%">Pointer on a structure <a
|
||||
href="#LDV_PALETTE">LDV_PALETTE</a> describing the palette
|
||||
associated with the image if the number of bits is less than
|
||||
or equal to 8.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_PALETTE"></a><font size="4"><strong>5.4
|
||||
LDV_PALETTE</strong></font></p>
|
||||
|
||||
<p><strong>typedef struct<br>
|
||||
{<br>
|
||||
short NbColors ; <br>
|
||||
VDI_ELEMENTPAL *Pal ;<br>
|
||||
}<br>
|
||||
LDV_PALETTE ;</strong></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">NbColors</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">The number of elements in the table pointed by
|
||||
Palette (i.e., 2, 4, 16 ou 256 colours)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Pal</td>
|
||||
<td align="center" width="15%"><a
|
||||
href="#LDV_VDIELEMENTALPAL">VDI_ELEMENTALPAL</a> *</td>
|
||||
<td width="75%">Pointer on a table of NbColors
|
||||
elements of the type VDI_ELEMENTPAL. The proposed palette is
|
||||
indexed by VDI indexes (those used by the VDI functions such as
|
||||
line drawing) and not TOS ones (those you get from
|
||||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a> raster functions).
|
||||
Thankfully, <a href="vapi/index.htm#Pr<50>sentation">VAPI</a> has
|
||||
functions to convert VDI to TOS indexes in both directions.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_VDIELEMENTALPAL"></a><font size="4"><strong>5.5
|
||||
VDI_ELEMENTALPAL</strong></font></p>
|
||||
|
||||
<p><strong>typedef struct<br>
|
||||
{<br>
|
||||
short Red ;<br>
|
||||
short Green ;<br>
|
||||
short Blue ;<br>
|
||||
}<br>
|
||||
VDI_ELEMENTPAL ;</strong></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">Red</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">Component <font color="#FF0000">Red</font>
|
||||
of the VDI index of the palette (0 <= index <= 1000)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">Green</td>
|
||||
<td align="center">short</td>
|
||||
<td>Component <font color="#00FF00">Green</font> of the VDI
|
||||
index of the palette (0 <= index <= 1000)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">Blue</td>
|
||||
<td align="center">short</td>
|
||||
<td>Component <font color="#0000FF">Blue</font>
|
||||
of the VDI index of the palette (0 <= index <= 1000)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_PARAMS"></a><font size="4"><strong>5.6 LDV_PARAMS</strong></font></p>
|
||||
|
||||
<p><strong>typedef struct<br>
|
||||
{<br>
|
||||
short x1, y1, x2, y2 ;<br>
|
||||
short NbParams ;<br>
|
||||
LDV_BASICPARAM Param[LDVNBMAX_PARAMETERS] ;<br>
|
||||
}<br>
|
||||
LDV_PARAMS ;</strong></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">x1</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">X position of the left top border of the
|
||||
rectangle to be processed
|
||||
(0 for a full image)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">y1</td>
|
||||
<td align="center">short</td>
|
||||
<td>Y position of the left top border of the
|
||||
rectangle to be processed
|
||||
(0 for a full image)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">x2</td>
|
||||
<td align="center">short</td>
|
||||
<td>X position of the right bottom border of the rectable
|
||||
to be processed
|
||||
(image width - 1 for a full image)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">y2</td>
|
||||
<td align="center">short</td>
|
||||
<td>YX position of the right bottom border of the rectable
|
||||
to be processed
|
||||
(image height - 1 for a full image)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">NbParams</td>
|
||||
<td align="center">short</td>
|
||||
<td>Number of valid parameters in the Param table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">Param</td>
|
||||
<td align="center"><a href="#LDV_BASICPARAM">LDV_BASICPARAM</a></td>
|
||||
<td>Table containing the parameters entered from the
|
||||
<em><strong>VISION</strong></em> user interface</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="LDV_BASICPARAM"></a><font size="4"><strong>5.7
|
||||
LDV_BASICPARAM (UNION)</strong></font></p>
|
||||
|
||||
<p><strong>typedef union<br>
|
||||
{<br>
|
||||
short s ;<br>
|
||||
float f ;<br>
|
||||
}<br>
|
||||
LDV_BASICPARAM ;</strong></p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="10%"><strong>Field</strong></td>
|
||||
<td align="center" width="15%"><strong>Type</strong></td>
|
||||
<td align="center" width="75%"><strong>Comments</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" width="10%">s</td>
|
||||
<td align="center" width="15%">short</td>
|
||||
<td width="75%">Parameter value (if this parameter, defined in the
|
||||
<a href="descrip.htm#fichier ini"> associated .INI
|
||||
</a> is an integer)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">f</td>
|
||||
<td align="center">float</td>
|
||||
<td>Parameter value (if this parameter, defined in the
|
||||
<a href="descrip.htm#fichier ini"> associated .INI
|
||||
</a> is a Float. Currently, the type Float is not handled, and
|
||||
since compilers can differ in the way they code floats, I
|
||||
strongly recommend to use Shorts).</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="defines.htm"><img
|
||||
src="images/cprev.jpg" alt="Previous chapter "
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="images/csom.jpg"
|
||||
alt="Back to content " border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="kitdev.htm"><img
|
||||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||||
hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icoprinc.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(LDV)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="images/icointro.gif" width="59"
|
||||
height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last updpate:
|
||||
<!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>S
|
||||
T R U C T U R E S</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
220
tools/vision/LDV/doc/english/vapi/co.htm
Normal file
220
tools/vision/LDV/doc/english/vapi/co.htm
Normal file
@@ -0,0 +1,220 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (VAPI) : Configuration Interface</title></head>
|
||||
<body background="../images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="ra.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="in.htm"><img src="../images/csuiv.jpg" alt="Chapitre suivant" border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : 07/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>CONFIGURATION
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <a href="http://www.estat.com/getstats?serial=1390118421"> </a> <br></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center"><strong>R<EFBFBD>sum<EFBFBD></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Interface prefix</strong></td>
|
||||
<td width="85%">Co</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Number of functions</strong></td>
|
||||
<td width="85%">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Set of functions giving access to <em><strong>VISION</strong></em>.'s configuration (paths, languages,...)</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="CoGetLDVPath"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">char* cdecl <strong>CoGetLDVPath</strong>(void)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">A pointer to string holding LDV path</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used
|
||||
to know what is LDV path. Enables the LDV to load a file from there
|
||||
(e.g. LOD, INI). This path is passed as a parameter to <a href="../descrip.htm#getparams">GetParams</a>
|
||||
function (optional).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%"><a href="index.htm">VAPI</a> returns a pointer to <em><strong>VISION</strong></em>.'x configuration.
|
||||
You shall NOT change data from this pointer; make your own copy if you need !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="CoGetCurrentLanguage"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">char* cdecl <strong>CoGetCurrentLanguage</strong>(void)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">A pointer to string holding <em><strong>VISION</strong></em>.''s current language<em><strong></strong></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to know which language is currently used. Use with <a href="#CoGetLDVPath">CoGetLDVPath</a>, you can locate the INI file for this LDV, just concatenate both strings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%"><a href="index.htm">VAPI</a> returns a pointer to <em><strong>VISION</strong></em>.'x configuration.
|
||||
You shall NOT change data from this pointer; make your own copy if you need !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p>
|
||||
</p><div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="CoGetFunctionOptimizations"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">unsigned long cdecl <strong>CoGetFunctionOptimizations</strong>(void
|
||||
*function)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">Pointer to <a href="index.htm">VAPI</a> function for which you'd like to know if some optimization is available</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">A 32bit word which following bit meaning:<br>
|
||||
Bit 0 set This function is 68030 optimized<br>
|
||||
Bit 1 set : This function is DSP 56001 optimzed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to know if a function has specific processor optimzations to let the progress window know about this (see <a href="pr.htm">Progress Interface</a> : <a href="pr.htm#PrOptimize">PrOptimize</a>). Not that useful but so sexy !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%">If
|
||||
the machine running this call has no 68030 or DSP support, this call
|
||||
won"t return any optimization, which is pretty logical as it won"t be
|
||||
used even if exisitng.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.03 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="CoGetProcessors"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">unsigned long cdecl <strong>CoGetProcessors</strong>(void)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">Requests <em><strong>VISION</strong></em> what are the available processors</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">A 32bit word which following bit meaning:<br>0x02 : A 68030 or better is present<br>0x20 : A FPU (68881 or better) is present<br>0x200: A DSP 56001 is present</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to prepeare LDV to select appropriae routines depending on processors availability</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%">The returned value may be filtered out by <span style="font-style: italic; font-weight: bold;">VISION</span>
|
||||
if VISION.INI says so in Hide030, HideFPU or HideDSP
|
||||
variables set to 1. Very useful to simulate LDV run on a lower configuration.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.04 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="ra.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="in.htm"><img src="../images/csuiv.jpg" alt="Chapitre suivant" border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : 07/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>CONFIGURATION
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
342
tools/vision/LDV/doc/english/vapi/in.htm
Normal file
342
tools/vision/LDV/doc/english/vapi/in.htm
Normal file
@@ -0,0 +1,342 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (VAPI) : INI Interface</title></head>
|
||||
<body background="../images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="co.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="27" hspace="2" width="32"></a><a href="lo.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update: 19/05/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>INI
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center"><strong>Abstract</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Interface Prefix</strong></td>
|
||||
<td width="85%">In</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Number of functions</strong></td>
|
||||
<td width="85%">6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Set of functions to manipulate INI files. A maximum of 3 INI files can be simulataneously managed.</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InOpen"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InOpen</strong>(char
|
||||
*file)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> file : INI file name </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">If >= 0 : a INI handle<br>
|
||||
If < 0, No more INI handle available</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Reserve a INI handle to operate later on. If file does not exist, a valid handle is returned, file can then be saved by calling <a href="#InSaveAndClose">InSaveAndClose</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong><strong></strong></td>
|
||||
<td width="85%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InClose"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InClose</strong>(long
|
||||
hini)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> hini : A INI handle previously returned by <a href="#InOpen">InOpen</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Success<br>
|
||||
-1 : Invalid handle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Free INI handle. Does not save modifications, use <a href="#InSaveAndClose">InSaveAndClose</a> to save them.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InSaveAndClose"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InSaveAndClose</strong>(long
|
||||
hini, char *new_name)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> hini : A INI handle previously returned by <a href="in.htm#InOpen">InOpen</a><a href="#InOpen"></a><br>
|
||||
<strong>[IN]</strong> new_name : new filename to use for saving. If NULL, this function will use the one passed to <a href="#InOpen">InOpen</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Success<br>
|
||||
-1 : Invalid handle, won't save.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Generate a INI file by commiting all modifications made since last call to <a href="#InOpen">InOpen</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InGetKey"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InGetKey</strong>(long
|
||||
hini, char *section, char *key, char *val_key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> hini : A INI handle previously returned by <a href="in.htm#InOpen">InOpen</a><a href="#InOpen"></a><br>
|
||||
<strong>[IN]</strong> section : section name<br>
|
||||
<strong>[IN] </strong>key : key name<br>
|
||||
<strong>[OUT]</strong> val_key : buffer which will hold the key value in ASCII</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Error : key or section does not exist<br>
|
||||
1 : Success, ASCII value for this key in the section is hold in val_key</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Retrieves a specific key in a specific section</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InSetKey"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InSetKey</strong>(long
|
||||
hini, char *section, char *key, char *val_key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> hini : A INI handle previously returned by <a href="in.htm#InOpen">InOpen</a><br>
|
||||
<strong>[IN]</strong> section : section name<br>
|
||||
<strong>[IN] </strong>key : key name<br>
|
||||
<strong>[OUT]</strong> val_key : buffer which holds the key value in ASCII</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Error : key or section could not be created or changed due to insufficient memory<br>
|
||||
1 : Success</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Adds or modify a key within a section</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%">If section r key does not exist, it is created</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="InGetOrSetKey"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <strong>InGetOrSetKey</strong>(long
|
||||
hini, char *section, char *key, char *val_key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> hini : A INI handle previously returned by <a href="in.htm#InOpen">InOpen</a><br>
|
||||
<strong>[IN]</strong> section : section name<br>
|
||||
<strong>[IN] </strong>key : key name<br>
|
||||
<strong>[IN/OUT] </strong>val_key : buffer holding the default key value in ASCII [IN] or/and the key value [OUT]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Key has been sucessfully retrieved<br>
|
||||
1 : Key has been created.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to retrieve an existing key in a given section or create it with a default value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%">Pretty useful!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<pre><br></pre><div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><strong><a name="GetKeyFromFile"></a>Prototype</strong></td>
|
||||
<td width="85%">long<strong> InGetKeyFromFile</strong>(char *file, char *section, char *key, char *val_key)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> file : INI file name<a href="in.htm#InOpen"></a><br>
|
||||
<strong>[IN]</strong> section : section name<br>
|
||||
<strong>[IN] </strong>key : key name<br>
|
||||
<strong>[IN/OUT] </strong>val_key : buffer holding the default key value in ASCII [IN] or/and the key value [OUT]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">0 : Key could not be retrieved (filename, section or key not found)<br>
|
||||
1 : Key has been succesfully read.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used
|
||||
to read a key value directly from a file without the need to create the
|
||||
key if not present (as previous function). Typically this is used to
|
||||
read a setting from a file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%">Pretty useful!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.04 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<font size="3"><br></font><pre><font size="3">Example: find a proprietary key in a LDV INI file<br>long hini, must_save ;<br>short angle = 90; </font><font color="#000080" size="3"><em>/* Default value */</em></font><font size="3">
|
||||
char buffer[256] ;
|
||||
char *path_ldv, *language ;
|
||||
|
||||
path_ldv = Vapi-></font><a href="co.htm#CoGetLDVPath"><font size="3">CoGetLDVPath</font></a><font size="3">() ; </font><font color="#000080" size="3">/* Get LDV current path */</font><font size="3">
|
||||
language = Vapi-></font><a href="co.htm#CoGetCurrentLanguage"><font size="3">CoGetCurrentLanguage</font></a><font size="3">() ; </font><font color="#000080" size="3">/* Get current language */</font><font size="3">
|
||||
if ( path_ldv && language )
|
||||
{
|
||||
sprintf( buffer, "%s\\%s\\MYLDV.INI", path_ldv, language ) ;
|
||||
hini = Vapi-></font><a href="#InOpen"><font size="3">InOpen</font></a><font size="3">( buffer ) ;<br> if ( hini >= 0 )<br> {<br> sprintf( buffer, "%d", angle ) ; </font><font color="#000080" size="3"><em>/* Setting default value */</em></font><font size="3">
|
||||
must_save = Vapi-></font><a href="#InGetOrSetKey"><font size="3">InGetOrSetKey</font></a><font size="3">( hini, "Parameters", "Angle", buffer ) ;<br> angle = atoi( buffer ) ; </font><font color="#000080" size="3"><em>/* Either angle will be set to 90 (default value), or value retrieved from INI file */</em></font><font size="3">
|
||||
if ( must_save ) Vapi-></font><a href="#InSaveAndClose"><font size="3">InSaveAndClose</font></a><font size="3">( hini ) ; </font><font color="#000080" size="3"><em>/* Save if key did not exist */</em></font><font size="3">
|
||||
else Vapi-></font><a href="#InClose"><font size="3">InClose</font></a><font size="3">( hini ) ; </font><font color="#000080" size="3"><em>/* Else regular close */</em></font><font size="3">
|
||||
}
|
||||
}</font></pre>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="co.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="lo.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update : 19/05/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>INI
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
159
tools/vision/LDV/doc/english/vapi/index.htm
Normal file
159
tools/vision/LDV/doc/english/vapi/index.htm
Normal file
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>VISION Documentation (VAPI): Presentation</title></head>
|
||||
|
||||
<body background="../images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="pr.htm"><img src="../images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(VAPI)</em></strong></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update: 07/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>V
|
||||
A P I</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a name="Pr<50>sentation"></a><font size="4"><strong>1.
|
||||
Presentation</strong></font></p>
|
||||
|
||||
<p>VAPI (<em><strong>VISION's</strong></em> Application
|
||||
Programmer Interface) is a part of <em><strong>VISION</strong></em>
|
||||
designed to help you develop LDVs. You must have guessed that internally,
|
||||
<em><strong>VISION</strong></em> uses numerous functions to handle images
|
||||
(bit-planes conversions <--> TOS/VDI indexes, rasters handling,...)
|
||||
as well as user interface functions (e.g., progress windows).<br>
|
||||
The aim of VAPI is make available to LDVs these functions reserved, until
|
||||
now, to the internal operations of <em><strong>VISION</strong></em>.
|
||||
There are two interests for an LDV:</p>
|
||||
|
||||
<ul>
|
||||
<li>Its author spares the time to develop again an existing function
|
||||
</li>
|
||||
<li>The LDV is lighter</li>
|
||||
</ul>
|
||||
|
||||
<p>Of course, <em><strong>VISION</strong></em>
|
||||
has numerous functions (more or less easy and elegant...), a choice must
|
||||
then be made on which ones to export.
|
||||
Furthermore, <font size="3"><em><strong>VISION</strong></em></font> could
|
||||
also export its data such as the catalog, the image Browser, etc...<br>
|
||||
Since it still takes a lot of time to design and make all this, I will
|
||||
first ensure that <em><strong>VISION</strong></em> exports first a few
|
||||
"basic" functions, then, if success increases, more will follow.
|
||||
</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="dev-kit"></a><font size="4"><strong>2. Development kit
|
||||
</strong></font></p>
|
||||
|
||||
<p>The VAPI development kit is identical to the LDV one.
|
||||
You will find it <a href="../kitdev.htm">here</a>.</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="use"></a><font size="4"><strong>3. Use</strong></font></p>
|
||||
|
||||
<p>Using VAPI from an LDV is very simple: when <em><strong>VISION</strong></em>
|
||||
call the GetLDVCapabilities function, it returns a pointer on a structure
|
||||
of the type <a href="struct.htm#VAPI">VAPI</a>.
|
||||
Without going into details, this stucture contains the following
|
||||
information:</p>
|
||||
|
||||
<ul>
|
||||
<li>A header of the type <a href="struct.htm#VAPI_HEADER">VAPI_HEADER</a></li>
|
||||
<li>A list of "loose" functions. These functions are in fact
|
||||
put together in groups (also called interfaces). Each group is
|
||||
terminated by an unused memory area, which purpose is to host new
|
||||
functions from the same group. If new groups are created, they will go
|
||||
at the end of the structure, to garanty ascending compatibility.</li>
|
||||
</ul>
|
||||
|
||||
<p>Now, to use a function from VAPI, it's very simple; imagine you want to
|
||||
initialise the destination image raster passed as a parameter in the Run
|
||||
function, with the colour white (in bit-plane or True Color); you just
|
||||
have to insert the following line:</p>
|
||||
|
||||
<p><strong>Vapi->RaImgWhite( &out->Raster ) ;</strong></p>
|
||||
|
||||
<p>This only suppose you maintained the VAPI pointer provided by
|
||||
<em><strong>VISION</strong></em> through GetLDVCapabilities (done
|
||||
automatically by the skeleton).</p>
|
||||
|
||||
<p>The list of all functions defined by the VAPI interface is available
|
||||
here. Sorry, but all the interfaces and the function names are in English!
|
||||
(Translator's note: this remark is obviously for French readers).</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><a name="interfaces"></a><font size="4"><strong>4. Available interfaces
|
||||
</strong></font></p>
|
||||
|
||||
<p><font size="3">Interfaces are grouping function having a common
|
||||
interest. Here is the list (which I hope is not complete) of the current
|
||||
interfaces:</font></p><table border="1" width="90%"><tbody><tr><td align="center" width="25%"><a href="pr.htm"><font size="3">Progress Interface</font></a></td>
|
||||
<td align="center" width="25%"><a href="ra.htm"><font size="3">Raster Interface</font></a></td>
|
||||
<td align="center" width="25%"><a href="co.htm">Configuration
|
||||
Interface</a></td>
|
||||
<td align="center" width="25%"><a href="in.htm">INI
|
||||
Interface</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="me.htm">MEM Interface</a></td>
|
||||
<td align="center"><a href="lo.htm">Logging Interface</a> </td>
|
||||
<td align="center"> </td>
|
||||
<td align="center"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<p> </p><p> </p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="pr.htm"><img src="../images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
|
||||
<em>(VAPI)</em></strong></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update: 07/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>V
|
||||
A P I</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
151
tools/vision/LDV/doc/english/vapi/lo.htm
Normal file
151
tools/vision/LDV/doc/english/vapi/lo.htm
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (VAPI) : Configuration Interface</title></head>
|
||||
<body background="../images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="in.htm"><img style="border: 0px solid ; width: 46px; height: 26px;" src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" hspace="2"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="struct.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update : 08/26/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>LOGGING INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center"><strong>Abstract</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Interface Prefix</strong></td>
|
||||
<td width="85%">Lo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Nomber of functions</strong></td>
|
||||
<td width="85%">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Set of functions enabling logging from LDV</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="LoDoLog"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">long cdecl <span style="font-weight: bold;">L</span><strong>oDoLog</strong>(unsigned long level, char* format, ...)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">level:
|
||||
bitmask defining the logging level of the message:: LL_FATAL, LL_ERROR,
|
||||
LL_WARNING, LL_INFO, LL_PERF, LL_MEM, LL_GW2, LL_GW1, LL_DEBUG, LL_KCODE, LL_TMP2, LL_TMP1<br>format: format string for parameters passed after (just like sprintf)<br>...: dynamic list of parameters to pass (cf. <a href="https://en.wikipedia.org/wiki/Ellipsis_%28computer_programming%29">'C' ellipsis</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">Number of bytes written to logging file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to send information to <em><strong>VISION</strong></em>'s logging file; typically for debugging, performance or error<br>Note that if level parameter does not match current <em><strong>VISION</strong></em>''s
|
||||
logging level bitmask, this function will simply return without even
|
||||
starting formatting data (which may have been CPU consuming)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%">Example:<br>Vapi->LoDoLog(LL_DEBUG, "%ld pixels computed or deduced", np) ;<br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.04 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="LoGetLogLevel"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">unsigned long cdecl <span style="font-weight: bold;">L</span><strong>oGetLogLevel</strong>(void)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">The bitmask logging level currently used by <em><strong>VISION</strong></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Used to know what is the current <em><strong>VISION</strong></em>'s logging level in order to not proceed to some useless computation for some message which won't be logged anyway</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarks</strong></td>
|
||||
<td width="85%">Use
|
||||
this function only if you may have extra computation before calling
|
||||
LoDoLog as LoDoLog will return immediatly if logging level does not
|
||||
match loggng level message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.04 or more</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center><br></center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="in.htm"><img style="border: 0px solid ; width: 46px; height: 26px;" src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" hspace="2"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="struct.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Chapitre suivant" hspace="2"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left"></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>LOGGING</strong></font><font size="4"><strong> INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
201
tools/vision/LDV/doc/english/vapi/me.htm
Normal file
201
tools/vision/LDV/doc/english/vapi/me.htm
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (VAPI) : MEM Interface</title></head>
|
||||
<body background="../images/conc2.gif" bgcolor="#ffffff">
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="in.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="27" hspace="2" width="32"></a><a href="struct.htm"><img src="../images/csuiv.jpg" alt="Chapitre suivant" border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update : 08/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>MEM
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td colspan="2" align="center"><strong>Abstract</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Pr<EFBFBD>fixe de l'interface</strong></td>
|
||||
<td width="85%">Me</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Nombre de fonctions</strong></td>
|
||||
<td width="85%">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Set of functions allowing to manipulate memory areas, mostly image oriented</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="MeSCopyMemory8"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">void cdecl <strong>MeSCopyMemory8</strong>(char
|
||||
*dst, char *src, unsigned long nb_elems_dst, unsigned
|
||||
long nb_elems_src)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[OUT]</strong> dst : Pointer to memory area to change<br>
|
||||
<strong>[IN]</strong> src : Pointer to memory area to copy from<br>
|
||||
<strong>[OUT]</strong> nb_elems_dst : Number of 8bit elements in destination area<br>
|
||||
<strong>[IN]</strong> nb_elems_src : Number of 8bit elements in source area</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Copies
|
||||
a 8bit memory area by respecting the number of elements in each zone.
|
||||
Very useful to perform changes on a line. Not working with overlapping
|
||||
zones.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%">Number of elements shall not be more than 65535 due to specific optimization. If a 68030 processor is available, <em><strong>VISION</strong></em>
|
||||
will use automatically an optimzed routine.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="MeSCopyMemory16"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">void cdecl <strong>MeSCopyMemory16</strong>(char
|
||||
*dst, char *src, unsigned long nb_elems_dst, unsigned
|
||||
long nb_elems_src)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[OUT]</strong> dst : Pointer to memory area to change<br>
|
||||
<strong>[IN]</strong> src : Pointer to memory area to copy from<br>
|
||||
<strong>[OUT]</strong> nb_elems_dst : Number of 16bit elements in destination area<br>
|
||||
<strong>[IN]</strong> nb_elems_src : Number of 16bit elements in source area</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Copies a 16bit memory area by respecting the number of elements in each
|
||||
zone. Very useful to perform changes on a line. Not working with
|
||||
overlapping zones.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">Number of elements shall not be more than 32767 due to specific optimization. If a 68030 processor is available, <em><strong>VISION</strong></em>
|
||||
will use automatically an optimzed routine.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="15%"><a name="MeSCopyMemory32"></a><strong>Prototype</strong></td>
|
||||
<td width="85%">void cdecl <strong>MeSCopyMemory32</strong>(char
|
||||
*dst, char *src, unsigned long nb_elems_dst, unsigned
|
||||
long nb_elems_src)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Parameters</strong></td>
|
||||
<td width="85%"><strong>[OUT]</strong> dst : Pointer to memory area to change<br>
|
||||
<strong>[IN]</strong> src : Pointer to memory area to copy from<br>
|
||||
<strong>[OUT]</strong> nb_elems_dst : Number of 32bit elements in destination area<br>
|
||||
<strong>[IN]</strong> nb_elems_src : Number of 32bit elements in source area</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Return</strong></td>
|
||||
<td width="85%">None</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Copies a 32bit memory area by respecting the number of elements in each
|
||||
zone. Very useful to perform changes on a line. Not working with
|
||||
overlapping zones.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Comments</strong></td>
|
||||
<td width="85%">Number of elements shall not be more than 16383 due to specific optimization. If a 68030 processor is available, <em><strong>VISION</strong></em>
|
||||
will use automatically an optimzed routine.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
|
||||
<td width="85%">1.02 or greater</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td align="center" width="17%"><a href="in.htm"><img src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent" border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Retour au sommaire" border="0" height="26" hspace="2" width="26"></a><a href="struct.htm"><img src="../images/csuiv.jpg" alt="Chapitre suivant" border="0" height="26" hspace="2" width="43"></a></td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Last update : 08/04/18</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a href="..%5C..%5C..%5Cdownload/dvldv.zip"><br></a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>MEM
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</center></div>
|
||||
</body></html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user