Why for white-pixel image, oc_enc_fdct8x8_c() returns
the matrix with non-zero AC-coefficients?
_x[64]:
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
* 107 107 107 107 107 107 107 107
_y[64]:
* 3426 1 1 1 0 0 0 0
* 1 2 1 1 0 0 0 0
* 1 1 1 1 0 0 0 0
* 1 2 1 1 0 0 0 0
* 1 1 1 1 0 0 0 0
* 0 1 1 1 0 0 0 0
* 1 1 1 1 1 0 1 0
* 0 0 0 0 0 0 0 0
This is - error of butterfly-method?
P.S. My program dct.py returns:
1016 0 -0 0 0 0 -0 -0
0 -0 0 0 0 0 0 -0
0 -0 0 0 0 -0 0 0
0 0 -0 0 0 0 -0 0
0 -0 0 -0 0 0 -0 -0
0 0 0 0 0 0 0 0
-0 0 -0 -0 0 0 -0 -0
-0 -0 0 0 -0 -0 0 0
> Why for white-pixel image, oc_enc_fdct8x8_c() returns > the matrix with non-zero AC-coefficients?Theora defines an exact-integer inverse DCT in the specification, that only approximately corresponds to the "real" DCT, and includes some scaling. See section 7.9.3 of the specification for details. An encoder is allowed to use any forward DCT it wants, but a poor choice can have a substantial impact on quality, especially at high rates. A naive implementation (e.g., like VP3 used, which is the one currently referenced in the specification) or a direct matrix multiply will introduce significant round-trip error. The forward DCT used in libtheora is designed to minimize this round-trip error, and as such has a small amount of DC leakage (nothing that would exceed the minimum quantization threshold, however). See http://people.xiph.org/~xiphmont/demo/theora/demo7.html for some additional discussion. I should probably update the (non-normative) description of the forward DCT in the spcification to match libtheora's, but for the moment the C code should be fairly straightforward.
Maybe Matching Threads
- DCT in Theora
- DCT function?
- theora encoder reordering, order of puting data from DCT 8x8 blocks to huffman compressor, and puting result of huffman compressor to buffer bitstream memory
- Converting ddf/dct/sas data definition file to R
- Inverse DCT in coding stage