[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-codec-devel
Subject:    Re: [codec-devel] Video Coding Puzzle (fwd)
From:       Mike Melanson <melanson () pcisys ! net>
Date:       2004-07-11 11:32:09
Message-ID: Pine.LNX.4.58.0407110531010.2258 () x-wing ! tmmm ! home
[Download RAW message or body]

Here's that vector with non-zero DC...

--
	-Mike Melanson



---------- Forwarded message ----------
Date: Sun, 11 Jul 2004 07:13:20 +0100
From: Mario Brito <mbrito@student.dei.uc.pt>
To: Mike Melanson <melanson@pcisys.net>
Subject: Re: [codec-devel] Video Coding Puzzle (fwd)

Here's a test case with just the DC component non-zero:

Input:

156.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Output:

19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19
19 19 19 19 19 19 19 19

Matlab: matrix = idct2(input');

matrix =

   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000
   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000   19.5000

The result was much closer than with the other test matrices... At this point i'm
convinced that (ouch..) the discrepancy may be caused by a bug on my reconstructed
code. If that's the case though, it didn't seem to affect the resulting image much, at
least not in a way i could visually detect. In order to verify this, next thing i'll
be doing is placing a few hooks on the original game decompressor and compare both
outputs of those routines.

Btw, adding 6755399441055744.0000000 seems to actually round the float to the nearest
int. Neat trick! :-)

Take care,

Mario Brito



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
xine-codec-devel mailing list
xine-codec-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-codec-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic