Hass Multimedia (MPP) Development (4) - Video encoder (VENC)

Preface:

Hass multimedia processing platform (MPP) is divided into: a video input (VI), a video processing (VPSS), a video encoder (VENC), a video decoder (VDEC), video output (VO), Video Detection Analysis (VDA), the audio input (AI), an audio output (AO), the audio encoder (AENC), an audio decoder (ADEC), area management (the rEGION) modules here describes a video encoding module
    video encoding module involves many concepts, specific content can go to see the sea thinking official documents.

Video coding questions phenomenon and problem cause analysis:
[Symptoms]: input and encoding configurations are normal, you can get to the h264 stream, but the captured data packets are very small, the image is all black, no picture.
[Question] reasons: It may be no camera, no camera resulting in data entry.
] [Fundamental reason: the camera 1 is not inserted or wiring fault, 2 6134ADC chip is provided with input does not match the actual camera (PAL standard camera input must be configured nvp6134 PAL mode VIDEO_ENCODING_MODE_PAL, whether the person can not detect the camera)

coding:

Strategies dropped frames when (1) the instantaneous rate exceeds a threshold value

Is mainly provided by the following parameters

  • enFrmLostMode: drop frame mode strategy.
  • u32EncFrmGaps: drop-frame interval.
  • bFrmLostOpen: switch frame loss.
  • u32FrmLostBpsThr: dropping threshold.


(2) rate control:

Qstep quantization step

QP (quantizer parameter) quality parameters

  • When QP takes a minimum value 0, represents the finest quantization; the contrary, when the maximum value QP 51, represents the most coarse quantization.
  • QP and Qstep has a linear correlation, Qstep increases with increasing QP, QP value increases each time the 6, Qstep will be doubled.

The specific content of this article can be viewed online:
"Stream / rate / bit rate / frame rate / resolution / high-definition difference."


(3) rate control mode (RC)

The rate controller:

  • From the science of information analysis, the lower the compression ratio of the image, the higher the quality of the compressed image; the higher the image compression ratio, the lower the quality of the compressed images. For the real scene scene change, the image quality and coding rate will fluctuate; coding rate stability, image quality will fluctuate. In an example H.264 encoding, the QP Generally, the lower image, the better the image quality, the higher the bit rate; the higher the QP image, the image quality is poor, the low bit rate. In terms of flow rate control is for consecutive coded symbols, therefore, JPEG encoding channel protocol does not include rate control function.

The controller provides a rate control mode, respectively, the three rate H.264 \ H.265 \ MPEG-4 \ MJPEG encoding channel protocol CBR, VBR, FIXQP the like , image quality and bit rate is adjusted.

  • CBR (Constant Bit Rate) fixed bit rate
  • VBR (Variable Bit Rate) variable bit rate
  • Fix Qp constant QP value

CBR   

CBR (Constant Bit Rate) fixed bit rate. Namely to ensure a smooth encoding bit rate in the bit rate statistics of time. Rate stability was evaluated by two major amount.

  • Time u32StatTime rate statistics

Seconds (S), the longer the time rate statistics, the fluctuation rate of each frame, the weaker the influence of rate adjustment, the rate adjustment will be slower, will be more fluctuation in image quality slightly; statistical time rate the shorter the rate adjustment for the effect of each frame rate fluctuations stronger, adjusting the image rate will be more sensitive to fluctuations in image quality will be more intense.

  • Row-level rate control regulating the amplitude u32RowQpDelta

Row-level rate control regulating the amplitude of a frame line is adjustable maximum range, wherein the row units of a macroblock level. The larger the amplitude adjustment, allowing greater line level adjusting QP range, the more stable rate. The complexity of the scene to the image of the uneven distribution, row-level rate control are too long to bring the amplitude adjusting image quality unevenness.

VBR 

VBR (Variable Bit Rate) variable bit rate, i.e. coding rate fluctuations in the bit rate statistics of time to ensure a smooth image quality encoding. In H.264 encoding an example, VENC module provides user settable MaxQp, MinQp, MaxBitrate. MaxQp, MinQp for controlling the mass range of the image, MaxBitrate coding rate for the maximum rate in the statistical time clamping. When the encoding bit rate close to the maximum bit rate, the image will gradually MaxQp QP adjustment, when the coding rate is far less than the maximum bit rate, the image will gradually adjust the QP MinQp. When the picture QP reaches MaxQp, QP is clamped to a maximum value, MaxBirate clamping effect of the failure, the coding rate may exceed MaxBirate. When the picture QP reaches MinQp, QP is clamped to a minimum coding rate at this time has reached the maximum, and the best image quality.    

FIXQP

Fix Qp constant QP value. Count rate in time, the same for all the macroblocks coded picture QP values ​​QP value using the image set by the user, QP values ​​of I and P frames may be provided separately.

Coded rating:

Hass support: coding level. Value range: [0, 3]. 0: Baseline; 1: Main Profile ; 2: High Profile; 3: Svc-T
usually profile level are BP, EP, MP, HP:

  1. BP-Baseline Profile: basic quality. Support I / P frame, supports only non interlaced (Progressive) and the CAVLC;
  2. EP-Extended profile: Advanced picture quality. Support I / P / B / SP / SI-frame, supports only non-interlaced (Progressive) and the CAVLC;
  3. MP-Main profile: mainstream quality. Providing I / P / B-frame, non interlaced support (Progressive) and interleaved (Interlaced), also supports CABAC and CAVLC is supported;
  4. HP-High profile: Advanced picture quality. On the basis of the main Profile adds 8x8 intra-prediction, custom quantization, lossless video coding and more YUV format;

H.264 specifies three grades, each grade to support a specific set of encoding, and support for a particular type of application.

  1. Basic grade: the use of I-slices and P slices support intra- and inter-coding, entropy coding supports context-adaptive variable length coding based on (CAVLC). Mainly used for real-time video communication video telephony, video conferencing, wireless communications;
  2. Main grade: Interlaced video coding using inter-sheet B and intra coding using weighted prediction; support the use of adaptive context-based arithmetic coding (CABAC) based. Mainly used for digital broadcast television and digital video storage;
  3. Extended Profile: support efficient switching between stream (SP and SI slice), improved error performance (data division), but does not support interlaced video and CABAC. The main video stream for the network, such as video on demand.
     

 

This chapter from the frequency measurement engineering "catalog preface" to get the address provided

 

The first article in this column "catalog preface," lists the complete directory column, read by directory order to help your understanding.

 

 

Published 175 original articles · won praise 262 · views 700 000 +

Guess you like

Origin blog.csdn.net/li_wen01/article/details/105025101