Discussion:
api proposal pre1.9
Andraz Tori
2004-11-10 02:16:17 UTC
Permalink
Ok here's the new proposal:
http://www.kiberpipa.org/~minmax/livido/livido-p1.9.tar.gz

source readable at:
http://www.kiberpipa.org/~minmax/livido/latest_source/


I tried to respect everyone's wishes about functionality:

What is new?
1. It compiles with -std=c99 -pedantic -Wall without any warnings
(niels' wish)
2. It supports per parameter host querying for keyframes (salsaman's
wish)
3. Completely orthogonal implementation of interpolation
4. persistent parameter store inside livido_instance_t
5. removal of host_data and get_prev/next_keyframe from
livido_instance_t (jaromil's wish)
6. removal of all macros needed to hide queries, since not needed

Salsaman: i went even further than needing two lines of code from
non-keyframable plugins. Now the only thing simple plugin needs to do is
set the
livido_instance_templte_t->interpolate_parameters to NULL

salsaman: the only thing i had to add is flag hint for marking
parameters as not to be displayed by GUI ... a feat needed for
interpolation function to pass some calculated values to the
instance ... can be used by some other things also...

there are other changes, and they can be found at the end of livido.h...

bye
andraz
salsaman
2004-11-10 12:56:18 UTC
Permalink
Post by Andraz Tori
http://www.kiberpipa.org/~minmax/livido/livido-p1.9.tar.gz
http://www.kiberpipa.org/~minmax/livido/latest_source/
What is new?
1. It compiles with -std=c99 -pedantic -Wall without any warnings
(niels' wish)
2. It supports per parameter host querying for keyframes (salsaman's
wish)
3. Completely orthogonal implementation of interpolation
4. persistent parameter store inside livido_instance_t
5. removal of host_data and get_prev/next_keyframe from
livido_instance_t (jaromil's wish)
6. removal of all macros needed to hide queries, since not needed
Salsaman: i went even further than needing two lines of code from
non-keyframable plugins. Now the only thing simple plugin needs to do is
set the
livido_instance_templte_t->interpolate_parameters to NULL
salsaman: the only thing i had to add is flag hint for marking
parameters as not to be displayed by GUI ... a feat needed for
interpolation function to pass some calculated values to the
instance ... can be used by some other things also...
there are other changes, and they can be found at the end of livido.h...
bye
andraz
_______________________________________________
piksel-dev mailing list
http://plot.bek.no/mailman/listinfo/piksel-dev
http://www.piksel.org
I will take a look. Right now I can't compile LiVES, the build system
got updated when I did some development on blackjack at piksel.
I need to upgrade on my home system, I am just downloading the bit
torrents for Mandrake 10.1. This will take at least another couple of days.


Cheers,
Gabriel.
--
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

-- George Bernard Shaw
jaromil
2004-11-10 17:35:42 UTC
Permalink
answers to your open questions:

// 2.
// Should min and max be of the same type as def (in livido_paramter_description_t)?

yes definitely, for consistence in the parameter parser.

// 5.
// should we be strict about exact sizing (by using uint32_t and others everywhere)?
// this means NO types of int, long, char ..

yes, especially on flags.

// 7.
// should we rename all the names to LVD_ and lvd_
// Salsaman presented counter argument, but i still cannot see a clear
// and logical distinction. A programer writing code will have to
// think of that... what's the purpose?

to not take the namespace of the "lvd" project, whatever that will be :)

so far LVD is only used in binary flags, which we might want to change to
LIVIDO as well.

to make things shorter you can always use a few typedefs at the beginning of
your code:
typedef livido_channel_t channel
and so on..




now a question:
what is it for the reserved[64] ?

and a thought:
we cannot use the void* memory blocks for actual parameter values as we
need a clear specification of how the data is stored inside, not a "black
box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it must
be clear and intuitive, explicited by reading the header.
the reason is obvious to everyone, i hope.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Niels Elburg
2004-11-11 10:19:54 UTC
Permalink
Marshalling each scalar of the array of values by this method will mean
solution is going to be too slow if you will want to pass a lot of data
in this way. For example sound samples
we have a void *extra pointer for that
But this is currently useless, since we haven't defined ways to use it,
while channels already provide the templating mechanism etc etc..
*extra pointer is only useful for hosts that work with specific plugins,
both knowing how to interpret the thing. not for general big array
passing
the extra pointer is simply private data from the plugin, host must never
touch. a practical example is a font renderer using freetype lib where
lists of fonts and other information needs to be stored somewhere.
or shape data...
we have MASK channels for that
I wasn't precise enough MASK is bitmap shape data, i was thinking vector
shape data.
No, MASK doesnt imply anything on data. Its simply a hint for the host;
the actual datatype of the data passed through the channel is still set by
the palette ; MASK can also be RGBA or YUYV and is not limited to bitmap.
imagine thousands of scalars... multiply by 25 ... So this means it
has very limited use (i find it hard to imagine what limited use this
would be).
in fact the printf is an efficient enough implementation, of course
given the fact that cases like the ones you mention are implemented
using properly formed data.
Sorry, but printf and scanf may be efficient, but are definitely a
bottleneck for passing tens of thousands of scalars per second.
Why do so many scalars have to be passed as a parameter ?

Right now, to pass large amounts of data it is done by sending it through
the Channel. However, somehow this doesnt fit well (parameters passed
trough channels blocks instead of parameter blocks).

If we need a more abstract way of passing arround any type of data,
we need a different approach (using Ports, either of which is
control or data and allow them to pass anything arround, whether scalars, image data,
sound data). The datastructure of channel is really not suitable for
passing arround anything other than images, anything else will be hacking
the API.
Andraz Tori
2004-11-11 10:45:04 UTC
Permalink
Post by Niels Elburg
Sorry, but printf and scanf may be efficient, but are definitely a
bottleneck for passing tens of thousands of scalars per second.
Why do so many scalars have to be passed as a parameter ?
I think salsaman (or was it someone else?) wanted to have variable
lenght arrays passed trough parameters in order to pass vector shape
data. This was also used as an argument why printf/scanf solution would
be needed in order to have dynamically sized arrays.

I just pointed out that in that case printf/scanf would become a
bottleneck and probably using channels would be much smarter for this
purpose.
Post by Niels Elburg
If we need a more abstract way of passing arround any type of data,
we need a different approach (using Ports, either of which is
control or data and allow them to pass anything arround, whether scalars, image data,
sound data). The datastructure of channel is really not suitable for
passing arround anything other than images, anything else will be hacking
the API.
Channel, by the meaning of the english word is exactly what is needed to
pass streamlined data (it's actually pretty close to the meaning of port
in this context).

However, we currently have structure
livido_channel_t/livido_channel_template_t shaped to fit images.
But by simple hack: defining a new palette entry, having x as amout of
samples and y as amout of sound channels, you get a tool that can be
used for passing sound with the best possible efficency :)

It is true this is a bit of a hack, but it does make a lot of sense...
You however make your point. We are leaving this up to livido 1.1 / 2.0

The proposal above is just one of the possible paths...

bye
andraz
Andraz Tori
2004-11-10 23:23:53 UTC
Permalink
Post by jaromil
we cannot use the void* memory blocks for actual parameter values as we
need a clear specification of how the data is stored inside, not a "black
box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it must
be clear and intuitive, explicited by reading the header.
the reason is obvious to everyone, i hope.
You don't need library to read/write parameters... macros inside
livido.h do that just fine (all that is needed is adding the offset to
the paramter block pointer and casting it properly).

livido-library.c functions to access parameters just offer another layer
of error-checking - typecasting check ... Noone needs to use them.

bye
andraz
jaromil
2004-11-10 23:39:38 UTC
Permalink
Post by Andraz Tori
Post by jaromil
we cannot use the void* memory blocks for actual parameter values as
we need a clear specification of how the data is stored inside, not
a "black box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it
must be clear and intuitive, explicited by reading the header. the
reason is obvious to everyone, i hope.
You don't need library to read/write parameters... macros inside
livido.h do that just fine (all that is needed is adding the offset to
the paramter block pointer and casting it properly).
stepping back from the initial approach of having macros, i think that a
clear specification of how the values are stored in the memory would do
better in the header.

let's leave our auxiliary marshalling implementation in the library,
that will make things smoother.

but we really need a clear and well documented description of the
format, therefore scanf seemed a good solution...
but while implementing it i also noticed some problems with scalar
values which are not explicitly of float type, something that made me
and salsaman shake heads already once here at piksel.

still i want to stick to the use of va_list and va_arg, which is very
convenient for parameters with variable number of arguments.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-11 00:01:43 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
Post by jaromil
we cannot use the void* memory blocks for actual parameter values as
we need a clear specification of how the data is stored inside, not
a "black box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it
must be clear and intuitive, explicited by reading the header. the
reason is obvious to everyone, i hope.
You don't need library to read/write parameters... macros inside
livido.h do that just fine (all that is needed is adding the offset to
the paramter block pointer and casting it properly).
stepping back from the initial approach of having macros, i think that a
clear specification of how the values are stored in the memory would do
better in the header.
let's leave our auxiliary marshalling implementation in the library,
that will make things smoother.
but we really need a clear and well documented description of the
format, therefore scanf seemed a good solution...
but while implementing it i also noticed some problems with scalar
values which are not explicitly of float type, something that made me
and salsaman shake heads already once here at piksel.
still i want to stick to the use of va_list and va_arg, which is very
convenient for parameters with variable number of arguments.
Not only are there many pitfalls as you already found out...

Marshalling each scalar of the array of values by this method will mean
solution is going to be too slow if you will want to pass a lot of data
in this way. For example sound samples or shape data... imagine
thousands of scalars... multiply by 25 ... So this means it has very
limited use (i find it hard to imagine what limited use this would be).

I seriously suggest to look at channels as a very elegant method for
passing variable lenght big arrays of data. By simply creating new types
of PALETTES that denote not the real palettes, but other kinds of data..
for example shapes. They ideally fit for the purpose.

Do you see any pitfalls in this idea?

bye
andraz
jaromil
2004-11-11 00:20:03 UTC
Permalink
Marshalling each scalar of the array of values by this method will mean
solution is going to be too slow if you will want to pass a lot of data
in this way. For example sound samples
we have a void *extra pointer for that
or shape data...
we have MASK channels for that
imagine thousands of scalars... multiply by 25 ... So this means it
has very limited use (i find it hard to imagine what limited use this
would be).
in fact the printf is an efficient enough implementation, of course
given the fact that cases like the ones you mention are implemented
using properly formed data.
I seriously suggest to look at channels as a very elegant method for
passing variable lenght big arrays of data. By simply creating new types
of PALETTES that denote not the real palettes, but other kinds of data..
for example shapes. They ideally fit for the purpose.
Do you see any pitfalls in this idea?
no.

in fact we have things like MASK property and ALPHA 1bit palette
already.

i am now tempted to propose an AUDIO palette type for channels.

but... gosh. i won't. oh no. let's forget about that.

this would probably go too far now, we might start wanting to build a
suppa-modular multimediamatic application out of livido even before
releasing this header spec :Q

i'm going offline until tomorrow, having a good read of your proposal.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-11 00:29:22 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marshalling each scalar of the array of values by this method will mean
solution is going to be too slow if you will want to pass a lot of data
in this way. For example sound samples
we have a void *extra pointer for that
But this is currently useless, since we haven't defined ways to use it,
while channels already provide the templating mechanism etc etc..

*extra pointer is only useful for hosts that work with specific plugins,
both knowing how to interpret the thing. not for general big array
passing
or shape data...
we have MASK channels for that
I wasn't precise enough MASK is bitmap shape data, i was thinking vector
shape data.
imagine thousands of scalars... multiply by 25 ... So this means it
has very limited use (i find it hard to imagine what limited use this
would be).
in fact the printf is an efficient enough implementation, of course
given the fact that cases like the ones you mention are implemented
using properly formed data.
Sorry, but printf and scanf may be efficient, but are definitely a
bottleneck for passing tens of thousands of scalars per second.
I seriously suggest to look at channels as a very elegant method for
passing variable lenght big arrays of data. By simply creating new types
of PALETTES that denote not the real palettes, but other kinds of data..
for example shapes. They ideally fit for the purpose.
Do you see any pitfalls in this idea?
no.
in fact we have things like MASK property and ALPHA 1bit palette
already.
i am now tempted to propose an AUDIO palette type for channels.
but... gosh. i won't. oh no. let's forget about that.
Actually I see that as an easy added functionality for Livido 1.1 :)
this would probably go too far now, we might start wanting to build a
suppa-modular multimediamatic application out of livido even before
releasing this header spec :Q
A side effect of good API is the future unintended uses :)
i'm going offline until tomorrow, having a good read of your proposal.
ok.. btw.. let's really implement the example plugin i was talking
about. It will make the biggest difference between proposals very
visible...

byea
andraz
jaromil
2004-11-11 16:21:00 UTC
Permalink
Andraz,

please find some time to briefly answer my questions below

i also hope you get my point about the current parameter passing and why
it has to be done in a clearly documented format.

ciao
Post by jaromil
// 2.
// Should min and max be of the same type as def (in livido_paramter_description_t)?
yes definitely, for consistence in the parameter parser.
// 5.
// should we be strict about exact sizing (by using uint32_t and others everywhere)?
// this means NO types of int, long, char ..
yes, especially on flags.
// 7.
// should we rename all the names to LVD_ and lvd_
// Salsaman presented counter argument, but i still cannot see a clear
// and logical distinction. A programer writing code will have to
// think of that... what's the purpose?
to not take the namespace of the "lvd" project, whatever that will be :)
so far LVD is only used in binary flags, which we might want to change to
LIVIDO as well.
to make things shorter you can always use a few typedefs at the beginning of
typedef livido_channel_t channel
and so on..
what is it for the reserved[64] ?
we cannot use the void* memory blocks for actual parameter values as we
need a clear specification of how the data is stored inside, not a "black
box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it must
be clear and intuitive, explicited by reading the header.
the reason is obvious to everyone, i hope.
ciao
--
jaromil, dyne.org rasta coder, http://rastasoft.org
_______________________________________________
piksel-dev mailing list
http://plot.bek.no/mailman/listinfo/piksel-dev
http://www.piksel.org
- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-11 17:12:04 UTC
Permalink
Post by jaromil
Andraz,
please find some time to briefly answer my questions below
i also hope you get my point about the current parameter passing and why
it has to be done in a clearly documented format.
I have to say, i made some mistakes of not deleting the points that have
been already resolved.
Post by jaromil
Post by jaromil
// 2.
// Should min and max be of the same type as def (in livido_paramter_description_t)?
yes definitely, for consistence in the parameter parser.
agreed and resolved. Parameter sets provide great solution to this
Post by jaromil
Post by jaromil
// 5.
// should we be strict about exact sizing (by using uint32_t and others everywhere)?
// this means NO types of int, long, char ..
yes, especially on flags.
agreed, done in p1.9 already
Post by jaromil
Post by jaromil
// 7.
// should we rename all the names to LVD_ and lvd_
// Salsaman presented counter argument, but i still cannot see a clear
// and logical distinction. A programer writing code will have to
// think of that... what's the purpose?
to not take the namespace of the "lvd" project, whatever that will be :)
so far LVD is only used in binary flags, which we might want to change to
LIVIDO as well.
I am still not convinced here.. using livido for every flag is
cumbersome, and being afraid for some yet unborn project called lvd is a
bit overexagerating..

Are there any better reasons against lvd_ ?
Post by jaromil
Post by jaromil
to make things shorter you can always use a few typedefs at the beginning of
typedef livido_channel_t channel
and so on..
Yes, but why, when we could just have lvd_ everything ?
Post by jaromil
Post by jaromil
what is it for the reserved[64] ?
Reserved space for further usage by livido 1.1
Post by jaromil
Post by jaromil
we cannot use the void* memory blocks for actual parameter values as we
need a clear specification of how the data is stored inside, not a "black
box" that can be written and read only using the library.
we must specify clearly the format in which the data is stored, it must
be clear and intuitive, explicited by reading the header.
the reason is obvious to everyone, i hope.
I agree, we need a clear specification of what is inside memory blocks.
Parameter templates provide that clear and unambigious specification


bye
andraz
jaromil
2004-11-11 17:58:03 UTC
Permalink
Post by Andraz Tori
Post by jaromil
what is it for the reserved[64] ?
Reserved space for further usage by livido 1.1
this is not an answer :)

why that?
why char?
why somewhere 64, then 32, then 16?
Post by Andraz Tori
I agree, we need a clear specification of what is inside memory blocks.
Parameter templates provide that clear and unambigious specification
i will elaborate further on parameter sets and correct the current
implementation in the main trunk.

meanwhile i'd like you to answer one simple question on keyframing:
which are the data elements that an host and a plugin should be able to
access? an explanation that starts from "what is a callback" just
confuses me, my random access memory is full ;)

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Niels Elburg
2004-11-12 12:18:00 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
Post by jaromil
what is it for the reserved[64] ?
Reserved space for further usage by livido 1.1
No, please no reserved[crap] inside livido. There is
nothing 'unknown' , 'special' or 'reserved' that needs to be
put there.
Andraz Tori
2004-11-12 19:36:10 UTC
Permalink
Post by Niels Elburg
Post by Andraz Tori
Post by jaromil
what is it for the reserved[64] ?
Reserved space for further usage by livido 1.1
No, please no reserved[crap] inside livido. There is
nothing 'unknown' , 'special' or 'reserved' that needs to be
put there.
This is reserved memory to be used by later versions of livido (1.1,
2.0) in order not to break binary compatiblity.

I can throw it out if you really want, however we could find it a very
usefull tool in the future. It is a good idea to have some reserved
space for new things to come.

bye
andraz
Slavko Glamocanin
2004-11-12 20:09:41 UTC
Permalink
just a quick note, the general windows (and we all know how hated this software is:) implementation for passing structs is having a 'size' parameter, which contains the size of the passing struct.

so basically older 'hosts' just use the first something defined variables, but the hosts that know the new structure type (which is larger) can eaily find out which structure version has been passed (based on size) and act accordingly.

just somethink to think about (and to measure the MS bias on the list:). i find this solution an acceptable idea for expanding struct, judge for yourself.

and let me just rant some more about the scanf solution for parameter passing.

jaromil has not once clearly responded to andrazes factually proven examples about the scanf phenomenon. it is not about competition, i myself would love to hear some fact based arguments speaking for the scanf approach, in hope of learning something new.

as i dont have an in-depth knowledge of the problem (failing to read the 100+ emails:), i cannot propose a solution. but generally, i find two entry points between the host and the plugin to be enough. one for setting/getting number values (float) and another for string values (char*/wide maybe). all other additional functionality could be done on the plugin side, having VST as an example, as the plugins there are hugely bloated with functionality:)

consider this: adding subtitles... the host gives the plugin the location data and all the titling happens inside the plugin, along with the composition and transitions.

i basicaly consider things to have a clean design when they look simple and are easy to use. hacking is a method which does not produce clean design.

buhbye,
Slavko
*********** REPLY SEPARATOR ***********
Post by Andraz Tori
Post by Niels Elburg
Post by Andraz Tori
Post by jaromil
what is it for the reserved[64] ?
Reserved space for further usage by livido 1.1
No, please no reserved[crap] inside livido. There is
nothing 'unknown' , 'special' or 'reserved' that needs to be
put there.
This is reserved memory to be used by later versions of livido (1.1,
2.0) in order not to break binary compatiblity.
I can throw it out if you really want, however we could find it a very
usefull tool in the future. It is a good idea to have some reserved
space for new things to come.
bye
andraz
_______________________________________________
piksel-dev mailing list
http://plot.bek.no/mailman/listinfo/piksel-dev
http://www.piksel.org
jaromil
2004-11-13 11:44:59 UTC
Permalink
Post by Slavko Glamocanin
just a quick note, the general windows (and we all know how hated this
software is:) implementation for passing structs is having a 'size'
parameter, which contains the size of the passing struct.
so basically older 'hosts' just use the first something defined
variables, but the hosts that know the new structure type (which is
larger) can eaily find out which structure version has been passed
(based on size) and act accordingly.
just somethink to think about (and to measure the MS bias on the
list:). i find this solution an acceptable idea for expanding struct,
judge for yourself.
hi Slavko,

concerning binary compatibility thru different versions, i find the
reserved[] buffer at the end of the structures a better solution than
this.
Post by Slavko Glamocanin
and let me just rant some more about the scanf solution for parameter passing.
jaromil has not once clearly responded to andrazes factually proven
examples about the scanf phenomenon.
i must admit that the trolling on this list reached the point in which i
don't consider anymore a comunication channel useful, therefore i've
been forced to keep private contact with other developers to avoid
unpleasant insults and aggressive criticism.

i think it is not clear to everyone that we are here not to compete
among each other or to show up our skills, but to cooperate in
establishing a common API for video effects and objectively evaluate it.

consider also that the current implementation is generated out of a
discussion that has been also kept IRL.

this process took 1 year and is now finished.
Post by Slavko Glamocanin
it is not about competition, i myself would love to hear some fact
based arguments speaking for the scanf approach, in hope of learning
something new.
i'm pleased to give you my point of view about scanf/fprintf:

- - simplicity:
the current implementation leads to a very simple and recognizable
prototype for set/get_parameter, which greatly reduces errors in
buffer handling while results extremely familiar even to unexperienced
programmers which want to just focus on video algorithms.
furthermore the usage of get/set_parameter in livido is not yet
another way to pass parameters, but it's consistent with the POSIX way
to pass parameters which is indeed a good thing to learn ;)

- - de/marshalling for portability:
to avoid differences in binary representations of values across
platforms, rendering to strings is the solution. This is not an
opinion, this is a fact: you can retrieve this approach in a wide
number of applications. cross platform compatibility is one of the
main focuses set by the pikselites for livido.

- - localisation:
while we had a little bug with reading default values typed into the
plugin sources depending from the locales, in case we use a
de/marshaller that is not locale-aware we will have a symmetrical
problem occurring on a wider level: numbers provided by GUIs will be
localised indeed. by using scanf/fprintf this is solved across all
platforms.

- - speed: scanf/printf internally is a fast and simple implementation,
there is no point in saying is slow as it is the underlying conversion
routine for a wide number of POSIX functions and libraries, and more.
furthermore, parameters should not be used to pass data, but
informations about how to manipulate data and about how that has been
manipulated.
of course the get/set_parameters is done only once on data: parameters
are not fetched every time the value is checked as their processing
will be atomical thru the instance passing scheme we are using.
i guess this should be enough to solve all speed concerns.
Post by Slavko Glamocanin
as i dont have an in-depth knowledge of the problem (failing to read
the 100+ emails:),
i give you all my solidarity :)

still i prefer much open lists to moderated or digested, so i hope we
will all survive and learn from it, keeping this place as it is.
Post by Slavko Glamocanin
consider this: adding subtitles... the host gives the plugin the
location data and all the titling happens inside the plugin, along
with the composition and transitions.
would be a simple filter:
1 input and 1 output channel
parameters: position, text, font, size, (kerning etc.)
Post by Slavko Glamocanin
i basicaly consider things to have a clean design when they look
simple and are easy to use. hacking is a method which does not produce
clean design.
i totally agree with you and i think is quite a common point this one.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-13 12:43:05 UTC
Permalink
I'll be short.
Post by jaromil
i must admit that the trolling on this list reached the point in which i
don't consider anymore a comunication channel useful, therefore i've
been forced to keep private contact with other developers to avoid
unpleasant insults and aggressive criticism.
I am very disappointed by this. But aggressive criticism is what
I am left with when I see factually wrong statements and unworkable
or cumbersome solutions.

You might want to isolate yourself from critical review of your
solutions, but not having a review will guarantee you will
make a bad API, which will hurt everyone, including me.
That's why I am really trying hard to explain you all the problems
you can't anticipate yourself.

It has been shown many times that some people discussing livido on
this list don't have much of programming competency. This is not an
insult, this is a fact supported by the debates on this list.

On the other hand, I understand that I am not the easiest person
to work with, since I don't care much about being politically correct.
Post by jaromil
the current implementation leads to a very simple and recognizable
prototype for set/get_parameter, which greatly reduces errors in
buffer handling while results extremely familiar even to unexperienced
programmers which want to just focus on video algorithms.
furthermore the usage of get/set_parameter in livido is not yet
another way to pass parameters, but it's consistent with the POSIX way
to pass parameters which is indeed a good thing to learn ;)
Can you please post an example of a bit more complex plugin, so we could
compare which implementation is actually simpler.

I have already specified the plugin I want from you. It will prove
or disprove your claim of simplicity once and for all.

This is what will convince me, not talking about being consistent with
POSIX which is completely abstract topic.
Post by jaromil
to avoid differences in binary representations of values across
platforms, rendering to strings is the solution. This is not an
opinion, this is a fact: you can retrieve this approach in a wide
number of applications. cross platform compatibility is one of the
main focuses set by the pikselites for livido.
Can you explain only one example where marshalling solution is more
portable than binary parameter passing solution?
Post by jaromil
while we had a little bug with reading default values typed into the
plugin sources depending from the locales, in case we use a
de/marshaller that is not locale-aware we will have a symmetrical
problem occurring on a wider level: numbers provided by GUIs will be
localised indeed. by using scanf/fprintf this is solved across all
platforms.
You need to write a custom marshaller now, which you haven't yet.
It will be quite complicated piece of code, I can assure you.
Post by jaromil
- - speed: scanf/printf internally is a fast and simple implementation,
there is no point in saying is slow as it is the underlying conversion
routine for a wide number of POSIX functions and libraries, and more.
furthermore, parameters should not be used to pass data, but
informations about how to manipulate data and about how that has been
manipulated.
I'd like to point out that the main argument for scanf/printf solution
was passing lists of floats and the example given was passing vectorized
shape data.

I've pointed out that this is a bad example, since in this case
printf/scanf solution becomes a bottleneck and that we need more
efficient method for dynamicly sized arrays - and also proposed one.

I also haven't yet seen how list of floats of dynamic lenght will be
passed by your solution. I'd like to have an example first, since I
think I see at least one problem in the distance that you aren't yet
aware of.

Here's my prognosis: you will start to have more and more complicated
(de)marshalling since you will start to bump into problems you aren't
yet aware of. You will have to add one hack after another in order to
get out of the problems. At the end, the solution will be total mess
by everyone's standards, except your's naturally.

Third thing. Writing an efficient demarshaller requires a cellular
automata implementation of it. I hope you are aware of that.

bye
andraz
jaromil
2004-11-13 13:24:29 UTC
Permalink
Post by Andraz Tori
I am very disappointed by this. But aggressive criticism is what
you would be even more disappointed if i would express my feelings about
the code in your proosal and the code in the cvs of cinelerra, after
having read what i read.

but this list is not about such a discussion neither about showing up of
the best programmer around. You just insist to have competition and
endless arguments, while you hook up to a few real problems to bloat the
whole process with arbitrary insults and misleading opinions.

anyway i do believe you have some good suggestions to share, but your
way of monopolizing a common discussion space makes them almost less
valuable than a peaceful place for cooperation.

said that, i can imagine you are very disappointed now, so i will just
assume your transformation in a troll has reached his final stage, in
case it is true i will just threat you as such.
Post by Andraz Tori
I see factually wrong statements and unworkable or cumbersome solutions
put up some glasses.
Post by Andraz Tori
You might want to isolate yourself from critical review of your
i'm not isolated, you are isolated: you have been invited to partecipate
in person to the development process, instead you refused, as you
refused to commit your code in the repository for a clear review of it.
instead you just kept acting like you are doing on this mailinglist,
after arriving in the final months of the process and pretending to
shape the API after the design in Cinelerra.
Post by Andraz Tori
It has been shown many times that some people discussing livido on
this list don't have much of programming competency. This is not an
insult, this is a fact supported by the debates on this list.
this fact should be supported by the code that everyone of us wrote and
the experience we made, not by the insults flying on this list.
Post by Andraz Tori
On the other hand, I understand that I am not the easiest person to
work with, since I don't care much about being politically correct.
it is not politically correctness what i'm talking about: it is peace of
mind and cooperative attitude.

i suggest you have a break for some time before replying again.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Niels Elburg
2004-11-13 13:39:37 UTC
Permalink
On Sat, 13 Nov 2004, jaromil wrote:

I keep this even shorter.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
I am very disappointed by this. But aggressive criticism is what
anyway i do believe you have some good suggestions to share, but your
way of monopolizing a common discussion space makes them almost less
valuable than a peaceful place for cooperation.
Livido is like a common room ; everbody joins and adds to the discussion,
eventually also in the code. So the code belongs to everybody
(which is the same as nobody). Andraz is the one of us who could
make decisions what course to take (I think) because he is more
experienced and he is a better (software) designer. But but but livido is
a semi-democratic process where all parties involved tend to
disagree out of the box, just like in dutch politics.
That is also a reason why livido's development is so slow
(businesses can read expensive) but now when we are reaching the
final state of livido , decisions have to be made and not by
counting votes but by weighting valid arguments.
But I agree Andraz can be quite senseless from time to time, sometimes
it annoys me other times I laugh out loud so hard my stomach hurts.

- Niels
Andraz Tori
2004-11-13 15:41:09 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
I am very disappointed by this. But aggressive criticism is what
you would be even more disappointed if i would express my feelings about
the code in your proosal and the code in the cvs of cinelerra, after
having read what i read.
If you point out at things that dont' work or work badly etc, i will be
willing to listen.

About Cinelerra. I think I've explained it to you in private RL
discussion already, that the code that we (CVS Cinelerra project) are
working on is complex and far far from perfect. We don't even want to
change it much where it is not absolutely neccessary since it would mean
forking it from the main developer, which means even less eyes and
brains for maintaining 200.000+ lines of code.

We are doing best as we can, but code in cinelerra is not mine. However
I've learned enormously from Cinelerra - many good and bad coding
practices, that I would never think up myself.

But if you have criticism about my proposal, all I can say is bring it
on, start dismanteling it and provide examples of what can't be done
with it or what has to be done in some very strange or cumbersome way.

If your examples will be real, I will either answer with the code
showing how to do things elegantly, or fix my proposal and answer with
the code (as I have done many times already, when good arguments were
made - for example keyframing each parameter separately). Or in the case
when you will provide me with real world case that is completely
unworkable inside my proposal, but is workable in yours, I'll say that
we should throw my proposal away.
but this list is not about such a discussion neither about showing up of
the best programmer around. You just insist to have competition and
endless arguments, while you hook up to a few real problems to bloat the
whole process with arbitrary insults and misleading opinions.
I insist on proven solutions. I insist o engeneering and scienfistic
principles of the finding the best solution by being the last standing
solution when all the possible scenarios have been thrown at it.

I don't care who is the best programmer around, I care about the API I
will also use. I care about making an API that could attract as many
developers as possible, because it will be as easy to use without making
mistakes.

As I said once before on this list, I believe that many heads will bring
to more brainstorming and to better solutions. For example, without the
input from this list, i'd never be able to articulate the parameter
blocks idea... I'd never be able to get such a clear idea how to
orthogonally implement keyframing. Many good things come from exchanging
thoughts and opinions.
anyway i do believe you have some good suggestions to share, but your
way of monopolizing a common discussion space makes them almost less
valuable than a peaceful place for cooperation.
I don't believe my solution is the best or that my solution is the only
possible path, but I have strong reasons to believe that your current
solution is plain bad.
said that, i can imagine you are very disappointed now, so i will just
assume your transformation in a troll has reached his final stage, in
case it is true i will just threat you as such.
:)
Post by Andraz Tori
I see factually wrong statements and unworkable or cumbersome solutions
put up some glasses.
Thank you, but my (in)sight is pretty good.
Post by Andraz Tori
You might want to isolate yourself from critical review of your
i'm not isolated, you are isolated: you have been invited to partecipate
in person to the development process, instead you refused, as you
refused to commit your code in the repository for a clear review of it.
instead you just kept acting like you are doing on this mailinglist,
after arriving in the final months of the process and pretending to
shape the API after the design in Cinelerra.
I am not saying you personaly are isolated, but people that have very
narrow idea about this API and naturally it is easier to work with
similar-minded people than with differently-minded.

I believe the best approach for many projects, including this API, is
the gatekeeper approach. Where only one person with the vision at the
end commits the final things into the CVS, and everything else are just
proposals that are weighted on their own terms.

I've joined late and from what I had seen at the time this gatekeeper
was Salsaman. Lately you took upon this role. This is the reason I've
never commited anything to the CVS, but rather provided my proposals
separately.

Everyone that wants to do a review of them is provided with a url link
where to get a .tar.gz, in a fully compilable form, without even need
for using CVS.

btw: my current API proposal is currently shaped far far away from the
design of cinelerra... I learned a lot from cinelerra, but many things
inside it are simply not general-purpose enough for livido...
Livido is currenlty much better in many respects than cinelerra's own
plugin system.
Post by Andraz Tori
It has been shown many times that some people discussing livido on
this list don't have much of programming competency. This is not an
insult, this is a fact supported by the debates on this list.
this fact should be supported by the code that everyone of us wrote and
the experience we made, not by the insults flying on this list.
The insults started to flow when you claimed one thing, but did the
other. Claiming you are patient about my explanations why your idea
won't work, but commiting the same idea to CVS at the moment you had it
without even thinking about it deeply.

I admit that I really got nervous when I have seen that you vehemently
made changes, because you thought you understand what you were doing,
but in reallity you didn't have a clue (callback functionality).

I admit that I went over the edge at that time.
Post by Andraz Tori
On the other hand, I understand that I am not the easiest person to
work with, since I don't care much about being politically correct.
it is not politically correctness what i'm talking about: it is peace of
mind and cooperative attitude.
Yes, I get upset sometimes,
i suggest you have a break for some time before replying again.
I am too afraid to have a break, since I am afraid that what you are
going to release the half-baked thing you've coded up and pass it as
1.0.

bye
andraz.
jaromil
2004-11-14 11:35:20 UTC
Permalink
Post by Andraz Tori
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
I am very disappointed by this. But aggressive criticism is what
you would be even more disappointed if i would express my feelings about
the code in your proosal and the code in the cvs of cinelerra, after
having read what i read.
If you point out at things that dont' work or work badly etc, i will be
willing to listen.
we are not here to review your code.

we are here to agree on a simple header and, thanks god, not even a
library ;)
Post by Andraz Tori
But if you have criticism about my proposal, all I can say is bring it
on, start dismanteling it and provide examples of what can't be done
with it or what has to be done in some very strange or cumbersome way.
i did, but the way we are argumenting is way too chaotical.

to summarize:

parameter handling:
your proposal has no spec as it is not clear at all how data is stored
in memory, plus is dependant from a library.

keyframing:
both me, Niels and Salsaman have doubts about the way it works.
you should stop threating us as stupid and review it in a clear way.
Post by Andraz Tori
If your examples will be real, I will either answer with the code
showing how to do things elegantly, or fix my proposal and answer with
the code (as I have done many times already, when good arguments were
made - for example keyframing each parameter separately). Or in the case
when you will provide me with real world case that is completely
unworkable inside my proposal, but is workable in yours, I'll say that
we should throw my proposal away.
it is no point to work on "your proposal" this way.

we are going thru the last part of a process of defining the livido
header and we need to refer to the main trunk.
Post by Andraz Tori
I insist on proven solutions. I insist o engeneering and scienfistic
principles of the finding the best solution by being the last standing
solution when all the possible scenarios have been thrown at it.
well, i think you just insist :)

there is no hope of posting a mail on this mailinglist without having
you replying first, go and look at the archives.
Post by Andraz Tori
I don't care who is the best programmer around, I care about the API I
will also use. I care about making an API that could attract as many
developers as possible, because it will be as easy to use without making
mistakes.
ok. i do believe you.
Post by Andraz Tori
As I said once before on this list, I believe that many heads will bring
to more brainstorming and to better solutions. For example, without the
input from this list, i'd never be able to articulate the parameter
blocks idea... I'd never be able to get such a clear idea how to
orthogonally implement keyframing. Many good things come from
exchanging thoughts and opinions.
i agree.
Post by Andraz Tori
I don't believe my solution is the best or that my solution is the only
possible path, but I have strong reasons to believe that your current
solution is plain bad.
you keep on arbitrarily calling it bad!
and then you talk about concrete examples of code?

i try to summarize:
you found a localization problem in the parameter handling, which is
solved in a very simple way just when parsing the default value at
initialization.

after this, you kept on saying it will break up in future, because is
bad bad bad.

how can i take you seriously Andraz?
Post by Andraz Tori
said that, i can imagine you are very disappointed now, so i will just
assume your transformation in a troll has reached his final stage, in
case it is true i will just threat you as such.
:)
i'm very glad if you don't, but i still have doubts about your
contribution at this stage of development.
Post by Andraz Tori
I believe the best approach for many projects, including this API, is
the gatekeeper approach. Where only one person with the vision at the
end commits the final things into the CVS, and everything else are just
proposals that are weighted on their own terms.
I've joined late and from what I had seen at the time this gatekeeper
was Salsaman. Lately you took upon this role. This is the reason I've
never commited anything to the CVS, but rather provided my proposals
separately.
look at the revisions in the main trunk, which was hosted on savannah
and now on the subversion repository, to make an idea of who has been
the gatekeeper for livido so far.

anyway i did encouraged you to merge your revisions so that we can
analize them better. both cvs and subversion support branching and
that's what we should use.

it helps to keep the discussion based on facts.
Post by Andraz Tori
Livido is currenlty much better in many respects than cinelerra's own
plugin system.
sure, livido is better than any of our already implemented plugin
systems, because it came after and benefitted of our experience in
mistakes.
Post by Andraz Tori
The insults started to flow when you claimed one thing, but did the
other. Claiming you are patient about my explanations why your idea
won't work, but commiting the same idea to CVS at the moment you had it
without even thinking about it deeply.
I admit that I really got nervous when I have seen that you vehemently
made changes, because you thought you understand what you were doing,
but in reallity you didn't have a clue (callback functionality).
I admit that I went over the edge at that time.
as i said many times i really hope you commit that bit of code (only ONE
function prototype) by yourself, agreeing with Salsaman.

said that please be confident that i'll not exclude you from this
process.
Post by Andraz Tori
Post by Andraz Tori
On the other hand, I understand that I am not the easiest person to
work with, since I don't care much about being politically correct.
it is not politically correctness what i'm talking about: it is peace of
mind and cooperative attitude.
Yes, I get upset sometimes,
thanks for understanding my point.
Post by Andraz Tori
i suggest you have a break for some time before replying again.
I am too afraid to have a break, since I am afraid that what you are
going to release the half-baked thing you've coded up and pass it as
1.0.
you are the last one that needs to agree,
i received agreement from all developers but you on the current API,
after all, we are talking about this header since one year!

of course we will evaluate your criticism but let's keep it short and
less chaotic than it has been so far.

if you like, please detail the problems you see in the current
parameter implementation and keyframing.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-14 12:45:36 UTC
Permalink
I'll be really short.
Post by jaromil
we are not here to review your code.
You should, you could learn some things from it :)
Post by jaromil
we are here to agree on a simple header and, thanks god, not even a
library ;)
Yes, we are!
Post by jaromil
Post by Andraz Tori
But if you have criticism about my proposal, all I can say is bring it
on, start dismanteling it and provide examples of what can't be done
with it or what has to be done in some very strange or cumbersome way.
i did, but the way we are argumenting is way too chaotical.
your proposal has no spec as it is not clear at all how data is stored
in memory, plus is dependant from a library.
By saying this you admit that you don't understand my proposal and
haven't spent even 5 minutes studying its merits.

Parameter data is organized as a regular C structure in my proposal.
Plugin interprets it directly as a C structure (trough single typecast)
and host interprets it trough information provided by parmater
templates.

It would take you 5 minutes to figure that out if you had looked at the
source of the plugin, but obviously you did't, so you are talking
nonsense about no clear specification of data and dependency on the
library.

My proposal does not depend on the library. Library is however
implemented for convinience.
Post by jaromil
both me, Niels and Salsaman have doubts about the way it works.
you should stop threating us as stupid and review it in a clear way.
Well. Neither you, niels or salsaman ever implemented a keyframing
functionality in practice. You could trust me that callbacks are needed
to do it properly, or you could check how it is done in OpenFX, but you
are too proud of yourself to actually study what other people have done
in this matter. People who actually use this stuff.
Post by jaromil
Post by Andraz Tori
If your examples will be real, I will either answer with the code
showing how to do things elegantly, or fix my proposal and answer with
the code (as I have done many times already, when good arguments were
made - for example keyframing each parameter separately). Or in the case
when you will provide me with real world case that is completely
unworkable inside my proposal, but is workable in yours, I'll say that
we should throw my proposal away.
it is no point to work on "your proposal" this way.
we are going thru the last part of a process of defining the livido
header and we need to refer to the main trunk.
well, what can I say, I studied the way your solution works, that's why
when I had objections it was shown that my objections actually have real
ground. You haven't studied my code and that's why your objections are
factually wrong.
Post by jaromil
Post by Andraz Tori
I insist on proven solutions. I insist o engeneering and scienfistic
principles of the finding the best solution by being the last standing
solution when all the possible scenarios have been thrown at it.
well, i think you just insist :)
there is no hope of posting a mail on this mailinglist without having
you replying first, go and look at the archives.
This is correct, I tend to comment on every single misunderstanding or
problem so things are cleared up as soon as they come up, not after it
is already too late.
Post by jaromil
Post by Andraz Tori
I don't believe my solution is the best or that my solution is the only
possible path, but I have strong reasons to believe that your current
solution is plain bad.
you keep on arbitrarily calling it bad!
and then you talk about concrete examples of code?
you found a localization problem in the parameter handling, which is
solved in a very simple way just when parsing the default value at
initialization.
First, you don't have a working solution yet. The localization problem
is not the only one, as I have told you already.
Linked lists are unnecessary and error prone, and introduce unneeded
complexity to plugin writers, which will turn some of them away.
Post by jaromil
after this, you kept on saying it will break up in future, because is
bad bad bad.
how can i take you seriously Andraz?
I've demonstrated many times already that I have an insight of problems
that you haven't yet come to understand.

I have stated two concrete chalanges that will let you recognize
problems before it is to late. If they will not convince you that your
implementation is bad, they will at least let you realize that you need
some augmentation of it, since I can assure you that it is broken in the
current state. More precisely, some things that you hope to achieve with
it will need enormous amout of hacking the API to work.

If you want to know what I am talking about, ... implement those two
things first. BEFORE you release the final version of livido.
Post by jaromil
Post by Andraz Tori
Post by jaromil
said that, i can imagine you are very disappointed now, so i will just
assume your transformation in a troll has reached his final stage, in
case it is true i will just threat you as such.
:)
i'm very glad if you don't, but i still have doubts about your
contribution at this stage of development.
The problem is that we are not approaching the problem systematically.
That's why we don't have all properties of specific solutions listed and
compared in one place.. maybe on wiki or somewhere. You tend to ignore
problems that I am pointing out (beside printf!)
Post by jaromil
anyway i did encouraged you to merge your revisions so that we can
analize them better. both cvs and subversion support branching and
that's what we should use.
Sorry, I find branches confusing for this purpose. I prefer posting
clear files.
Post by jaromil
Post by Andraz Tori
Livido is currenlty much better in many respects than cinelerra's own
plugin system.
sure, livido is better than any of our already implemented plugin
systems, because it came after and benefitted of our experience in
mistakes.
However. OpenFX leaves livido years behind in the dust in some areas.
Post by jaromil
Post by Andraz Tori
I admit that I really got nervous when I have seen that you vehemently
made changes, because you thought you understand what you were doing,
but in reallity you didn't have a clue (callback functionality).
I admit that I went over the edge at that time.
as i said many times i really hope you commit that bit of code (only ONE
function prototype) by yourself, agreeing with Salsaman.
You are unable to understand what I have said many times already. You
can't put keyframing just over any parameter passing solution. That line
of code needs to be in sync with the rest of the spec.
Post by jaromil
said that please be confident that i'll not exclude you from this
process.
Ah...
Post by jaromil
Post by Andraz Tori
Post by jaromil
i suggest you have a break for some time before replying again.
I am too afraid to have a break, since I am afraid that what you are
going to release the half-baked thing you've coded up and pass it as
1.0.
you are the last one that needs to agree,
i received agreement from all developers but you on the current API,
after all, we are talking about this header since one year!
Well, if that's what you are about to do... then do it, shot yourself
into the foot. But if you don't want to do that, do something good for
yourself and implement my two chalanges first.
Post by jaromil
of course we will evaluate your criticism but let's keep it short and
less chaotic than it has been so far.
You are not evaluating my criticism at all. You tend to ignore it.
Post by jaromil
if you like, please detail the problems you see in the current
parameter implementation and keyframing.
jaromil
2004-11-14 13:24:32 UTC
Permalink
Post by Andraz Tori
I'll be really short.
you need to train a lot more in that IMHO.

[SNIP]
Post by Andraz Tori
By saying this you admit that you don't understand my proposal and
haven't spent even 5 minutes studying its merits.
i spent half a day on it and i couldn't figure it out clearly.

after all, my role needs to be the stupid one here, i hope you
understand and avoid using unnecessary insults.

just try to be clearer and stop playing the first in the class.
Post by Andraz Tori
Parameter data is organized as a regular C structure in my proposal.
Plugin interprets it directly as a C structure (trough single
typecast) and host interprets it trough information provided by
parmater templates.
ok. is that what you meant so far with block parameters?

that's now one step in clearing things up.

can you explain now why the parameter template structure you are
proposing doesn't contains min/max/def, instead placing them in the
instance structure?
and what do you mean with params_in_sets?
Post by Andraz Tori
My proposal does not depend on the library. Library is however
implemented for convinience.
we will not provide a library in the release of livido.

debugging functions should go in the host example implementation.
Post by Andraz Tori
Well. Neither you, niels or salsaman ever implemented a keyframing
functionality in practice. You could trust me that callbacks are needed
to do it properly,
allright. callbacks are there.

is there something missing?
Post by Andraz Tori
First, you don't have a working solution yet. The localization problem
is not the only one, as I have told you already.
the localization problem is solved.

which other problems are there?
Post by Andraz Tori
Linked lists are unnecessary and error prone, and introduce unneeded
complexity to plugin writers, which will turn some of them away.
this is just your opinion and can be proven to be wrong.

linklists are way less error prone than terminated arrays and they are
simplier to implement. i provided documents about the topic already,
while you are still insisting, flooding the discussion.

i heard a few opinions about linklists on this list, mostly out of it,
i'd like to hear other people, but if you go on this way is impossible.

now before replying consider that *i know* what you think of linklist
and none of your arguments convinced me at all. insisting won't help.
Post by Andraz Tori
If you want to know what I am talking about, ... implement those two
things first. BEFORE you release the final version of livido.
i will not take any challenge, i will test it as we are all doing.
Post by Andraz Tori
You are unable to understand what I have said many times already. You
can't put keyframing just over any parameter passing solution. That line
of code needs to be in sync with the rest of the spec.
please detail this statement and where the string parameter approach
doesn't fits to keyframing.
Post by Andraz Tori
You are not evaluating my criticism at all. You tend to ignore it.
the more unnecessary noise you put in your communication, the more you
risk to have ignored important parts of it.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
salsaman
2004-11-14 14:52:55 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
I'll be really short.
you need to train a lot more in that IMHO.
[SNIP]
Post by Andraz Tori
By saying this you admit that you don't understand my proposal and
haven't spent even 5 minutes studying its merits.
i spent half a day on it and i couldn't figure it out clearly.
after all, my role needs to be the stupid one here, i hope you
understand and avoid using unnecessary insults.
just try to be clearer and stop playing the first in the class.
Post by Andraz Tori
Parameter data is organized as a regular C structure in my proposal.
Plugin interprets it directly as a C structure (trough single
typecast) and host interprets it trough information provided by
parmater templates.
ok. is that what you meant so far with block parameters?
that's now one step in clearing things up.
can you explain now why the parameter template structure you are
proposing doesn't contains min/max/def, instead placing them in the
instance structure?
and what do you mean with params_in_sets?
Post by Andraz Tori
My proposal does not depend on the library. Library is however
implemented for convinience.
we will not provide a library in the release of livido.
debugging functions should go in the host example implementation.
Post by Andraz Tori
Well. Neither you, niels or salsaman ever implemented a keyframing
functionality in practice. You could trust me that callbacks are needed
to do it properly,
allright. callbacks are there.
is there something missing?
Post by Andraz Tori
First, you don't have a working solution yet. The localization problem
is not the only one, as I have told you already.
the localization problem is solved.
which other problems are there?
Post by Andraz Tori
Linked lists are unnecessary and error prone, and introduce unneeded
complexity to plugin writers, which will turn some of them away.
this is just your opinion and can be proven to be wrong.
linklists are way less error prone than terminated arrays and they are
simplier to implement. i provided documents about the topic already,
while you are still insisting, flooding the discussion.
i heard a few opinions about linklists on this list, mostly out of it,
i'd like to hear other people, but if you go on this way is impossible.
now before replying consider that *i know* what you think of linklist
and none of your arguments convinced me at all. insisting won't help.
Jaromil, linked lists are only useful where:
- size of a list elements can change
- number of list elements can change


Since we already decided to leave dynamic parameters out of livido,
there is no reason to use linked lists.

Please stop trading insults with Andraz, it is not useful and will
distract him from writing his spec.


Let us wait, read Andraz spec, which I hope he will provide us with, and
then comment on it.


Please Andraz and Jaromil, take a step back, take a deep breath and be
more civil to each other.

Gabriel.
Andraz Tori
2004-11-14 12:56:57 UTC
Permalink
Post by jaromil
if you like, please detail the problems you see in the current
parameter implementation and keyframing.
Before I can provide you with exact problems of your parameter
implementation, please give me four simple answers.

Four simple questions are:

1. do you plan to use parameters passing for sending arrays as
parameters (for example array of floats)?

2. what kind of extensability do you want from it (that binary won't
give to you)?

3. what platform will this work on that the binary passing won't?

4. are you going to implement your own marshalling instead of
printf/scanf?


When I get those four simple answers, I'll be able to point out the
problems in your implementation clearly.

Bye
andraz
salsaman
2004-11-14 14:35:36 UTC
Permalink
Post by Andraz Tori
Post by jaromil
if you like, please detail the problems you see in the current
parameter implementation and keyframing.
Before I can provide you with exact problems of your parameter
implementation, please give me four simple answers.
1. do you plan to use parameters passing for sending arrays as
parameters (for example array of floats)?
2. what kind of extensability do you want from it (that binary won't
give to you)?
3. what platform will this work on that the binary passing won't?
4. are you going to implement your own marshalling instead of
printf/scanf?
When I get those four simple answers, I'll be able to point out the
problems in your implementation clearly.
Bye
andraz
_______________________________________________
piksel-dev mailing list
http://plot.bek.no/mailman/listinfo/piksel-dev
http://www.piksel.org
Don't worry about this now. Write your parameter/keyframing spec, and
then we shall review both proposals side by side.

Gabriel.
--
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

-- George Bernard Shaw
Andraz Tori
2004-11-14 13:56:51 UTC
Permalink
Post by salsaman
Don't worry about this now. Write your parameter/keyframing spec, and
then we shall review both proposals side by side.
These are quite important things. I'd just like simple answers, it will
also help me fit my implementation to be more in line with the needs of
everyone (for example knowing what binary parameters can't deliever so i
can think of the way to do it or rethink the whole thing)

They are quite simple questions, so it is not unreasonable request to
get them answered... ;)

bye
andraz
jaromil
2004-11-14 14:34:44 UTC
Permalink
Post by Andraz Tori
1. do you plan to use parameters passing for sending arrays as
parameters (for example array of floats)?
i need to be able to define a custom scheme for parameters

this can be combined with the possibility of having a variable number of
values of the same type in a parameter: i'd rather not use a custom
scheme every time i need 5 numbers, instead i would define a number
parameter with 5 elements.
Post by Andraz Tori
2. what kind of extensability do you want from it (that binary won't
give to you)?
it has to be completely independent from the endiannes of the
architecture.
Post by Andraz Tori
3. what platform will this work on that the binary passing won't?
i don't know what do you mean with your binary scheme yet,

anyway i am aware that the same problem i'm mentioning here was solved
in a wide number of cases with the string solution
Post by Andraz Tori
4. are you going to implement your own marshalling instead of
printf/scanf?
no: i'm still trying with printf/scanf which is a ideal solution.

i'm going to avoid use of vsscanf and strdup which are both GNU
extensions to the basic prototypes in stdarg.h and string.h

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-14 15:22:26 UTC
Permalink
just kind followups.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
1. do you plan to use parameters passing for sending arrays as
parameters (for example array of floats)?
i need to be able to define a custom scheme for parameters
are you aware that defining custom schemes will prevent hosts from using
them in user-friendly user-input way?
(and that binary also allows custom parameter scheme)
this can be combined with the possibility of having a variable number of
values of the same type in a parameter: i'd rather not use a custom
scheme every time i need 5 numbers, instead i would define a number
parameter with 5 elements.
I am not getting you here exactly, but are you aware, that if plugin
needs 5 numbers, host has to know that plugin needs 5 numbers in order
to create appropriate gui - be it curves on the track or input box or
something else?

are you aware that your current implementation does not allow for
variable number of floats (let aside custom params) inside single
parameter?
(this is one of the problems I'd like to point out to you, it's
explanation is at the end of this message)
Post by Andraz Tori
2. what kind of extensability do you want from it (that binary won't
give to you)?
it has to be completely independent from the endiannes of the
architecture.
Are you aware of the fact that all other parts of livido depend on
running on the same arhitecture and therefore depend on the same
endianness?

Livido is completely independand from endiannes as long as you run both
host and plugin on the same machine, which is always the case.
Post by Andraz Tori
3. what platform will this work on that the binary passing won't?
i don't know what do you mean with your binary scheme yet,
anyway i am aware that the same problem i'm mentioning here was solved
in a wide number of cases with the string solution
Ok... Which problem exactly? problematic scenarion.

Other projects are solving their own scenarions - for example both
sides of communications on different architectures , which is not the
case in livido...
Post by Andraz Tori
4. are you going to implement your own marshalling instead of
printf/scanf?
no: i'm still trying with printf/scanf which is a ideal solution.
i'm going to avoid use of vsscanf and strdup which are both GNU
extensions to the basic prototypes in stdarg.h and string.h
You will have a lot of fun hacking 'variabile number of parameters'
scanning with sscanf. More headaches than you could expect right now
(local reshaping of parameter_template->format being one of them), just
watch out that it won't be considered a complete hack at the end.

(other work will be en/decoding strings...)

anyway... i hope you will not break your teeth with it :)

bye
andraz
jaromil
2004-11-14 15:57:23 UTC
Permalink
Post by Andraz Tori
Post by jaromil
i need to be able to define a custom scheme for parameters
are you aware that defining custom schemes will prevent hosts from
using them in user-friendly user-input way?
i don't understand what you are saying here.

i'm sure an host can be aware of custom parameters.

i'm also sure that a GUI can be able to render custom parameters.
Post by Andraz Tori
I am not getting you here exactly, but are you aware, that if plugin
needs 5 numbers, host has to know that plugin needs 5 numbers in order
to create appropriate gui - be it curves on the track or input box or
something else?
sure. in fact i'm thinking to add a num_elements flag, so that we can
avoid to use the custom type when the only thing to be needed are
variable amounts of elements of the same type.
Post by Andraz Tori
are you aware that your current implementation does not allow for
variable number of floats (let aside custom params) inside single
parameter?
yes.
Post by Andraz Tori
Post by jaromil
it has to be completely independent from the endiannes of the
architecture.
Are you aware of the fact that all other parts of livido depend on
running on the same arhitecture and therefore depend on the same
endianness?
then why all this code around that is not big-endian compatible?

endian problems are present when manipulating binary data that is
expected to be LE or BE only, whenever it comes to byte granular
manipulation.

maybe you can make a simple idea about it looking at color masks in SDL.

you can argue that such problems won't occur on parameters, anyway i'm
not yet sure of this.
Post by Andraz Tori
Livido is completely independand from endiannes as long as you run
both host and plugin on the same machine, which is always the case.
i assume you don't have much experience of writing cross-platform code.
Post by Andraz Tori
You will have a lot of fun hacking 'variabile number of parameters'
scanning with sscanf. More headaches than you could expect right now
(local reshaping of parameter_template->format being one of them), just
watch out that it won't be considered a complete hack at the end.
(other work will be en/decoding strings...)
anyway... i hope you will not break your teeth with it :)
thanks. eventually i'll keep the pieces and show them :)

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-14 20:02:13 UTC
Permalink
Post by jaromil
Post by Andraz Tori
Are you aware of the fact that all other parts of livido depend on
running on the same arhitecture and therefore depend on the same
endianness?
then why all this code around that is not big-endian compatible?
Would you mind pointing out what exact code is BE uncompatible?
(one single example will do)

(and leave Carlo's RGB565 code snippet out, since that has nothing to do
with parameter passing - it fixing anyway)
Post by jaromil
endian problems are present when manipulating binary data that is
expected to be LE or BE only, whenever it comes to byte granular
manipulation.
Yes, you are completely right about the nature of LE/BE problems in
multiplatform programming.
What I am trying to tell you that I do not manipulate any parameter on
byte granularity.
Each paramter is always manipulated as a whole.
Post by jaromil
maybe you can make a simple idea about it looking at color masks in SDL.
you can argue that such problems won't occur on parameters, anyway i'm
not yet sure of this.
Please study the topic some more so you are sure (as I am already). You
will find out that this is not a problem in given situation.

However I have found a problem with aligning of the types inside structs
on other arhitectures, but it is easily generally fixable and will be
fixed in p2.0 today.
Post by jaromil
Post by Andraz Tori
Livido is completely independand from endiannes as long as you run
both host and plugin on the same machine, which is always the case.
i assume you don't have much experience of writing cross-platform code.
You are correct, not much, but some I do and I understand the topic.
Post by jaromil
Post by Andraz Tori
You will have a lot of fun hacking 'variabile number of parameters'
scanning with sscanf. More headaches than you could expect right now
(local reshaping of parameter_template->format being one of them), just
watch out that it won't be considered a complete hack at the end.
(other work will be en/decoding strings...)
anyway... i hope you will not break your teeth with it :)
thanks. eventually i'll keep the pieces and show them :)
:)))

bye
andraz
salsaman
2004-11-14 14:31:56 UTC
Permalink
Post by Andraz Tori
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Andraz Tori
I am very disappointed by this. But aggressive criticism is what
you would be even more disappointed if i would express my feelings about
the code in your proosal and the code in the cvs of cinelerra, after
having read what i read.
If you point out at things that dont' work or work badly etc, i will be
willing to listen.
About Cinelerra. I think I've explained it to you in private RL
discussion already, that the code that we (CVS Cinelerra project) are
working on is complex and far far from perfect. We don't even want to
change it much where it is not absolutely neccessary since it would mean
forking it from the main developer, which means even less eyes and
brains for maintaining 200.000+ lines of code.
We are doing best as we can, but code in cinelerra is not mine. However
I've learned enormously from Cinelerra - many good and bad coding
practices, that I would never think up myself.
But if you have criticism about my proposal, all I can say is bring it
on, start dismanteling it and provide examples of what can't be done
with it or what has to be done in some very strange or cumbersome way.
If your examples will be real, I will either answer with the code
showing how to do things elegantly, or fix my proposal and answer with
the code (as I have done many times already, when good arguments were
made - for example keyframing each parameter separately). Or in the case
when you will provide me with real world case that is completely
unworkable inside my proposal, but is workable in yours, I'll say that
we should throw my proposal away.
but this list is not about such a discussion neither about showing up of
the best programmer around. You just insist to have competition and
endless arguments, while you hook up to a few real problems to bloat the
whole process with arbitrary insults and misleading opinions.
I insist on proven solutions. I insist o engeneering and scienfistic
principles of the finding the best solution by being the last standing
solution when all the possible scenarios have been thrown at it.
I don't care who is the best programmer around, I care about the API I
will also use. I care about making an API that could attract as many
developers as possible, because it will be as easy to use without making
mistakes.
As I said once before on this list, I believe that many heads will bring
to more brainstorming and to better solutions. For example, without the
input from this list, i'd never be able to articulate the parameter
blocks idea... I'd never be able to get such a clear idea how to
orthogonally implement keyframing. Many good things come from exchanging
thoughts and opinions.
anyway i do believe you have some good suggestions to share, but your
way of monopolizing a common discussion space makes them almost less
valuable than a peaceful place for cooperation.
I don't believe my solution is the best or that my solution is the only
possible path, but I have strong reasons to believe that your current
solution is plain bad.
said that, i can imagine you are very disappointed now, so i will just
assume your transformation in a troll has reached his final stage, in
case it is true i will just threat you as such.
:)
Post by Andraz Tori
I see factually wrong statements and unworkable or cumbersome solutions
put up some glasses.
Thank you, but my (in)sight is pretty good.
Post by Andraz Tori
You might want to isolate yourself from critical review of your
i'm not isolated, you are isolated: you have been invited to partecipate
in person to the development process, instead you refused, as you
refused to commit your code in the repository for a clear review of it.
instead you just kept acting like you are doing on this mailinglist,
after arriving in the final months of the process and pretending to
shape the API after the design in Cinelerra.
I am not saying you personaly are isolated, but people that have very
narrow idea about this API and naturally it is easier to work with
similar-minded people than with differently-minded.
I believe the best approach for many projects, including this API, is
the gatekeeper approach. Where only one person with the vision at the
end commits the final things into the CVS, and everything else are just
proposals that are weighted on their own terms.
I've joined late and from what I had seen at the time this gatekeeper
was Salsaman. Lately you took upon this role. This is the reason I've
never commited anything to the CVS, but rather provided my proposals
separately.
Everyone that wants to do a review of them is provided with a url link
where to get a .tar.gz, in a fully compilable form, without even need
for using CVS.
btw: my current API proposal is currently shaped far far away from the
design of cinelerra... I learned a lot from cinelerra, but many things
inside it are simply not general-purpose enough for livido...
Livido is currenlty much better in many respects than cinelerra's own
plugin system.
Post by Andraz Tori
It has been shown many times that some people discussing livido on
this list don't have much of programming competency. This is not an
insult, this is a fact supported by the debates on this list.
this fact should be supported by the code that everyone of us wrote and
the experience we made, not by the insults flying on this list.
The insults started to flow when you claimed one thing, but did the
other. Claiming you are patient about my explanations why your idea
won't work, but commiting the same idea to CVS at the moment you had it
without even thinking about it deeply.
I admit that I really got nervous when I have seen that you vehemently
made changes, because you thought you understand what you were doing,
but in reallity you didn't have a clue (callback functionality).
I admit that I went over the edge at that time.
Post by Andraz Tori
On the other hand, I understand that I am not the easiest person to
work with, since I don't care much about being politically correct.
it is not politically correctness what i'm talking about: it is peace of
mind and cooperative attitude.
Yes, I get upset sometimes,
i suggest you have a break for some time before replying again.
I am too afraid to have a break, since I am afraid that what you are
going to release the half-baked thing you've coded up and pass it as
1.0.
bye
andraz.
_______________________________________________
piksel-dev mailing list
http://plot.bek.no/mailman/listinfo/piksel-dev
http://www.piksel.org
Hi Andraz,
I have exchanged email with Jaromil, and he has agreed that rushing the
final part of livido would be a big mistake without a general agreement
from all of the main developers.

I think what would be helpful is if you could write a spec for your
parameter system and keyframes method. Particularly this thing of host data.
I understand what you are saying that it is a host supplied pointer, but
if the interpolate function of a plugin uses this pointer then it is
important to know it's contents.

Also you need to explain:
- where the parameter blocks are assigned/freed
- where the value of this pointer is kept
- how plugin and host get/set values
- what the LIVIDO_SIMPLE_SET_PARAMETERS does
- how list values work in your system and why
- how the keyframing system works in detail

I think if you can come up with a spec which explains all of this,
people will begin to see the advantages of your system.
If you just say "read the code" it's no good. Code only shows one
implementation of a spec.
Comments are useful, but people will read them out of order, out of
context, etc.


Anyway, I can assure you that I will not consider any proposal 1.0 until
we are all (at least you, Jaromil, Niels and myself) happy with
the final result. It will not be perfect, there will be some areas which
make coding difficult for a particular application, for example for
myself I have no use right now for RGBA float, even though it is the
default palette. But at least I can see that reasoning behind it and so
I compromised by accepting the default palette, but insisting that we
allow other optional palettes.

On channel_templates/channels, instance_templates/instances we are all
pretty much agreed. It is a compromise solution which allows all of us
to implement our current plugin sets.

I should also say that we should really try hard to come to an agreement
soon, otherwise we will lose the momentum which has built up recently.

Regards,
Gabriel.

Comments in code are useful to give a general idea, but we need a
reference specification. We have seen that it is possible to implement
your system as you yourself have demonstrated. But a spec would make
things clearer.

I would also like to try implementing
jaromil
2004-11-14 13:33:38 UTC
Permalink
Post by salsaman
Anyway, I can assure you that I will not consider any proposal 1.0 until
we are all (at least you, Jaromil, Niels and myself) happy with
right. we miss Tom here, who also contributed to the development and was
an important guidance for me since the beginning.

he researched on his own track and tested it, then stepped back from it,
recognizing that it would have been too hard to cope on that.

he is basically fine with what we are coming up, keeping a loose eye on
it at this final stage of development.

i got permission from to post his final evaluation of that research, so
here it is for the record:






/* HEADER */

/** floating point pixel */
typedef struct {
float r; ///< red float component
float g; ///< green float component
float b; ///< blue float component
float a; ///< alpha float component
} livido_pixel_float_t;


/** atom types */
#define LVD_ATOM_PAIR 1 ///< pair node
#define LVD_ATOM_FRAME 10 ///< physical frame holding pixel buffer (livido_pixel_float_t *)
#define LVD_ATOM_NUMBER 101 ///< number value, encoded in double
#define LVD_ATOM_STRING 102 ///< text string
#define LVD_ATOM_DATA 103 ///< pointer to custom data buffer



/** atom structs */
typedef void livido_atom_t; ///< each atom contains dynamic type description, so from C side an atom is void
typedef int livido_atom_type_t; ///< this is just an int, but we enjoy to be descriptive in api's that change the world


typedef struct {
livido_atom_type_t type; ///< LVD_ATOM_PAIR
livido_atom_t *car; ///< left branch (in list notation, NULL denotes an empty atom)
livido_atom_t *cdr; ///< right branch (in list notation, NULL denotes end of list)
} livido_atom_pair_t;

typedef struct {
int type;
double value;
} livido_atom_number_t;



/** stuff to handle atoms (data) and pairs (list traversal)
this should go in the library.

question:
setjmp is posix if i recall, so might be a good idea to
install an exception handler for livido functions. this will
keep the traversal functions much simpler and avoid lots of if-then-else nobody likes

i'll call it livido_throw here..
the argument should be the type of exception later.
*/

void livido_throw(void){}

/** type checking */
int livido_atom_type(livido_atom_t *atom) {int *t = (int *)atom; return *x;}
int livido_atom_framep(livido_atom_t *atom) {return (livido_atom_type(atom) == LVD_ATOM_FRAME);}
int livido_atom_numberp(livido_atom_t *atom) {return (livido_atom_type(atom) == LVD_ATOM_NUMBER);}
int livido_atom_pairp(livido_atom_t *atom) {return (livido_atom_type(atom) == LVD_ATOM_PAIR);}

/** data structure traversal */
livido_atom_t *livido_atom_car(livido_atom_t *atom){
livido_pair_t *p = (livido_pair_t *)atom;
if (!livido_atom_pairp(atom)) livido_throw();
return p->car;
}
livido_atom_t *livido_atom_cdr(livido_atom_t *atom){
livido_pair_t *p = (livido_pair_t *)atom;
if (!livido_atom_pairp(atom)) livido_throw();
return p->cdr;
}
/** data access
these will throw an exception if there is an error. */
double livido_atom_get_number(livido_atom_t *atom){
livido_number_t *n = (livido_number_t *)atom;
if (!livido_atom_numberp(atom)) livido_throw();
return n->value;
}

/** data allocation
this should be cons. but i don't think that is a good idea
without GC... maybe forget about allocation on the stack all together,
cuz that's quite involved actually and a good example of premature optimization...
DAMN YOU PAUL GRAHAM!!!
*/

/** this should be a callback implemented by the host */
void *livido_malloc(int size){ return malloc(size); }

/** atom constructors */
livido_atom_t *livido_atom_number(double value){
livido_atom_number_t *n = livido_malloc(sizeof(*n));
n->type = LVD_ATOM_NUMBER;
n->value = value;
return (livido_atom_t *)n;
}

/** cons is the pair constructor */
livido_atom_t *livido_atom_cons(livido_atom_t *car, livido_atom_t *cdr){
livideo_atom_pair_t *p = livido_malloc(sizeof(*p));
p->type = LVD_ATOM_PAIR;
p->car = car;
p->cdr = cdr;
return (livido_atom_t *)p;
}





/* HOST EXAMPLE */


/* PLUGIN EXAMPLE */
/*
we adopt a semi-pull method:
* all image metadata and parameters will be pushed by the host
* the image data will be pulled from the identifier.

this enables the host to do read caching for images.
likewize, the returned images could be pushed to the host
at the moment they are produced to enable write caching.

for this we define
livido_pull_frame (frame_id);
livido_push_frame (frame_id);

*/


/*
plugin will receive a list of frame packets
a frame packet is (timecode port port port ...)
port can be any valid livido atom complying to the plugin class' input template

output is returned in the same manner, complying to the plugin class' output template

image data will be handled through push-pull to allow for caching to be abstract.

*/

/* example will expect (number number image) and return (image image) */
plugin_process (livido_atom_t *param){
livido_atom_t *todolist = param; // traversal pointer
double n1, n2;
livido_image_id_t iid0, iid1, iid2; // image ids
livido_pixel_t *p0, *p1, *p2; // image pointers
livido_timecode_t tc;

while (todolist){
livido_atom_t *x = livido_atom_car(todolist); // get next port list

/* load the parameters into C local variables */
tc = livido_atom_get_timecode(livido_atom_car(x)); x = livido_atom_cdr(x);
n1 = livido_atom_get_number(livido_atom_car(x)); x = livido_atom_cdr(x);
n2 = livido_atom_get_number(livido_atom_car(x)); x = livido_atom_cdr(x);
iid0 = livido_atom_get_iid(livido_atom_car(x));

/* get the image read data */
p = livido_iid_pull(iid);

/* create new image ids */
iid1 = livido_iid_new();
iid2 = livido_iid_new();
p1 = livido_iid_pull(iid1);
p2 = livido_iid_pull(iid2);

// process *p0 -> *p1 *p2

/* push result frames to host */
livido_iid_push(iid1);
livido_iid_push(iid2);

/* free source frame */
livido_iid_free(iid0);

/* dump all the data in the result list
this will be returned in the end, but
sorry i lost motivation... */


/* advance to next port list */
todolist = livido_atom_cdr(todolist);
}

// return result list..
}



/*
conclusion: this is imnsho the way to go, definitely.
but, doing it in C like this, without the availability of a real
lisp or scheme is complete madness. especially the lack of
garbage collection (to make 'cons' do what it is supposed to do)
is a show stopper.

so, allow me to change my opinion again, and tell you to throw
it all away, or to do it in scheme (guile). i got too used to
the convenience of high level languages, that i start to think
in them. i can't use C to solve a 'general problem' any more..
maybe i never could.

i will stop working on this. the problem is simply to hard to solve
centrally. long live distributed anarchy. i will keep providing
hints and information, but no code. i'm sorry. this has clearly
showed me that central design of APIs is a problem i will never
do myself any more, unless i have total control, which i have
in packet forth. and basicly, that's the reason i am writing it,
because i can't live with compromize.

that's the reason we should all write our own plugin architectures,
and build 1-1 bridges between different plugin APIs and solve things
that don't match for the case of that 1-1 connection. central tradeoffs
suck. they only make big companies happy. homey no play that. i simply
feel bad deciding things before they occur.

like some sage said: don't define yourself, and definitely
don't define others.. i say write a language or keep it simple
(AND!!) and i'm not saying that, just doing it..



the cache mechanism is a good thing i think. we should keep that idea..

*/
Andraz Tori
2004-11-14 14:53:32 UTC
Permalink
Post by salsaman
I think what would be helpful is if you could write a spec for your
parameter system and keyframes method. Particularly this thing of host data.
I understand what you are saying that it is a host supplied pointer, but
if the interpolate function of a plugin uses this pointer then it is
important to know it's contents.
Ok... i will, but just quick answers for now.
p.s.: which at the end of the writing weren't as short anymore :)
Post by salsaman
- where the parameter blocks are assigned/freed
For simple hosts they are malloced/freed in
LIVIDO_CREATE_INSTANCE/LIVIDO_FREE_INSTNACE exclusively
Post by salsaman
- where the value of this pointer is kept
the value of this pointer for input parameters is stored at
livido_instance_t->params_in
Post by salsaman
- how plugin and host get/set values
plugin casts the livido_instance_t->params_in parameter to its own
structure, for example to:
typedef struct {
lvd_type_number fade;
lvd_type_number p;
lvd_type_string title;
} parameters_structure_t;

Plugin can then use (read or write) parameters directly as regular
variabiles inside the structure. No additional function calls or
dereferencing is neccessary.

Host uses macros that return pointers to specific parameter number of
specific type.
In the above case host could get the parameters this way (leaving type
discovery aside):

float localfade =
*LVD_PARAM_NUMBER(livido_template, pointer_to_parameter_block, 0);

float localp =
*LVD_PARAM_NUMBER(livido_template, pointer_to_parameter_block, 1);

strcpy(localstring,
LVD_PARAM_STRING(livido_template, pointer_to_parameter_block, 2));

and set them in the same way...
Post by salsaman
- what the LIVIDO_SIMPLE_SET_PARAMETERS does
This macro has been removed from p1.9.
Since plugin_instance_t does not contain host_data, get_prev_keyframe
and get_next_keyframe pointers anymore, it is not needed anymore.
Post by salsaman
- how list values work in your system and why
If you are talking about how offering possible values for some parameter
works, it is by the use of the array
livido_parameter_template_t->choice_list (depending what people think
the exact implementation is still not decided)

If you are asking how host passes dynamic number of for example floats
to plugin, then it is by the use of channels.
I've based this decision on the use-cases of this feature named on this
list:
pasing sound data and passing vector shapes.

There might be differently implemented in the end case, but what is a
fact is, that list of floats is fundamentally different type than single
float. Even if they are passed in almost the same way, the host needs
two very different implementations of handling them before or after
passing (presenting to the user for example).
Post by salsaman
- how the keyframing system works in detail
Keyframing is independand of the instances (as we talked already).
Plugin that knows to do keyframing sets the interpolate_parameters to
its own function (otherwise it is set to null - it's up to the host to
check if functionality is available).

interpolate_parameters() is the function implemented by the plugin.
get_prev_keyframe() and get_next_keyframe() are the functions
implemented by the host and are called as callbacks from
interpolate_parameters().
This is the only place host_data is used, and it is used in general
callback way. If you still think there are any problems with host_data
for this kind of use, please read the Callback topic on the Wikipedia.

Every parameter is delievered to plugin separately by
get_prev/next_keyframe(), but is delievered directly inside the
parameter block. This simplifies code on the plugin side.


Another answer: about min/max:

since def, min and max need to be of the same type as the parameter
itself it is problematic to have pointer from inside parameter template
to def, min and max.
The reason is the following: it makes plugins more complicated, since
you have to initialize def,min and max variabile of every paramter
separately and then you are able to reference them from paramter
templates.

Having paramter sets def, min, and max generalizes the solution.

param_in_sets are sets of all parameters together that plugin can offer
to hosts. For example if plugin knows some 'good' combinations of its
parameters, it can offer them trough parameter sets to the host, so host
can offer them to the user. This functionality is optional to support
both by the host and plugin.
Post by salsaman
I think if you can come up with a spec which explains all of this,
people will begin to see the advantages of your system.
I hope this makes it a bit clearer.
Post by salsaman
If you just say "read the code" it's no good. Code only shows one
implementation of a spec.
Yes this is true, however, when people really don't understand some
concept, studying code could be more useful than 100 sentances in the
mail...
I'd especially recommend studying plugin code, not so much the host
code, since host code really depends a lot on the implementation, while
plugin side implementations will be much more similar.
Post by salsaman
Anyway, I can assure you that I will not consider any proposal 1.0 until
we are all (at least you, Jaromil, Niels and myself) happy with
the final result. It will not be perfect, there will be some areas which
make coding difficult for a particular application, for example for
myself I have no use right now for RGBA float, even though it is the
default palette. But at least I can see that reasoning behind it and so
I compromised by accepting the default palette, but insisting that we
allow other optional palettes.
Thanks.
Btw: I am all for making RGBA32 (RGBA8888) as default instead of float.
It would probably be more useful palette than others.

btw: In cinelerra i've learned a quite general approach to writing
multi-colormode rutines by using macros. It makes a nice compromise
between efficiency of the code, cross-colormodelness, and
maintainability. something I'd definitely recommend to study for plugin
writers, but I am getting off-topic here :)
Post by salsaman
On channel_templates/channels, instance_templates/instances we are all
pretty much agreed. It is a compromise solution which allows all of us
to implement our current plugin sets.
Yes.
Post by salsaman
I should also say that we should really try hard to come to an agreement
soon, otherwise we will lose the momentum which has built up recently.
yes.
Post by salsaman
Comments in code are useful to give a general idea, but we need a
reference specification. We have seen that it is possible to implement
your system as you yourself have demonstrated. But a spec would make
things clearer.
I've spent a lot of time implementing proof of concept implementations
and I am really not encouraged to write more precise specification, if
it will be read to the same shallow depth as my many other posts on this
lists were.

Probably the best way to understand my proposal is to take the
fade_plugin_simple.c and try to write another simple plugin of your
choice by changing the existing code. It should be very easy to get to
understand the basic concepts this way.


bye
andraz
jaromil
2004-11-14 15:42:11 UTC
Permalink
Post by Andraz Tori
Post by salsaman
- where the parameter blocks are assigned/freed
For simple hosts they are malloced/freed in
LIVIDO_CREATE_INSTANCE/LIVIDO_FREE_INSTNACE exclusively
the inclusion of these #defines in the header is confusing

we should just include the functions, as simple as possible, inside the
host implementations. people can copy them in their own code.

i'm not sure wether is good or not to have defines for
get/set_parameters, it is probably better to have example
implementations for them as well.
Post by Andraz Tori
Post by salsaman
- how list values work in your system and why
If you are talking about how offering possible values for some parameter
works, it is by the use of the array
livido_parameter_template_t->choice_list (depending what people think
the exact implementation is still not decided)
the string choice list can be an hybrid between number and strings:
the *choice_list can hold a list of strings, while the value can be the
numerical index for them, whereas min and max can be used for
boundaries.
Post by Andraz Tori
If you are asking how host passes dynamic number of for example floats
to plugin, then it is by the use of channels.
this is not a solution. channels have fixed palettes and such an
approach would just mean to misuse them.

consider the case in which there are arrays of 5 strings
or the case in which there are arrays of 5 pointers
Post by Andraz Tori
I've based this decision on the use-cases of this feature named on
pasing sound data and passing vector shapes.
that has nothing to do with parameters.
Post by Andraz Tori
There might be differently implemented in the end case, but what is a
fact is, that list of floats is fundamentally different type than
single float. Even if they are passed in almost the same way, the host
needs two very different implementations of handling them before or
after passing (presenting to the user for example).
not in case of strings: the host parses the format specification reading
the values in a loop in case there is more than one.
Post by Andraz Tori
since def, min and max need to be of the same type as the parameter
itself it is problematic to have pointer from inside parameter template
to def, min and max.
what you are talking about?

min/max are there only if the parameter is a number.

there is only def who needs to be casted to the type.
Post by Andraz Tori
The reason is the following: it makes plugins more complicated, since
you have to initialize def,min and max variabile of every paramter
separately and then you are able to reference them from paramter
templates.
sorry, i can't understand the sentence above.
Post by Andraz Tori
Having paramter sets def, min, and max generalizes the solution.
param_in_sets are sets of all parameters together that plugin can offer
to hosts. For example if plugin knows some 'good' combinations of its
parameters, it can offer them trough parameter sets to the host, so host
can offer them to the user. This functionality is optional to support
both by the host and plugin.
while it is not clear to me how this happens, i am garbled by the fact
that in your picture we have parameter defaults outside of both of the
parameter structures, in the effect template.

i consider it a clear error in define: every component of an object must
be contained in one of the template/instance data structures for that
object. the default for a value has obviously to be hold in the
parameter template.
Post by Andraz Tori
btw: In cinelerra i've learned a quite general approach to writing
multi-colormode rutines by using macros.
nothing really new for things done in the demoscene 10 years ago.
Post by Andraz Tori
It makes a nice compromise
between efficiency of the code, cross-colormodelness, and
maintainability. something I'd definitely recommend to study for plugin
writers, but I am getting off-topic here :)
as well c++ templates, as the gephex coders use them already, can be
pretty interesting approach.
Post by Andraz Tori
Probably the best way to understand my proposal is to take the
fade_plugin_simple.c
i was actually referring to the fade_plugin.c so far, to have a complete
overview of all the features you propose.

ciao

- --
jaromil, dyne.org rasta coder, http://rastasoft.org
Andraz Tori
2004-11-14 22:37:32 UTC
Permalink
Another thing i forogot...
Post by jaromil
Post by Andraz Tori
since def, min and max need to be of the same type as the parameter
itself it is problematic to have pointer from inside parameter template
to def, min and max.
what you are talking about?
Read on :)
Post by jaromil
min/max are there only if the parameter is a number.
coord2d is another type that cannot do without min and max values.
Post by jaromil
there is only def who needs to be casted to the type.
... not exactly... min/max might be needed for other types also,
especially when we come to custom parameters and forward compatibility
in general.

bye
andraz
Niels Elburg
2004-11-14 19:10:21 UTC
Permalink
Post by Andraz Tori
I've based this decision on the use-cases of this feature named on this
pasing sound data and passing vector shapes.
Well there we go again but this time I formulate it differently.

Why not add video processing to LADSPA so we can all really do something
usefull with audio data in the plugins ? What I mean here is that
just 'passing' sound data is simply insufficient. What sound data
is beeing passed ? 1 byte per sample ? 4 bytes per sample ? in short ?
or in float? or in char ? how many audio channels does the plugin want ?
how many audio output channels does it want ? How can another host
feed the proper sound data without knowning what the plugin wants?
How many audio samples does the plugin need? etc etc...

I am totally against synchronized audio/video processing (which it really
does, plugin handles both in the same process() step ... )
It should be processed asynchronously IMO or at least not in livido 1.0.

And unfortunately, I cannot follow the discussions anymore.
Its totally confusing to read concepts, ideas,opinions and code that
supposedly implements them. PLEASE USE THE TICKET SYSTEM people !

I must admit, I havent used it myself yet but I must. I will add
my audio comment tomorrow hopefully.


Also, before people start saying 'we agreed on this and that'
I'd like to remind you that even if we agree it is probably the
wrong solution anyway. What I mean is use the ticket system, so we
can see why/how and wether we agree/disagree. At the moment, its mostly
empty so we didnt agree on anything really.

- Niels
Andraz Tori
2004-11-14 19:36:13 UTC
Permalink
Post by Niels Elburg
Post by Andraz Tori
I've based this decision on the use-cases of this feature named on this
pasing sound data and passing vector shapes.
Well there we go again but this time I formulate it differently.
Why not add video processing to LADSPA so we can all really do something
usefull with audio data in the plugins ? What I mean here is that
just 'passing' sound data is simply insufficient. What sound data
is beeing passed ? 1 byte per sample ? 4 bytes per sample ? in short ?
or in float? or in char ? how many audio channels does the plugin want ?
how many audio output channels does it want ? How can another host
feed the proper sound data without knowning what the plugin wants?
How many audio samples does the plugin need? etc etc...
I imagined this could come very handy for livido 1.1/2.0, that's why i
already thought about it a bit...

This is NOT a proposal for livido 1.0, just thoughts on how we can do it
smartly later on:
This is doable very simply trough the idea of channels... let's say we
use the same system as ladspa and only allow samples of type float.

You introduce new palette LVD_PALETTE_SOUNDFLOAT (which means sound
samples). Interpretation of x and y change:
x being the number of samples passed
y becomes the sound frequency.

btw: the main reason that salsaman expressed for sound support is the
ability to have sound->visualisation plugins. The idea however can be
used for other things also.
Post by Niels Elburg
I am totally against synchronized audio/video processing (which it really
does, plugin handles both in the same process() step ... )
It should be processed asynchronously IMO or at least not in livido 1.0.
Well for visualisation plugins you actually need synhronicity, for everything else,
you could just add a function analogous to process_frames() that would only process
sound part.

bye
andraz
salsaman
2004-11-15 02:22:11 UTC
Permalink
Post by Andraz Tori
Post by Niels Elburg
Post by Andraz Tori
I've based this decision on the use-cases of this feature named on this
pasing sound data and passing vector shapes.
Well there we go again but this time I formulate it differently.
Why not add video processing to LADSPA so we can all really do something
usefull with audio data in the plugins ? What I mean here is that
just 'passing' sound data is simply insufficient. What sound data
is beeing passed ? 1 byte per sample ? 4 bytes per sample ? in short ?
or in float? or in char ? how many audio channels does the plugin want ?
how many audio output channels does it want ? How can another host
feed the proper sound data without knowning what the plugin wants?
How many audio samples does the plugin need? etc etc...
I imagined this could come very handy for livido 1.1/2.0, that's why i
already thought about it a bit...
This is NOT a proposal for livido 1.0, just thoughts on how we can do it
This is doable very simply trough the idea of channels... let's say we
use the same system as ladspa and only allow samples of type float.
You introduce new palette LVD_PALETTE_SOUNDFLOAT (which means sound
x being the number of samples passed
y becomes the sound frequency.
It not quite so simple. We would also need channel template flags for
endianness (it is important here), signedness, another parameter for
number of channels, sample size (8,16,24,32,etc) and whether the
channels are interlaced or not. Plus audio data is generally int for
pcm. Plus also the plugin often needs to be able to restrict the host to
a list of audio rates, channels, sample size

Which is why we should leave it for later.

Gabriel.
Andraz Tori
2004-11-15 01:38:20 UTC
Permalink
Post by salsaman
It not quite so simple. We would also need channel template flags for
endianness (it is important here), signedness, another parameter for
number of channels, sample size (8,16,24,32,etc) and whether the
channels are interlaced or not. Plus audio data is generally int for
pcm. Plus also the plugin often needs to be able to restrict the host to
a list of audio rates, channels, sample size
This is past-1.0 material but anyway:

Regarding sound... I'd simply copy all the experience from sound people
that designed LADSPA.

In sound, the amout of data passed is much lower (compared to video) so
you are allowed to do some simplifications:
- only allowed type of sample is float.
- there is no interleaved data possible. Each channel must be separate.
- endianess is not important - since things are passed as platform's
native floats only
- the only way for plugin to refuse the sample rate is refusing to
instantinate
Post by salsaman
Which is why we should leave it for later.
Which is why we need reserved[xx] :)

I don't think hosts/plugins will abuse it, this list will have to be a
clearing house for any changes to livido. We will also be the writers of
the most hosts, so we can simply be policy makers.

bye
andraz
Georg Seidel
2004-11-15 08:48:52 UTC
Permalink
| Which is why we need reserved[xx] :)
|
| I don't think hosts/plugins will abuse it, this list will have to be a
| clearing house for any changes to livido. We will also be the writers of
| the most hosts, so we can simply be policy makers.

Some processor architectures required address bits that are reserved for
future extensions to be always zero (I think this was the case with
alpha).

Similarly, the livido spec could require the reserved bytes to be zero
and conforming hosts could refuse loading the plugin otherwise.
This would make abusing the reserved bytes hard.

Georg

Loading...