Jump to content
  • Advertisement
Sign in to follow this  
JasonL220

jpeg loading maths

This topic is 4593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been read the jpeg compression standard from wotsit, but when i got to the maths i found it abit confusing, especially the E-like symbol. I have cover integration and differention in my math a-level, i think this uses and definate integral, but thats all i understand. Could you please clarify the maths for me, thanks.

Share this post


Link to post
Share on other sites
Advertisement
IIRC the E like symbol means summation.

So the bit on the first line between the [ and the * mean sum from x=0 to x=7 and sum from y=0 to y=7 f(x, y)

Or to put it another way:

for ( x = 0; x < 8; ++x )
for ( y = 0; y < 8; ++y )
sum += f( x, y );

I've never read the jpg specs so without context I have no idea what that math is supposed to do.

Share this post


Link to post
Share on other sites
The sigma is a symbol for summation. You can think of it like a 'for' loop. The first pair of sigmas in your example is sort of like the c++ nested loop:
for (int x = 0; x <=7; ++x) {
for (int y = 0; y <= 7; ++y) {
}
}
Although the equations you posted are recursive and somewhat complicated, once you understand what the sigma notation means it should be relatively straightforward to convert to code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!