Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Idct ?, Encode iDCT exist ???
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Neiro
Posted: Dec 16 2002, 03:27 AM


Unregistered









I've heard about an iDCT for encoding...

VirtualDub include a iDCT ??
Or iDCT is inside the codec ??

From Vidomi forum :
Vidomi uses Virtualdub which uses a MMX optimized idct. The modified dll-files are only for a lossles decode of the vob-files. But there isn't a reference idct for encodage (virtualdub)!

It's true ??? blink.gif

Thanks smile.gif
 
  Top
phaeron
Posted: Dec 16 2002, 04:41 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Not this again!

First, you have to make sure you are referring to the correct DCT. The Discrete Cosine Transform (DCT) has both a forward incarnation (FDCT) used for encoding and an inverse one (IDCT) for decoding. The IDCT is also used during encoding to verify the coding error. However, some have dubbed the term "iDCT" to refer to any DCT that has been implemented in integer math. This acronym is misleading and isn't used in any academic literature, but you may see it in some forums. Try to stomp it out whenever possible.

VirtualDub has both forward and reverse DCTs. The MPEG-1 video decoder uses an integer 8x8 2D inverse DCT, with both scalar and MMX (Intel AP-922) incarnations. The MPEG-1 audio decoder uses a forward DCT as part of the subband synthesis transform, and an inverse modified DCT (IMDCT) in the layer III decoder, both of which are implemented in floating-point. However, VirtualDub has no encoder of its own -- all encoding is handled by external codecs. When you are encoding AVI-to-AVI, VirtualDub isn't using its MPEG-1 decoder and thus its IDCT routines don't matter.

A reference IDCT is a IDCT that has been coded brute-force:
CODE

for(int i=0; i<8; ++i) {
  double s = 0;
  for(int j=0; j<8; ++j)
     s += in[j] * cos((pi/36) * (2*i+1) * j);
  out[i] = s;
}

It is strictly by the definition and is the dumbest, slowest possible way to implement the IDCT. It is also the hardest to get wrong, which is the reason why it is implemented -- it is used as a reference to check faster implementations for accuracy. It is true that a floating-point reference IDCT will have a tiny bit more accuracy than a compliant integer IDCT, but not necessarily more than a compliant floating-point IDCT. Just applying Byeong Gi Lee's decomposition to the IDCT will speed up the algorithm by a factor of three but still give you ~22 bits of accuracy in single precision, which is way more than you need for video work. Going to Feig-Winograd shaves another 20% or so off the complexity.
 
    Top
Neiro
  Posted: Dec 16 2002, 05:04 AM


Unregistered









Thanks smile.gif
 
  Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
2 replies since Dec 16 2002, 03:27 AM Track this topic | Email this topic | Print this topic

<< Back to Advanced Video Processing