Re: Fastcode IDCT B&V 0.1.0
- From: "Nils Haeck" <bla@xxxxxxx>
- Date: Mon, 14 May 2007 19:29:24 +0200
That is ok :)
DCT is hard to grasp at first. You can see the Coef[0] as the average of the
whole block, multiplied by 8. So it is smallint range (max 8 * 255),
actually usually only 0 or positive values for this particular coefficient.
Coef[1] and Coef[2] are the horizontal slope and vertical slope of the
block, respectively (also multiplied by *some* factor). The rest are
higher/mixed frequencies (or higher degree slopes). To complicate matters,
there's also a zig-zag pattern applied, but the coefficients the IDCT gets
are already de-zigzagged.
Above is not entirely true, only if you first multiply the coefficients with
the quantization factors. For "small tables", as defined by Jpeg Baseline,
the maximum value of a quantization factor is 255. A Quantization factor of
1 means "no quantization".
Some libraries split the dequantization and IDCT step. But IJG has
integrated it to use the fast integer method, because by multiplying the
*quantization* factors again, one can gain a few multiplication steps, by
replacing them by additions.
Isn't that smart.. (and complicated!) :)
You have gotten my source code.. there's actually a routine in the
JpegMain.pas file, that does a "brute force" DCT and IDCT, so you can see
how it works.. it's an integration over the 8x8 block, with 4 loops. That
demo routine works with doubles, and you can see that doing a DCT followed
by IDCT gives practically your old results back, within some machine
precision (e.g. 1E-20).
Nils
"Dennis" <marianndkc@xxxxxxxxxxxxxxx> schreef in bericht
news:464768ea@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Nils
Please be patient with me ;-) It takes me some time to understand the IDCT
well enough to make proper validation and benchmarking. I will take all
your
advice and implement it piece by piece as soon as I understand it. As we
go
I will probably ask many questions (intelligent or not ;-))
Best regards
Dennis Kjaer Christensen
.
- Follow-Ups:
- Re: Fastcode IDCT B&V 0.1.0
- From: Dennis
- Re: Fastcode IDCT B&V 0.1.0
- From: Nils Haeck
- Re: Fastcode IDCT B&V 0.1.0
- References:
- Fastcode IDCT B&V 0.1.0
- From: Dennis
- Re: Fastcode IDCT B&V 0.1.0
- From: Dennis
- Re: Fastcode IDCT B&V 0.1.0
- From: Nils Haeck
- Re: Fastcode IDCT B&V 0.1.0
- From: Dennis
- Fastcode IDCT B&V 0.1.0
- Prev by Date: Re: Fastcode Library Suggestions Thead
- Next by Date: Re: Fastcode IDCT B&V 0.1.0
- Previous by thread: Re: Fastcode IDCT B&V 0.1.0
- Next by thread: Re: Fastcode IDCT B&V 0.1.0
- Index(es):
Relevant Pages
|