Rate control for video encoder

Through the hybrid video stream encoding method and the flexible adjustment of hierarchical encoding and quantization parameters, the problem of insufficient rate control in the existing technology is solved, and efficient encoding in complex scenes is achieved. It is suitable for a variety of use cases and reduces the complexity of video encoding. sex.

CN118540485APending Publication Date: 2024-08-23V NOVA INT LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410700919.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-07-05
Filing Date
2019-12-13
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing video coding technology has insufficient flexibility in rate control, making it difficult to dynamically adjust the coding quality and bit rate according to different scenarios, resulting in low coding efficiency in complex scenarios.

Method used

Adopting a hybrid video stream encoding method, through hierarchical encoding and decoding between the base encoded stream and multiple enhancement streams, using residual generation and quantization parameters at different resolutions for rate control, allowing the quantization of each enhancement stream to be adjusted independently parameters for flexible rate control.

Benefits of technology

It enables flexible adjustment of encoding quality and bit rate in different scenarios, improves encoding efficiency, and is suitable for a variety of applications such as OTT transmission and UHD broadcasting. It reduces complexity, provides improved visual quality and higher encoding flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540485A_ABST
    Figure CN118540485A_ABST
Patent Text Reader

Abstract

A method of encoding an input video into a hybrid video stream, the method comprising: receiving the input video at a first resolution; obtaining an indication of a desired quality level of the encoding, the desired quality level setting one or more bit rates of the mixed video stream, the mixed stream comprising a base encoded stream at a second resolution and a plurality of enhanced streams at each of the first and second resolutions, the first resolution ratio is higher than the second resolution ratio; each of the plurality of enhanced streams is encoded by: generating a residual set based on a difference between the input video and a reconstructed video at the respective resolution of the enhanced stream; determining a quantization parameter for the set of residuals based on the desired quality level; quantizing the residual set based on the quantization parameter; and creating an encoded stream from the quantized residual set.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is a divisional application of the Chinese patent application with application number 201980095810.0. The Chinese patent application with application number 201980095810.0 is a Chinese national phase application of the international application PCT / GB2019 / 053551, which claims priority to the British patent application 1903844.7 filed on March 20, 2019, the British patent application 1904014.6 filed on March 23, 2019, the British patent application 1904492.4 filed on March 29, 2019, the British patent application 1905325.5 filed on April 15, 2019, and the British patent application 1909701.3 filed on July 5, 2019, all of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present disclosure relates to a method and apparatus for encoding a signal. Specifically, but not exclusively, the present disclosure relates to a method and apparatus for encoding a video and / or image signal. The present disclosure relates to a rate control method and apparatus for rate control during an encoding process. Background Art

[0004] When encoding data such as video data, it is known to set the number of bits required to encode a portion of the data. In the case of video data, this may be the number of bits used to encode a frame of the video data. The setting of the number of bits required is known as rate control. It is known to set the bit rate at a constant or variable value.

[0005] One known form of rate control uses a "constant rate factor" or CRF, where the data rate is adjusted to achieve or maintain a desired encoding quality. Thus, in video encoding, the bit rate can be increased or decreased depending on the complexity of the scene to be encoded. A more complex scene will require more data to encode a given quality level than a less complex scene of the same quality level. Thus, rather than maintaining a constant bit rate as seen in constant bit rate encoding, a CRF will maintain a constant quality level while encoding. The terms quality level and quality level are used interchangeably. Summary of the invention

[0006] A method, a computer program, a computer readable medium and an encoder are provided as set out in the accompanying claims.

[0007] In one embodiment, a method for encoding an input video into a hybrid video stream is provided, the method comprising: receiving the input video at a first resolution; obtaining an indication of a desired quality level for encoding, the desired quality level setting one or more bit rates of a hybrid video stream, the hybrid stream comprising a base encoded stream at a second resolution and a plurality of enhancement streams at each of a first and a second resolution, the first resolution being higher than the second resolution; encoding each of the plurality of enhancement streams by: generating a residual set based on a difference between the input video and a reconstructed video at a corresponding resolution of the enhancement stream; determining a quantization parameter for the residual set based on the desired quality level; quantizing the residual set based on the quantization parameter; and creating an encoded stream from the quantized residual set.

[0008] The method allows setting the rate control according to the desired quality score or bit rate.Because the method is used for hybrid streams, the method allows setting the quantization of two different enhancement streams.

[0009] Further aspects of the invention will become apparent from the accompanying claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] One or more examples will now be described with reference to the accompanying drawings, in which:

[0011] Figure 1 A block diagram showing an example encoder at a first level of detail;

[0012] Figure 2 A block diagram showing an example decoder at a first level of detail;

[0013] Figure 3 a block diagram showing an example encoder at a second level of detail;

[0014] Figure 4 A block diagram showing a rate controller according to a first example;

[0015] Figure 5 showing a block diagram of a rate controller according to a second example;

[0016] Figure 6 A block diagram showing an enhanced rate controller according to an example;

[0017] Fig. 7A A block diagram showing an example rate controller for a first enhancement stream within an encoder;

[0018] Figure 7B A block diagram showing an example rate controller for multiple enhancement streams within an encoder;

[0019] Figure 8 showing a block diagram of a rate controller according to a third example;

[0020] Fig. 9 showing a block diagram of a rate controller according to a fourth example;

[0021] Fig. 10A Demonstrate examples of applied quantification;

[0022] Fig. 10B Demonstrate examples of applying quantization in situations with variable deadband; and

[0023] Fig.11 A flow chart is shown that illustrates a rate control method according to an example. DETAILED DESCRIPTION

[0024] This disclosure describes a hybrid backward compatible coding technique. This technique is a flexible, adaptable, efficient, and computationally inexpensive coding format that combines different video coding formats, base codecs (i.e., encoder-decoders) (e.g., AVC / H.264, HEVC / H.265, or any other current or future codecs, as well as non-standard algorithms such as VP9, ​​AV1, etc.) with at least two enhancement levels of coded data.

[0025] The general structure of the coding scheme uses a downsampled source signal encoded with a base codec, adds a first level of correction or enhancement data to the decoded output of the base codec to generate a corrected picture, and then adds another level of correction or enhancement data to an upsampled version of the corrected picture.

[0026] Thus, the specific examples described herein are used to encode a signal as a set of data streams, i.e., data that changes over time. The specific examples relate to an encoder or encoding process that generates a set of streams that includes a base stream and one or more enhancement streams, where there are typically two enhancement streams. It is noteworthy that the base stream can be decoded by a hardware decoder, while the enhancement stream can be suitable for software processing implementation with suitable power consumption.

[0027] The specific example provides a coding structure that creates multiple degrees of freedom that allow greater flexibility and adaptability in many situations, thus making the coding format suitable for many use cases including over-the-top (OTT) delivery, live streaming, live UHD broadcasting, etc. It also provides low-complexity video coding.

[0028] Typically, a set of streams, which may be referred to herein as a hybrid stream, are decoded and combined to generate an output signal for viewing. This may include an output reconstructed video signal at the same resolution as the original input video signal. Although the decoded output of the base codec is not intended for viewing, it is a fully decoded video at a lower resolution, making the output compatible with existing decoders and also usable as a lower resolution output where deemed appropriate. The base stream and the first enhancement stream may be further decoded and combined for viewing as a corrected lower resolution video stream.

[0029] The example video coding techniques described herein use a minimal number of relatively simple coding tools. When combined synergistically, they can provide visual quality improvements compared to full-resolution pictures encoded with a base codec, while making the manner in which they can be used more flexible.

[0030] The methods and apparatus are based on an overall approach that builds on existing encoding and / or decoding algorithms (e.g., MPEG standards such as AVC / H.264, HEVC / H.265, and non-standard algorithms such as VP9, ​​AV1, etc.) used as a baseline for enhancement layers. The enhancement layers work according to different encoding and / or decoding methods. The idea behind the overall approach is to encode / decode video frames in a hierarchical manner, in contrast to using a block-based approach as in the MPEG family of algorithms. Encoding frames in a hierarchical manner includes generating residuals for full frames, and then generating residuals for reduced or decimated frames, and so on.

[0031] Figure 1 An example encoding process is depicted in a block diagram of . An input full-resolution video is processed to generate various encoded streams. A base encoded stream is generated by feeding a downsampled version of the input video to a base codec (e.g., AVC, HEVC, or any other codec). The base encoded stream may include the output of a base encoder of the base codec. A first encoded stream of an enhancement layer (encoded layer 1 stream) is generated by processing a residual obtained by taking the difference between a reconstructed base codec video and a downsampled version of the input video. Reconstructing the encoded base stream may include receiving a decoded base stream from the base codec. A second encoded stream of the enhancement layer (encoded layer 2 stream) is generated by processing a residual obtained by taking the difference between an upsampled version of a corrected version of the reconstructed base decoded video and the input video.

[0032] In some cases, Figure 1The components of may provide a general low-complexity encoder. In some cases, the enhancement stream may be generated by an encoding process that forms part of the low-complexity encoder, and the low-complexity encoder may be configured to control an independent base encoder and decoder (e.g., encapsulated as a base codec). In other cases, the base encoder and decoder may be provided as part of the low-complexity encoder. In one case, Figure 1 The low-complexity encoder may be viewed as a form of wrapper for a base codec, where the functionality of the base codec may be hidden from the entity implementing the low-complexity encoder.

[0033] Figure 2 An example decoding process is depicted in the block diagram of FIG. The decoding process may be Figure 1 The decoder receives the three streams generated by the encoder together with a header containing additional decoding information. The encoded base stream is decoded by a base decoder corresponding to the base codec used in the encoder, and its output is combined with the decoded residual obtained from the encoded layer 1 stream. The combined video is upsampled and further combined with the decoded residual obtained from the encoded layer 2 stream.

[0034] Steering Figure 1 , the example encoder topology at the general level is as follows. Encoder 100 includes an input I for receiving an input signal 10. The input signal 10 may include full (or highest) resolution video, where the encoder is applied on a frame-by-frame basis. Input I is connected to a downsampler 105D and a processing block 100-2. Downsampler 105D outputs to a basic codec 120 at the base level of encoder 100. Downsampler 105D also outputs to processing block 100-1. Processing block 100-1 passes the output to upsampler 105U, which in turn outputs to processing block 100-2. Each of processing blocks 100-2 and 100-1 includes one or more of the following modules: a transform block 110, a quantization block 120, and an entropy coding block 130.

[0035] The base stream is generally created by the process described above. That is, the input video is downsampled (i.e., a downsampling operation is applied to the input video to generate a downsampled input video). The downsampled video is then encoded using a first base codec (i.e., an encoding operation is applied to the downsampled input video using a first or base codec to generate an encoded base stream). Preferably, the first or base codec is a codec suitable for hardware decoding. The encoded base stream may be referred to as a base layer or base level.

[0036] As described above, the enhancement stream may include two streams. The first level of enhancement provides a set of correction data that can be combined with a decoded version of the base stream to generate a corrected picture. This first enhancement stream is Figure 1 and3 Shown in FIG. 1 is a coded layer 1 stream.

[0037] To generate the encoded level 1 stream, the encoded base stream is decoded (i.e., a decoding operation is applied to the encoded base stream to generate a decoded base stream). A difference is then created between the decoded base stream and the downsampled input video (i.e., a subtraction operation is applied to the downsampled input video and the decoded base stream to generate a first residual set). Here, the term residual is used in the same manner as known in the art, i.e., the error between a reference frame and a reconstructed frame. Here, the reconstructed frame is the decoded base stream and the reference frame is the downsampled input video. Therefore, the residual used in the first enhancement level can be considered as a corrected video because it 'corrects' the decoded base stream to the downsampled input video used in the basic encoding operation. The first residual set is then encoded using the first encoding block 100-1 (which may also be referred to as a first encoder or a first enhancement encoder) to generate the encoded level 1 stream (i.e., an encoding operation is applied to the first residual set to generate the first enhancement stream).

[0038] Figure 2 is corresponding to Figure 1 . The decoding process is split into two halves as shown by the dotted lines. Below the dotted line is the base level of the decoder 200. The base level can be usefully implemented in hardware. Above the dotted line is the enhancement level, which can be usefully implemented in software. The decoder 200 can include only the enhancement level process, or a combination of the base level process and the enhancement level process as desired. The decoder 200 can be usefully implemented in software, especially at the enhancement level, and can be suitably superior to traditional decoding techniques, especially traditional hardware techniques. Traditional techniques refer to early techniques that have been previously developed and sold, are already in the market, are inconvenient to replace and / or are expensive to replace, and can still be used for the purpose of decoding signals. In other cases, the base level may include any existing and / or future video encoding tools or techniques.

[0039] The decoder topology at a general level is as follows. The decoder 200 includes an input (not shown) for receiving one or more input signals including an encoded base stream, an encoded layer 1 stream, and an encoded layer 2 stream together with an optional header containing additional decoding information (e.g., local and global configuration information). The decoder 200 includes a basic decoder 220 at the base layer, and processing blocks 200-1 and 200-2 at the enhancement layer. The basic decoder 220 may form a part of the applied base codec (e.g., a decoding function or unit of the base codec). The upsampler 205U is also provided between the processing blocks 200-1 and 200-2 to provide the processing block 200-2 with an upsampled version of the signal output by the processing block 200-1.

[0040] The decoder 200 receives the one or more input signals and directs the three streams generated by the encoder 100. The encoded base stream is directed to and decoded by the base decoder 220, which corresponds to the base codec 120 used in the encoder 100 and is used to reverse the encoding process at the base level. The encoded layer 1 stream is processed by block 200-1 of the decoder 200 to recreate the first residual created by the encoder 100. Block 200-1 corresponds to the processing block 100-1 in the encoder 100 and is used to reverse or substantially reverse the processing of block 100-1 at the base level. The output of the base decoder 220 is combined with the first residual obtained from the encoded layer 1 stream. The combined signal is upsampled by the upsampler 205U. The encoded layer 2 stream is processed by block 200-2 to recreate the additional residual created by the encoder 100. Block 200-2 corresponds to processing block 100-2 of encoder 100 and is used to reverse or substantially reverse the processing of block 100-2 at the base level. The upsampled signal from upsampler 205U is combined with the additional residual obtained from the encoded level 2 stream to create a level 2 reconstruction of input signal 10. The level 2 reconstruction of input signal 10 can be used as a decoded video at the same resolution as the original input video. The encoding and decoding described herein can generate a lossy or lossless reconstruction of the original input signal 10 depending on the configuration of the encoder and decoder. In many cases, the level 2 reconstruction of input signal 10 can be a lossy reconstruction of the original input video, wherein the loss has a reduced effect or minimal effect on the perception of the decoded video.

[0041] As described above, the enhancement stream may include two streams, namely, an encoded layer 1 stream (enhancement of the first layer) and an encoded layer 2 stream (enhancement of the second layer). The encoded layer 1 stream provides a set of correction data that can be combined with a decoded version of the base stream to generate a corrected picture. The encoded layer 2 stream provides a set of correction or enhancement data that adds fine details to the corrected picture generated by combining the decoded layer 1 stream and the decoded base stream.

[0042] Figure 3 Show in more detail Figure 11. The encoded base stream is created directly by the base encoder 120E and may be quantized and entropy encoded as needed. In some cases, these latter processes may be performed as part of the encoding performed by the base encoder 120E. In order to generate the encoded layer 1 stream, the encoded base stream is decoded at the encoder 100 (i.e., the decoding operation is applied to the encoded base stream at the base decoding block 120D). The base decoding block 120D is shown as part of the base layer of the encoder 100 and is shown as being separated from the corresponding base encoding block 120E. For example, the base decoder 120D can be a decoding component that supplements the encoding component in the form of the base encoder 120E with a base codec. In other examples, the base decoding block 120D may actually be part of the enhancement layer, and more specifically may be part of the processing block 100-1.

[0043] Return to Figure 3 , creating a difference between the decoded base stream output from the base decoding block 120D and the downsampled input video (i.e., applying the subtraction operation 110-S to the downsampled input video and the decoded base stream to generate a first set of residuals). Here, the term residual is used in the same manner as is known in the art; that is, the residual represents the error or difference between a reference signal or frame and a reconstructed signal or frame. Here, the reconstructed signal or frame is the decoded base stream, and the reference signal or frame is the downsampled input video. Therefore, the residuals used in the first enhancement level can be considered as correction signals because they are able to 'correct' the future decoded base stream to a closer approximation of the downsampled input video used in the base encoding operation. This is useful because this can correct for quirks or other characteristics of the base codec. These characteristics include, among other things, the motion compensation algorithm applied by the base codec, the quantization and entropy coding applied by the base codec, and the block adjustments applied by the base codec.

[0044] exist Figure 3 More details in Figure 1 Specifically, the first residual set is transformed, quantized, and entropy encoded to produce an encoded level 1 stream. Figure 3, a transform operation 110-1 is applied to a first set of residuals; a quantization operation 120-1 is applied to the transformed set of residuals to generate a set of quantized residuals; and an entropy coding operation 130-1 is applied to the quantized set of residuals to generate an encoded layer 1 stream at a first enhancement level. However, it should be noted that in other examples, only the quantization step 120-1, or only the transform step 110-1 may be performed. Entropy coding may not be used, or may optionally be used in addition to one or both of the transform step 110-1 and the quantization step 120-1. The entropy coding operation may be any suitable type of entropy coding, such as a Huffman coding operation or a run length encoding (RLE) operation, or a combination of both Huffman coding operations and RLE operations.

[0045] As described above, the enhancement stream may include an encoded layer 1 stream (enhancements of the first layer) and an encoded layer 2 stream (enhancements of the second layer). The enhancements of the first layer may be considered to achieve corrected video at the base layer, which is used, for example, to correct encoder quirks. The enhancements of the second layer may be considered to be another level of enhancement, which may be used to convert the corrected video to the original input video or a close approximation thereof. For example, the enhancements of the second layer may add fine details lost during downsampling and / or help correct errors introduced by one or more of the transform operation 110-1 and the quantization operation 120-1.

[0046] It should be noted that Figure 1 and 3 The components shown in FIG. 1 may operate on blocks or coding units of data corresponding to, for example, a 2×2 or 4×4 portion of a frame at a particular resolution level. The components operate without any inter-block dependencies, so they can be applied to multiple blocks or coding units within a frame in parallel. This is different from comparative video coding schemes, in which there are dependencies (e.g., spatial dependencies or temporal dependencies) between blocks. The dependencies of comparative video coding schemes limit the level of parallelism and require much higher complexity.

[0047] Preferably, the transform operation 110-1 is a directional decomposition transform such as a Hadamard-based transform. Typically, the transform may be applied using a transform matrix applied to a flattened (i.e., one-dimensional array) block of residual elements (e.g., blocks corresponding to pixels such as color component channels in the input signal). As described above, these blocks may also be referred to as decoding units because they are the basic units applied by the encoder and decoder processes. For a 2×2 decoding unit, a 4×4 Hadamard matrix may be applied, and for a 4×4 decoding unit, a 16×16 Hadamard matrix may be applied. These two transform forms may be referred to as a directional decomposition (DD) transform and a directional decomposition squared (DDS) transform. The latter transform is so called because it can be viewed as a repeated application of a directional decomposition transform. Both have small kernels that are applied directly to the residual.

[0048] As an example, the first transform has a 4×4 kernel applied to the flattened 2×2 block of the residual (R). The resulting coefficients (C) can be determined as follows:

[0049]

[0050] The second transform then has a 16×16 kernel applied to the 4×4 block of the residual. The resulting coefficients are as follows:

[0051]

[0052] Preferably, the quantization operation 120-1 is performed using a linear quantizer. The linear quantizer may use a variable size dead zone. This is later referred to Fig. 10A and 10B Describe in more detail.

[0053] In one case, the Figure 1 and 3 The encoder 100 and Figure 2 The decoder 200 may be applied to so-called data planes reflecting different color components of a video signal. For example, the components and methods described herein may be applied to different planes of YUV or RGB data reflecting different color channels. The different color channels may be processed in parallel. Thus, references to residual sets as described herein may include multiple residual sets, with each color component having a different residual set forming part of a combined enhancement stream.

[0054] See also Figure 1 and Figure 3 Both, to generate the encoded level 2 stream, another level of enhancement information is created at block 100-2 by generating and encoding another set of residuals. The other set of residuals is the difference between an upsampled version (via upsampler 105U) of the corrected version of the decoded base stream (reference signal or frame) and the input signal 10 (desired signal or frame).

[0055] In order to achieve reconstruction of a corrected version of the decoded base stream as would be generated at the decoder 200, at least some of the processing steps of block 100-1 are reversed to emulate the process of the decoder 200, and to account for at least some of the losses and quirks of the transform and quantization processes. To this end, block 100-1 includes an inverse quantization block 120-1i and an inverse transform block 110-1i. The quantized first residual set is inverse quantized at the inverse quantization block 120-1i in the encoder 100 and inverse transformed at the inverse transform block 110-1i to regenerate a decoder-side version of the first residual set. Other filtering operations may additionally be performed to reconstruct the input to the upsampler 105U.

[0056] The decoded base stream from decoder 120D is combined with the decoder-side version of the first residual set (i.e., a summation operation 110-C is performed on the decoded base stream and the decoder-side version of the first residual set). The summation operation 110-C generates a reconstruction of a downsampled version of the input video as would likely be generated at the decoder - i.e., reconstructed video at the resolution of level 1). Figure 1 and Figure 3 As shown in , the reconstructed base codec video is then upsampled by an upsampler 105U.

[0057] The upsampled signal (i.e., reconstructed signal or frame) is then compared to the input signal 10 (i.e., desired or reference signal or frame) to create a second or additional set of residuals (i.e., the difference operation 100-S is applied to the upsampled recreated stream to generate another set of residuals). The additional set of residuals is then processed at block 100-2 to become an encoded level 2 stream (i.e., the encoding operation is then applied to the additional set of residuals to generate another enhanced stream that is encoded).

[0058] Specifically, the further set of residuals is transformed (i.e., the transform operation 110-2 is performed on the further set of residuals to generate another set of transformed residuals). The transformed residuals are then quantized and entropy encoded in the manner described above with respect to the first set of residuals (i.e., the quantization operation 120-2 is applied to the transformed set of residuals to generate another set of quantized residuals; and the entropy encoding operation 130-2 is applied to the quantized another set of residuals to generate an encoded level 2 stream containing enhancement information of another level). However, only the quantization step 120-1, or only the transformation and quantization steps may be performed. Entropy encoding may optionally be used as a supplement. Preferably, the entropy encoding operation may be a Huffman encoding operation or a run length encoding (RLE) operation or both.

[0059] Therefore, if Figure 1 and 3 As shown in and described above, the output of the encoding process is a base stream at a base layer level, and one or more enhancement streams at an enhancement layer level that preferably include enhancements of a first layer and enhancements of another layer.

[0060] Figures 1 to 3Example encoding and decoding schemes are shown in which certain aspects of the present invention may be applied. One aspect of the present invention is able to adapt the data rate of a hybrid stream while maintaining a desired quality level (e.g., a desired quality level of the output decoded video). One aspect of the hybrid encoding method is that the method allows for parallel encoding and decoding of data streams. Because the method does not rely on inter-block information, whether intra-frame or inter-frame, each frame, and indeed individual portions of a frame, can be processed separately. For rate control purposes, this flexibility allows different metrics to be set for each enhancement stream, because the different encoding components of each enhancement layer can be controlled independently. Therefore, this provides an improved and simple rate control method.

[0061] In the case of a hybrid stream, such as a set of three streams output by encoder 100, a desired quality level for the hybrid stream as a whole, such as based on bandwidth limitations, may be implemented by applying rate control for one or more of the three streams. Rate control may be applied by determining the desired quality or bitrate for the individual streams within a collective bitrate budget. Because each enhancement stream represents a resolution of the video data at the time of rendering, controlling the rate control via a quality metric ensures that the hybrid stream can encode and deliver data at a known quality.

[0062] Figure 4 4 is a schematic representation of a first example rate controller 400. The rate controller 400 of this example includes an enhanced rate controller 402. The enhanced rate controller 402 is configured to increase the rate of each stream by setting a quantization parameter Q i To control Figures 1 to 3 The bit rate of each of the enhancement streams (e.g., layer 1 and layer 2 streams) shown in Figure 4 , the enhancement rate controller 402 outputs two quantization parameters, a first quantization parameter Q1 for the first (level 1) enhancement stream and a second quantization parameter Q2 for the second (level 2) enhancement stream. It should be noted that in some embodiments, the levels of the enhancement streams may be reverse marked, such that the highest resolution stream is level 0 and the lower resolution streams are level 1.

[0063] Figure 4 The example of shows a rate controller 400 implemented according to a first rate control mode. In this rate control mode, no external desired quality level is provided. As such, the first and second quantization parameters Q1 and Q2 may be set based on internal control logic and / or internal measurements of the encoding scheme. The rate controller 400 may also optionally determine a bit rate for a base layer (not shown), or the bit rate for the base layer may be set via configuration parameters. Although Figure 4Only two enhancement streams are shown in , but the process described herein can be extended to multiple enhancement streams (e.g., at increased resolution layers). In the examples described herein, the bit rate can be set according to a bit per pixel or bpp rate, where a pixel may include a residual element (e.g., a "pixel" of a residual signal).

[0064] exist Figure 4 In the example shown, enhancement rate controller 402 determines a quantization level represented by quantization parameters Q1 and Q2 for each enhancement level, as described in detail below. Rate controller 400 forms, for example, Figure 1 and 3 The quantization parameters may also be transmitted to, for example, Figure 2 200 or the like. The quantization parameters may form part of the header information of the hybrid stream (or one of the enhancement streams). The quantization parameters Q1 and Q2 may be determined frame by frame so that for a given frame, each coding unit within the frame is quantized using the quantization parameters, such as applied by quantization blocks 120-1 and 120-2. References to frames herein may refer to specific components of a frame, such as one of a YUV or RGB component, where a set of components are encoded in a similar manner (and may be encoded in parallel). In some cases, there may be different quantization parameters Q1 and Q2 for different components and / or common quantization parameters Q1 and Q2 for each set of components of a given frame (e.g., quantization parameters are set for a frame and the quantization parameters are applied similarly for each component).

[0065] like Figure 4 , in some cases, rate controller 400 may receive optional encoding feedback 404. Encoding feedback 404 may include information about the encoding process that may be used by enhancement rate controller 402 to set quantization parameters Q1 and Q2. Encoding feedback 404 may include feedback from the encoding process as applied to previously encoded frames. Encoding feedback 404 may enable enhancement rate controller 602 to determine the quantization level for each enhancement layer.

[0066] As described in detail below, quantization parameters Q1 and Q2 may be used by quantization blocks 120-1 and 120-2 to determine a block group size (or a set of block group sizes) to use in the quantization process, where a smaller block group size represents a more detailed quantization level that requires more data to encode (i.e., more block groups mean more values ​​are to be entropy encoded, and if run-length encoding is applied, the probability of a run of zeros is lower). By adjusting the block group size (and therefore, the quantization level), it is possible to control the quality of the frame being encoded, as well as the data rate. Thus, by changing the quantization parameters of each of the enhancement streams, the amount of data required to encode each data frame may vary. In one instance, the enhancement rate controller 402 may be configured to set the quantization parameters Q1 and Q2 depending on the complexity of the frame, thereby reducing the data rate for low complexity scenarios and / or allowing adjustments based on changing bandwidth availability.

[0067] According to Figure 4 In the first rate control mode shown in the example of , the desired quality level in the first instance may be a predetermined internal value. The first rate control mode may be applied in the presence of a static available bit rate for transmission. In this case, the quantization parameters Q1 and Q2 may be adjusted during transmission and / or generation of the encoded hybrid stream to maintain the static bit rate. The independence of the two enhancement streams provides good flexibility for controlling the bit rate, for example, in some cases, a finer quantization level at the first enhancement layer may allow a coarser quantization level at the second enhancement layer, and thus achieve a bit rate tradeoff (e.g., because the second enhancement layer is typically at a higher resolution and therefore requires more bits). In a further example described below, a second rate control mode is presented, in which the desired quality level may be set (e.g., by a user, a cloud controller, or a configuration parameter) in order to better manage the data rate.

[0068] As described in detail below, in some cases, the amount of data required to encode each frame may vary, and may vary at each enhancement layer. This may be due to the unpredictable nature of the input video stream, and / or the ability to encode blocks of data independently of other blocks (e.g., also on a frame-by-frame basis). In order to account for the variation in the data required to encode each frame of data, it is preferred that the desired quality level or quality factor be set so that the buffer used in the encoding and / or decoding process is not full or exceeds capacity for most frames. This ensures that more complex frames that require more data to encode can be stored in the buffer. The desired quality level may also be applicable to situations where variable bandwidth is available, such as where a transmission may be allowed to occupy a variable proportion of the available bandwidth, and it may be necessary to commit to a given quality level to avoid using too much bandwidth.

[0069] Figure 5 Another example of a rate controller 500 implementing the second rate control mode as discussed above is shown. In some cases, Figure 5The rate controller 500 of can be the same as the rate controller 400, but represents a change in operating parameters, such as where additional components are used and / or additional components are instantiated. In other cases, Figure 5 The rate controller 500 may be hard-coded or configured to implement a second rate control mode, in contrast to the first rate control mode.

[0070] Figure 5 The rate controller 500 is Figure 4 The rate controller 400 of FIG. 502 shares certain features. The enhancement rate controller 502 is again configured to output a set of quantization parameters Q1 and Q2, which can control quantization in the two enhancement coding layers as described above. The rate controller 500 is different from Figure 4 The rate controller 400 is further configured to receive a desired quality level indication 510 for the hybrid video stream. The rate controller 500 is then configured to adjust operating parameters of the enhancement and / or base layer encoding components to provide this desired quality level 510. Figure 5 , a desired quality level indication 510 is received by a quality controller 512 forming part of the rate controller 500 . Figure 5 The quality controller 512 in is configured to control the enhancement rate controller 502 according to the desired quality level indication 510, for example, the quality controller 502 can adjust the operation of the base layer and the enhancement layer (including the encoding of the layer 1 and layer 2 streams) to meet or target the desired quality level indication 510. Figure 5 In the example, the quality controller 512 outputs base parameters 514, which are used to encode the base level or layer of the hybrid stream (e.g., control the base codec, such as Figure 1 120 in the table).

[0071] therefore, Figure 5 Another example of a rate control process is shown in , where the base layer as well as the enhancement layers of a mixed stream are encoded with the aim of achieving an externally supplied quality indication via a rate controller 500 .

[0072] like Figure 5As shown, the rate controller 500 receives a desired quality level indication 510 for encoding. The desired quality level indication 510 may be a predetermined value (e.g., loaded from a configuration file or other data storage device), or it may be input by a user. The desired quality level indication 510 may include a value within a predetermined range of values ​​mapped to a predetermined range of quality values ​​of the output decoded video (e.g., the reconstructed layer 2 signal output by the decoder). The desired quality level indication 510 may be a form of a constant rate factor; however, compared to hybrid schemes covering different encoding methods, contrasting constant rate factors are typically designed for a single encoding scheme, such as may be implemented at the base layer. In the art, there is a challenge in adapting such hybrid schemes to use parameters similar to the constant rate factor. For example, the use of different encoding methods in the base layer and the enhancement layer means that it is not possible to control the two layers with a common shared quality factor, and the sub-layers of the two layers and the enhancement stream may have variable bit rates depending on the input image content.

[0073] In one case, the desired quality level indication 510 may include an 8-bit integer value representing a defined quality range. The desired quality level indication 510 may be defined such that the range is similar to that used for known video codecs, e.g., for AVC and HEVC, a range of 0 to 51 is used, where lower values ​​indicate higher quality and higher values ​​indicate lower quality. In this case, the rate controller 500, and more specifically the quality controller 512, is configured to convert the desired quality level indication 510 into control instructions for the enhancement rate controller 502 and into base parameters 514 for the base codec. For example, the quality controller 512 controls the bit rates of the base stream and the two enhancement streams by setting the base parameters 514 and by controlling the enhancement rate controller 502. The desired quality level indication 510 thus sets an initial quality factor, which is used by the quality controller 512 to control the enhancement rate controller 502 to determine the quantization parameters Q1 and Q2 for the enhancement layer. The rate controller 500 thus sets the bit rate of the mixed stream so as to meet or target the desired quality level indication 510.

[0074] One or more different initial parameters may be used to express the desired quality level indication 510. The desired quality level 510 indication may be independent of similar indications that may be used for the base layer and / or enhancement layer. The quality controller 512 may map the desired quality level indication 510 to a number of base parameters 514 for controlling the base layer. The base parameters 514 may include one or more of a base mode (e.g., a constant bit rate, a variable bit rate, or a constant quality factor mode), a base bit rate, a base buffer size, and a maximum base bit rate.

[0075] The desired quality level indication 510 may include a single parameter, such as an integer value, and / or may include an array of different desired settings. In one case, the desired quality level indication 510 may be provided along with additional constraints and / or properties of the input video to be encoded. For example, the desired quality level indication 510 may include, be a function of, or be accompanied by parameters, such as the input resolution of the video, the available bit rate, and a set of spatial scale parameters (e.g., such as whether up / down sampling is used in both image directions or only in the horizontal direction). In an embodiment, the desired quality input 510 depends on the encoding standard used to encode the video stream. In some cases, the desired quality level indication 510 may include, be a function of, or be accompanied by parameters for setting or overriding default values ​​of the base parameters 514. For example, if the base operating mode is passed to the quality controller 512, this may be used to explicitly set the base mode in the base parameters 514. In a preferred case, the desired quality level indication 510 is static for the encoding of the supplied video signal or file, such as for encoding video. However, with the aid of the quality controller 512 , one or more of the basic control parameters, including the quantization parameters Q1 and Q2 , can (and likely will) be varied between frames to try to meet the desired quality level 510 .

[0076] As reference Figures 1 to 3 As described, based on the base parameters 514, the encoder controls the base codec 102. As discussed above, the base codec 102 receives a downsampled input video so that base encoding and decoding is performed using the base parameters 514 at a resolution lower than the resolution of the input video. Similarly, the layer 1 enhancement stream is typically encoded at the same resolution as the base layer, and the layer 2 enhancement stream is typically encoded at a resolution that is the same as or higher than the resolution of the input signal. In the case of multiple resolutions, the quality controller 512 is arranged to control the bit rate of the base and enhancement encoders so as to meet or target the desired quality level indication 510. This again means that controlling the bit rate is a necessary operation.

[0077] In certain cases, the quantization parameters Q1 and Q2 are different from the base parameters 514. For example, the base parameters 514 may be controlled in a "black box" or modular manner using an available external interface (e.g., hardware and / or application programming interface) of the base codec. Figure 1The rate controller 500 may have more access to the internal controls of the enhancement coding block, and may therefore set the quantization parameters Q1 and Q2 at a lower or more precise level of control. The base codec may itself use the quantization parameters within its coding structure; however, these parameters are generally not externally configurable (e.g., there may be no access or reduced access via the base codec's interface, and / or it may not be possible to pass information to the base codec to enable changes in the quantization parameters when encoding). Preferably, the base coding stream or layer is encoded independently of the enhancement stream.

[0078] Optionally, as described in detail below, enhancement rate control 502 also receives another input indicative of encoding feedback 504. This may include information from enhancement level encoding operations (e.g., Figure 1 The blocks 100-1 and 100-2 in the encoding process and / or feedback of subcomponents of these operations may include feedback from one or more previous frames or blocks of the encoded video signal. This may also include feedback from a base layer (e.g., a base codec using a standard reporting interface).

[0079] use Figure 5 With the rate controller 500 of FIG. 5 , the quantization level may be constant or varied to meet or attempt to meet the desired quality indication 510. For example, the quantization parameters Q1 and Q2 may be controlled to meet one or more bit rates or bit rate ranges or constraints set based on the desired quality indication 510. In one case, the base parameters 514 are set as static parameters for encoding, and the quantization parameters Q1 and Q2 are variable within the context of the selected static base parameters 514 to meet or attempt to meet the desired quality indication 510.

[0080] In instances where the quantization level varies, the enhancement rate controller 502 may set bounds on the quantization parameters Q1 and Q2 for each enhancement stream. For example, the upper and lower bounds may be set based on the desired quality indication 510 so that the subjective quality level (such as the quality level perceived by the user) remains constant or is not noticeable. This allows the rate controller 500 to encode the video stream in a flexible manner, even during complex scenes, without perceptible loss of quality. As the amount of data stored in the output buffer varies, the optional encoding feedback module 504 may provide additional information about the capacity of the buffer to the enhancement rate controller 502. This information may be used to adjust the quantization parameters Q1 and Q2 for each enhancement stream.

[0081] Figure 6 An example of enhanced rate controller 602 is shown. The example shows specific internal components that may be implemented in specific situations to provide one or more of enhanced rate controllers 402 and 502.

[0082] exist Figure 6 In , the enhancement rate controller 602 is again configured to output quantization parameters Q1 and Q2 for a given frame (or decoding unit) of the encoded video signal. Figure 6 In the example of FIG. 6 , the enhancement rate controller 602 adjusts the bit rate of each enhancement stream by determining quantization parameters Q1 and Q2 based on a plurality of input parameters. Specifically, the enhancement rate controller 602 is configured to determine the quantization parameters Q1 and Q2 for each frame in a set of a plurality of frames of the video to be encoded. Feedback from the encoding of the previous frame may be used to set the quantization parameters Q1 and Q2 for the current frame.

[0083] For example, a first frame f0 may be encoded, and quantization parameters Q1 and Q2 may be determined for this first frame. A subsequent frame f1 of video data will then be encoded. In this case, the enhanced rate controller 602 is configured to preferably use the encoded data from the previous frame f0 to determine the quantization parameters Q1 and Q2 for the subsequent frame. For example, the settings for the previous frame (or one or more other previous frames) may be used to determine the initial values ​​of the quantization parameters Q1 and Q2 for the subsequent frame, wherein the enhanced rate controller 602 is configured to search for new values ​​of the quantization parameters Q1 and Q2 from this starting point. Thus, the encoding parameters from the previous frame provide a form of feedback for setting the quantization parameters Q1 and Q2 for the subsequent frame. Because the hybrid video stream is constructed so that frames can be encoded independently of each other, although the following description refers to the previous frame and the subsequent frame for ease of understanding, the previous frame is not necessarily the frame immediately preceding the subsequent frame.

[0084] Figure 6 In the embodiment, the enhanced rate controller 602 receives a desired quality level indication 610. This may include Figure 5 The same indication of the desired quality level 510 that is input to the rate controller 500 in the quality controller 512. In other cases, the quality controller 512 may adjust the desired quality level indication 510 and then pass it to the Figure 6 The desired quality level indication 610 is input to a parameter calculator 620. The parameter calculator 620 is configured to process the desired quality level indication 610 (and optionally one or more additional parameters) and output quantization parameters Q'1 and Q'2 and a desired bit rate BR for each enhancement stream. D Where the output quantization parameters Q1 and Q2 are used to attempt to meet the input desired quality level indication 610, the desired bit rate BR DThe estimated bit rate of the hybrid video stream (and / or one or more of the enhancement streams) may be included. The enhancement rate controller 602 further receives an inertial mass level indication 630, which is input to an inertial parameter calculator 632. The inertial parameter calculator 632 replicates the functionality of the parameter calculator 620 but receives different inputs (and therefore generates different outputs). For example, the parameter calculator 620 and the inertial parameter calculator 632 may include different instances of a common program code species and / or replicas of a common hardware chip. The inertial parameter calculator 632 outputs quantization parameters Q"1 and Q"2 for each enhancement stream and the inertial bit rate BR I Where the output quantization parameters Q'1 and Q'2 are used to attempt to meet the input desired quality level indication 630, the inertial bit rate BR I The estimated bit rate of the hybrid video stream (and / or one or more of the enhancement streams) may be included. Finally, the enhancement rate controller 602 also receives an encoding parameter input 640. This may include something like Figure 4 and 5 4 and 504. The encoding parameter input 640 may include one or more operating parameters, such as a frame type, a bit rate for a base layer, a minimum desired bit rate (e.g., as determined by the quality controller 512), and a target bit rate based on previous encodings. The encoding parameter input 640 is provided to a bit rate range calculator 642. The bit rate range calculator 642 receives the encoding parameter input 640 and determines a bit rate range, such as a maximum and minimum bit rate for the hybrid video stream (or one or more of the individual enhancement streams).

[0085] The outputs of parameter calculator 620, inertial parameter calculator 632, and bit rate range calculator 642 are input to quality adjuster 650. Quality adjuster 650 is configured to process the inputs and determine a final set of quantization parameters Q1 and Q2 for the current frame to be encoded. In one case, quality adjuster 650 determines the received desired bit rate BR from parameter calculator 620 and inertial parameter calculator 632 as D and inertial rate BR IThe quality adjuster 650 determines whether one or more of the input bit rates are within the bit rate range output by the bit rate range calculator 642. If one of the input bit rates is within the bit rate range, a corresponding one of the quantization parameters Q'1 and Q'2 and the quantization parameters Q"1 and Q"2 is selected and used as the quantization parameters Q1 and Q2 output by the enhanced rate controller 602. If none of the input bit rates are within the bit rate range, the quality adjuster 650 also outputs an updated inertia indication of the desired quality level to the inertial mass calculator 632. The updated inertia indication of the desired quality level is an updated version of the inertia indication 630 of the desired quality level. The quality adjuster 650 uses the output of the parameter calculator 620 as a reference to adjust the inertia indication 630 of the desired quality level in a direction associated with an increase or decrease in the bit rate so as to fall within the bit rate range. The inertia parameter calculator 632 is then iteratively activated to output modified quantization parameters Q"1 and Q"2 and a modified inertia bit rate BR based on the updated inertia indication of the desired quality level received from the quality adjuster 650. I This feedback loop can be iterated until the corrected inertial bit rate BR I The bit rate range from the bit rate range calculator 642 is within the bit rate range. When the bit rate output by one or more of the parameter calculator 620 and the inertial parameter calculator 632 is found to be within the bit rate range, and the final set of quantization parameters Q1 and Q2 is output, the quality adjuster 650 is also configured to output an inertial indication 652 of the desired quality level for the next frame, e.g., frame n+1). The desired quality level output 652 may be used as the inertial indication 630 of the desired quality level for the next frame (and the desired quality level indication 610 may be constant for the next frame, depending on the operation of the quality controller 512).

[0086] As described above, enhancement rate controller 602 takes a number of input parameters to output a final set of quantization parameters Q1 and Q2 for each enhancement stream at a desired quality level 652 and an inertial frame quality indication for the next frame.

[0087] For the first frame of video data, or in the event that the inertial indication of the desired quality level 630 is not available, the inertial indication of the desired quality level 630 may be set to the initial indication of the desired quality level 610. Figure 4 , which may be an initial user set or otherwise predetermined value. Desired quality level indication 610, inertial indication of desired quality level 630, or inertial indication of desired quality level 652 may have a common format and may be any suitable objective quality metric. In one case, they may be 8-bit integer values ​​within a predefined range of quality values ​​representing the perceived quality of the output decoded video.

[0088] Both the parameter calculator 620 and the inertial parameter calculator 632 determine the required quantization level for each enhancement level based on the quality indication. In addition, based on the required quantization level, the bit rate required to encode the data frame at or near the desired quality is also calculated. The total amount of data required to encode a frame using the hybrid coding scheme described herein may depend on the complexity of the scene in the video signal, and therefore may change between frames. As such, different quantization parameters may be determined for different frames with a constant desired quality level indication 610. Thus, the enhancement rate controller 602 is a dynamic system in which the outputs of the components change every frame and for a given frame.

[0089] The encoding parameter input 640 defines several parameters used in the encoding process. These parameters may include a target rate factor (or quality level) and a target bit rate. The encoding parameter input 640 may also include ranges in the form of maximum and minimum values ​​for such parameters. The bit rate range calculator 642 may compare different bit rate range indications as provided by the encoding parameter input 640 to determine an overall bit rate range.

[0090] In certain examples described in detail below, the encoder 100 utilizes a buffer implemented according to a leaky bucket model to determine the quantization level of a data frame. Because the amount of data required to encode a frame may vary depending on the complexity of the frame, it is necessary to control the contents of the buffer so that the buffer does not overflow (e.g., so that more data can be encoded that can be supported by the available bandwidth or bit rate). In this case, the encoding parameter input 640 may include measurements associated with the buffer, such as the buffer capacity and the minimum bit rate to fill the buffer. The measurements associated with the buffer (i.e., the leaky bucket parameters) can therefore be used by the bit rate range calculator 642 to determine the bit rate range for one or more enhancement streams.

[0091] use Figure 4 and 5 The rate controllers 400 and 500 and Figure 6 The enhancement rate controller 600 of FIG. 60 can encode video frames at multiple quantization levels, wherein the base stream and each of the two enhancement streams are preferably encoded at different quantization levels. The encoding within these instances is repeated for multiple frames using a frame-by-frame process. As described above, for each frame, the encoding process thus includes reconstructing the video frame at each respective resolution of the two enhancement streams, and then comparing the reconstruction with the video data derived from the input video frame, the video data corresponding to the respective resolution of the enhancement stream. Thus, this comparison allows the difference between the original frame and the reconstructed frame to be made. For example, if Figure 1 and 3 As shown in FIG. 1 , for each frame, a residual set of the video frame is generated at each of the two enhancement levels based on the comparison, and the residual set is generated using the residual set of the video frame. Figure 4 and 5These residuals are encoded with the quantization parameters of the two enhancement streams output by the rate controllers 400 and 500 (e.g., via operation of the enhancement rate controller 600). The process may be repeated across multiple frames of data in order to encode a complete video (e.g., a video file or video stream for transmission). Frames are encoded within the hybrid stream in order to meet or attempt to meet the input desired quality level indication 510 or 610. This provides a simple way for a non-technical user to set complex technical quantization parameters for multiple different encoding methods in order to obtain a desired quality level.

[0092] Fig. 7A and 7B A schematic diagram of an example encoder 700 is shown. This may include Figure 1 and 3 Encoder 100 shown in FIG. Fig. 7A and 7B Showing the rate controller of the previous example (e.g. Figure 4 How can the rate controller 400 or 500 of the embodiment of the present invention be used in the following manner? Figure 1 or implemented within the context of the encoder 100 shown in FIG. 3 . Fig. 7A A rate controller 710 is shown arranged to control a quantization block 720-1 within the first enhancement encoder 700-1. Figure 7B The same rate controller 710 is shown arranged to control the quantization blocks 720-1 and 720-2 within the first enhancement encoder 700-1 and the second enhancement encoder 700-2. The rate controller 710 may include a software routine (e.g., in a fast low-level language such as C or C++) and / or a dedicated electronic circuit system. Both figures show a base codec 730 configured to perform encoding and decoding operations according to a base video coding method that is different from the coding of the enhancement level. The base codec 730 outputs an encoded base stream (BS), the first enhancement encoder 700-1 outputs a first encoded enhancement stream (LS1), and the second enhancement encoder 700-2 outputs a second encoded enhancement stream (L2S). Fig. 7A and 7B The example encoder 700 also includes a buffer 740 to receive one or more of the encoded streams. The buffer 740 is used to store and / or combine the encoded base stream and at least one of the two encoded enhancement streams. The buffer 740 may include a software-defined buffer (e.g., a reserved section of memory resources) and / or a dedicated hardware buffer. The buffer 740 is configured to combine multiple encoded streams to output a hybrid video stream (HVS).

[0093] exist Fig. 7A and Figure 7B In the example of , rate controller 710 receives data from a base processing layer (eg, at least a base encoder of base codec 730) and buffer 740. This data may include Figure 6The encoder parameters shown in the input 640 or Figure 4 and 5 Encoding feedback 404 and 504.

[0094] Fig. 7A showing the use of buffer 740 with respect to the encoded base stream and the first encoded enhancement stream; Figure 7B Another example is shown, where the buffer receives an encoded base stream and two encoded enhancement streams. Figures 6 to 8 The rate control process shown is shown with two enhancement streams. The number of enhancement streams may be greater or less than two.

[0095] exist Fig. 7A In the example of , the rate controller 710 controls the quantization within the first enhancement encoder 700-1 by supplying a quantization parameter set Q1. Figure 7B In the example of , the rate controller 710 supplies the quantization parameters to the corresponding "quantization" components, that is, by supplying the quantization parameters Q1 and Q2 to the quantization blocks 720-1 and 720-2 (which may be from Figure 1 and 3 In another embodiment (not shown), the buffer 740 may be configured to receive the encoded base stream and the second encoded enhancement stream.

[0096] exist Fig. 7A and 7B In the example of , buffer 740 can be configured to receive input at a variable bit rate (e.g., an encoded stream at a variable bit rate) while reading output (i.e., a mixed video stream) at a constant bit rate. In other cases, the output can be output at a variable bit rate, but is subject to the reference Figure 6 The desired quality level described indicates the limit. Rate controller 710 can read the status from buffer 740 to ensure that it does not overflow or become empty, and control the data passed to the buffer to ensure that there is always data available for reading at its output. For example, Figure 6 The encoder parameter input 640 in may include the minimum bit rate required to fill the buffer 740 and the maximum bit rate or capacity of the buffer 740. These can be used to control the reference Figure 6 The bit rate range described.

[0097] Figure 8 Display can be used to control Figure 1 and 3 The third example of a rate controller 800 for adjusting the bit rate of one or more data streams within the encoder 100 is shown. It can be seen as a variation of any of the previously described encoders. Fig. 9A fourth example of a rate controller 900 is shown, which is a more advanced variation of the third example of rate controller 800 . Figure 8 and 9 Two possible implementations of a rate controller that are compatible with the leaky bucket model are presented. Specifically, Figure 8 and 9 exhibit Figure 4 and 5 One way in which the optional encoding feedback 404 or 504 of can be implemented. Figure 6 The variation of the inertial parameters used.

[0098] Figure 8 and 9 Both rate controllers 800 and 900 receive buffers (e.g., Fig. 7A and 7B The state 840, 940 of the buffer 740) is used to generate the quantization parameter set Q of the current frame t t The quantization parameters can be supplied to Figure 3 The "quantization" component in one or more of the layer 1 and layer 2 encoding pipelines shown in FIG. Although described with reference to a single enhancement layer Figure 8 and 9 , but they can be based on Figures 4 to 6 The example of is adapted to provide quantization parameters for multiple enhancement levels (or is repeatedly implemented for each of the multiple enhancement levels).

[0099] In both examples, the general operation of the rate controllers 800, 900 may be as follows: Adjusting the quantization parameter set Q based on feedback from the buffer t This feedback may indicate the amount of data in the buffer (e.g., capacity, etc.). Figure 8 and 9 In both, an indication of the amount of data within the buffer (i.e., how "full" the buffer is) is received via the "from buffer" signal 840, 940. This is then used directly or indirectly by the Q estimation component 820, 920 to estimate a set of quantization parameters Q used as parameters for the "quantization" operation. t .

[0100] For example, Figure 8 The Q estimation component 820 in the embodiment may be configured to receive the buffer signal 840 and determine whether the buffer is approaching capacity (i.e., becoming "full"). This may be performed directly (e.g., using an indication of remaining capacity) and / or indirectly (e.g., using the bit rate, such as bpp capacity). If the buffer is approaching capacity, the Q estimation component 820 is configured to adjust the quantization parameter Q t To reduce the amount of data required. Figure 6In a similar manner to the use of the encoding parameter input 640, the signal from the buffer 840 may include (or be used to determine) a maximum and minimum range (e.g., with respect to the size of the buffer), and the quantization parameter may be adjusted to thereby adjust the number of bits required to encode the frame so that it falls within the range.

[0101] In one case, the quantization parameter value set Q t Q may be proportional to the amount of data in the buffer. For example, if a large amount of data is present in the buffer (i.e., the buffer is approaching capacity) at the time a new frame is received, Q estimation component 820 may set Q t A high value of (such as, for example, a large step size or block group size) may be used to reduce the amount of residual data that is encoded.

[0102] In some embodiments, the quantization parameter Q t It can be used to set the quantization step width, where the quantization step width is related to the quantization parameter Q t In this case, Q t A low value of may correspond to a larger quantization step width value that produces fewer quantization block groups or groups for a given residual value range, and thus, the quantization parameter value set Q t may be inversely proportional to the amount of data in the buffer. In this case, if the buffer is relatively empty, the rate controller is configured to set Q t A high value of (ie, a low step width value) may be used to encode more residual data into the hybrid video stream. Different methods may be applied depending on how the quantization step width is determined from the one or more quantization parameters.

[0103] Generally speaking, Figure 8 In the example of , rate controller 800 allows for an adaptive rate control process in which the amount of data in the buffer is used to determine the quantization level of one or more enhancement layers.

[0104] Fig. 9 An instance of uses an additional component to determine a set of quantization parameters. Fig. 9 In the example of , the rate controller 900 also receives encoder parameters from the base encoder. These are shown as a "from base" signal 942 that is input to the rate controller 900. The from base signal 942 may form Figure 6 942 may indicate the bit rate being used by the base encoder (e.g., as part of the base codec 120). If the base encoder is configured to use a variable bit rate encoding format, the bit rate used by the base encoder may vary from frame to frame. The current bit rate of the base encoder may therefore be used to determine the quantization parameter of the enhancement stream.

[0105] In one case, the base signal 942 may also indicate the amount of "filler" data that the base encoder wishes to add to its stream. In this case, the encoder may replace the base encoder "filler" data with the additional enhancement stream data to maximize the available bandwidth. In this case, if there is a high filler level, the rate controller 900 may be able to set the quantization parameter Q that produces a lower step width. t value, so that more residual data is received in the buffer. This is possible because the "filler" data can be removed or replaced in the base encoder stream (e.g., before or at the buffer) because it is not needed to decode the base encoded stream.

[0106] Fig. 9 In the example of FIG. 1 , the rate controller 900 includes a target size estimation component 910. This component receives a signal from a buffer 940 and from a base signal 942. The target size estimation component 910 may be configured to receive the state of the buffer via the buffer signal 940, and to receive information about the amount of "filler" data that the base encoder is planning to add to the frame via the base signal 942. The target size estimation component thus determines a target data size for the frame. The amount of data stored in the buffer may be indicated by a "fullness" parameter that may be normalized to a range of 0 to 1 or 0% to 100%, where 60% indicates that the buffer is 60% full (i.e., has 40% remaining space). In this case, a mapping function or lookup table may be defined to map from the "fullness" block group to a "target size" parameter, where the target size is the target size of the next frame to be encoded by one or more of the first and second enhancement layers. In one case, the mapping function or lookup table may implement a non-linear mapping that may be set based on experiments. In one case, the target size estimate may also be set based on a configuration parameter indicating a desired proportion of the hybrid video stream to be filled by the enhancement stream (eg, the remainder of the hybrid video stream to be filled by the base stream).

[0107] exist Fig. 9 In the example of , the target size determined by the target size estimation component 910 is transmitted to the Q estimation component 920. Fig. 9 In the example, the Q estimation component 920 additionally receives input from a parameter buffer 930 which stores a set of quantization parameters Q from a previous frame. t-1 . In this way, Figure 6 In a similar manner, a feedback mechanism is provided in which the amount of data used to encode a first frame is used to set the quantization parameters used to encode subsequent frames.

[0108] Fig. 9 In the example, the Q estimation component 920 receives the target size from the target size estimation component 910 and the quantization parameter set Q from the previous frame. t-1 , and the quantization parameter set Q from the previous frame t-1The size of the current frame being encoded (current data size) ("current size"). The size of the current frame can be supplied by current size estimation component 940. Current size estimation component 940 can use at least a partial implementation of at least one of the enhanced encoding pipelines (e.g., L-1 or L-2 components) to determine the current size based on input from parameter buffer 930. Current size estimation component 940 can include Figure 6 632, where it simulates the size metric used to encode a given frame given a set of encoded data from a previous frame. In one case, the "current size" information can be determined by at least one parallel copy of the enhancement encoding pipeline, for example, by using a quantization parameter Q t Quantize the current frame for transmission, but the current size estimation component 940 receives Q t-1 And based on these quantization parameters, the current size is determined by performing encoding without transmission. In another example, the current size may be received from a cloud configuration interface, for example, based on pre-processing of a pre-recorded video. In an example Figure 6 In this other example shown in , parallel implementation may not be required.

[0109] exist Fig. 9 In the Q estimation component 920, it takes its input (eg, as described above) and calculates an initial estimated quantization parameter set Q' t In one case, this may be performed using a set of size functions that map data size (e.g., as expressed by a target or current size) to a quantization parameter. The data size and / or the quantization parameter may, for example, be normalized to a value between 0 and 1. The quantization parameter may be associated with a quantization step size, e.g., it may be a "quality factor" that is inversely proportional to the quantization step size and / or may be the quantization step size.

[0110] exist Fig. 9 In an example of , a set of curves may be defined to map normalized size onto a quantization parameter. Each curve may have one or more of a multiplier and an offset, which may depend on the nature of the current frame (e.g., it may depend on the complexity of the information to be encoded within the frame). The multiplier and the offset may define the shape of the curve. The multiplier may be applied to a size normalization function as a function of the quantization parameter Q. In one case, the current size (i.e., in terms of Q) is t-1 The size of the encoded frame t) and Q t-1 A point in space that can be used to define a set of curves. This point can be used to select a set of closest curves from the set of curves. These can be curves above the point and curves below the point or the highest or lowest curves at the point. The set of closest curves can be used in an interpolation function along with the point to determine a new curve associated with the point. Once this new curve is determined, the multiplier and offset for the new curve can be determined. These values ​​can then be used together with the received target size to determine Qt values ​​(e.g., a curve may define a function of size and Q).

[0111] In some cases, at least the Q estimate 920 of rate controller 900 is adaptive, where properties of one or more previous frames affect the Q estimate of the current frame. In one case, a set of curves may be stored in accessible memory and updated based on a set of curves determined for a previous frame. In some cases, adaptive quantization may be applied differently for different coefficient positions within a coding unit or block, such as for different elements in an array of 4 or 16 coefficients (for a 2x2 or 4x4 transform).

[0112] at last, Fig. 9 The example of Q capping component 950 receives the estimated quantization parameter set Q' output from Q estimation component 920 and corrects this set based on one or more factors. Q capping component 950 may include a version or a portion of quality adjuster 650. The estimated quantization parameter set Q' t One or more values ​​may be included. In one case, the quantization parameter Q may be based on one or more of the operating characteristics of the base coding layer and the quantization parameter Q t The initial quantization parameter set Q' is corrected by changing t In one case, the estimated set of quantization parameters Q' may be capped based on the set of quantization parameters used by the base coding layer that may be received with data from this layer. t In one case, the estimated quantization parameter set Q' may be constrained based on the values ​​of the previous quantization parameter set, with or without adaptation using base coding layer data. t In this case, Q' t One or more of the minimum and maximum values ​​of Q may be based on previous Q values ​​(e.g., Q t-1 ) setting. Then the capped output is provided as the final quantization parameter set Q t , as by Fig. 9 As shown in 950.

[0113] In one case, the quantization parameter set includes Q t In this case, the step width applied by one of the quantization components to frame t may be based on Q t The function used to determine the step width can also be based on the maximum step width (for example, the step width can be in the range between 0 and 10). An example step width calculation is:

[0114] Step width = [(1-Q 0.2 )·(Step width 最大 -1)]+1

[0115] Now refer to Fig. 10A and 10BDescribes specific quantization changes. These describe how quantization parameters may be applied in one or more quantization blocks.

[0116] Fig. 10A An example is provided of how quantization of residuals and / or coefficients (transformed residuals) may be performed based on groups of blocks with a defined step width. Fig. 10A This is provided for example only, and there may be different ways of implementing quantization known in the art. Fig. 10A In , the x-axis represents the residual or transformed coefficient value. In this example, the number of block groups is limited by a step width of 5. The size of the step width can be selected, for example, based on a parameter value. In some cases, the size of the step width can be set dynamically, for example, based on the rate control example described above.

[0117] Fig. 10A , the step width produces block groups corresponding to residual values ​​in the range of 0-4, 5-9, 10-14, 15-19 (i.e., 0 to 4 inclusive). The block group width can be configured to include or exclude the endpoints as needed. In this example, quantization is performed by replacing all values ​​that fall within the block group with integer values ​​(e.g., residual values ​​between 0 and 4 (inclusive of the endpoints) have a quantized value of 1). Fig. 10A In , quantization can be performed by dividing by the step width (e.g., 5), flooring the result (i.e., for positive values, the nearest integer less than a certain decimal), and then adding one (e.g., 3 / 5=0.6, floor(0.6)=0, 0+1=1; or 16 / 5=3.2, floor(3.2)=3, 3+1=4). Negative values ​​can be handled in a similar manner, such as by acting on the absolute value and then converting to a negative value after the calculation (e.g., abs(-9)=9, 9 / 5=1.8, floor(1.8)=1, 1+1=2, 2*-1=-2). Fig. 10A A case of linear quantization is shown where all block groups have a common step width. It should be noted that various different implementations based on this method can be made, for example, the first block group can have a quantized value of 0 instead of 1, or can include values ​​1 to 5 (inclusive). Fig. 10A Just an illustration of the quantization of groups of blocks according to a given step width.

[0118] Fig. 10B Demonstrates how a so-called "dead zone" (DZ) can be implemented. Fig. 10B In , residuals or transformed coefficients having values ​​within a predefined range are set to zero. Fig. 10B The predefined range is the range around the value 0. Fig. 10B In , values ​​less than 6 and greater than -6 are set to 0. The dead zone can be set to a fixed range (e.g., -6 to 6) or can be set based on the step width. In one case, the dead zone can be set to a predefined multiple step widths, for example, as a linear function of the step width value. Fig. 10BIn the example of , the deadband is set to 2.4*step width. Thus, with a step width of 5, the deadband extends from -6 to +6. In other cases, the deadband can be set as a nonlinear function of the step width value.

[0119] In one case, the dead zone is set based on a dynamic step width, which can be adaptive, for example. In this case, the dead zone can change as the step width changes. For example, if the step width is updated to 3 instead of 5, the dead zone of 2.4*step width can change from a range of -6 to +6 to a range of -3.6 to 3.6; or if the step width is updated to 10, the dead zone can change to extend from -12 to 12. In one case, the multiplier of the step width can be between 2 and 4. In one case, the multiplier can also be adaptive, for example based on operating conditions such as available bit rate. Having a dead zone can help reduce the amount of data to be transmitted over the network, for example, helping to reduce the bit rate. When using a dead zone, the residual or coefficient values ​​that fall within the dead zone are effectively ignored.

[0120] In one case, the step width used for quantization may vary for different coefficients within a 2×2 or 4×4 transformed coefficient block. For example, smaller step widths may be assigned to coefficients that are experimentally determined to affect the perception of the decoded signal to a greater extent, such as in a directional decomposition (DD-squared or "DDS") as described above, the AA, AH, AV, and AD coefficients may be assigned smaller step widths, with later coefficients being assigned larger step widths. In this case, a base_stepwidth parameter that sets a default step width may be defined, and then a modifier may be applied to this parameter to calculate a modified_stepwidth for use in quantization (and dequantization), such as modified_stepwidth = base_stepwidth * modifier, where the modifier may be set based on a specific coefficient within a block or unit.

[0121] In some cases, the modifier may additionally or alternatively depend on the level of enhancement. For example, for a level 1 enhancement stream, the step width may be smaller because it may affect more reconstructed pixels at a higher quality level.

[0122] In some cases, modifiers may be defined based on both coefficients within a block and levels of enhancement. In one case, a quantization matrix may be defined with a set of modifiers for different coefficients and different levels of enhancement. This quantization matrix may be signaled between an encoder and a decoder. In one case, the quantization matrix may be constructed at the encoder using quantization parameters output by a rate controller as described herein.

[0123] In one case, different quantization modes may be defined. In one mode, a common quantization matrix may be used for both enhancement layers; in another mode, separate matrices may be used for different layers; in yet another mode, a quantization matrix may be used for only one enhancement layer, such as only for layer 0. The quantization matrix may be indexed by the position of the coefficients within the block (e.g., 0 or 1 in the x direction and 0 or 1 in the y direction for a 2x2 block, or 0 to 3 for a 4x4 block). These modes may depend on the rate control mode applied, and the number of enhancement layers being controlled.

[0124] In one case, a base quantization matrix may be defined by a set of values. This base quantization matrix may be modified by a scaling factor that is a function of the step width of one or more of the enhancement layers. In one case, the scaling factor may be a clamped function of the step width variable. At the decoder, the step width variable may be received from the encoder for one or more of the layer 0 stream and the layer 1 stream. In one case, each entry in the quantization matrix may be scaled using an exponential function of the scaling factor, e.g., each entry may be raised to a power of the scaling factor.

[0125] Fig.11 is a flowchart of an encoding process according to an embodiment of the present invention.

[0126] The encoding process can be implemented using the encoder 100 described herein and / or a different encoder. The encoding process is used to encode an input video into a hybrid video stream. The encoded hybrid video stream includes a base encoding stream and multiple enhancement streams.

[0127] At step S102, an input video is received at a first resolution. The input video is provided at a certain resolution in any known format. At step S104, the method includes obtaining a desired quality level indication for encoding. This may include parameters within a defined range mapped to a set of output quality levels and / or may include a defined bit rate or bit rate metric. The encoding process produces a hybrid video stream. When decoded, the hybrid video stream renders video at a certain quality level. The hybrid video stream includes a base encoded stream at a second resolution and a plurality of enhanced streams at each of the first and second resolutions, the first resolution being higher than the second resolution.

[0128] At step S106, the method includes encoding each of the plurality of enhancement streams. This may include indicating an iteration of steps S108 to S114 for each enhancement stream. At step S108, the method includes generating a set of residuals based on the difference between the input video and the reconstructed video at the respective resolution of the enhancement stream. For example, at the first enhancement level described herein, the resolution may be lower than the resolution of the input video. The generation of the residuals for each enhancement stream thus provides correction data that, when decoded with the base layer, will render the video data at the respective resolution. At step S110, the method performs the step of determining a quantization parameter for the set of residuals based on the desired quality level. This may be performed using a method as described herein (e.g., Figures 4 to 9 By determining the quantization parameter based on the desired quality level obtained at step S104, a certain quality level can be maintained during the encoding process despite the change in bit rate due to the encoding process and / or frame content. At step S112, the method includes quantizing the residual based on the quantization parameter determined at step S110. This may include determining a step width using the quantization parameter, and performing Fig. 10A and 10B . The quantization shown in one or more of the steps S112 is performed. The streams are quantized based on the quantization parameters determined for each of the enhancement streams via iterations of step S112. Preferably, the quantization parameters used for each enhancement stream are different; however, in a certain instance, it may be necessary to use the quantization parameters for each stream. Because the process is performed for each enhancement layer, the presentation process optionally returns to step S108. At step S114, after the quantization has been determined, the method continues to create an encoded stream from a set of quantized residuals. The encoded enhancement stream output by the repetition of step S114 can then be combined with the base encoded stream to generate a hybrid video stream. In some cases, the base layer stream and the enhancement stream are encoded separately, for example, the base encoded stream is generated by an independent base codec using a different encoding method than the enhancement stream.

[0129] Specific methods and encoder components as described herein may be performed by instructions stored on a non-transitory computer-readable medium. A non-transitory computer-readable medium stores code including instructions that, if executed by one or more computers, will cause the computer to perform the steps of a method as described herein or the operation of an encoder component. A non-transitory computer-readable medium may include one or more of a rotating magnetic disk, a rotating optical disk, a flash random access memory (RAM) chip, and other mechanically moving or solid-state storage media. Some examples may be implemented as: a physical device such as a semiconductor chip; a hardware description language representation of the logical or functional characteristics of such devices; and one or more non-transitory computer-readable media arranged to store such hardware description language representations. The description of the principles, aspects, and embodiments described herein encompasses both their structural and functional equivalents.

[0130] Specific examples have been described herein, and it should be noted that different combinations of different components from different examples may be implemented. Prominent features are presented to better illustrate the examples; however, it is apparent that certain features may be added, modified, and / or omitted without modifying the functional aspects of these examples as described. Elements described herein as "connected" or "connected in a communicative manner" have an effective relationship that can be achieved by direct connection or indirect connection (which uses one or more other intermediate elements). Examples described herein as "communication" or "communication with another device, module, or element" include any form of communication or link. In addition, without departing from the scope of the present invention as defined in the appended claims, equivalents and modifications not described above may also be adopted.

Claims

1. A method for encoding an input video into a mixed video stream, the method comprising: receiving the input video at a first resolution; obtaining an indication of a desired quality level for the encoding, the desired quality level setting one or more bit rates for the hybrid video stream, the hybrid stream comprising a base encoded stream at a second resolution and a plurality of enhancement streams at each of the first and second resolutions, the first resolution being higher than the second resolution; Each of the plurality of enhancement streams is encoded by: generating a set of residuals based on a difference between the input video and a reconstructed video at the corresponding resolution of the enhancement stream; determining a quantization parameter for the residual set based on the desired quality level; quantizing the residual set based on the quantization parameter; as well as An encoded stream is created from the set of quantized residuals. 2 . The method of claim 1 , wherein the base coded stream and at least one of the plurality of enhancement streams are encoded using different quantization levels.

3. A method according to any preceding claim, wherein the base coded stream and one or more of the plurality of enhancement streams are encoded independently.

4. A method according to any preceding claim, comprising: downsampling the input video at the second resolution to create a downsampled video; as well as Instructing to encode the downsampled video using a first base encoder to create the base encoded stream.

5. The method of any preceding claim, wherein the encoding of each of the plurality of enhancement streams is performed frame by frame and comprises for each frame and for each of the enhancement streams: reconstructing video frames at the corresponding resolution of the enhancement stream; comparing reconstructed video frames with frames derived from the input video at the corresponding resolution of the enhancement stream; as well as A set of residuals for the video frame is generated based on the comparison.

6. The method of any preceding claim, wherein determining a quantization parameter comprises: receiving a status of a buffer receiving one or more of the plurality of encoded streams and the base encoded stream; as well as The state is used to determine the quantization parameter.

7. The method of any preceding claim, wherein determining a quantization parameter comprises: determining a capacity of the buffer based on a size of the buffer and an amount of data stored in the buffer, Wherein the quantization parameter is determined based on the desired quality level and a determined capacity of the buffer.

8. The method of claim 7, wherein determining a quantization parameter for the residual set for a given enhancement stream comprises: determining an amount of data required to encode a residual data set of the given enhancement stream; comparing the determined amount of data to the determined capacity of the buffer; as well as An initial set of quantization parameters is adjusted based on the comparison.

9. The method according to any one of claims 7 to 8, comprising: comparing an estimated size of the set of quantized residuals to the capacity of the buffer; Responsive to the comparison, a step width used for quantization is changed to increase or decrease the estimated size of the set of quantized residuals.

10. The method according to any one of claims 6 to 9, wherein the buffer is configured to receive input from the base encoded stream and the plurality of enhancement streams at a variable bit rate and to provide output at a constant bit rate.

11. The method of any preceding claim, wherein determining a quantization parameter for the residual set based on the desired quality level comprises: A quantization parameter is determined that provides the desired level of quality within a set of bitrate constraints.

12. The method of any preceding claim, wherein determining a quantization parameter for the residual set based on the desired quality level comprises, for each of the plurality of enhancement levels: A step width for the quantization of the residual set is determined.

13. The method of any preceding claim, wherein determining a quantization parameter for the residual set comprises: receiving an initial set of quantization parameters for a set of residuals associated with a previous video frame; receiving input from a buffer for the mixed video stream; receiving an input from an underlying encoder for encoding said underlying encoded stream; as well as The initial set of quantization parameters is adjusted based on the input to determine a set of quantization parameters for a set of residuals associated with a current video frame.

14. A method according to any preceding claim, whereby the step of determining a quantisation parameter comprises: Receiving a state of an underlying encoder used to encode the underlying coded stream; as well as The state is used to determine the quantization parameter.

15. A method according to any preceding claim, wherein the quantization parameter for a given enhancement stream is based on a previous set of quantization parameters for that enhancement stream.

16. A method according to any preceding claim, wherein a plurality of frames of the input video are encoded and the quantisation parameter is determined for each of the plurality of frames on a frame-by-frame basis.

17. The method of claim 16, wherein the determined quantization parameter of a frame of data is used as an initial quantization parameter for subsequent frames of video data.

18. The method of claim 17 or 18, wherein the quantization parameter for the frame is determined based on a target data size for the frame and a current data size of the frame, the current data size of the frame being determined using a previous set of quantization parameters.

19. A system comprising an encoder configured to perform the method according to any preceding method claim.