Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"01-18-11 - Hadamard"

5 Comments -

1 – 5 of 5
Blogger won3d said...

There's also BinDCT

January 18, 2011 at 5:55 PM

Blogger ryg said...

BinDCT is nice for HW but in SW (given fast SIMD multipliers) a few parallel muls+adds are usually better than lots of adds+shifts with long dependency chains.

Also, after the original BinDCT papers, there's been some improvements. State of the art (as far as I know) in integer-only DCTs is ISO/IEC 23002-2. See here (paper) and here (code).

The really big win (both HW and SW) is reducing width of arithmetic needed. In HW, you can make each stage just as wide as it needs to be; in SW, if you never have to go >16 bits, that's very notable (needs less regs *and* saves a lot of ops).

January 18, 2011 at 11:10 PM

Blogger won3d said...

ARM has free shifts, but newer implementations also have fast multiplies, too. Anyway, I'm not particularly familiar with either ARM or implementing DCT, so enough from me.

This paper looks really cool! It is going to make for some very interesting reading very soon.

January 18, 2011 at 11:55 PM

Blogger ryg said...

Even ARM7TDMI (that's 1994 tech!) has fast muls (2-5 cycles; 2 if top 24 bits of multiplicand are all-0 or all-1, 3 if top 16 bits are all-0 or all-1, etc). For the small multipliers in BinDCT etc. (usually <=7 bits) that's plenty. Not something I'd worry about.

January 19, 2011 at 1:45 AM

Blogger cbloom said...

So this post was meant to just be a dump of some stuff I learned about Hadamard transforms.

The H264 Frext 8x8 transform is designed to stay in 16 bit integers, and every coefficient has at most 2 bits on, so multiplies can be replaced with two shifts and an add. If multiplies were cheap you would use a different transform.

BTW another interesting approach for designing approximate/fast integer transforms is to do a Hadamard first and then apply a few lifting-style corrections to munge the coefficients together.

January 19, 2011 at 11:01 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.