[PD-dev] non-2^n blocksizes (was Re: [ pure-data-Feature Requests-3578019 ] I'd like to...)
IOhannes m zmoelnig
zmoelnig at iem.at
Wed Oct 24 09:24:21 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2012-10-24 02:56, Miller Puckette wrote:
> I think the most nearly correct thing to do would be to change the
> signal structure to add an ?allocated-size" field, and put what is
> now calcsize in the s_n field of the signal.
<m_pd.h>
typedef struct _signal
{
int s_n; /* number of points in the array */
t_sample *s_vec; /* the array */
t_float s_sr; /* sample rate */
int s_refcount; /* number of times used */
int s_isborrowed; /* whether we're going to borrow our array */
struct _signal *s_borrowedfrom; /* signal to borrow it from */
struct _signal *s_nextfree; /* next in freelist */
struct _signal *s_nextused; /* next in used list */
int s_vecsize; /* allocated size of array in points */
} t_signal;
</m_pd.h>
now i haven't recently checked the mechanics how all these variables
are used internally, but according to the comments i would have
guessed that, "s_vecsize" is the "allocated-size" field, and "s_n" is
the actual (to-be-computed) vectorsize.
>
> I'm not 100% sure I can change the size of the signal structure
> without breaking binary compatibility with older objects.
i think that "t_signal" is used by reference everywhere, which would
grant binary compatibility, as long as you only add the end of the struct.
> However, there's other stuff I want to add (to support objects
> being able to detect when there's no signal connected to an
> input). I think when I make that change I can
more important for me would be fields to separate
overlap/resampling/samplerate.
PLLLLLEAASE!
> try making the non-power-of-two thing work too. But I'm not sure
> anyone will ever use it - there are other ways to process images
> these days :)
there have been other ways to process images before...
i still would love to see non-2^n blocksizes, ideally allowing
reblocking to sub-patches if one blocksize is an integer multiple of
the other.
mfgasdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlCHl58ACgkQkX2Xpv6ydvRsDwCg0PdpIpSJWG8BSV8BzjKhyIYQ
hnMAnjOpUesgkuagN8gxTkVuil+HYvmu
=iFUL
-----END PGP SIGNATURE-----
More information about the Pd-dev
mailing list