Content deleted Content added
review: WP:DUPLINK |
m →External links: HTTP to HTTPS for SourceForge |
||
(46 intermediate revisions by 22 users not shown) | |||
Line 1:
{{Short description|Technique used in signal processing and data compression}}
A '''discrete cosine transform''' ('''DCT''') expresses a finite sequence of [[data points]] in terms of a sum of [[cosine]] functions oscillating at different [[frequency|frequencies]]. The DCT, first proposed by [[Nasir Ahmed (engineer)|Nasir Ahmed]] in 1972, is a widely used transformation technique in [[signal processing]] and [[data compression]]. It is used in most [[digital media]], including [[digital images]] (such as [[JPEG]] and [[HEIF]]), [[digital video]] (such as [[MPEG]] and {{nowrap|[[H.26x]]}}), [[digital audio]] (such as [[Dolby Digital]], [[MP3]] and [[Advanced Audio Coding|AAC]]), [[digital television]] (such as [[SDTV]], [[HDTV]] and [[Video on demand|VOD]]), [[digital radio]] (such as [[AAC+]] and [[DAB+]]), and [[speech coding]] (such as [[AAC-LD]], [[Siren (codec)|Siren]] and [[Opus (audio format)|Opus]]). DCTs are also important to numerous other applications in [[science and engineering]], such as [[digital signal processing]], [[telecommunication]] devices, reducing [[network bandwidth]] usage, and [[spectral method]]s for the numerical solution of [[partial differential equations]].
A DCT is a [[List of Fourier-related transforms|Fourier-related transform]] similar to the [[discrete Fourier transform]] (DFT), but using only [[real number]]s. The DCTs are generally related to [[Fourier series]] coefficients of a periodically and symmetrically extended sequence whereas DFTs are related to Fourier series coefficients of only periodically extended sequences. DCTs are equivalent to DFTs of roughly twice the length, operating on real data with [[even and odd functions|even]] symmetry (since the Fourier transform of a real and even function is real and even), whereas in some variants the input or output data are shifted by half a sample.
There are eight standard DCT variants, of which four are common.
The most common variant of discrete cosine transform is the type-II DCT, which is often called simply ''the DCT''. This was the original DCT as first proposed by Ahmed. Its inverse, the type-III DCT, is correspondingly often called simply ''the inverse DCT'' or ''the IDCT''. Two related transforms are the [[discrete sine transform]] (DST), which is equivalent to a DFT of real and [[odd function]]s, and the [[modified discrete cosine transform]] (MDCT), which is based on a DCT of overlapping data. Multidimensional DCTs (MD DCTs) are developed to extend the concept of DCT to multidimensional signals. A variety of fast algorithms have been developed to reduce the computational complexity of implementing DCT. One of these is the integer DCT (IntDCT),<ref name="Stankovic"/> an [[integer]] approximation of the standard DCT,<ref name="Britanak2010" />{{rp|pages= [https://books.google.com/books?id=iRlQHcK-r_kC&pg=PA141 ix, xiii, 1, 141–304]}} used in several [[ISO/IEC]] and [[ITU-T]] international standards.<ref name="Stankovic"/><ref name="Britanak2010"/>
DCT compression, also known as block compression, compresses data in sets of discrete DCT blocks.<ref name="Alikhani"/> DCT blocks sizes including 8x8 [[pixels]] for the standard DCT, and varied integer DCT sizes between 4x4 and 32x32 pixels.<ref name="Stankovic"/><ref name="apple"/> The DCT has a strong ''energy compaction'' property,<ref name="pubDCT"/><ref name="pubRaoYip"/> capable of achieving high quality at high [[data compression ratio]]s.<ref name="Barbero"/><ref name="Lea">{{cite journal|last1=Lea|first1=William|date=1994|title=Video on demand: Research Paper 94/68|url=https://researchbriefings.parliament.uk/ResearchBriefing/Summary/RP94-68|journal=[[House of Commons Library]]|access-date=20 September 2019}}</ref> However, blocky [[compression artifacts]] can appear when heavy DCT compression is applied.
== History ==
The DCT was first conceived by [[Nasir Ahmed (engineer)|Nasir Ahmed
Since its introduction in 1974, there has been significant research on the DCT.<ref name="t81"/> In 1977, Wen-Hsiung Chen published a paper with C. Harrison Smith and Stanley C. Fralick presenting a fast DCT algorithm.<ref name="A Fast Computational Algorithm for">{{cite journal |last1=Chen |first1=Wen-Hsiung |last2=Smith |first2=C. H. |last3=Fralick |first3=S. C. |title=A Fast Computational Algorithm for the Discrete Cosine Transform |journal=[[IEEE Transactions on Communications]] |date=September 1977 |volume=25 |issue=9 |pages=1004–1009 |doi=10.1109/TCOM.1977.1093941}}</ref><ref name="t81"/> Further developments include a 1978 paper by M. J. Narasimha and A. M. Peterson, and a 1984 paper by B. G. Lee.<ref name="t81"/> These research papers, along with the original 1974 Ahmed paper and the 1977 Chen paper, were cited by the [[Joint Photographic Experts Group]] as the basis for [[JPEG]]'s lossy image compression algorithm in 1992.<ref name="t81"/><ref name="chen">{{cite journal |last1=Smith |first1=C. |last2=Fralick |first2=S. |title=A Fast Computational Algorithm for the Discrete Cosine Transform |journal=IEEE Transactions on Communications |date=1977 |volume=25 |issue=9 |pages=1004–1009 |doi=10.1109/TCOM.1977.1093941 |issn=0090-6778}}</ref>
Line 60 ⟶ 59:
**[[Image processing]] — [[digital image processing]],<ref name="Stankovic"/> [[image analysis]], [[content-based image retrieval]], [[corner detection]], directional block-wise [[Sparse approximation|image representation]], [[edge detection]], [[image enhancement]], [[image fusion]], [[image segmentation]], [[interpolation]], [[image noise]] level estimation, mirroring, rotation, [[Just-noticeable difference|just-noticeable distortion]] (JND) profile, [[spatiotemporal]] masking effects, [[foveated imaging]]<ref name="Ochoa"/>
**[[Image quality]] assessment — DCT-based quality degradation metric (DCT QM)<ref name="Ochoa"/>
**[[Image reconstruction]] — directional [[image texture|textures]] auto inspection,
*[[Medical technology]]
**[[Electrocardiography]] (ECG) — [[vectorcardiography]] (VCG)<ref name="Ochoa"/>
Line 85 ⟶ 84:
===Visual media standards===
The DCT-II
The integer DCT, an integer approximation of the DCT,<ref name="Britanak2010"/><ref name="Stankovic"/> is used in [[Advanced Video Coding]] (AVC),<ref name="Wang">{{cite journal |last1=Wang |first1=Hanli |last2=Kwong |first2=S. |last3=Kok |first3=C. |title=Efficient prediction algorithm of integer DCT coefficients for {{nowrap|H.264}}/AVC optimization |journal=IEEE Transactions on Circuits and Systems for Video Technology |date=2006 |volume=16 |issue=4 |pages=547–552 |doi=10.1109/TCSVT.2006.871390|s2cid=2060937 }}</ref><ref name="Stankovic"/> introduced in 2003, and [[High Efficiency Video Coding]] (HEVC),<ref name="apple"/><ref name="Stankovic"/> introduced in 2013. The integer DCT is also used in the [[High Efficiency Image Format]] (HEIF), which uses a subset of the [[HEVC]] video coding format for coding still images.<ref name="apple"/> AVC uses 4 x 4 and 8 x 8 blocks. HEVC and HEIF use varied block sizes between 4 x 4 and 32 x 32 [[pixels]].<ref name="apple"/><ref name="Stankovic"/> {{As of|2019}}, AVC is by far the most commonly used format for the recording, compression and distribution of video content, used by 91% of video developers, followed by HEVC which is used by 43% of developers.<ref name="Bitmovin">{{cite web |url=https://cdn2.hubspot.net/hubfs/3411032/Bitmovin%20Magazine/Video%20Developer%20Report%202019/bitmovin-video-developer-report-2019.pdf |title=Video Developer Report 2019 |website=[[Bitmovin]] |year=2019 |access-date=5 November 2019}}</ref>
====Image formats====
Line 105 ⟶ 104:
|-
| [[JPEG XL]]<ref name="jxl">{{Cite web |url=http://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf |title=JPEG XL White Paper |last1=Alakuijala | first1=Jyrki |last2=Sneyers |first2=Jon |last3=Versari |first3=Luca |last4=Wassenberg |first4=Jan |access-date=14 Jan 2022 |date=22 January 2021 |website=JPEG Org. |archive-date=2 May 2021 |archive-url=https://web.archive.org/web/20210502025653/http://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf |url-status=live |quote=Variable-sized DCT (square or rectangular from 2x2 to 256x256) serves as a fast approximation of the optimal decorrelating transform.}}</ref> ||2020|| A royalty-free raster-graphics file format that supports both lossy and lossless compression.
|}
====Video formats====
Line 112 ⟶ 111:
! [[Video coding standard]] !! Year !! Common applications
|-
| {{nowrap|[[H.261]]}}<ref name="video-standards">{{cite web|first=Yao|last=Wang|archive-url=https://web.archive.org/web/20130123211453/http://eeweb.poly.edu/~yao/EL6123/coding_standards_pt1.pdf|archive-date=2013-01-23|url=http://eeweb.poly.edu/~yao/EL6123/coding_standards_pt1.pdf|title=Video Coding Standards: Part I|year=2006}}</ref><ref>{{cite web|first=Yao|last=Wang|archive-url=https://web.archive.org/web/20130123211453/http://eeweb.poly.edu/~yao/EL6123/coding_standards_pt2.pdf|archive-date=2013-01-23|url=http://eeweb.poly.edu/~yao/EL6123/coding_standards_pt2.pdf|title=Video Coding Standards: Part II|year=2006}}</ref> ||1988|| First of a family of [[video coding standards]]. Used primarily in older [[video conferencing]] and [[video telephone]] products.
|-
| [[Motion JPEG]] (MJPEG)<ref>{{cite book |last1=Hoffman |first1=Roy |title=Data Compression in Digital Systems |date=2012 |publisher=[[Springer Science & Business Media]] |isbn=9781461560319 |page=255 |url=https://books.google.com/books?id=FOfTBwAAQBAJ}}</ref> ||1992|| [[QuickTime]], [[video editing]], [[non-linear editing]], [[digital cameras]]
|-
| [[MPEG-1]] Video<ref name="Rao">{{cite book | last1 = Rao | first1 = K.R. | author-link1 = K. R. Rao | last2 = Hwang | first2 = J. J. | date = 1996-07-18 | title = Techniques and Standards for Image, Video, and Audio Coding | language = en | publisher = Prentice Hall | at = JPEG: Chapter 8; {{nowrap|H.261}}: Chapter 9; MPEG-1: Chapter 10; MPEG-2: Chapter 11 | isbn = 978-0133099072 | lccn = 96015550 | oclc = 34617596 | ol = OL978319M | s2cid = 56983045 | df = dmy-all}}</ref> ||1993|| [[Digital video]] distribution on [[CD]] or [[Internet video]]
|-
| [[MPEG-2 Video]] ({{nowrap|H.262}})<ref name="Rao"/> ||1995|| Storage and handling of digital images in broadcast applications, [[digital television]], [[HDTV]], cable, satellite, high-speed [[Internet]], [[DVD]] video distribution
|-
| [[DV (video format)|DV]] ||1995|| [[Camcorders]], [[digital cassettes]]
|-
| [[H.263]] ([[MPEG-4 Part 2]])<ref name="video-standards"/> ||1996|| [[Video telephony]] over [[public switched telephone network]] (PSTN), {{nowrap|[[H.320]]}}, [[Integrated Services Digital Network]] (ISDN)<ref>{{cite news |last1=Davis |first1=Andrew |title=The H.320 Recommendation Overview |url=https://www.eetimes.com/document.asp?doc_id=1275886 |access-date=7 November 2019 |work=[[EE Times]] |date=13 June 1997}}</ref><ref>{{cite book |title=IEEE WESCANEX 97: communications, power, and computing : conference proceedings |date=May 22–23, 1997 |publisher=[[Institute of Electrical and Electronics Engineers]] |___location=University of Manitoba, Winnipeg, Manitoba, Canada |isbn=9780780341470 |page=30 |url=https://books.google.com/books?id=8vhEAQAAIAAJ |quote={{nowrap|H.263}} is similar to, but more complex than {{nowrap|H.261}}. It is currently the most widely used international video compression standard for video telephony on ISDN (Integrated Services Digital Network) telephone lines.}}</ref>
|-
| [[Advanced Video Coding]] (AVC,
|-
| [[Theora]] ||2004|| Internet video, web browsers
Line 130 ⟶ 129:
| [[VC-1]] ||2006|| [[Windows]] media, [[Blu-ray Disc]]s
|-
| [[Apple ProRes]] ||2007|| Professional
|-
| [[VP9]]||2010|| A video codec developed by [[Google]] used in the [[WebM]] container format with [[HTML5]].
|-
| [[High Efficiency Video Coding]] (HEVC,
|-
| [[Daala]] ||2013|| Research video format by [[Xiph.org]]
|-
| [[AV1]]<ref name="AV1">{{cite web |url=https://aomediacodec.github.io/av1-spec/av1-spec.pdf |title=AV1 Bitstream & Decoding Process Specification |author=Peter de Rivaz |author2=Jack Haughton |date=2018 |publisher=[[Alliance for Open Media]] |access-date=2022-01-14}}</ref> ||2018|| An open source format based on VP10 ([[VP9]]'s internal successor), [[Daala]] and [[Thor (video codec)|Thor]]; used by content providers such as [[YouTube]]<ref name="YT AV1 Beta Playlist">{{cite web |url=https://www.youtube.com/playlist?list=PLyqf6gJt7KuHBmeVzZteZUlNUQAVLwrZS |title=AV1 Beta Launch Playlist |author=YouTube Developers |website=[[YouTube]] |date=15 September 2018 |access-date=14 January 2022 |quote=The first videos to receive YouTube's AV1 transcodes.}}</ref><ref name="YT AV1">{{cite web |url=https://www.ghacks.net/2018/09/13/how-to-enable-av1-support-on-youtube/ |title=How to enable AV1 support on YouTube |last=Brinkmann |first=Martin |date=13 September 2018 |access-date=14 January 2022}}</ref> and [[Netflix]].<ref name="Netflix AV1 Android">{{cite web |url=https://netflixtechblog.com/netflix-now-streaming-av1-on-android-d5264a515202 |title=Netflix Now Streaming AV1 on Android |author=Netflix Technology Blog |date=5 February 2020 |access-date=14 January 2022}}</ref><ref name="Netflix AV1 TV">{{cite web |url=https://netflixtechblog.com/bringing-av1-streaming-to-netflix-members-tvs-b7fc88e42320 |title=Bringing AV1 Streaming to Netflix Members' TVs |author=Netflix Technology Blog |date=9 November 2021 |access-date=14 January 2022}}</ref>
Line 142 ⟶ 141:
===MDCT audio standards===
{{
====General audio====
{| class="wikitable"
|-
!
! Year
! Common applications
|-
| [[Dolby Digital]] (AC-3)<ref name="Luo" /><ref name="Britanak2011" />
| [[Dolby Digital]] (AC-3)<ref name="Luo">{{cite book |last1=Luo |first1=Fa-Long |title=Mobile Multimedia Broadcasting Standards: Technology and Practice |date=2008 |publisher=[[Springer Science & Business Media]] |isbn=9780387782638 |page=590 |url=https://books.google.com/books?id=l6PovWat8SMC&pg=PA590}}</ref><ref name="Britanak2011">{{cite journal |last1=Britanak |first1=V. |title=On Properties, Relations, and Simplified Implementation of Filter Banks in the Dolby Digital (Plus) AC-3 Audio Coding Standards |journal=IEEE Transactions on Audio, Speech, and Language Processing |date=2011 |volume=19 |issue=5 |pages=1231–1241 |doi=10.1109/TASL.2010.2087755|s2cid=897622 }}</ref>▼
| 1991
| [[Film|Cinema]], [[digital cinema]], [[DVD]], [[Blu-ray]], [[streaming media]], [[video games]]
Line 158:
| [[MiniDisc]]
|-
| [[
| 1993
| [[Digital audio]] distribution, [[MP3 players]], [[portable media players]], [[streaming media]]
Line 170:
| [[Digital audio]] distribution, [[portable media players]], [[streaming media]], [[game consoles]], [[mobile devices]], [[iOS]], [[iTunes]], [[Android (operating system)|Android]], [[BlackBerry]]
|-
| [[High-Efficiency Advanced Audio Coding]] (AAC+)<ref
| 1997
| [[Digital radio]], [[digital audio broadcasting]] (DAB+),<ref name="Britanak"
|-
| [[Cook Codec]]
Line 182:
| [[Windows Media]]
|-
| [[Vorbis]]<ref name="vorbis-mdct" /><ref name="Luo" />
| [[Vorbis]]<ref name="vorbis-mdct">{{cite web |author=Xiph.Org Foundation |publisher=Xiph.Org Foundation |url=http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-50001.1.2 |title=Vorbis I specification - 1.1.2 Classification |date=2009-06-02 |access-date=2009-09-22}}</ref><ref name="Luo"/>▼
| 2000
| [[Digital audio]] distribution, [[radio station]]s, [[streaming media]], [[video game]]s, [[Spotify]], [[Wikipedia]]
Line 194:
| China national audio standard, [[China Multimedia Mobile Broadcasting]], [[DVB-H]]
|-
| [[Opus (audio format)|Opus]]<ref name="Valin" />
| [[Opus (audio format)|Opus]]<ref>{{cite conference|last1=Valin|first1=Jean-Marc|last2=Maxwell|first2=Gregory|last3=Terriberry|first3=Timothy B.|last4=Vos|first4=Koen|date=October 2013|title=High-Quality, Low-Delay Music Coding in the Opus Codec|conference=135th AES Convention|publisher=[[Audio Engineering Society]]|arxiv=1602.04845}}</ref>▼
| 2012
| VoIP,<ref name="homepage" /> mobile telephony, [[WhatsApp]],<ref name="Register" /><ref name="Hazra" /><ref name="Srivastava" /> [[PlayStation 4]]<ref name="PlayStation" />
|-
| [[Dolby AC-4]]<ref name="Dolby AC-4" />
| [[Dolby AC-4]]<ref>{{cite web |title=Dolby AC-4: Audio Delivery for Next-Generation Entertainment Services |url=https://www.dolby.com/us/en/technologies/ac-4/Next-Generation-Entertainment-Services.pdf |website=[[Dolby Laboratories]] |date=June 2015 |access-date=11 November 2019}}</ref>▼
| rowspan="2" |
| rowspan="2" | [[ATSC 3.0]], [[ultra-high-definition television]] (UHD TV)
|-
| [[MPEG-H 3D Audio]]<ref name="Bleidt" />
| [[MPEG-H 3D Audio]]<ref>{{cite journal |last1=Bleidt |first1=R. L. |last2=Sen |first2=D. |last3=Niedermeier |first3=A. |last4=Czelhan |first4=B. |last5=Füg |first5=S. |display-authors=etal |title=Development of the MPEG-H TV Audio System for ATSC 3.0 |journal=IEEE Transactions on Broadcasting |date=2017 |volume=63 |issue=1 |pages=202–236 |doi=10.1109/TBC.2017.2661258 |s2cid=30821673 |url=https://www.iis.fraunhofer.de/content/dam/iis/en/doc/ame/Conference-Paper/BleidtR-IEEE-2017-Development-of-MPEG-H-TV-Audio-System-for-ATSC-3-0.pdf}}</ref>▼
|}
Line 211:
!Common applications
|-
|[[AAC-LD]] (LD-MDCT)<ref name="Schnell" />
|[[AAC-LD]] (LD-MDCT)<ref>{{cite conference |last1=Schnell |first1=Markus |last2=Schmidt |first2=Markus |last3=Jander |first3=Manuel |last4=Albert |first4=Tobias |last5=Geiger |first5=Ralf |last6=Ruoppila |first6=Vesa |last7=Ekstrand |first7=Per |last8=Bernhard |first8=Grill |date=October 2008 |title=MPEG-4 Enhanced Low Delay AAC - A New Standard for High Quality Communication |url=https://www.iis.fraunhofer.de/content/dam/iis/de/doc/ame/conference/AES-125-Convention_AAC-ELD-NewStandardForHighQualityCommunication_AES7503.pdf |conference=125th AES Convention |publisher=[[Audio Engineering Society]] |access-date=20 October 2019 |website=[[Fraunhofer IIS]]}}</ref>▼
|1999
|[[Mobile telephony]], [[voice-over-IP]] (VoIP), [[iOS]], [[FaceTime]]<ref name="AppleInsider standards 1"/>
|-
|[[Siren (codec)|Siren]]<ref name="Hersent" />
|[[Siren (codec)|Siren]]<ref name="Hersent">{{cite book |last1=Hersent |first1=Olivier |last2=Petit |first2=Jean-Pierre |last3=Gurle |first3=David |title=Beyond VoIP Protocols: Understanding Voice Technology and Networking Techniques for IP Telephony |date=2005 |publisher=[[John Wiley & Sons]] |isbn=9780470023631 |page=55 |url=https://books.google.com/books?id=SMvNToRs-DgC&pg=PA55}}</ref>▼
|1999
|[[VoIP]], [[wideband audio]], [[G.722.1]]
|-
|[[G.722.1]]<ref name="Lutzky" />
|[[G.722.1]]<ref>{{cite conference |last1=Lutzky |first1=Manfred |last2=Schuller |first2=Gerald |last3=Gayer |first3=Marc |last4=Krämer |first4=Ulrich |last5=Wabnik |first5=Stefan |title=A guideline to audio codec delay |url=https://www.iis.fraunhofer.de/content/dam/iis/de/doc/ame/conference/AES-116-Convention_guideline-to-audio-codec-delay_AES116.pdf |website=[[Fraunhofer IIS]] |conference=116th AES Convention |publisher=[[Audio Engineering Society]] |date=May 2004 |access-date=24 October 2019}}</ref>▼
|1999
|VoIP, wideband audio, [[G.722]]
|-
|[[G.729.1]]<ref name="Nagireddi" />
|[[G.729.1]]<ref name="Nagireddi">{{cite book|url=https://books.google.com/books?id=5AneeZFE71MC&pg=PA69|title=VoIP Voice and Fax Signal Processing|last1=Nagireddi|first1=Sivannarayana|date=2008|publisher=[[John Wiley & Sons]]|isbn=9780470377864|page=69}}</ref>▼
|2006
|[[G.729]], VoIP, wideband audio,<ref name="Nagireddi" /> [[mobile telephony]]
Line 231:
|[[Wideband audio]]
|-
|[[G.718]]<ref name="ITU-T" />
|[[G.718]]<ref>{{Cite web|url=https://www.itu.int/ITU-T/workprog/wp_item.aspx?isn=344|title=ITU-T Work Programme|website=ITU}}</ref>▼
|2008
|VoIP, wideband audio, mobile telephony
Line 239:
|[[Teleconferencing]], [[videoconferencing]], [[voice mail]]
|-
|[[CELT]]<ref name="Terriberry" />
|[[CELT]]<ref name="presentation">{{cite AV media |first=Timothy B.|last=Terriberry |title=Presentation of the CELT codec |url=http://people.xiph.org/~greg/video/linux_conf_au_CELT_2.ogv |time=65 minutes}}, also {{cite web|url=http://www.celt-codec.org/presentations/misc/lca-celt.pdf|title=CELT codec presentation slides}}</ref>▼
|2011
|VoIP,<ref name="ekiga"
|-
|[[Enhanced Voice Services]] (EVS)<ref name="EVS" />
|[[Enhanced Voice Services]] (EVS)<ref>{{cite web|url=https://www.iis.fraunhofer.de/content/dam/iis/de/doc/ame/wp/FraunhoferIIS_Technical-Paper_EVS.pdf|title=Enhanced Voice Services (EVS) Codec|date=March 2017|publisher=[[Fraunhofer IIS]]|access-date=19 October 2019}}</ref>▼
|2014
|Mobile telephony, VoIP, wideband audio
|}
===
{{See also|ZPEG}}
Multidimensional DCTs (MD DCTs) have several applications, mainly 3-D DCTs such as the 3-D DCT-II, which has several new applications like Hyperspectral Imaging coding systems,<ref name="appDCT">{{Citation |first1=G. P. |last1=Abousleman |first2=M. W. |last2=Marcellin |first3=B. R. |last3=Hunt |title=Compression of hyperspectral imagery using 3-D DCT and hybrid DPCM/DCT |journal=IEEE Trans. Geosci. Remote Sens. |date=January 1995 |volume=33 |issue=1 |pages=26–34 |doi=10.1109/36.368225|bibcode=1995ITGRS..33...26A }}</ref> variable temporal length 3-D DCT coding,<ref name="app2DCT">{{Citation |first1=Y. |last1=Chan |first2=W. |last2=Siu |title= Variable temporal-length 3-D discrete cosine transform coding |journal=IEEE Trans. Image
===Digital signal processing===
DCT plays an important role in [[digital signal processing]] specifically [[data compression]]. The DCT is widely implemented in [[digital signal processors]] (DSP), as well as digital signal processing software. Many companies have developed DSPs based on DCT technology. DCTs are widely used for applications such as [[encoding]], decoding, video, audio, [[multiplexing]], control signals, [[signaling]], and [[analog-to-digital conversion]]. DCTs are also commonly used for [[high-definition television]] (HDTV) encoder/decoder [[integrated circuit|chips]].<ref name="Stankovic"/>▼
▲The DCT is widely implemented in [[digital signal processors]] (DSP), as well as digital signal processing software. Many companies have developed DSPs based on DCT technology. DCTs are widely used for applications such as [[encoding]], decoding, video, audio, [[multiplexing]], control signals, [[signaling]], and [[analog-to-digital conversion]]. DCTs are also commonly used for [[high-definition television]] (HDTV) encoder/decoder [[integrated circuit|chips]].<ref name="Stankovic"/>
===Compression artifacts===
A common issue with DCT compression in [[digital media]] are blocky [[compression artifacts]],<ref name="Katsaggelos">{{cite book |last1=Katsaggelos |first1=Aggelos K. |last2=Babacan |first2=S. Derin |last3=Chun-Jen |first3=Tsai |title=The Essential Guide to Image Processing |date=2009 |publisher=[[Academic Press]] |isbn=9780123744579 |pages=349–383|chapter=Chapter 15 - Iterative Image Restoration}}</ref> caused by DCT blocks.<ref name="Alikhani">{{cite web |last1=Alikhani |first1=Darya |title=Beyond resolution: Rosa Menkman's glitch art |url=http://postmatter.merimedia.com/articles/archive-2012-2016/2015/51-rosa-menkman/ |website=POSTmatter |date=April 1, 2015 |access-date=19 October 2019 |archive-date=19 October 2019 |archive-url=https://web.archive.org/web/20191019082218/http://postmatter.merimedia.com/articles/archive-2012-2016/2015/51-rosa-menkman/ |url-status=dead }}</ref>
DCT blocks are often used in [[glitch art]].<ref name="Alikhani"/> The artist [[Rosa Menkman]] makes use of DCT-based compression artifacts in her glitch art,<ref name="Menkman">{{cite book |last1=Menkman |first1=Rosa |title=The Glitch Moment(um) |url=https://networkcultures.org/_uploads/NN%234_RosaMenkman.pdf |publisher=Institute of Network Cultures |isbn=978-90-816021-6-7 |date=October 2011 |access-date=19 October 2019}}</ref> particularly the DCT blocks found in most [[digital media]] formats such as [[JPEG]] digital images and [[MP3]]
▲A common issue with DCT compression in [[digital media]] are blocky [[compression artifacts]],<ref name="Katsaggelos">{{cite book |last1=Katsaggelos |first1=Aggelos K. |last2=Babacan |first2=S. Derin |last3=Chun-Jen |first3=Tsai |title=The Essential Guide to Image Processing |date=2009 |publisher=[[Academic Press]] |isbn=9780123744579 |pages=349–383|chapter=Chapter 15 - Iterative Image Restoration}}</ref> caused by DCT blocks.<ref name="Alikhani">{{cite web |last1=Alikhani |first1=Darya |title=Beyond resolution: Rosa Menkman's glitch art |url=http://postmatter.merimedia.com/articles/archive-2012-2016/2015/51-rosa-menkman/ |website=POSTmatter |date=April 1, 2015 |access-date=19 October 2019 |archive-date=19 October 2019 |archive-url=https://web.archive.org/web/20191019082218/http://postmatter.merimedia.com/articles/archive-2012-2016/2015/51-rosa-menkman/ |url-status=dead }}</ref> The DCT algorithm can cause block-based artifacts when heavy compression is applied. Due to the DCT being used in the majority of digital image and [[video coding standards]] (such as the [[JPEG]], [[H.26x]] and [[MPEG]] formats), DCT-based blocky compression artifacts are widespread in [[digital media]]. In a DCT algorithm, an image (or frame in an image sequence) is divided into square blocks which are processed independently from each other, then the DCT of these blocks is taken, and the resulting DCT coefficients are [[Quantization (signal processing)|quantized]]. This process can cause blocking artifacts, primarily at high [[data compression ratio]]s.<ref name="Katsaggelos"/> This can also cause the "[[mosquito noise]]" effect, commonly found in [[digital video]] (such as the MPEG formats).<ref>{{cite web |title=Mosquito noise |url=https://www.pcmag.com/encyclopedia/term/55914/mosquito-noise |website=[[PC Magazine]] |access-date=19 October 2019}}</ref>
▲DCT blocks are often used in [[glitch art]].<ref name="Alikhani"/> The artist [[Rosa Menkman]] makes use of DCT-based compression artifacts in her glitch art,<ref name="Menkman">{{cite book |last1=Menkman |first1=Rosa |title=The Glitch Moment(um) |url=https://networkcultures.org/_uploads/NN%234_RosaMenkman.pdf |publisher=Institute of Network Cultures |isbn=978-90-816021-6-7 |date=October 2011 |access-date=19 October 2019}}</ref> particularly the DCT blocks found in most [[digital media]] formats such as [[JPEG]] digital images and [[MP3]] [[digital audio]].<ref name="Alikhani"/> Another example is ''Jpegs'' by German photographer [[Thomas Ruff]], which uses intentional [[JPEG]] artifacts as the basis of the picture's style.<ref>{{cite book|chapter=jpegs|first=Thomas|last=Ruff|title=Aperture|date=May 31, 2009|page=132|publisher=Aperture |isbn=9781597110938}}</ref><ref>{{cite web|url=http://jmcolberg.com/weblog/2009/04/review_jpegs_by_thomas_ruff/|title=Review: jpegs by Thomas Ruff|first=Jörg|last=Colberg|date=April 17, 2009}}</ref>
==Informal overview==
Like any Fourier-related transform,
The Fourier-related transforms that operate on a function over a finite [[___domain of a function|___domain]], such as the DFT or DCT or a [[Fourier series]], can be thought of as implicitly defining an ''extension'' of that function outside the ___domain. That is, once you write a function <math>f(x)</math> as a sum of sinusoids, you can evaluate that sum at any <math>x</math>, even for <math>x</math> where the original <math>f(x)</math> was not specified. The DFT, like the Fourier series, implies a [[periodic function|periodic]] extension of the original function. A DCT, like a [[
[[Image:DCT-symmetries.svg|thumb|right|350px|Illustration of the implicit even/odd extensions of DCT input data, for ''N''=11 data points (red dots), for the four most common types of DCT (types I-IV). Note the subtle differences at the interfaces between the data and the extensions: in DCT-II and DCT-IV both the end points are replicated in the extensions but not in DCT-I or DCT-III (and a zero point is inserted at the sign reversal extension in DCT-III).]]
However, because DCTs operate on ''finite'', ''discrete'' sequences, two issues arise that do not apply for the continuous cosine transform. First, one has to specify whether the function is even or odd at ''both'' the left and right boundaries of the ___domain (i.e. the min-''n'' and max-''n'' boundaries in the definitions below, respectively). Second, one has to specify around ''what point'' the function is even or odd. In particular, consider a sequence ''abcd'' of four equally spaced data points, and say that we specify an even ''left'' boundary. There are two sensible possibilities: either the data are even about the sample ''a'', in which case the even extension is ''dcbabcd'', or the data are even about the point ''halfway'' between ''a'' and the previous point, in which case the even extension is ''dcbaabcd'' (''a'' is repeated).
Each boundary can be either even or odd (2 choices per boundary) and can be symmetric about a data point or the point halfway between two data points (2 choices per boundary), for a total of 2 × 2 × 2 × 2 = 16 possibilities. These choices lead to all the standard variations of DCTs and also [[discrete sine transform]]s (DSTs). Half of these possibilities, those where the ''left'' boundary is even, correspond to the 8 types of DCT; the other half are the 8 types of DST.
These different boundary conditions strongly affect the applications of the transform and lead to uniquely useful properties for the various DCT types. Most directly, when using Fourier-related transforms to solve [[partial differential equation]]s by [[spectral method]]s, the boundary conditions are directly specified as a part of the problem being solved. Or, for the
In particular, it is well known that any [[Classification of discontinuities|discontinuities]] in a function reduce the [[rate of convergence]] of the Fourier series
== Formal definition ==
Line 287 ⟶ 283:
:<math>X_k
= \frac{1}{2} (x_0 + (-1)^k x_{N-1})
+ \sum_{n=1}^{N-2} x_n \cos \left[\, \
\qquad \text{ for } ~ k = 0,\ \ldots\ N-1 ~.</math>
Some authors further multiply the <math>x_0 </math> and <math> x_{N-1} </math> terms by <math> \sqrt{2\,}\
The DCT-I is exactly equivalent (up to an overall scale factor of 2), to a
Note, however, that the DCT-I is not defined for <math>
Thus, the DCT-I corresponds to the boundary conditions: <math>
=== DCT-II ===
Line 303 ⟶ 299:
\qquad \text{ for } ~ k = 0,\ \dots\ N-1 ~.</math>
The DCT-II is probably the most commonly used form, and is often simply referred to as
This transform is exactly equivalent (up to an overall scale factor of 2) to a
Some authors further multiply the <math>
The DCT-II implies the boundary conditions: <math>
=== DCT-III ===
Line 317 ⟶ 313:
\qquad \text{ for } ~ k = 0,\ \ldots\ N-1 ~.</math>
Because it is the inverse of DCT-II up to a scale factor (see below), this form is sometimes simply referred to as
Some authors divide the <math>x_0</math> term by <math>\sqrt{2}</math> instead of by 2 (resulting in an overall <math>x_0/\sqrt{2}</math> term) and multiply the resulting matrix by an overall scale factor of <math display="inline"> \sqrt{2/N}</math> (see above for the corresponding change in DCT-II), so that the DCT-II and DCT-III are transposes of one another. This makes the DCT-III matrix [[orthogonal matrix|orthogonal]], but breaks the direct correspondence with a real-even
The DCT-III implies the boundary conditions: <math>x_n</math> is even around <math>n = 0</math> and odd around <math>n = N ;</math> <math>X_k</math> is even around <math>k = -1/2</math> and even around <math>k = N - 1/2.</math>
Line 332 ⟶ 328:
A variant of the DCT-IV, where data from different transforms are ''overlapped'', is called the [[modified discrete cosine transform]] (MDCT).<ref>{{harvnb|Malvar|1992}}</ref>
The DCT-IV implies the boundary conditions: <math>
=== DCT V-VIII ===
DCTs of types I–IV treat both boundaries consistently regarding the point of symmetry: they are even/odd around either a data point for both boundaries or halfway between two data points for both boundaries. By contrast, DCTs of types V-VIII imply boundaries that are even/odd around a data point for one boundary and halfway between two data points for the other boundary.
In other words, DCT types I–IV are equivalent to real-even
However, these variants seem to be rarely used in practice. One reason, perhaps, is that [[Fast Fourier transform|FFT]] algorithms for odd-length DFTs are generally more complicated than [[Fast Fourier transform|FFT]] algorithms for even-length DFTs (e.g. the simplest radix-2 algorithms are only for even lengths), and this increased intricacy carries over to the DCTs as described below.
Line 346 ⟶ 342:
Using the normalization conventions above, the inverse of DCT-I is DCT-I multiplied by 2/(''N'' − 1). The inverse of DCT-IV is DCT-IV multiplied by 2/''N''. The inverse of DCT-II is DCT-III multiplied by 2/''N'' and vice versa.<ref name="pubRaoYip"/>
Like for the
== Multidimensional DCTs ==
Line 510 ⟶ 506:
Specialized DCT algorithms, on the other hand, see widespread use for transforms of small, fixed sizes such as the {{nobr| 8 × 8 }} DCT-II used in [[JPEG]] compression, or the small DCTs (or MDCTs) typically used in audio compression. (Reduced code size may also be a reason to use a specialized DCT for embedded-device applications.)
In fact, even the DCT algorithms using an ordinary FFT are sometimes equivalent to pruning the redundant operations from a larger FFT of real-symmetric data, and they can even be optimal from the perspective of arithmetic counts. For example, a type-II DCT is equivalent to a DFT of size <math>~ 4N ~</math> with real-even symmetry whose even-indexed elements are zero. One of the most common methods for computing this via an FFT (e.g. the method used in [[FFTPACK]] and [[Fastest Fourier Transform in the West|FFTW]]) was described by {{harvtxt|Narasimha|Peterson|1978}} and {{harvtxt|Makhoul|1980}}, and this method in hindsight can be seen as one step of a radix-4 decimation-in-time Cooley–Tukey algorithm applied to the "logical" real-even DFT corresponding to the DCT-II.{{efn|
The radix-4 step reduces the size <math>~ 4N ~</math> DFT to four size <math>~ N ~</math> DFTs of real data, two of which are zero, and two of which are equal to one another by the even symmetry. Hence giving a single size <math>~ N ~</math> FFT of real data plus <math>~ \mathcal{O}(N) ~</math> [[butterfly (FFT algorithm)|butterflies]], once the trivial and / or duplicate parts are eliminated and / or merged.
}}
Line 517 ⟶ 513:
}}).
A recent reduction in the operation count to <math>~ \tfrac{17}{9} N \log_2 N + \mathcal{O}(N)</math> also uses a real-data FFT.<ref>{{cite journal |doi=10.1016/j.sigpro.2008.01.004 |title=Type-II/III DCT/DST algorithms with reduced number of arithmetic operations |journal=Signal Processing |volume=88 |issue=6 |pages=1553–1564 |year=2008 |last1=Shao |first1=Xuancheng |last2=Johnson |first2=Steven G. |arxiv=cs/0703150 |bibcode=2008SigPr..88.1553S |s2cid=986733}}</ref> So, there is nothing intrinsically bad about computing the DCT via an FFT from an arithmetic perspective – it is sometimes merely a question of whether the corresponding FFT algorithm is optimal. (As a practical matter, the function-call overhead in invoking a separate FFT routine might be significant for small <math>~ N ~,</math> but this is an implementation rather than an algorithmic question since it can be solved by unrolling or inlining.)
==Example of IDCT==
[[File:DCT filter comparison.png|thumb|right|An example showing eight different filters applied to a test image (top left) by multiplying its DCT spectrum (top right) with each filter.]]
Consider this {{resx|8x8}} [[grayscale image]] of capital letter A.
[[File:letter-a-8x8.png|frame|center|Original size, scaled 10x (nearest neighbor), scaled 10x (bilinear).]]
Line 554 ⟶ 550:
== References ==
{{reflist
<ref name="Ahmed">{{cite journal |last=Ahmed |first=Nasir |author-link=N. Ahmed |title=How I Came Up With the Discrete Cosine Transform |journal=[[Digital Signal Processing (journal)|Digital Signal Processing]] |date=January 1991 |volume=1 |issue=1 |pages=4–5 |doi=10.1016/1051-2004(91)90086-Z |bibcode=1991DSP.....1....4A |url=https://www.
<ref name="Stankovic">{{cite journal | last1 = Stanković | first1 = Radomir S. | last2 = Astola | first2 = Jaakko T. |title = Reminiscences of the Early Work in DCT: Interview with K.R. Rao | journal = Reprints from the Early Days of Information Sciences | publisher = Tampere International Center for Signal Processing | date = 2012 | volume = 60 | url = https://ethw.org/w/images/1/19/Report-60.pdf | access-date = 2021-12-30 | archive-url = https://web.archive.org/web/20211230214050/https://ethw.org/w/images/1/19/Report-60.pdf | archive-date = 2021-12-30 | url-status = live | issn = 1456-2774 | isbn = 978-9521528187 | via = [[Engineering and Technology History Wiki|ETHW]] | df = dmy-all}}</ref>
Line 567 ⟶ 563:
<ref name="pubRaoYip">{{cite book | last1 = Rao | first1 = K. Ramamohan | author-link1 = K. R. Rao | last2 = Yip | first2 = Patrick C. | date = 1990-09-11 | title = Discrete Cosine Transform: Algorithms, Advantages, Applications | series = Signal, Image and Speech Processing | language = en | publisher = [[Academic Press]] | doi = 10.1016/c2009-0-22279-3 | arxiv = 1109.0337 | isbn = 978-0125802031 | lccn = 89029800 | oclc = 1008648293 | ol = OL2207570M | s2cid = 12270940 | df = dmy-all}}</ref>
<ref name="Luo">{{cite book |last1=Luo |first1=Fa-Long |title=Mobile Multimedia Broadcasting Standards: Technology and Practice |date=2008 |publisher=[[Springer Science & Business Media]] |isbn=9780387782638 |page=590 |url=https://books.google.com/books?id=l6PovWat8SMC&pg=PA590}}</ref>
▲
<ref name="Herre">{{cite journal |last1=Herre |first1=J. |last2=Dietz |first2=M. |title=MPEG-4 high-efficiency AAC coding [Standards in a Nutshell] |journal=IEEE Signal Processing Magazine |date=2008 |volume=25 |issue=3 |pages=137–142 |doi=10.1109/MSP.2008.918684|bibcode=2008ISPM...25..137H }}</ref>
<ref name="Britanak">{{cite book |last1=Britanak |first1=Vladimir |last2=Rao |first2=K. R. |title=Cosine-/Sine-Modulated Filter Banks: General Properties, Fast Algorithms and Integer Approximations |date=2017 |publisher=Springer |isbn=9783319610801 |page=478 |url=https://books.google.com/books?id=cZ4vDwAAQBAJ&pg=PA478}}</ref>
▲
▲
<ref name="homepage">{{cite web|url=http://opus-codec.org/|title=Opus Codec|work=Opus|publisher=Xiph.org Foundation|type=Home page|access-date=July 31, 2012}}</ref>
<ref name="Register">{{cite news|url=https://www.theregister.co.uk/2015/10/27/whatsapp_forensic_analysis/|title=WhatsApp laid bare: Info-sucking app's innards probed|last1=Leyden|first1=John|date=27 October 2015|work=[[The Register]]|access-date=19 October 2019}}</ref>
<ref name="PlayStation">{{cite web|url=https://doc.dl.playstation.net/doc/ps4-oss/|title=Open Source Software used in PlayStation 4|publisher=Sony Interactive Entertainment Inc.|access-date=2017-12-11}}</ref>
<ref name="Hazra">{{cite book|title=Security in Computing and Communications: 5th International Symposium, SSCC 2017|last1=Hazra|first1=Sudip|last2=Mateti|first2=Prabhaker|date=September 13–16, 2017|publisher=Springer|isbn=9789811068980|editor-last1=Thampi|editor-first1=Sabu M.|pages=286–299 (290)|chapter=Challenges in Android Forensics|doi=10.1007/978-981-10-6898-0_24|editor-last2=Pérez|editor-first2=Gregorio Martínez|editor-last3=Westphall|editor-first3=Carlos Becker|editor-last4=Hu|editor-first4=Jiankun|editor-last5=Fan|editor-first5=Chun I.|editor-last6=Mármol|editor-first6=Félix Gómez|chapter-url=https://books.google.com/books?id=1u09DwAAQBAJ&pg=PA290}}</ref>
<ref name="Srivastava">{{cite book|title=Cyber Security in Parallel and Distributed Computing: Concepts, Techniques, Applications and Case Studies|last1=Srivastava|first1=Saurabh Ranjan|last2=Dube|first2=Sachin|last3=Shrivastaya|first3=Gulshan|last4=Sharma|first4=Kavita|chapter=Smartphone Triggered Security Challenges - Issues, Case Studies and Prevention |date=2019|publisher=John Wiley & Sons|isbn=9781119488057|editor-last1=Le|editor-first1=Dac-Nhuong|pages=187–206 (200)|doi=10.1002/9781119488330.ch12|s2cid=214034702 |editor-last2=Kumar|editor-first2=Raghvendra|editor-last3=Mishra|editor-first3=Brojo Kishore|editor-last4=Chatterjee|editor-first4=Jyotir Moy|editor-last5=Khari|editor-first5=Manju|chapter-url=https://books.google.com/books?id=FzGtDwAAQBAJ&pg=PA200}}</ref>
▲
▲
▲
▲
▲
▲
▲
▲
<ref name="ekiga">{{cite web|url=http://blog.ekiga.net/?p=112|title=Ekiga 3.1.0 available|access-date=2019-10-19|archive-date=2011-09-30|archive-url=https://web.archive.org/web/20110930034502/http://blog.ekiga.net/?p=112|url-status=dead}}</ref>
<ref name="FreeSWITCH">{{Cite web|url=https://signalwire.com/freeswitch|title=☏ FreeSWITCH|website=SignalWire}}</ref>
▲
}}
Line 575 ⟶ 614:
* {{Cite journal | last1 = Sorensen | first1 = H. | last2 = Jones | first2 = D. | last3 = Heideman | first3 = M. | last4 = Burrus | first4 = C. | title = Real-valued fast Fourier transform algorithms | doi = 10.1109/TASSP.1987.1165220 | journal = IEEE Transactions on Acoustics, Speech, and Signal Processing | volume = 35 | issue = 6 | pages = 849–863| date=June 1987 | citeseerx = 10.1.1.205.4523 }}
* {{Cite journal |last1=Plonka |first1=G. |author1-link= Gerlind Plonka |last2=Tasche|first2=M. |title=Fast and numerically stable algorithms for discrete cosine transforms |journal=Linear Algebra and Its Applications |volume=394 |issue=1 |pages=309–345 |date=January 2005 |doi=10.1016/j.laa.2004.07.015 |doi-access=free }}
* {{Cite journal | last1 = Duhamel | first1 = P. | last2 = Vetterli | first2 = M. | doi = 10.1016/0165-1684(90)90158-U | title = Fast fourier transforms: A tutorial review and a state of the art | journal = Signal Processing | volume = 19 | issue = 4 | pages = 259–299| date=April 1990 | bibcode = 1990SigPr..19..259D | url = http://infoscience.epfl.ch/record/59946 | type = Submitted manuscript }}
* {{Cite journal | last1 = Ahmed | first1 = N. | author-link1 = N. Ahmed| doi = 10.1016/1051-2004(91)90086-Z | title = How I came up with the discrete cosine transform | journal = Digital Signal Processing | volume = 1 | issue = 1| pages = 4–9 | date=January 1991 | bibcode = 1991DSP.....1....4A | url = https://www.scribd.com/doc/52879771/DCT-History-How-I-Came-Up-with-the-Discrete-Cosine-Transform}}
* {{Cite journal | last1 = Feig | first1 = E. | last2 = Winograd | first2 = S. | doi = 10.1109/78.157218 | title = Fast algorithms for the discrete cosine transform | journal = IEEE Transactions on Signal Processing | volume = 40 | issue = 9 | pages = 2174–2193| date=September 1992b | bibcode = 1992ITSP...40.2174F }}
* {{Citation |last1=Malvar |first1=Henrique |title=Signal Processing with Lapped Transforms |publisher=Artech House |___location=Boston |year=1992 |isbn=978-0-89006-467-2}}
Line 594 ⟶ 633:
* Takuya Ooura: General Purpose FFT Package, [http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html FFT Package 1-dim / 2-dim]. Free C & FORTRAN libraries for computing fast DCTs (types II–III) in one, two or three dimensions, power of 2 sizes.
* Tim Kientzle: Fast algorithms for computing the 8-point DCT and IDCT, [http://drdobbs.com/parallel/184410889 Algorithm Alley].
* [
{{Compression Methods|state=expanded}}
Line 607 ⟶ 646:
[[Category:Data compression]]
[[Category:Image compression]]
[[Category:H.26x]]
[[Category:JPEG]]
|