logo

English

How video compression works 1/5

by digipine posted Nov 02, 2017
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print Attachment
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print Attachment

BDTI explains how video codecs like MPEG-4 and H.264 work, and how they differ from one another. It also explains the demands codecs make on processors.

By BDTI 
[For a closer look at H.264, see H.264: the codec to watch]

Digital video compression and decompression algorithms (codecs) are at the heart of many modern video products, from DVD players to multimedia jukeboxes to video-capable cell phones. Understanding the operation of video compression algorithms is essential for developers of the systems, processors, and tools that target video applications. In this article, we explain the operation and characteristics of video codecs and the demands codecs make on processors. We also explain how codecs differ from one another and the significance of these differences.



Starting with stills

Because video clips are made up of sequences of individual images, or "frames," video compression algorithms share many concepts and techniques with still-image compression algorithms. Therefore, we begin our exploration of video compression by discussing the inner workings of transform-based still image compression algorithms such as JPEG, which are illustrated in Figure 1.


abca5501d702b6ab2f565f19dd1f18a5.gif

 


The image compression techniques used in JPEG and in most video compression algorithms are "lossy." That is, the original uncompressed image can't be perfectly reconstructed from the compressed data, so some information from the original image is lost. The goal of using lossy compression is to minimize the number of bits that are consumed by the image while making sure that the differences between the original (uncompressed) image and the reconstructed image are not perceptible—or at least not objectionable—to the human eye.

Switching to frequency
The first step in JPEG and similar image compression algorithms is to divide the image into small blocks and transform each block into a frequency-domain representation. Typically, this step uses a discrete cosine transform (DCT) on blocks that are eight pixels wide by eight pixels high. Thus, the DCT operates on 64 input pixels and yields 64 frequency-domain coefficients, as shown in Figure 2. (Transforms other than DCT and block sizes other than eight by eight pixels are used in some algorithms. For simplicity, we discuss only the 8x8 DCT in this article.)


 03af673cad82955b251071ec871823de.gif


The DCT itself is not lossy; that is, an inverse DCT (IDCT) could be used to perfectly reconstruct the original 64 pixels from the DCT coefficients. The transform is used to facilitate frequency-based compression techniques. The human eye is more sensitive to the information contained in low frequencies (corresponding to large features in the image) than to the information contained in high frequencies (corresponding to small features). Therefore, the DCT helps separate the more perceptually significant information from less perceptually significant information. After the DCT, the compression algorithm encodes the low-frequency DCT coefficients with high precision, but uses fewer bits to encode the high-frequency coefficients. In the decoding algorithm, an IDCT transforms the imperfectly coded coefficients back into an 8x8 block of pixels.

A single two-dimensional eight-by-eight DCT or IDCT requires a few hundred instruction cycles on a typical DSP such as the Texas Instruments TMS320C55x. Video compression algorithms often perform a vast number of DCTs and/or IDCTs per second. For example, an MPEG-4 video decoder operating at VGA (640x480) resolution and a frame rate of 30 frames per second (fps) would require roughly 216,000 8x8 IDCTs per second, depending on the video content. In older video codecs these IDCT computations could consume as many as 30% of the processor cycles. In newer, more demanding codec algorithms such as H.264, however, the inverse transform (which is often a different transform than the IDCT) takes only a few percent of the decoder cycles.

Because the DCT and other transforms operate on small image blocks, the memory requirements of these functions are typically negligible compared to the size of frame buffers and other data in image and video compression applications. 

TAG •

List of Articles
No. Subject Author Date Views
67 해킨토시 설치법 GA-P55A-UD3R rev 2.0 / intel Core i5 760 / NVIDIA GeForce GT 240 digipine 2017.11.03 646
66 파나소닉, 풀 스펙 8K 동영상 신호 전송용 단일 케이블 및 커넥터 솔루션 개발 file lizard2019 2019.06.07 1187
65 트위터에서 다크모드 설정 방법 file digipine 2022.01.20 185
64 퀄컴, 갤노트20 두뇌 '스냅드래곤865+' 공개 file digipine 2020.07.09 303
63 쿠버네티스, 도커 지원 중단 file digipine 2021.10.20 489
62 차세대 비휘발성 메모리 기술동향 file digipine 2017.11.02 247
61 임베디드 무선랜 개발 iwconfig wpa_supplicant digipine 2017.11.02 775
60 임베디드 Linux 시스템 부팅 시 프로그램 자동 실행 digipine 2017.11.03 4154
59 이더리움 (Ethereum) digipine 2018.02.08 826
58 윈도우XP 배경화면, '스마트폰용' 속편 출시 file 엉뚱도마뱀 2017.11.27 762
57 영화의 매트릭스의 네오의 컴퓨터 화면 프로그램 digipine 2021.02.04 1051
56 애플, 서드파티 앱마켓 진출 허용하나 lizard2019 2022.12.18 239
55 애플, 맥미니 2011 지원 종료 공식화, 신제품 출시는 미정 file 엉뚱도마뱀 2017.12.08 748
54 애플 워치와 모방제품과의 승부 file lizard2019 2020.05.26 454
53 애플 드디어 ARM 기반의 맥 출시 예정, 11월 10일 digipine 2020.11.09 300
52 암호화폐 (Crypto Currency) 비트코인 file digipine 2018.02.08 3515
51 안드로이드 의 써드파티 어플의 SD RW 권한 부여 digipine 2017.11.03 336
50 스니핑 개념, 공격기법, 방어법, 참고할만한 오픈소스 라이브러리 및 툴 digipine 2017.11.03 1301
49 서보모터의 기초와 제어 file digipine 2017.11.02 423
48 서보 모터 (Servo-motor) 의 내부 구조와 회전 원리 file digipine 2017.11.02 807
Board Pagination Prev 1 2 3 ... 4 Next
/ 4