Method for encoding an input video as a hybrid video stream and system comprising an encoder for performing the same

The hybrid video encoding method addresses the inefficiencies of fixed rate factors by using a base and enhancement streams with adjustable rate control, ensuring consistent quality and efficient bit rate management across varying scene complexities.

JP7561385B2Active Publication Date: 2024-10-04V NOVA INT LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2021556458
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-07-05
Filing Date
2019-12-13
Publication Date
2024-10-04
Estimated Expiration
2039-12-13

AI Technical Summary

Technical Problem

Existing video encoding methods using fixed rate factors (CRF) struggle to maintain consistent quality levels across varying scene complexities, leading to inefficiencies in bit rate allocation.

Method used

A method for encoding video as a hybrid stream, comprising a base stream and multiple enhancement streams, where rate control is adjusted based on desired quality levels, allowing independent bit rate management for each stream.

Benefits of technology

This approach ensures consistent quality by dynamically allocating bits across different streams, adapting to scene complexity and maintaining desired quality levels while optimizing bit rate usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561385000003
    Figure 0007561385000003
  • Figure 0007561385000004
    Figure 0007561385000004
  • Figure 0007561385000005
    Figure 0007561385000005
Patent Text Reader

Abstract

1. A method for encoding an input video as a hybrid video stream, 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 for the hybrid video stream, the hybrid stream including an encoded base stream at a second resolution and a plurality of enhancement streams at each of the first resolution and the second resolution, the first resolution being higher than the second resolution; and encoding each of the plurality of enhancement streams by generating a set of residuals based on differences between the input video and a reconstructed video at a respective resolution of the enhancement stream; determining a quantization parameter for the set of residuals based on the desired quality level; quantizing the set of residuals based on the quantization parameter; and creating an encoded stream from the set of quantized residuals.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to methods and apparatus for encoding signals. In particular, but not by way of limitation, the present disclosure relates to methods and apparatus for encoding video and / or image signals. The present disclosure relates to rate control methodologies and apparatus for rate control during the encoding process. [Background technology]

[0002] When encoding data, for example 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 to encode a frame of the video data. Setting the number of bits required is known as rate control. It is known to set the bit rate to a constant, or to a variable value. Summary of the Invention [Problem to be solved by the invention]

[0003] A known form of rate control uses a "fixed rate factor," or CRF, where the data rate is adjusted to achieve or maintain a desired quality of encoding. Thus, in video encoding, the bit rate may increase or decrease depending on the complexity of the scene being encoded. A more complex scene will require more data to encode a given level of quality than a less complex scene of the same quality level. Thus, a CRF will maintain a constant quality level when encoding, compared to maintaining a constant bit rate as found in constant bit rate encoding. The terms quality level and quality level are used interchangeably. [Means for solving the problem]

[0004] As set forth in the accompanying claims, there are provided a method, a computer program, a computer readable medium, and an encoder.

[0005] In an embodiment, a method is provided for encoding an input video as a hybrid video stream, the method including receiving an 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 for the hybrid video stream, the hybrid stream including an encoded base stream at a second resolution and a plurality of enhancement streams at each of the first resolution and a second resolution, the first resolution being higher than the second resolution; and encoding each of the plurality of enhancement streams by generating a set of residuals based on a difference between the input video and a reconstructed video at a respective resolution of the enhancement stream; determining a quantization parameter for the set of residuals based on the desired quality level; quantizing the set of residuals based on the quantization parameter; and creating an encoded stream from the set of quantized residuals.

[0006] This method allows the rate control to be set according to the desired quality rate, i.e. the bit rate. Since this method is used for hybrid streams, it allows the quantization of the two different enhancement streams to be set.

[0007] Other aspects of the present invention will become apparent from the accompanying claims set.

[0008] One or more embodiments will now be described with reference to the accompanying drawings. [Brief description of the drawings]

[0009] [Figure 1] 2 shows a block diagram of an example encoder at a first level of detail. [Diagram 2] 2 shows a block diagram of an exemplary decoder at a first level of detail. [Diagram 3] 4 shows a block diagram of an example encoder at a second level of detail. [Figure 4] 1 shows a block diagram of a rate controller according to a first embodiment. [Diagram 5] 1 shows a block diagram of a rate controller according to a second embodiment. [Figure 6] 1 shows a block diagram of an enhanced rate controller according to an embodiment. [Figure 7A] 1 shows a block diagram of an example rate controller used in an encoder for a first enhancement stream. [Figure 7B] 1 shows a block diagram of an example rate controller used in an encoder for multiple enhancement streams. [Figure 8] 13 shows a block diagram of a rate controller according to a third embodiment. [Figure 9] FIG. 13 shows a block diagram of a rate controller according to a fourth embodiment. [Figure 10A] An embodiment of applying quantization will be given. [Figure 10B] An example of applying quantization with a variable deadzone is given. [Figure 11] FIG. 2 is a flow diagram illustrating a rate control method according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] This disclosure describes a hybrid backward compatible coding technique that is a flexible, adaptable, highly 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 codec, as well as non-standard algorithms such as VP9, ​​AV1, etc.) with at least two enhancement levels of coded data.

[0011] The general structure of the encoding 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 produce a corrected picture, and then adds a further level of correction or enhancement data to an upsampled version of the corrected picture.

[0012] Thus, certain embodiments described herein act to encode a signal into a set of data streams, i.e., data that varies over time. Certain embodiments relate to an encoder or encoding process that generates a set of streams including a base stream and one or more enhancement streams, of which there are typically two enhancement streams. The base stream may be decoded by a hardware decoder, while the enhanced stream may be suitable for software processing implementation with reasonable power consumption.

[0013] Certain embodiments provide an encoding structure that creates multiple degrees of freedom that allow high flexibility and adaptability to many situations, making the coding format suitable for many use cases, including over-the-top (OTT) transmission, live streaming, live UHD broadcasting, etc. It also provides low-complexity video coding.

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

[0015] The example video coding techniques described herein use a minimal number of relatively simple coding tools that, when combined synergistically, can provide improved visual quality compared to full resolution pictures encoded with a base codec while at the same time creating flexibility in the ways in which these coding tools may be used.

[0016] The method 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.), which serve as a baseline for the enhancement layers. The enhancement layers work according to a different encoding and / or decoding approach. The idea behind the overall approach is to hierarchically code / decode video frames, as opposed to using a block-based approach as used in the MPEG family of algorithms. Hierarchically coding a frame involves generating a residual for the whole frame, and for subsequently reduced or thinned frames, etc.

[0017] An exemplary encoding process is depicted in the block diagram of FIG. 1. An input full resolution video is processed to generate various encoded streams. The encoded base 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 encoded base stream may include the output of a base encoder of the base codec. The first encoded stream of the enhancement layer (encoded level 1 stream) is generated by processing a residual obtained by taking the difference between the reconstructed base codec video and the downsampled version of the input video. Reconstructing the encoded base stream may include receiving a decoded base stream from the base codec. The second encoded stream of the enhancement layer (encoded level 2 stream) is generated by processing a residual obtained by taking the difference between an upsampled version of the compensated version of the reconstructed base coded video and the input video.

[0018] In some cases, the components of Figure 1 may provide a general-purpose low-complexity encoder. In some cases, the enhancement stream may be generated by an encoding process that forms part of a low-complexity encoder, and the low-complexity encoder may be configured to control a separate base encoder and decoder (e.g., packaged as a base codec). In other cases, the base encoder and decoder may be provided as part of the low-complexity encoder. In some cases, the low-complexity encoder of Figure 1 may be considered a form of wrapper for a base codec, and the functionality of the base codec may be hidden from the entity that implements the low-complexity encoder.

[0019] An exemplary decoding process is depicted in the block diagram of Figure 2. The decoding process may be a complementary process to the exemplary encoding process of Figure 1. The decoder receives the three streams generated by the encoder together with a header containing further 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 level 1 stream. The combined video is upsampled and further combined with the decoded residual obtained from the encoded level 2 stream.

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

[0021] The base stream is created substantially by the process as described above: 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 to generate an encoded base stream using the first or base codec). 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.

[0022] As mentioned above, the enhancement stream may include two streams. A first level of enhancement provides a set of correction data that may be combined with a decoded version of the base stream to generate a corrected picture. This first enhancement stream is shown in Figures 1 and 3 as the encoded level 1 stream.

[0023] To generate an 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). Then, a difference between the decoded base stream and the downsampled input video is created (i.e., a subtraction operation is applied 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 way 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. Thus, the residuals used in the first enhancement level can be considered as a corrected video, since these residuals "correct" the decoded base stream to the downsampled input video used in the base encoding operation. Then, the first set of residuals is encoded using a first encoding block 100-1 (which may be referred to as a first encoder or a first enhancement encoder) to generate an encoded level 1 stream (i.e., an encoding operation is applied to the first set of residuals to generate a first enhancement stream).

[0024] FIG. 2 is a block diagram of a decoding process that may correspond to the encoding process shown in FIG. 1. The decoding process is divided in two, as indicated by the dashed line. Below the dashed line is the base level of the decoder 200. The base level may be usefully implemented in hardware. Above the dashed line is the enhanced level that may be usefully implemented in software. The decoder 200 may comprise only the enhanced level processes or a combination of the base level processes and the enhanced level processes, as appropriate. The decoder 200, especially at the enhanced level, may be usefully implemented in software and may sit well on top of legacy decoding technologies, especially legacy hardware technologies. Legacy technologies refer to older technologies previously developed and sold that are already present on the market, inconvenient and / or expensive to replace, and may still serve the purpose of decoding a signal. In other cases, the base level may include any existing and / or future video encoding tools or technologies.

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

[0026] The decoder 200 receives 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 a base decoder 220, which corresponds to the base codec 120 used in the encoder 100 and acts to reverse the encoding process at a base level. The encoded level 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 processing block 100-1 in the encoder 100 and acts to reverse or substantially reverse the processing of block 100-1 at a basic level. The output of the base decoder 220 is combined with the first residual obtained from the encoded level 1 stream. The combined signal is upsampled by an upsampler 205U. The encoded level 2 stream is processed by block 200-2 to recreate the further residual created by the encoder 100. Block 200-2 corresponds to processing block 100-2 of encoder 100 and acts to reverse or substantially reverse the processing of block 100-2 at a basic level. The upsampled signal from upsampler 205U is combined with a further residual obtained from the encoded level 2 stream to generate a level 2 reconstruction of input signal 10. The level 2 reconstruction of input signal 10 can be used as a decoded video of 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 where losses have reduced or minimal impact on the perception of the decoded video.

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

[0028] FIG. 3 illustrates the encoding process of FIG. 1 in more detail. The encoded base stream is created directly by the base encoder 120E and may be quantized and entropy coded, if necessary. In some cases, these latter processes may be performed as part of the encoding by the base encoder 120E. The encoded base stream is decoded in the encoder 100 (i.e., a decoding operation is applied to the encoded base stream in the base decoding block 120D) to generate an encoded level 1 stream. The base decoding block 120D is shown as part of the base level of the encoder 100 and is shown separately from the corresponding base encoding block 120E. For example, the base decoder 120D may be a decoding component that complements the encoding component in the form of the base encoder 120E with the base codec. In other embodiments, the base decoding block 120D may instead be part of an enhancement level, in particular, part of the processing block 100-1.

[0029] Returning to FIG. 3, a difference between the decoded base stream output from the base decoding block 120D and the downsampled input video is created (i.e., a subtraction operation 110-S is applied to the downsampled input video and the decoded base stream to generate a first set of residuals). Here, the term residual is used as known in the art, i.e., 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. Thus, the residual used at the first enhancement level may be considered a correction signal, since the residual may "correct" future decoded base streams to be closer approximations of the downsampled input video used in the base encoding operation. This is useful, since it may correct quirks or other idiosyncrasies of the base codec. These include, among others, the motion compensation algorithm applied by the base codec, the quantization and entropy coding applied by the base codec, and the block adjustment applied by the base codec.

[0030] The components of block 100-1 of FIG. 1 are shown in more detail in FIG. 3. In particular, a first set of residuals is transformed, quantized, and entropy coded to generate an encoded level 1 stream. In FIG. 3, a transform operation 110-1 is applied to the 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 level 1 stream with a first level of enhancement. However, it should be noted that in other embodiments, only the quantization step 120-1 may be performed, or only the transform step 110-1 may be performed. Entropy coding may not be used, or may be used optionally in addition to one or both of the transform step 110-1 and the quantization step 120-1. The entropy encoding operation may be any suitable type of entropy encoding, such as a Huffman encoding operation, or a run-length encoding (RLE) operation, or a combination of both a Huffman encoding operation and an RLE operation.

[0031] As mentioned above, the enhanced stream may include an encoded level 1 stream (first level enhancement) and an encoded level 2 stream (second level enhancement). The first level enhancement may be considered to enable a base level of compensated video, i.e., to compensate for, for example, encoder quirks. The second level enhancement may be considered to be a further level of enhancement that can be used to convert the compensated video into the original input video or a close approximation thereof. For example, the second level enhancement may add fine details lost during downsampling and / or help compensate from errors introduced by one or more of the transform operation 110-1 and the quantization operation 120-1.

[0032] It should be noted that the components shown in Figures 1 and 3 may operate on blocks or coding units of data, for example, corresponding to 2x2 or 4x4 portions of a frame at a particular level of resolution. The components operate without any inter-block dependencies, and thus the components may be applied in parallel to multiple blocks or coding units within a frame. This differs from comparative video coding schemes, where there are dependencies (e.g., either spatial or temporal dependencies) between blocks. The dependencies of the comparative video coding schemes limit the level of parallelism and require much higher complexity.

[0033] Preferably, the transform operation 110-1 is a directional decomposition transform, such as a Hadamard-based transform. In general, the transform may be applied using a transform matrix applied to flattened (i.e., one-dimensional array) blocks of residual elements (e.g., corresponding to blocks of picture elements such as color component channels in the input signal). As mentioned above, these blocks are sometimes referred to as coding units, since they are the basic units to which the encoder and decoder processes are applied. For a 2×2 coding unit, a 4×4 Hadamard matrix may be applied, and for a 4×4 coding unit, a 16×16 Hadamard matrix may be applied. These two forms of transform are sometimes referred to as directional decomposition (DD) transform and directional decomposition squared (DDS) transform. The latter transform may be considered as a so-called repeated application of a directional decomposition transform. Both have small kernels applied directly to the residual.

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

[0035]

number

[0036] This is followed by a second transform with a 16x16 kernel applied to the 4x4 block of residuals. The resulting coefficients are:

[0037]

number

[0038] Preferably, the quantization operation 120-1 is performed using a linear quantizer, which may use a variable-sized dead zone, as described in more detail below with reference to Figures 10A and 10B.

[0039] In some cases, the encoder 100 of Figures 1 and 3 and the decoder 200 of Figure 2 described herein may be applied to so-called data planes that reflect different color components of a video signal. For example, the components and methods described herein may be applied to different YUV or RGB data planes that reflect different color channels. The different color channels may be processed in parallel. Thus, as described herein, reference to a set of residuals may include multiple sets of residuals, with each color component having a different set of residuals that form part of the combined enhancement stream.

[0040] 1 and 3, a further level of enhancement information is created in block 100-2 by generating and encoding a further set of residuals, which are the differences between an upsampled (via upsampler 105U) version of the corrected version of the decoded base stream (reference signal or frame) and the input signal 10 (desired signal or frame) to generate an encoded level 2 stream.

[0041] To achieve reconstruction of a corrected version of the decoded base stream as generated in the decoder 200, at least some of the processing steps of the block 100-1 are reversed to mimic the process of the decoder 200 and to take into account at least some losses and quirks of the transform and quantization process. For this purpose, the block 100-1 comprises an inverse quantization block 120-1i and an inverse transform block 110-1i. The quantized first set of residuals are inverse quantized in the inverse quantization block 120-1i and inverse transformed in the inverse transform block 110-1i in the encoder 100 to regenerate a decoder-side version of the first set of residuals. Other filtering operations may additionally be performed to reconstruct the input to the upsampler 105U.

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

[0043] The upsampled signal (i.e., the reconstructed signal or frame) is then compared to the input signal 10 (i.e., the desired or reference signal or frame) to create a second or further set of residuals (i.e., a difference operation 100-S is applied to the upsampled reconstructed stream to generate a further set of residuals). The further set of residuals is then processed in block 100-2 into a coded level 2 stream (i.e., a coding operation is then applied to the further set of residuals to generate a further coded enhancement stream).

[0044] In particular, the further set of residuals is transformed (i.e., a transform operation 110-2 is performed on the further set of residuals to generate a further transformed set of residuals). The transformed residuals are then quantized and entropy coded in the manner described above for the first set of residuals (i.e., a quantization operation 120-2 is applied to the transformed set of residuals to generate a further set of quantized residuals, and an entropy coding operation 130-2 is applied to the quantized further set of residuals to generate an encoded level 2 stream including a further level of enhancement information). However, only the quantization step 120-1 may be performed, or only the transform and quantization steps may be performed. Entropy coding may optionally be used in addition. Preferably, the entropy coding operation may be a Huffman coding operation, or a Run-Length Encoding (RLE) operation, or both.

[0045] Thus, as shown in Figures 1 and 3 and described above, the output of the encoding process is a base stream at a base level and, preferably, one or more enhancement streams at enhancement levels, including a first level of enhancement and a further level of enhancement.

[0046] 1-3 illustrate exemplary encoding and decoding schemes to which certain aspects of the present invention may be applied. One aspect of the present invention is the ability 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). An aspect of the hybrid encoding methodology is that the methodology allows for parallel encoding and decoding of data streams. Because the methodology does not rely on inter-block information, each frame, and indeed individual parts of a frame, whether intra-frame or inter-frame, may be processed separately. For rate control purposes, this flexibility allows for different metrics to be set for each enhancement stream, since different coding components of each enhancement layer may be controlled independently. This therefore provides an improved and simplified rate control methodology.

[0047] In a hybrid stream, such as the set of three streams output by encoder 100, a desired quality level for the entire hybrid stream, based for example on bandwidth limitations, may be implemented by applying rate control to one or more of the three streams. Rate control may be applied by determining the desired quality or bit rate of each individual stream within the total bitrate budget. Because each enhanced stream represents a resolution of the video data as it is rendered, controlling the rate control via a quality metric ensures that the hybrid stream is capable of encoding and delivering data at a known quality.

[0048] 4 shows a schematic diagram of a first exemplary rate controller 400. The rate controller 400 in this example comprises an enhanced rate controller 402. The enhanced rate controller 402 controls a quantization parameter Q i 4, the enhancement rate controller 402 is configured to control the bit rate of each of the enhancement streams (e.g., the level 1 and level 2 streams) shown in FIGS. 1-3 by setting a first quantization parameter Q 1 and a second quantization parameter Q for the second (level 2) enhancement stream. 2 It is noted that in some implementations, the levels of the enhancement stream may be reverse-labeled, such that the highest resolution stream is level 0 and the lower resolution stream is level 1.

[0049] The example of FIG. 4 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. Thus, the first and second quantization parameters Q 1 and Q 2may be set based on internal control logic and / or internal measurements for the encoding scheme. The rate controller 400 may also optionally determine the bit rate of a base layer (not shown), which may be set via configuration parameters. Although only two enhancement streams are shown in FIG. 4, the process described herein may be extended to multiple enhancement streams (e.g., to increase layers of resolution). In the examples described herein, the bit rate may be set according to the bits per picture element or bpp rate, where the picture elements may include residual elements (e.g., "pixels" of the residual signal).

[0050] In the example shown in FIG. 4, the enhancement rate controller 402 determines, for each enhancement level, a quantization parameter Q 1 and Q 2 The rate controller 400 determines the level of quantization, represented by Q. The rate controller 400 forms part of an encoder, such as the encoder 100 of any of FIGS. 1 and 3. The quantization parameter may also be communicated to a decoder, such as the decoder 200 of FIG. 2. The quantization parameter may form part of the header information of the hybrid stream (or one of the enhancement streams). The quantization parameter Q 1 and Q 2 may be determined on a frame-by-frame basis, such that for a given frame a quantization parameter Q is used to quantize each coding unit in the frame, e.g., as applied by quantization blocks 120-1 and 120-2. References herein to a frame may refer to a particular component of the frame, e.g., one of YUV or RGB components, where a set of components are coded in a similar manner (and may be coded in parallel). In some cases, different quantization parameters Q for different components may be used. 1 and Q 2 , and / or a common quantization parameter Q for each set of components for a given frame. 1 and Q 2(eg, the quantization parameters are set for the frame and applied to each component in the same way).

[0051] 4, in some cases, the rate controller 400 may receive optional coding feedback 604. The coding feedback 604 may include a quantization parameter Q 1 and Q 2 The encoding feedback 604 may include information about the encoding process that can be used by the enhancement rate controller 402 to set the quantization rate for each enhancement layer. The encoding feedback 604 may include feedback from the encoding process as applied to previously encoded frames. The encoding feedback 604 may enable the enhancement rate controller 602 to determine the level of quantization for each enhancement layer.

[0052] As described in more detail below, quantization blocks 120-1 and 120-2 generate a quantization parameter Q 1 and Q 2 may be used to determine the bin size (or set of bin sizes) to use in the quantization process, with smaller bin sizes representing a more fine level of quantization that requires more data to encode (i.e., more bins means more values ​​to entropy code and less chance of runs of zeros when run-length coding is applied). By adjusting the bin size (and thus the level of quantization), it is possible to control the quality of the frames being coded, and even the data rate. Thus, by varying the quantization parameters for each of the enhancement streams, the amount of data required to code each frame of data may be varied. In some cases, the enhancement rate controller 402 may adjust the quantization parameter Q depending on the complexity of the frame. 1 and Q 2 , thus reducing the data rate for low complexity scenes and / or allowing adjustment based on changes in bandwidth availability.

[0053] According to the first rate control mode, the desired quality level in the first case may be a predefined internal value, as shown by the example in Fig. 4. The first rate control mode may be applied when there is a static bit rate available for the transmission. In this case, the quantization parameter Q 1 and Q 2 may be adjusted during transmission and / or generation of the encoded hybrid stream to maintain a static bit rate. The independence of the two enhancement streams provides good flexibility for controlling the bit rate, e.g., in some cases, a finer level of quantization for the first enhancement level may allow a coarser level of quantization at the second enhancement level, thus allowing a bit rate trade-off (e.g., since the second enhancement level is typically of higher resolution and therefore requires more bits). In a further embodiment described below, a second rate control mode is presented, in which a desired quality level may be set (e.g., by a user, a cloud controller, or a configuration parameter) to better manage the data rate.

[0054] As will be explained in detail below, in some cases, the amount of data required to encode each frame may vary and may vary with 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., even on a frame-by-frame level). To account for the variation in the data required to encode each frame of data, it is preferable to set the desired quality level or quality factor such that the buffers used in the encoding and / or decoding process do not fill up or exceed capacity for a majority of the frames. This ensures that more complex frames, which require more data to be encoded, can be stored in the buffer. The desired quality level may also be useful in situations where variable bandwidth is available, e.g., where a transmission may be allowed to occupy a variable proportion of the available bandwidth, and it may be desirable to have a given quality level to avoid using excessive bandwidth.

[0055] Figure 5 illustrates a further example of a rate controller 500 that implements a second rate control mode as described above. In some cases, the rate controller 500 of Figure 5 is the same as the rate controller 400, but may represent changes in operating parameters, e.g., if additional components are used and / or instantiated. In other cases, the rate controller 500 of Figure 5 may be hard-coded or configured to implement the second rate control mode as opposed to the first rate control mode.

[0056] The rate controller 500 of Figure 5 shares certain features with the rate controller 400 of Figure 4. The enhancement rate controller 502 also controls the quantization parameter Q, which may control the quantization in the two enhancement coding layers, as described above. 1 and Q 2 5. The rate controller 500 differs from the rate controller 400 of FIG. 4 in that it is configured to receive an indication of a desired quality level 510 for the hybrid video stream. The rate controller 500 is then configured to adjust operating parameters of the enhancement and / or base level encoding components to provide this desired quality level 510. In FIG. 5, the indication of the desired quality level 510 is received by a quality controller 512 forming part of the rate controller 500. The quality controller 512 of FIG. 5 is configured to control the enhancement rate controller 502 according to the indication of the desired quality level 510, e.g., the quality controller 502 may adjust the operation of the base level and enhancement levels (including the encoding of the level 1 and level 2 streams) to meet or target the indication of the desired quality level 510. In FIG. 5, the quality controller 512 outputs base parameters 514 (e.g., controlling a base codec such as 120 of FIG. 1) used to encode the base level or layer of the hybrid stream.

[0057] Thus, FIG. 5 shows further examples of a rate control process, in which the base and enhancement layers of a hybrid stream are encoded to target achieving an indication of quality that is fed externally via rate controller 500.

[0058] As shown in FIG. 5, the rate controller 500 receives an indication of a desired quality level 510 for encoding. The indication of the desired quality level 510 may be a predefined value (e.g., as loaded from a configuration file or other data storage) or the indication may be input by a user. The indication of the desired quality level 510 may include a value within a predefined range of values ​​that maps to a predefined range of quality values ​​of the output decoded video (e.g., the reconstructed level 2 signal output by the decoder). The indication of the desired quality level 510 may be in the form of a fixed rate factor, but a comparative fixed rate factor is typically designed for a single encoding scheme, such as one that may be implemented at the base level, as opposed to a hybrid scheme that encompasses different encoding approaches. There are challenges in the art in adapting such hybrid schemes to use similar parameters as the fixed rate factor. For example, the use of different encoding approaches at the base level and the enhancement level means that it is not possible to control both levels with a common shared quality factor, and furthermore, both levels, as well as sub-layers of the enhancement stream, may have variable bit rates that depend on the input image content.

[0059] In some cases, the indication of the desired quality level 510 may include an 8-bit integer value representing a defined quality range. The indication of the desired quality level 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, with lower values ​​indicating higher quality and higher values ​​indicating lower quality. In this case, the rate controller 500, and in particular the quality controller 512, is configured to convert the indication of the desired quality level 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 and two enhancement streams by setting the base parameters 514 and by controlling the enhancement rate controller 502. Thus, the indication of the desired quality level 510 is converted by the quality controller 512 to control the enhancement rate controller 502 to set the quantization parameter Q for the enhancement layer. 1 and Q 2 The rate controller 500 thus sets the bit rate of the hybrid stream to meet or target an indication of the desired quality level 510.

[0060] The indication of the desired quality level 510 may be expressed using one or more different initial parameters. The indication of the desired quality level 510 may be independent of similar indications available for the base layer and / or the enhancement layer. The quality controller 512 may map the indication of the desired quality level 510 to a number of base parameters 514 to control the base layer. The base parameters 514 may include one or more of a base mode (such as a constant bit rate, variable bit rate, or fixed quality factor mode), a base bit rate, a base buffer size, and a maximum base bit rate.

[0061] The indication of the desired quality level 510 may include a single parameter, e.g., an integer value, and / or may include an array of different desired settings. In some cases, the indication of the desired quality level 510 may be provided along with additional constraints and / or characteristics of the input video to be encoded. For example, the indication of the desired quality level 510 may include, be a function of, or may be associated with parameters such as the input resolution of the video, the available bit rate, and a set of spatial scaling parameters (e.g., whether to use up / downsampling in both image directions or only in the horizontal direction, etc.). In an embodiment, the desired quality input 510 depends on the encoding standard used to encode the video stream. In some cases, the indication of the desired quality level 510 may include, be a function of, or may be associated with parameters used to either set or override default values ​​of the base parameters 514. For example, if a base mode of operation 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 510 indication is static for the encoding of a supplied video signal or file, e.g., used to encode a video. However, the quantization parameter Q 1 and Q 2 One or more of the underlying control parameters, including, may (and likely will) vary from frame to frame to attempt to meet the desired quality level 510.

[0062] Based on the base parameters 514, the encoder controls the base codec 102, as described with reference to Figures 1-3. As discussed above, the base codec 102 receives a downsampled input video such that the base encoding and decoding is performed using the base parameters 514 at a lower resolution than the resolution of the input video. Similarly, the level 1 enhancement stream is typically encoded at the same resolution as the base layer, and the level 2 enhancement stream is typically encoded at the same, but higher, resolution of the input signal. The quality controller 512 is arranged to control the bitrates of the base and enhancement encoders to meet or target a desired quality level 510 representation, of which there are multiple resolutions. This again means that controlling the bitrate is a non-trivial operation.

[0063] In some cases, the quantization parameter Q 1 and Q 2 quantization parameter Q differs from base parameters 514. For example, base parameters 514 may control base codec 120 of FIG. 1 in a "black box" or modular manner, using the available external interfaces (e.g., hardware and / or application programming interfaces) of the base codec. However, rate controller 500 may have more privileged access to the internal controls of the enhancement coding block and therefore may control quantization parameter Q at a lower or more precise level of control. 1 and Q 2 can be set. Although the base codec itself may use quantization parameters internally within the encoding structure of the base codec, these parameters are typically not externally configurable (e.g., there may be no or reduced access via the base codec's interface and / or it may not be possible to pass information to the base codec to allow modification of the quantization parameters during encoding). Preferably, the encoded base stream, or base layer, is encoded independently from the enhancement stream.

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

[0065] Using the rate controller 500 of FIG. 5, the level of quantization may be constant or may be varied to meet or attempt to meet an indication of desired quality 510. For example, the quantization parameter Q 1 and Q 2 may be controlled to satisfy one or more bit rates or bit rate ranges or constraints set based on an indication of desired quality 510. In some cases, the base parameters 514 are set as static parameters for the encoding, and the quantization parameter Q 1 and Q 2 is variable within the context of selected static base parameters 514 to meet or attempt to meet an indication of desired quality 510.

[0066] In embodiments where the level of quantization varies, the enhancement rate controller 502 determines a quantization parameter Q 1 and Q 2For example, upper and lower limits may be set based on an indication of desired quality 510 such that the subjective level of quality (the level of quality perceived by the user) remains unchanged or unnoticeable. This allows the rate controller 500 to encode the video streams in a flexible manner without perceptible loss of quality, even during complex scenes. When the amount of data stored in the output buffer fluctuates, the optional encoding feedback module 504 may provide further information related to the capacity of the buffer to the enhancement rate controller 502. Using this information, the quantization parameter Q for each enhancement stream may be adjusted based on the desired quality 510 indication such that the subjective level of quality (the level of quality perceived by the user) remains unchanged or unnoticeable. This allows the rate controller 500 to encode the video streams in a flexible manner without perceptible loss of quality, even during complex scenes. When the amount of data stored in the output buffer fluctuates, the optional encoding feedback module 504 may provide further information related to the capacity of the buffer to the enhancement rate controller 502. 1 and Q 2 can be adjusted.

[0067] 6 illustrates an example of an enhanced rate controller 602. This example illustrates certain internal components that may be implemented to provide one or more of the enhanced rate controllers 402 and 502, as the case may be.

[0068] In FIG. 6, the enhanced rate controller 602 also determines a quantization parameter Q for encoding a given frame (or coding unit) of a video signal. 1 and Q 2 In the example of FIG. 6, the enhancement rate controller 602 is configured to output a quantization parameter Q based on a number of input parameters. 1 and Q 2 In particular, the enhancement rate controller 602 adjusts the bit rate of each enhancement stream by determining a quantization parameter Q for each frame in a set of frames of the video to be encoded. 1 and Q 2 The quantization parameter Q for the current frame is determined using feedback from the encoding of the previous frame. 1 and Q 2 can be set.

[0069] For example, the first frame f 0can be encoded with a quantization parameter Q 1 and Q 2 may then be determined for this first frame. 1 In this case, the enhanced rate controller 602 preferably uses the previous frame f 0 Using the coded data from 1 and Q 2 For example, the quantization parameter Q for the subsequent frame may be determined using the settings of the previous frame (or one or more other previous frames). 1 and Q 2 , where the enhancement rate controller 602 determines an initial value for the quantization parameter Q from this starting point. 1 and Q 2 Therefore, the coding parameters from the previous frame are used to search for a new value of the quantization parameter Q for the subsequent frame. 1 and Q 2 Since hybrid video streams are structured such that frames may be coded independently of one another, the following will be described with reference to a preceding frame and a following frame for ease of understanding, although a preceding frame need not necessarily be the frame immediately preceding the following frame.

[0070] In Figure 6, the enhancement rate controller 602 receives an indication of a desired quality level 610. This may include the same indication of desired quality level 510 that is input to the rate controller 500 of Figure 5. In other cases, the quality controller 512 may adjust the indication of desired quality level 510 before passing it to the enhancement rate controller 602 of Figure 6. The indication of desired quality level 610 is input to a parameter calculator 620. The parameter calculator 620 processes the indication of desired quality level 610 (and optionally one or more additional parameters) and calculates a quantization parameter Q' for each enhancement stream. 1 and Q' 2 and the desired bit rate BRD The desired bit rate BR D is the output quantization parameter Q 1 and Q 2 The inertia quality level indication 630 may include an estimated bit rate for the hybrid video stream (and / or one or more of the enhancement streams) if the inertia quality level indication 630 is to be used to meet the input indication of the desired quality level 610. The enhancement rate controller 602 further receives an inertia quality level indication 630 that is input to an inertia parameter calculator 632. The inertia parameter calculator 632 replicates the functionality of the parameter calculator 620 but receives different inputs (and thus produces different outputs). For example, the parameter calculator 620 and the inertia parameter calculator 632 may comprise different instantiations of a common program code class and / or replicas of a common hardware chip. The inertia parameter calculator 632 calculates a quantization parameter Q” for each enhancement stream. 1 and Q.” 2 and inertial bit rate BR I Output the inertial bit rate BR I is the output quantization parameter Q” 1 and Q.” 2The quality controller 512 may include an estimated bit rate for the hybrid video stream (and / or one or more of the enhancement streams) when attempting to meet the input inertial indication of the desired quality level 630 using the quality controller 512. Finally, the enhancement rate controller 602 also receives an encoding parameter input 640. This may include inputs similar to the encoding feedback 404 and 504 of FIGS. 4 and 5. The encoding parameter input 640 may include one or more operating parameters, such as one or more of a frame type, a base layer bit rate, a minimum desired bit rate (e.g., as determined by the quality controller 512), and a target bit rate based on a previous encoding. 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).

[0071] The outputs of the parameter calculator 620, the inertia parameter calculator 632, and the bitrate range calculator 642 are input to a quality adjuster 650. The quality adjuster 650 processes the inputs and determines the quantization parameter Q for the current frame being encoded. 1 and Q 2 In one case, the quality adjuster 650 is configured to determine a final set of the desired bit rate BR from the parameter calculator 620 and the inertia parameter calculator 632. D and inertia bit rate BR I , which is within the bit rate range output by the bit rate range calculator 642. If one of the input bit rates is within the bit range, the quantization parameter Q' 1 and Q' 2 , and the quantization parameter Q” 1 and Q.” 2 , and the corresponding quantization parameter Q 1 and Q 2The quality adjuster 650 also outputs an updated inertial indication of the desired quality level to the inertial quality calculator 632 if any of the input bit rates are not within the bit rate range. The updated inertial indication of the desired quality level is an updated version of the inertial indication of the desired quality level 630. The quality adjuster 650 uses the output of the parameter calculator 620 as a reference to adjust the inertial indication of the desired quality level 630 in the direction associated with the bit rate increase or decrease so that it falls within the bit rate range. The inertial parameter calculator 632 then calculates a modified quantization parameter Q” based on the updated inertial indication of the desired quality level received from the quality adjuster 650. 1 and Q.” 2 As well as the modified inertial bit rate BR I This feedback loop is iteratively operated to output a modified inertial bit rate BR I may be iterated until the bit rate output by one or more of the parameter calculator 620 and the inertia parameter calculator 632 is found to fall within the bit rate range and the quantization parameter Q 1 and Q 2 When the final set of is output, the quality controller 512 is configured to output an inertial representation of the desired quality level 652 to be used for the next frame (e.g., frame n+1). The desired quality level output 652 may be used as an inertial representation of the desired quality level 630 for the next frame (while the representation of the desired quality level 610 may be constant for the next frame depending on the operation of the quality controller 512).

[0072] As described above, the enhancement rate controller 602 receives multiple input parameters and determines a quantization parameter Q for each enhancement stream. 1 and Q 2 as well as an inertial frame quality indication for the next frame at the desired quality level 652.

[0073] For the first frame of video data, or if an inertial indication of desired quality level 630 is not available, the inertial indication of desired quality level 630 may be set as an initial indication of desired quality level 610. This may be an initial user set, or some other predefined value, in accordance with FIG. 4. The indication of desired quality level 610, the inertial indication of desired quality level 630, or the inertial indication of desired quality level 652 may have a common format and may be any suitable objective quality metric. In some cases, they may be 8-bit integer values ​​within a predefined range of quality values ​​that represent the perceptual quality of the output decoded video.

[0074] Both the parameter calculator 620 and the inertia parameter calculator 632 determine the level of quantization required for each level of enhancement based on the indication of quality. Additionally, the bit rate required to encode a frame of data at or near the desired quality is also calculated based on the level of quantization required. The total amount of data required to encode a frame using the hybrid encoding scheme described herein may depend on the complexity of the scenes in the video signal and may therefore vary from frame to frame. Thus, different quantization parameters may be determined for different frames having a constant indication of the desired quality level 610. Thus, the enhancement rate controller 602 is a dynamic system whose component outputs change from frame to frame and for a given frame.

[0075] The encoding parameters input 640 defines several parameters used in the encoding process. These may include a target rate factor (or quality level) and a target bit rate. The encoding parameters 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 parameters input 640 to determine an overall bit rate range.

[0076] In a particular embodiment described in detail below, the encoder 100 utilizes a buffer implemented according to a leaky bucket model to determine the level of quantization for a frame of data. Because the amount of data required to encode a frame may vary depending on the complexity of the frame, the contents of the buffer need to be controlled so that the buffer does not overflow (e.g., so that more data is encoded as 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. Thus, the measurements associated with the buffer (i.e., the leaky bucket parameters) may be used by the bit rate range calculator 642 to determine the bit rate ranges of one or more enhancement streams.

[0077] Using the rate controllers 400 and 500 of FIG. 4 and FIG. 5 and the enhancement rate controller 600 of FIG. 6, a frame of a video may be coded with multiple levels of quantization, preferably coding each of the base stream and the two enhancement streams with different levels of quantization. The coding in these embodiments is repeated for multiple frames using a frame-by-frame process. Thus, as described above, for each frame, the coding process includes reconstructing a frame of the video at each resolution of each of the two enhancement streams, and then comparing the reconstruction with video data derived from a frame of the input video, which video data corresponds to each resolution of the enhancement streams. Such a comparison thus allows for making a difference between the original frame and the reconstructed frame. For example, as shown in FIG. 1 and FIG. 3, for each frame, a set of residuals for the frame of the video is generated at each of the two enhancement levels based on the comparison, and these residuals are coded using the quantization parameters for the two enhancement streams output by the rate controllers 400 and 500 of FIG. 4 and FIG. 5 (e.g., via the operation of the enhancement rate controller 600). The process may be repeated over multiple frames of data to encode a complete video (e.g., a video file or video stream for transmission). The frames are encoded in the hybrid stream to meet or attempt to meet the input representation of the desired quality level 510 or 610. This provides a simple way for a non-technical user to set complex technical quantization parameters for multiple different encoding approaches to obtain a desired level of quality.

[0078] 7A and 7B show schematic diagrams of an exemplary encoder 700. This may include the encoder 100 shown in FIG. 1 and FIG. 3. FIG. 7A and 7B show how the rate controllers of the previous examples (e.g., the rate controllers 400 or 500 of FIG. 4 or FIG. 5) may be implemented within the context of the encoder 100 as shown in FIG. 1 or FIG. 3. FIG. 7A shows a rate controller 710 arranged to control a quantization block 720-1 in a first enhancement encoder 700-1. FIG. 7B shows the same rate controller 710 arranged to control the quantization blocks 720-1 and 720-2 in a first enhancement encoder 700-1 and a second enhancement encoder 700-2. The rate controller 710 may comprise a software routine (e.g., in a high-speed low-level language such as C or C++) and / or a dedicated electronic circuit. Both figures show a base codec 730 configured to perform encoding and decoding operations according to a base video coding approach, which is distinct from the enhancement level coding. 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). The example encoder 700 of FIG. 7A and FIG. 7B also comprises a buffer 740 for receiving 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 comprise a software-defined buffer (e.g., a reserved section of a memory resource) and / or a dedicated hardware buffer. The buffer 740 is configured to combine the multiple encoded streams to output a hybrid video stream (HVS).

[0079] In the example of Figures 7A and 7B, the rate controller 710 receives data from a base processing layer (e.g., a base encoder of at least the base codec 730) and a buffer 740. This data may include the encoder parameter input 640 shown in Figure 6, or the encoding feedback 404 and 504 of Figures 4 and 5.

[0080] Figure 7A illustrates the use of a buffer 740 for an encoded base stream and a first encoded enhancement stream, while Figure 7B illustrates another embodiment in which a buffer receives the encoded base stream and both encoded enhancement streams, whereas the rate control process illustrated with respect to Figures 6-8 is illustrated with two enhancement streams, the number of enhancement streams may be greater or less than two.

[0081] In the embodiment of FIG. 7A, the rate controller 710 determines the quantization parameter Q 1 In the example of FIG. 7B , the rate controller 710 controls the quantization in the first enhancement encoder 700-1 by providing a set of quantization parameters Q 1 and Q 2 (which may be an implementation of quantization blocks 120-1 and 120-2 from one or more of FIGS. 1 and 3). In yet another case (not shown), buffer 740 may be configured to receive an encoded base stream and a second encoded enhancement stream.

[0082] In the examples of Figures 7A and 7B, the buffer 740 may be configured to receive an input (e.g., a variable bitrate encoded stream) at a variable bitrate, while the output (i.e., a hybrid video stream) is read at a constant bitrate. In other cases, the output may be output at a variable bitrate, but may be limited by an indication of a desired level of quality, as described with reference to Figure 6. The rate controller 710 may read a status from the buffer 740 to ensure that the buffer 740 does not overflow or empty, and may control the data passed to the buffer to ensure that there is always data available for reading at the output of the buffer 740. For example, the encoder parameters input 640 of Figure 6 may include a minimum bitrate required to fill the buffer 740, and a maximum bitrate or capacity of the buffer 740. These may be used to control a bitrate range, as described with reference to Figure 6.

[0083] FIG. 8 shows a third example of a rate controller 800 that may be used to control the bit rate of one or more data streams in the encoder 100 of FIG. 1 and FIG. 3. This may be considered as a variation of any one of the aforementioned encoders. FIG. 9 shows a fourth example of a rate controller 900, which is a more advanced variation of the third example of the rate controller 800. FIG. 8 and FIG. 9 show two possible implementations of a rate controller that is compatible with the leaky bucket model. In particular, FIG. 8 and FIG. 9 show one manner in which the optional encoding feedback 404 or 504 of FIG. 4 and FIG. 5 may be implemented. This may be considered as a variation of the use of the inertia parameter of FIG. 6.

[0084] The rate controllers 800 and 900 of FIGS. 8 and 9 both receive the status 840, 940 of a buffer (such as buffer 740 of FIGS. 7A and 7B) and generate a quantization parameter Q for the current frame t. tThe quantization parameters may be provided to a "quantize" component in one or more of the level 1 and level 2 encoding pipelines as shown in Figure 3. Although the examples of Figures 8 and 9 are described with reference to a single enhancement level, these examples may be adapted according to the examples of Figures 4-6 (or implemented repeatedly for each of multiple enhancement levels) to provide quantization parameters for multiple enhancement levels.

[0085] In both embodiments, the general operation of the rate controller 800, 900 may be as follows: t The set of Q is adjusted based on feedback from the buffer. This feedback may indicate the amount of data in the buffer (e.g., capacity, etc.). In both Figures 8 and 9, an indication of the amount of data in the buffer (i.e., how "full" the buffer is) is received via a "from buffer" signal 840, 940. This is then used either directly or indirectly by the Q estimation component 820, 920 to determine a quantization parameter Q, which is used as a "quantization" operational parameter. t We estimate a set of

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

[0087] In some cases, the quantization parameter value Q t The set of Q may be proportional to the amount of data in the buffer. For example, if there is a lot of data in the buffer (i.e., the buffer is approaching capacity) at the moment a new frame is received, the Q estimation component 820 may select a high value of Q to reduce the amount of residual data to be encoded. t (e.g., large step or bin size, etc.) may be set.

[0088] In a particular embodiment, the quantization parameter Q t quantization step size may be set using the quantization parameter Q t In this case, low values ​​of Q t may correspond to a larger quantization step size value that results in fewer quantization bins or groups for a given range of residual values, and thus the quantization parameter value Q t The set of Q may be inversely proportional to the amount of data in the buffer. In this case, the rate controller may set a high value of Q when the buffer is relatively empty. t (i.e., a low step size value) to encode more residual data into the hybrid video stream. Depending on how the quantization step size is determined from the one or more quantization parameters, different approaches may be applied.

[0089] Generally, in the embodiment of FIG. 8, rate controller 800 enables an adaptive rate control process that uses the amount of data in a buffer to determine the level of quantization for one or more enhancement layers.

[0090] The embodiment of FIG. 9 uses additional components to determine the set of quantization parameters. In the embodiment of FIG. 9, the rate controller 900 also receives encoder parameters from a base encoder. These are shown as "from base" signal 942 input to the rate controller 900. The signal from base 942 may form part of the encoder parameter input 640 in FIG. 6. In some cases, the signal from base 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 across frames. Thus, the current bit rate of the base encoder may be used to determine the quantization parameters of the enhancement stream.

[0091] In some cases, the signal from the base 942 may also indicate the amount of "filler" data that the base encoder intends to add to the base encoder's flow. In this case, the encoder may replace the base encoder "filler" data with extra enhancement stream data to maximize the available bandwidth. In this case, when there is a high level of filler, the rate controller 900 may select a quantization parameter Q that results in a lower step width so that more residual data is received in the buffer. t It may be possible to set a value of . This is possible because "filler" data may be removed or replaced in the base encoder stream (e.g., either before or at the buffer) since it is not required to decode the encoded base stream.

[0092] In FIG. 9, the rate controller 900 includes a target size estimation component 910, which receives a signal 940 from the buffer and a signal 942 from the base. The target size estimation component 910 may be configured to receive the status of the buffer via the signal 940 from the buffer and information regarding the amount of "filler" data that the base encoder plans to add to the frame via the signal 942 from the base. Thus, the target size estimation component determines the target data size of the frame. The amount of data held in the buffer may be indicated by a "full" parameter, which may be normalized within 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 "full" bin to the "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 some cases, the mapping function or lookup table may implement a non-linear mapping, which may be set based on experiments. In some cases, the target size estimate may also be set based on a configuration parameter that indicates a desired percentage of the hybrid video stream that is filled by the enhancement stream (e.g., with the remainder of the hybrid video stream being filled by the base stream).

[0093] In the embodiment of Figure 9, the target size determined by the target size estimation component 910 is communicated to the Q estimation component 920. In Figure 9, the Q estimation component 920 additionally receives the quantization parameter Q t-1 6, a feedback mechanism is provided in which the amount of data used to encode a first frame is used to set the quantization parameter for encoding a subsequent frame.

[0094] In FIG. 9, the Q estimation component 920 estimates the target size from the target size estimation component 910 and the quantization parameter Q from the previous frame. t-1 , and the quantization parameter Q from the previous frame (the "current size"). t-1 , the current frame size (current data size) that has been encoded with the set of L-1 or L-2 components. The size of the current frame may be provided by a current size estimation component 940. The current size estimation component 940 may determine the current size based on input from the parameter buffer 930 using at least a portion of an implementation of at least one of the enhancement encoding pipelines (e.g., L-1 or L-2 components). The current size estimation component 940 may include a version of the inertia parameter calculator 632 of FIG. 6 in that the current size estimation component 940 simulates a size metric for encoding a given frame given a set of encoded data from a previous frame. In some cases, the “current size” information may be determined by a parallel copy of at least one of the enhancement encoding pipelines, e.g., the current frame is determined based on a quantization parameter Q for transmission. t The current size estimation component 940 is quantized by Q t-1 and determines the current size based on these quantization parameters by performing encoding that is not transmitted. In another embodiment, the current size may alternatively be received from a cloud configuration interface, for example, based on pre-processing of pre-recorded video. In this other embodiment, such as the one shown in FIG. 6, a parallel implementation may not be required.

[0095] In FIG. 9, a Q estimation component 920 takes its inputs (eg, as described above) and generates an estimated quantization parameter Q′ tIn some cases, this may be performed using a set of size functions that map data sizes (e.g., represented by target or current sizes) to quantization parameters. The data sizes and / or quantization parameters may be normalized, e.g., to values ​​between 0 and 1. The quantization parameters may be associated with the quantization step size, e.g., the quantization parameter may be a "quality factor" that is inversely proportional to the quantization step size, and / or the quantization step size.

[0096] In the example of FIG. 9, a set of curves may be defined to map normalized sizes to quantization parameters. Each curve may have one or more multipliers and offsets that may depend on characteristics of the current frame (e.g., may depend on the complexity of the information to be encoded in the frame). The multipliers and offsets may define the shape of the curves. The multipliers may be applied to a size normalization function that is a function of the quantization parameter Q. In some cases, the current size (i.e., Q t-1 (the size of the encoded frame t) and Q t-1 A point in the space of the set of curves may be defined using a function Q. This point may be used to select a set of closest curves from the set of curves. These may be curves above the point, curves below the point, or the highest or lowest curves relative to the point. The set of closest curves may 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, a multiplier and offset for the new curve may be determined. These values ​​may then be used along with the received target size to determine Q. t A value of may be determined (eg, a curve may define a function of size and Q).

[0097] In some cases, at least the Q estimation 920 of the rate controller 900 is adaptive, and characteristics of one or more previous frames affect the Q estimation for the current frame. In some cases, 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 to different coefficient positions within a coding unit or block, for example, to different elements in an array of 4 or 16 coefficients (for a 2×2 or 4×4 transform).

[0098] Finally, the embodiment of FIG. 9 includes an estimated quantization parameter Q′ output from the Q estimation component 920. t , and corrects the set based on one or more factors. The Q-capping component 950 may include a version or part of the quality adjuster 650. t The set of quantization parameters Q′ may include one or more values. t The initial set of t In some cases, the estimated quantization parameter Q' may be corrected based on one or more of the changes in t The set of quantization parameters Q′ may be capped based on the set of quantization parameters used by the base coding layer, which may be received along with data from this layer. In some cases, the estimated quantization parameters Q′ may be used with or without adaptation using base coding layer data. t The set of Q′ can be limited based on the values ​​of the previous set of quantization parameters. t One or more of the minimum and maximum values ​​of t-1 ) The output of the capping may then be set based on the quantization parameter Q t It will be offered as the final set.

[0099] In some cases, the set of quantization parameters is Qt In this case, the step size applied to frame t by one of the quantization components may be set based on Qt. The function determining the step size may also be based on a maximum step size (e.g., the step size may range from 0 to 10). An exemplary step size calculation is: Step size = [(1-Q 0.2 ) (Step width max -1)]+1

[0100] Certain quantization variants will now be described with reference to Figures 10A and 10B, which describe how quantization parameters may be applied in one or more quantization blocks.

[0101] FIG. 10A provides an example of how quantization of residuals and / or coefficients (transformed residuals) can be performed based on bins with defined step widths. FIG. 10A is provided merely as an example, and there can be different ways of implementing quantization, as known in the art. In FIG. 10A, the x-axis represents residual values ​​or transformed coefficient values. In this example, several bins are defined with a step width of 5. The size of the step width can be selectable, for example, based on a parameter value. In some cases, the size of the step width can be dynamically set, for example, based on the rate control example described above.

[0102] In FIG. 10A, the step widths result in bins that correspond to residual values ​​in the ranges 0-4, 5-9, 10-14, 15-19 (i.e., 0-4 includes both 0 and 4). The bin widths may be configured to include or exclude the end points, as desired. In this example, quantization is performed by replacing all values ​​that fall into the bin with an integer value (e.g., residual values ​​from 0 to 4, inclusive, have a quantization value of 1). In FIG. 10A, quantization may be performed by dividing by the step width (e.g., 5), taking the floor of the result (i.e., the nearest integer less than a positive decimal value), and then adding 1 (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 ​​may be handled in a similar manner, for example by converting to negative values ​​following calculation after operating on the absolute value (e.g., abs(-9)=9, 9 / 5=1.8, floor(1.8)=1, 1+1=2, 2*-1=-2). FIG. 10A shows the case of linear quantization where all bins have a common step width. Note that various different implementations based on this approach may be implemented, for example the first bin may have a quantized value of 0 instead of 1, or may contain values ​​from 1 to 5 (inclusive). FIG. 10A is one simplified illustration of quantization with bins of a given step width.

[0103] FIG. 10B shows how a so-called "dead zone" (DZ) may be implemented. In FIG. 10B, residuals or transformed coefficients with values ​​within a predefined range are set to 0. In FIG. 10B, the predefined range is a range around a value of 0. In FIG. 10B, values ​​less than 6 and greater than -6 are set to 0. The dead zone may be set as a fixed range (e.g., from -6 to 6) or may be set based on the step width. In some cases, the dead zone may be set as a multiple of a predefined step width, e.g., as a linear function of the step width value. In the example of FIG. 10B, the dead zone is set as 2.4*step width. Therefore, with a step width of 5, the dead zone spans from -6 to +6. In other cases, the dead zone may be set as a non-linear function of the step width value.

[0104] In some cases, the dead zone may be set based on a dynamic step width, e.g., adaptive. In this case, the dead zone may change as the step width changes. For example, if the step width is updated to 3 instead of 5, the dead zone for a 2.4* step width may 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 may change to span from -12 to 12. In some cases, the step width multiplier may range from 2 to 4. In some cases, the multiplier may also be adaptive, e.g., based on operating conditions such as available bit rate. Having a dead zone can help reduce the amount of data transmitted over the network, e.g., to reduce the bit rate. When using dead zones, residual or coefficient values ​​that fall into the dead zone are effectively ignored.

[0105] In some cases, the quantization step width may vary for different coefficients within a 2x2 or 4x4 block of transformed coefficients. For example, coefficients that are experimentally determined to have a greater impact on the perception of the decoded signal may be assigned smaller step widths, e.g., 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 the latter coefficients being assigned larger step widths. In this case, a base_stepwidth parameter may be defined that sets a default step width, and then a modifier may be applied to this to calculate the modified_stepwidth to use in quantization (and dequantization), e.g., modified_stepwidth=base_stepwidth*modifier, which may be set based on the particular coefficients within the block or unit.

[0106] In some cases, the modifier may also or alternatively depend on the level of enhancement: for example, the step size may be smaller for a level 1 enhanced stream, since the step size may affect multiple reconstructed pixels at higher quality levels.

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

[0108] In some cases, different quantization modes may be defined. In one mode, a common quantization matrix may be used for both enhancement levels, in another mode, separate matrices may be used for the different levels, and in yet another mode, a quantization matrix may be used only for one enhancement level, e.g., level 0. The quantization matrix may be indexed by the position of the coefficient 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.

[0109] In some cases, a base quantization matrix may be defined with a set of values. The base quantization matrix may be modified by a scaling factor that is a function of a step width for one or more of the enhancement levels. In some cases, the scaling factor may be a clamping function of a step width variable. At the decoder, the step width variable may be received from the encoder for one or more of the level 0 stream and the level 1 stream. In some cases, 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.

[0110] FIG. 11 is a flow chart of an encoding process according to an embodiment of the present invention.

[0111] The encoding process may be implemented using the encoder 100 described herein and / or a different encoder. The encoding process is for encoding the input video as a hybrid video stream. The encoded hybrid video stream includes an encoded base stream and multiple enhancement streams.

[0112] In step S102, an input video is received at a first resolution. The input video may be provided in any known format having a resolution. In step S104, the method includes obtaining an indication of a desired quality level for encoding. This may include parameters within a defined range that are 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 the video to a level of quality. The hybrid video stream includes an encoded base 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.

[0113] In step S106, the method includes encoding each of the multiple enhancement streams. This may include ordering the repetition of steps S108-S114 for each enhancement stream. In step S108, the method includes generating a set of residuals based on differences between the input video and a reconstructed video at a respective resolution of the enhancement streams. For example, in a first enhancement level described herein, the resolution may be lower than that of the input video. Thus, the generation of the residuals for each enhancement stream provides correction data that, when decoded at the base layer, renders the video data at the respective resolution. In step S110, the method performs a step of determining a quantization parameter for the set of residuals based on a desired quality level. This may be performed using a rate controller (such as that shown in any one of Figures 4-9) described herein. By determining the quantization parameter based on the desired level of quality obtained in step S104, a quality level may be maintained during the encoding process despite bitrate variations due to the encoding process and / or frame content. In step S112, the method includes quantizing the residuals based on the quantization parameter determined in step S110. This may include using the quantization parameter to determine a step width and performing the quantization, as shown in one or more of Figures 10A and 10B. Through iterations of step S112, each of the enhancement streams is quantized based on the quantization parameter determined for that stream. Preferably, the quantization parameters for each enhancement stream are different, but in certain embodiments, it may be desirable to use a quantization parameter for each stream. Since this process is performed for each enhancement layer, an optional return of the process to step S108 is shown. In step S114, after the quantization has been determined, the method proceeds to create an encoded stream from the set of quantized residuals.The encoded enhancement stream output by the repetition of step S114 may then be combined with the encoded base stream to generate a hybrid video stream. In some cases, the base level stream and the enhancement stream are encoded separately, for example, the encoded base stream is generated by a separate base codec that uses a different encoding approach for the enhancement stream.

[0114] Certain methods and encoder components as described herein may be performed by instructions stored on a non-transitory computer-readable medium. The non-transitory computer-readable medium stores code including instructions that, when executed by one or more computers, cause the computer to perform steps of a method of the encoder component or perform an operation of the encoder component as described herein. The 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 operated 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 behavior of such a device, and one or more non-transitory computer-readable media arranged to store such hardware description language representations. The descriptions herein reciting principles, aspects, and embodiments encompass both structural and functional equivalents thereof.

[0115] It should be noted that certain embodiments are described herein, and different combinations of different components from different embodiments may be possible. Although prominent features are presented to better explain the embodiments, it is clear that certain features may be added, modified, and / or omitted without altering the functional aspects of these embodiments as described. Elements described herein as "coupled" or "communicatively coupled" have an effective relationship that can be achieved by a direct connection or an indirect connection using one or more other intervening elements. An embodiment described herein as "communicating" or "in communication with" another device, module, or element includes any form of communication or link. Moreover, equivalents and modifications not described above may also be used without departing from the scope of the invention, as defined in the appended claims.

Claims

1. 1. A method for encoding an input video as a hybrid video stream, 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 video stream including an encoded base stream at a second resolution and a plurality of enhancement streams at each of the first resolution and the second resolution, the first resolution being greater than the second resolution; each of the plurality of enhancement streams, generating a set of residuals based on differences between the input video and a reconstructed video of the respective resolution of the enhancement stream; determining a quantization parameter for the set of residuals based on the desired quality level; quantizing the set of residuals based on the quantization parameter; and creating a coded stream from the set of quantized residuals; A method wherein the quantization parameters for a given enhancement stream are based on a previous set of quantization parameters for that enhancement stream.

2. The method of claim 1 , wherein the encoded base stream and at least one of the multiple enhancement streams are encoded using different levels of quantization.

3. The method of claim 1 or 2, wherein the encoded base stream and one or more of the enhancement streams are independently encoded.

4. downsampling the input video to create a downsampled video at the second resolution; and commanding encoding of the downsampled video using a first base encoder to create the encoded base stream.

5. The encoding of each of the plurality of enhancement streams is performed on a frame-by-frame basis, and for each frame and for each of the enhancement streams, reconstructing frames of the respective resolution video of the enhancement stream; comparing frames of the reconstructed video with frames derived from the input video at the respective resolutions of the enhancement stream; The method of claim 1 , further comprising: generating a set of residuals for the frames of the video based on the comparison.

6. Determining the quantization parameter receiving a status of a buffer receiving one or more of the plurality of encoded streams and the encoded base stream; A method according to claim 1 , further comprising: determining the quantization parameter using the status.

7. Determining the quantization parameter determining a capacity of the buffer based on a size of the buffer and an amount of data stored in the buffer; The method of claim 6 , wherein the quantization parameter is determined based on the desired quality level and the determined capacity of the buffer.

8. determining a quantization parameter for the set of residuals for a given enhancement stream; determining an amount of data required to encode the set of residuals for the given enhancement stream; comparing the determined amount of data to the determined capacity of the buffer; and adjusting an initial set of quantization parameters based on the comparison.

9. comparing the estimated size of the set of quantized residuals to the capacity of the buffer; A method according to claim 7 or 8, comprising varying a step size for quantization in response to the comparison to increase or decrease the estimated size of the set of quantized residuals.

10. 10. The method of claim 6, wherein the buffer is configured to receive input from the encoded base stream and the multiple enhancement streams at a variable bit rate and to provide output at a constant bit rate.

11. determining a quantization parameter for the set of residuals based on the desired quality level; A method according to any preceding claim, comprising determining a quantisation parameter that provides the desired quality level within a set of bitrate constraints.

12. Determining a quantization parameter for the set of residuals based on the desired quality level includes, for each of the plurality of enhancement streams: A method according to claim 1 , comprising determining a step width for the quantisation of the set of residuals.

13. determining a quantization parameter for the set of residuals; receiving an initial set of quantization parameters for a set of residuals associated with a previous frame of the video; receiving an input from a buffer for the hybrid video stream; receiving an input from a base encoder used to encode the encoded base stream; and adjusting the initial set of quantization parameters based on the input to determine a set of quantization parameters for a set of residuals associated with a current frame of video.

14. The step of determining a quantization parameter comprises: receiving a status of a base encoder used to encode the encoded base stream; and using the status to determine the quantization parameter.

15. 15. The method of claim 1, wherein a plurality of frames of the input video are encoded and the quantization parameter is determined for each of the plurality of frames on a frame-by-frame basis.

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

17. 17. The method of claim 16, wherein a quantization parameter for the frame is determined based on a target data size of 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.

18. A system comprising an encoder configured to perform the method of any one of claims 1 to 17.

Citation Information

Patent Citations

  • Video coding with fine granularity spatial scalability

    JP2012114928A

  • Rate control method for multi-layered video coding, and video encoding apparatus and video signal processing system using the same

    JP2013251903A

  • Image decoder and image encoder

    JP2015167267A

  • Signaling of down-sampling phase information in scalable video coding

    JP2018110412A

  • Video coding with fine granularity spatial scalability

    US20120201301A1