logo

English

How video compression works 3/5 - Color and motion

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

Color and motion

Working with color
Color images are typically represented using several "color planes." For example, an RGB color image contains a red color plane, a green color plane, and a blue color plane. When overlaid and mixed, the three planes make up the full color image. To compress a color image, the still-image compression techniques described earlier can be applied to each color plane in turn.
Imaging and video applications often use a color scheme in which the color planes do not correspond to specific colors. Instead, one color plane contains luminance information (the overall brightness of each pixel in the color image) and two more color planes contain color (chrominance) information that when combined with luminance can be used to derive the specific levels of the red, green, and blue components of each image pixel.

Such a color scheme is convenient because the human eye is more sensitive to luminance than to color, so the chrominance planes can often be stored and/or encoded at a lower image resolution than the luminance information. Specifically, video compression algorithms typically encode the chrominance planes with half the horizontal resolution and half the vertical resolution of the luminance plane. Thus, for every 16-pixel by 16-pixel region in the luminance plane, each chrominance plane contains one 8-pixel by 8-pixel block. In typical video compression algorithms, a "macro block" is a 16x16 region in the video frame that contains four 8x8 luminance blocks and the two corresponding 8x8 chrominance blocks.

Adding Motion to the Mix
Video compression algorithms share many of the compression techniques used in still-image compression. A key difference, however, is that video compression can take advantage of the similarities between successive video frames to achieve even better compression ratios. Using the techniques described earlier, still-image compression algorithms such as JPEG can achieve good image quality at a compression ratio of about 10:1. The most advanced still-image codecs may achieve good image quality at compression ratios as high as 30:1. In contrast, video compression algorithms can provide good video quality at ratios of up to 200:1. This increased efficiency is accomplished with the addition of video-specific compression techniques such as motion estimation and motion compensation.

For each macro block in the current frame, motion estimation attempts to find a region in a previously encoded frame (called a "reference frame") that is a close match. The spatial offset between the current block and selected block from the reference frame is called a "motion vector," as shown in Figure 4. The encoder computes the pixel-by-pixel difference between the selected block from the reference frame and the current block and transmits this "prediction error" along with the motion vector. Most video compression standards allow motion-based prediction to be bypassed if the encoder fails to find a good match for the macro block. In this case, the macro block itself is encoded instead of the prediction error.

4450c0883ad219313b3b1e4ed811c8c2.gif

 



Note that the reference frame isn't always the previously displayed frame in the sequence of video frames. Video compression algorithms commonly encode frames in a different order from the order in which they are displayed. The encoder may skip several frames ahead and encode a future video frame, then skip backward and encode the next frame in the display sequence. This is done so that motion estimation can be performed backward in time, using the encoded future frame as a reference frame. Video compression algorithms also commonly allow the use of two reference frames—one previously displayed frame and one previously encoded future frame.

Video compression algorithms periodically encode one video frame using still-image coding techniques only, without relying on previously encoded frames. These frames are called "intra frames" or "I-frames." If a frame in the compressed bit stream is corrupted by errors, the video decoder can "restart" at the next I-frame, which doesn't require a reference frame for reconstruction.

As shown in Figure 5, frames that are encoded using only a previously displayed reference frame are called "P-frames," and frames that are encoded using both future and previously displayed reference frames are called "B-frames." A typical sequence of frames is illustrated in Figure 5[d]. 

c308bb11080215bacf0105c88c8562c9.gif

 

  

One factor that complicates motion estimation is that the displacement of an object from the reference frame to the current frame may be a non-integer number of pixels. For example, suppose that an object has moved 22.5 pixels to the right and 17.25 pixels upward. To handle such situations, modern video compression standards allow motion vectors to have non-integer values; motion vector resolutions of one-half or one-quarter of a pixel are common. To support searching for block matches at partial-pixel displacements, the encoder must use interpolation to estimate the reference frame's pixel values at non-integer locations. 

TAG •

List of Articles
No. Subject Author Date Views
47 파나소닉, 풀 스펙 8K 동영상 신호 전송용 단일 케이블 및 커넥터 솔루션 개발 file lizard2019 2019.06.07 1187
46 GDPR 유럽 일반 개인 정보보호법 시행 엉뚱도마뱀 2018.05.24 879
45 블럭체인 기술자료 링크 digipine 2018.02.08 3103
44 이더리움 (Ethereum) digipine 2018.02.08 826
43 암호화폐 (Crypto Currency) 비트코인 file digipine 2018.02.08 3514
42 Nintendo Switch 세계 누적 판매 대수 1,000만대 돌파 file 엉뚱도마뱀 2017.12.13 600
41 iPhone SE 2 2018년 상반기에 출시? file digipine 2017.12.11 540
40 [경고] Windows 10 Ctrl+Z 누르면 편집한 파일이 삭제되는 현상 file digipine 2017.12.11 4622
39 애플, 맥미니 2011 지원 종료 공식화, 신제품 출시는 미정 file 엉뚱도마뱀 2017.12.08 748
38 7 Best Music Players for Mac You Should Try file 엉뚱도마뱀 2017.12.07 601
37 구글의 임베디드용 OS Fuchsia 애플Swift를 지원 file 엉뚱도마뱀 2017.11.30 380
36 Facebook 게시물을 검색하여 자살 암시를 발견하는 AI 서비스 시작 1 file 엉뚱도마뱀 2017.11.29 512
35 구글의 천재 AI 연구자 신경망을 능가하는 "캡슐 네트워크" 발표 file 엉뚱도마뱀 2017.11.28 456
34 IoT 악성 코드 "Mirai"변종이 급증 주의 file 엉뚱도마뱀 2017.11.28 344
33 윈도우XP 배경화면, '스마트폰용' 속편 출시 file 엉뚱도마뱀 2017.11.27 761
32 iPhone X의 Face ID RAW 데이터 영상 분석 및 은행권 앱 동향 file 엉뚱도마뱀 2017.11.27 669
31 무료 파티션 도구 AOMEI Partition Assistant v6.6 exFAT를 완벽하게 지원 file 엉뚱도마뱀 2017.11.27 1339
30 동물의 숲 포켓 캠프 스마트폰 버전 서비스 개시 file 엉뚱도마뱀 2017.11.27 429
29 모바일 전용 CPU ARM이 노트북과 AI로 진화 한다 file digipine 2017.11.03 318
28 임베디드 Linux 시스템 부팅 시 프로그램 자동 실행 digipine 2017.11.03 4154
Board Pagination Prev 1 2 3 ... 4 Next
/ 4