Traditional Culture Encyclopedia - Traditional stories - What is the basic principle of video coding?

What is the basic principle of video coding?

Basic principles of video coding

Video image data has a strong correlation, that is, there is a lot of redundant information. Among them, redundant information can be divided into spatial redundant information and temporal redundancy information. Compression technology is to remove redundant information from data (remove the correlation between data). Compression techniques include intra-frame image data compression, inter-frame image data compression and entropy coding compression.

Time domain redundant information

Inter-frame coding technology can remove redundant information in time domain, which includes the following three parts:

-Motion compensation

Motion compensation is to predict and compensate the current local image through the previous local image, which is an effective method to reduce redundant information of frame sequence.

-Sports performance

Images in different regions need to use different motion vectors to describe motion information. Motion vectors are compressed by entropy coding.

-Motion estimation

Motion estimation is a set of techniques to extract motion information from video sequences.

Note: Common compression standards all use block-based memc.

De-airspace redundant information

Mainly use inter-frame coding technology and entropy coding technology:

-Transform coding

Intra-frame images and predicted differential signals have high spatial redundancy information. Transform coding transforms a spatial signal into another orthogonal vector space, which reduces its correlation and data redundancy.

-Quantization coding

After transform coding, a number of transform coefficients are generated, which are quantized to make the output of the encoder reach a certain bit rate. This process leads to a decrease in accuracy.

-Entropy coding

Entropy coding is lossless coding. It further compresses the coefficients and motion information obtained after transformation and quantization.

Basic framework of video coding

H.26 1

H.26 1 standard is designed for ISDN, which is mainly used for real-time coding and decoding. The time delay of signal compression and decompression shall not exceed 150ms, and the code rate shall be px64kbps(p= 1~30).

H.26 1 standard mainly adopts motion compensated inter-frame prediction, DCT transform, adaptive quantization, entropy coding and other compression technologies. There are only I frames and P frames, but there is no B frame, and the accuracy of motion estimation is only at the pixel level. Supports two image scanning formats: QCIF and CIF.

263

H.263 standard is a very low bit rate international standard for image coding. On the one hand, it is based on H.26 1, with mixed coding as the core. Its basic principle block diagram is very similar to H.26 1, and the original data and code stream organization are also very similar. On the other hand, H.263 also absorbs some effective and reasonable parts of other international standards such as MPEG, such as half-pixel precision motion estimation and PB frame prediction, which makes its performance better than H.26 1.

The bit rate used by H.263 can be less than 64Kb/s, and the transmission bit rate can be variable. H.263 supports multiple resolutions: SQCIF( 128x96), QCIF, CIF, 4CIF, 16CIF.

International standards related to H.26 1 and H.263.

International standards related to H.26 1

H.320: narrowband videophone system and terminal equipment;

H.22 1: the frame structure of 64~ 1 920Kb/s channel in audio-visual telecommunication service;

H.230: frame synchronization control and indication signal of audio-visual system;

H.242: An audio-visual terminal system that uses digital channels up to 2MB/s. ..

H.263 relevant international standards

H.324: very low bit rate multimedia communication terminal equipment;

H.223: very low bit rate multimedia communication composite protocol;

H.245: multimedia communication control protocol;

G.723. 1. 1: speech encoders with transmission rates of 5.3Kb/s and 6.3 kb/s. ..

Joint image expert group

1986, the Joint Photographic Expert Group (JPEG) was established by the International Organization for Standardization, which is mainly devoted to formulating digital image compression coding standards for continuous tones, multi-level grayscales and still images. The common coding method based on discrete cosine transform (DCT) is the core of JPEG algorithm.

MPEG- 1/2

The MPEG- 1 standard is used to encode moving images and their accompanying sounds on digital memory, and its digital rate is1.5mb/s/s .. The video principle block diagram of mpeg-1is similar to that of H.26 1.

Characteristics of MPEG- 1 video compression technology: 1. Random access; 2. Fast forward/fast backward search; 3. Reverse playback; 4. Audio-visual synchronization; 5. Fault tolerance; 6. Encoding/decoding delay. MPEG- 1 video compression strategy: In order to improve the compression ratio, intra/inter image data compression technology must be used at the same time. Intra-frame compression algorithm is almost the same as JPEG compression algorithm, and DCT-based transform coding technology is adopted to reduce redundant information in spatial domain. Inter-frame compression algorithm adopts prediction method and interpolation method. The prediction error can be further compressed by DCT transform coding. Inter-frame coding technology can reduce redundant information in the time axis direction.

MPEG-2 is called "2 1 century TV standard". It has made many important extensions and improvements on the basis of MPEG- 1, but its basic algorithm is the same as MPEG- 1.

MPEG-4

MPEG-4 standard is not a substitute for MPEG-2, but focuses on different application fields. The original intention of MPEG-4 is mainly aimed at the demand of ultra-low bit rate compression (less than 64Kb/s) for video conferencing and videophone. In the process of formulation, MPEG organization deeply felt that people's demand for media information, especially video information, has changed from playing to content-based access, retrieval and operation.

MPEG-4 is quite different from JPEG and MPEG- 1/2 mentioned above. It provides a broader platform for multimedia data compression and coding. It defines a format and a framework, not a specific algorithm. It hopes to establish a freer environment for communication and development. Therefore, the new goal of MPEG-4 is to support various multimedia applications, especially the content-based retrieval and access of multimedia information, and to configure decoders on site according to different application requirements. The coding system is also open, and new and effective algorithm modules can be added at any time. Applications include real-time audio-visual communication, multimedia communication, remote monitoring/surveillance, video on demand, home shopping/entertainment, etc.

JVT: A New Generation Video Compression Standard

JVT is a joint video group established by ISO/IEC MPEG and ITU-T VCEG, which is dedicated to formulating a new generation of digital video compression standards.

The official name of JVT standard in ISO/IEC is: MPEG-4 AVC(part 10) standard; Name in ITU-T: H.264 (formerly H.26L)

H264/AVC

H264 integrates the advantages of previous standards and absorbs the experience accumulated in the formulation of previous standards. The design is simple, and it is easier to popularize than MPEG4-4. H.264 pioneered new compression technologies such as multi-reference frames, multi-block types, integer transformation and intra prediction, and used finer sub-pixel motion vectors (1/4, 1/8) and a new generation of loop filters, which greatly improved the compression performance and improved the system.

H.264 has the following advantages:

-Efficient compression: compared with H.263+ and MPEG-4SP, the code rate is reduced by 50%.

-Good flexibility in time delay constraints.

-Fault tolerance

-Complexity and scalability of encoding/decoding

-Decode all details: no mismatch.

-High quality applications

-Network friendly

Video coding technology in monitoring

At present, several video coding technologies such as MJPEG, MPEG 1/2, MPEG-4 (SP/ASP) and H.264/AVC are mainly used in monitoring. For the end user, his main concerns are: clarity, storage capacity (bandwidth), stability and price. Using different compression technologies will greatly affect the above factors.

MJPEG

MJPEG (moving JPEG) compression technology is mainly based on static video compression. Its main feature is that it basically does not consider the changes between different frames in the video stream, and only compresses a certain frame.

MJPEG compression technology can obtain high-definition video images and dynamically adjust the frame rate and resolution. However, because the inter-frame change is not considered, a large amount of redundant information is repeatedly stored, so the space occupied by a single frame video is large. At present, the popular MJPEG technology can only achieve 3 kilobytes per frame at most, usually 8 ~ 20 kilobytes!

MPEG- 1/2

The MPEG- 1 standard mainly aims at the resolution of SIF standard (NTSC standard is 352X240;; PAL system is 352X288). The main target of compression bit rate is1.5mb/s/s. Compared with MJPEG technology, MPEG 1 has a significant improvement in real-time compression, data volume per frame and processing speed. However, MPEG 1 also has many shortcomings: the storage capacity is still too large, the definition is not high enough, and the network transmission is difficult.

MPEG-2 has been expanded and upgraded on the basis of MPEG- 1, and the backward compatibility of MPEG- 1 is mainly used in storage media, digital TV, high definition and other application fields. The resolutions are: low resolution (352x288), medium resolution (720x480) and the second highest resolution (1440x65438). Compared with MPEG- 1, MPEG-2 video improves the resolution and meets the user's requirements for high definition. However, due to the little improvement of compression performance, the storage capacity is still too large, which is not suitable for network transmission.

MPEG-4

Compared with MPEG- 1/2, MPEG-4 video compression algorithm has a significant improvement in low bit rate compression. In the case of CIF(352*288) or higher definition (768*576), video compression has greater advantages than MPEG- 1 in definition and storage capacity, and is more suitable for network transmission. In addition, MPEG-4 can dynamically adjust the frame rate and bit rate conveniently to reduce the storage capacity.

Because the system design of MPEG-4 is too complicated, it is difficult for MPEG-4 to be fully compatible, and it is also difficult to be realized in video conferencing, videophone and other fields, which deviates from the original intention. In addition, enterprises in China have to face the problem of high patent fees. Currently, it is stipulated that:

-Each decoding device needs to pay MPEG-LA 0.25.

-codec equipment also needs to be paid by time (4 cents/day = 1.2 USD/month = 14.4 USD/year).

H.264/AVC

H.264 concentrates the advantages of previous standards, and has made breakthrough progress in many fields, which makes it obtain much better overall performance than previous standards:

-Compared with H.263+ and MPEG-4 SP, it can save up to 50% code rate and greatly reduce the storage capacity;

H.264 can provide high video quality at different resolutions and different bit rates.

-Adopt a "network-friendly" structure and grammar to make it more conducive to network transmission.

With simple design, H.264 is easier to popularize than MPEG-4, easier to implement in video conference and videophone, easier to realize interconnection, and can be easily combined with low bit rate speech compression such as G.729 to form a complete system.

MPEG LA has absorbed the high patent fee of MPEG-4, so it is difficult to popularize it. MPEG LA has formulated the following low-cost charging standards for H.264: H.264 basically does not charge when playing; When the H.264 codec is embedded in the product, the annual output is less than 654.38+10,000 units, 0.2 USD for more than 654.38+10,000 units and 0. 1 USD for more than 5 million units. Low patent fees make it easier for China H.264 monitoring products to go global.

Selection of video coding resolution in monitoring

At present, the monitoring industry mainly uses the following resolutions: SQCIF, QCIF, CIF and 4CIF.

The advantages of SQCIF and QCIF are low storage capacity and can be used in narrow band. The products with this resolution are cheap. The disadvantage is that the image quality is usually poor and unacceptable to users.

CIF is the mainstream solution in the monitoring industry at present. Its advantages are low storage capacity, transmission in ordinary broadband network, relatively low price and good image quality, which are accepted by most users. The disadvantage is that the picture quality can't meet the requirements of high definition.

4CIF is standard definition resolution, which has the advantage of clear image. Disadvantages are large storage capacity, high network transmission bandwidth requirements and high price.

New Choice of Resolution-528x384

2CIF(704x288) has been adopted by some products to solve the shortcomings of 4CIF, such as low definition, large storage capacity and high price. However, because 704x288 only improves the horizontal resolution, the improvement of image quality is not particularly obvious.

After testing, we found that the resolution of another 2CIF is 528x384, which can solve the problems of CIF and 4CIF better than 704x288. Especially at the bit rate of 5 12kbps- 1mbps, stable high-quality images can be obtained, which meets the user's requirements for higher image quality. At present, this solution has been adopted by many network multimedia broadcasts and accepted by the majority of users. For example, Hangzhou Netcom Online Cinema adopts the resolution of 5 12x384, which can stably obtain DVD-like image quality at 768k.

The best way to realize video coding in monitoring

At present, video coding is in a period of rapid technological change, and the compression performance of video coding is also constantly improving.

ASCI and DSP are mainly used for monitoring. Because the design and production cycle of ASIC chip is too long, it can't keep up with the development speed of video coding. The DSP chip, because of its universal design, can realize various video coding algorithms, update the video encoder in time, and keep up with the development speed of video coding. In addition, using DSP chip can configure the encoder more flexibly than ASIC, so that the encoder can achieve the best performance.

The current technical level of Hikvision products.

Hikvision products adopt the most advanced H.264 video compression algorithm and high-performance DSP processor.

The powerful H.264 video compression engine enables the product to obtain extremely high compression ratio, high-quality image quality and good network transmission performance. High-performance DSP processor can flexibly configure video codec: dynamically set resolution, frame rate, code rate, image quality and so on. It can be output in double code streams, realizing the functions of local storage and network transmission.

Using TM 130X DSP products, a single chip can compress one channel of video in real time with the following resolutions: SQCIF, QCIF, CIF, 2CIF(PAL:704x288 or 528x384).

Using the products of DM642 DSP, a single chip can compress the video with resolution lower than four channels: SQCIF, QCIF, CIF and 2CIF(PAL:704x288 or 528x384) in real time. A single chip can compress 2 channels of 4CIF video in real time.

First, the basic concepts: embedded, real-time and multi-task

1, embedded: software (including operating system and functional software) is integrated into the hardware system, which is simply a software-hardware integrated system.

2. Real-time: Respond to events within the specified time limit. Timeout response is a failed response.

3. Multitasking: Respond to multiple requests at the same time.

4, real-time system and time-sharing system:

Real-time and non-real-time

Time-sharing and time-sharing (exclusive) are relative.

Second, the characteristics of embedded hard disk video recorder

1, embedded real-time multitasking device

2. The software and hardware are very professional, and there are no redundant functions.

3, simple and compact structure and small volume

5. What are the technical difficulties of embedded hard disk video recorder?

1, hard disk management

The validity, quick retrieval and error recovery ability of hard disk recording data, and the service life of hard disk (whether embedded or PC DVR, the problem of hard disk management has not been effectively solved at present)

2. Network transmission

Hard disk video recorder: network management

Video: network transmission

3. Video codec

Realization of video codec and its auxiliary functions

6. What is the current situation of embedded hard disk video recorder?

1, mainly domestic brands.

–Different technical requirements and standards

–Customers are increasingly demanding customized services.

–Timely technical support and after-sales service

There are more and more manufacturers, and the competition is fierce.

3. The product gradually matures.

7. What is the development trend of embedded hard disk video recorder?

1, and the application field is wider.

2. Higher frame rate and resolution

3. Lower code rate

4. More functions

5, stronger host performance, support more channels.

6. Higher accessibility

7. Stronger network performance

8. Long-term storage of DVR based on PC.

I. Market background

With the rapid development of computer and network technology, especially the maturity of video coding and decoding technology, the rapid improvement of computer processing capacity and the gradual popularization of broadband, the real-time application of video network based on the Internet has been widely adopted by many industries and government departments, especially in banking, broadcasting, petroleum, electric power and other industries, and many successful cases have emerged.

When it comes to the real-time application of Internet-based video network, we may think more about videophone and video conference system, live TV network, distance education and so on. These real-time Internet video applications require high performance of software and hardware, both high frame rate and low bit rate, so they need strong enough processing capabilities (including algorithm and chip processing capabilities). And to have this kind of processing ability, expensive special equipment is often needed.

For the digital video network monitoring system involving security, due to the characteristics of the industry, there are many data acquisition points, and a large number of coding devices need to be configured accordingly. Therefore, compared with other video network real-time applications, price becomes a relatively sensitive factor.

In the past, digital video network monitoring systems were basically based on local area network or private network. However, it is difficult to guarantee such network conditions in practical application environment, so system integrators cannot provide users with complete solutions.

For example, the bank's ATM digital centralized monitoring system may need to provide an Internet-based solution: broadband-based, supplemented by narrowband.

First of all, the private network entrance reserved by ATM needs to transmit business data. Considering the requirements of ATM 24-hour online business service and 24-hour video monitoring, it is difficult for us to provide a solution that can not only ensure the stable transmission of business data, but also ensure the smooth monitoring screen on the same private network. Therefore, we need to consider renting the lines of broadband operators to transmit video data through broadband. Moreover, considering the operation mode and cost, many ATMs do not need to transmit video data at any time, and often only ask the monitoring center to switch monitoring points when there is an abnormality; Or the monitoring center needs to be online when it regularly checks the monitoring points. In this case, ATM does not need to rent lines all the year round, but only needs to open ADSL, ISDN or even connect through telephone lines.

In the past two years, domestic manufacturers have continuously introduced high-performance, cost-effective video and audio compression cards and embedded network monitoring equipment, making it possible to monitor digital video networks based on the Internet, such as the centralized digital monitoring system for ATM machines mentioned above.