SIMD/Uses/DCT: Difference between revisions

("Uses" section)
Line 18: Line 18:


The Theora video codec features a DCT and IDCT using integer arithmetics. SSE2 implementations are available can be found in [http://svn.xiph.org/trunk/theora/lib/x86/sse2fdct.c sse2fdct.c] (the DCT) and [http://svn.xiph.org/trunk/theora/lib/x86/sse2idct.c sse2idct.c] (the IDCT).
The Theora video codec features a DCT and IDCT using integer arithmetics. SSE2 implementations are available can be found in [http://svn.xiph.org/trunk/theora/lib/x86/sse2fdct.c sse2fdct.c] (the DCT) and [http://svn.xiph.org/trunk/theora/lib/x86/sse2idct.c sse2idct.c] (the IDCT).
The reference DCT for JPEG is defined using double precision floating values. A SIMD version of this can be found, e.g., in [https://github.com/mozilla/mozjpeg/blob/master/simd/jfsseflt-64.asm mozjpeg's jfsseflt-64.asm]. However, for performance reasons, the JPEG DCT is often approximated with integer arithmetics, as in [https://github.com/mozilla/mozjpeg/blob/master/simd/jfss2fst-64.asm jfss2fst-64.asm].


=== Involved data types ===
=== Involved data types ===
Line 24: Line 26:


The IDCT of the Theora video compression format can implemented using 16-bit arithmetics, according to [http://www.theora.org/doc/Theora.pdf the Theora specification], section 7.9.3. Thus the natural SIMD data type to use there is [[SIMD/Types/int16x8 |int16x8]].
The IDCT of the Theora video compression format can implemented using 16-bit arithmetics, according to [http://www.theora.org/doc/Theora.pdf the Theora specification], section 7.9.3. Thus the natural SIMD data type to use there is [[SIMD/Types/int16x8 |int16x8]].
For full-precision floating point DCTs, [[SIMD/Types/float64x2 |float64x2]] is an option. Much more common are integer approximations, though.
51

edits