[Flac-dev] Re: nice idea
xflac at yahoo.com
Thu Oct 17 10:29:05 PDT 2002
--- Brady Patterson <brady at spaceship.com> wrote:
> This is in response to Miroslav's idea about variable block sizes. I
> may be a
> bit out of my league here as I'm just starting to look at how the
> encoding gets done. But it seems to me that you could make a decent
> about when something "new" happens based on the second derivative of
> the signal
> (where the first derivative is the difference between a given sample
> and the
> previous, and the second is you-get-the-idea).
> Here's my rationale: high-amplitude, high-frequency sections are the
> hard ones
> to encode, or at least will work best in their own frame. Those
> characteristics imply a high first derivative. You want to put such
> in their own block, and boundaries of such blocks will be where the
> derivative is relatively high.
> Okay, that's not quite right, since the first derivative will be
> negative about
> half the time, and large negative has the same effect as lange
> positive. So I
> think what you really want is the first derivative of the absolute
> value of the
> first derivative.
> Then there's the question of where to put the boundaries. Some
> is probably the best approach here. For files on which the above
> formula is
> consistently high, it will probably be desirable to set the limit
> high to avoid
> too much frame overhead.
I had done some experiments a while back with varying the blocksize.
My initial approach was to do an exhaustive search on some clips
just to see where the upper limit of improvement was, and it
turned out do not be that great. If I remember right it was
something like <1% compression improvement. In retrospect I
probably would have designed the format with more restrictions
on the blocksize to make the decoder simpler.
So I guess I would say before trying really complicated algos,
brute force it on a couple of samples to see if what you end
up with will be worth it. My conclusion at the time was that
varying the blocksize would probably only make sense for things
like sound fonts.
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
More information about the Flac-dev