Method for adjusting a quantization parameter
The automatic adjustment of quantization parameters based on complexity measures for luma and chroma components addresses the challenge of balanced compression quality in video data compression, enhancing PSNR balance between chroma and luma components.
Patent Information
- Application Number
- PCT/EP2024/054992
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-03
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-12
AI Technical Summary
Existing video data compression techniques face challenges in achieving balanced compression quality for luma and chroma components due to varying image characteristics, making it difficult to set optimal quantization parameters.
An automatic adjustment method for quantization parameters is introduced, which calculates complexity measures for luma and chroma components based on residual data to optimize the quantization relationship between them, ensuring balanced compression quality.
This approach improves the balance between peak signal-to-noise ratio (PSNR) for chroma and luma components, reducing the discrepancy in compression quality across different images and regions within an image.
Smart Images

Figure EP2024054992_12092024_PF_FP_ABST
Abstract
Description
[0001] METHOD FOR ADJUSTING A QUANTIZATION PARAMETER
[0002] BACKGROUND
[0003] Field
[0004] This disclosure relates to data encoding and decoding.
[0005] Description of Related Art
[0006] The “background” description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent it is described in this background section, as well as aspects of the description which may not otherwise qualify as prior art at the time of filing, is neither expressly or impliedly admitted as prior art against the present disclosure.
[0007] There are several systems, such as video or image data encoding and decoding systems, which involve transforming video data into a frequency domain representation, quantising the frequency domain coefficients and then applying some form of entropy encoding to the quantised coefficients. This can achieve compression of the video data. A corresponding decoding or decompression technique is applied to recover a reconstructed version of the original video data.
[0008] Quantization parameters can be used in order to affect the strength of quantization performed, and thus a level of compression, during the encoding process. However, image data can have different characteristics for different image components (such as luma and chroma components). Therefore, it can be difficult to achieve a similar level of compression quality for different image components.
[0009] It is an aim of the present disclosure to address these issues.
[0010] SUMMARY
[0011] Aspects of the present disclosure are defined by the appended claims.
[0012] Further respective aspects and features of the present disclosure are defined in the appended claims.
[0013] It is to be understood that both the foregoing general description and the following detailed description are exemplary, but are not restrictive, of the present technology.
[0014] BRIEF DESCRIPTION OF THE DRAWINGS
[0015] A more complete appreciation of the disclosure and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawings, wherein:
[0016] Figure 1 schematically illustrates an audio / video (A / V) data transmission and reception system using video data compression and decompression;
[0017] Figure 2 schematically illustrates a video display system using video data decompression; Figure 3 schematically illustrates an audio / video storage system using video data compression and decompression;
[0018] Figure 4 schematically illustrates a video camera using video data compression;
[0019] Figures 5 and 6 schematically illustrate storage media;
[0020] Figure 7 provides a schematic overview of a video data compression and decompression apparatus;
[0021] Figure 8 schematically illustrates a predictor;
[0022] Figure 9 schematically illustrates a transform-skip mode;
[0023] Figures 10a, 10b, 11a and 11b schematically illustrate respective scanning directions;
[0024] Figure 12 schematically illustrates a plot of peak signal-to-noise ratio difference between luma and chroma for a VTM encoding of a number of images;
[0025] Figure 13 schematically illustrates an encoding method in accordance with the present disclosure;
[0026] Figure 14 schematically illustrates an encoding method in accordance with the present disclosure
[0027] Figure 15 schematically illustrates an aspect of the generation of a residual estimation; and
[0028] Figure 16 schematically illustrates a plot of peak signal-to-noise ratio difference between luma and chroma with automatic quantization adjustment.
[0029] DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0030] Referring now to the drawings, Figures 1-4 are provided to give schematic illustrations of apparatus or systems making use of the compression and / or decompression apparatus to be described below in connection with embodiments of the present technology.
[0031] All of the data compression and / or decompression apparatus to be described below may be implemented in hardware, in software running on a general-purpose data processing apparatus such as a general-purpose computer, as programmable hardware such as an application specific integrated circuit (ASIC) or field programmable gate array (FPGA) or as combinations of these. In cases where the embodiments are implemented by software and / or firmware, it will be appreciated that such software and / or firmware, and non-transitory data storage media by which such software and / or firmware are stored or otherwise provided, are considered as embodiments of the present technology.
[0032] Figure 1 schematically illustrates an audio / video data transmission and reception system using video data compression and decompression. In this example, the data values to be encoded or decoded represent image data.
[0033] An input audio / video signal 10 is supplied to a video data compression apparatus 20 which compresses at least the video component of the audio / video signal 10 for transmission along a transmission route 30 such as a cable, an optical fibre, a wireless link or the like. The compressed signal is processed by a decompression apparatus 40 to provide an output audio / video signal 50. For the return path, a compression apparatus 60 compresses an audio / video signal for transmission along the transmission route 30 to a decompression apparatus 70.
[0034] The compression apparatus 20 and decompression apparatus 70 can therefore form one node of a transmission link. The decompression apparatus 40 and decompression apparatus 60 can form another node of the transmission link. Of course, in instances where the transmission link is uni-directional, only one of the nodes would require a compression apparatus and the other node would only require a decompression apparatus.
[0035] Figure 2 schematically illustrates a video display system using video data decompression. In particular, a compressed audio / video signal 100 is processed by a decompression apparatus 110 to provide a decompressed signal which can be displayed on a display 120. The decompression apparatus 110 could be implemented as an integral part of the display 120, for example being provided within the same casing as the display device. Alternatively, the decompression apparatus 110 maybe provided as (for example) a so-called set top box (STB), noting that the expression "set-top" does not imply a requirement for the box to be sited in any particular orientation or position with respect to the display 120; it is simply a term used in the art to indicate a device which is connectable to a display as a peripheral device.
[0036] Figure 3 schematically illustrates an audio / video storage system using video data compression and decompression. An input audio / video signal 130 is supplied to a compression apparatus 140 which generates a compressed signal for storing by a store device 150 such as a magnetic disk device, an optical disk device, a magnetic tape device, a solid state storage device such as a semiconductor memory or other storage device. For replay, compressed data is read from the storage device 150 and passed to a decompression apparatus 160 for decompression to provide an output audio / video signal 170.
[0037] It will be appreciated that the compressed or encoded signal, and a storage medium such as a machine-readable non-transitory storage medium, storing that signal, are considered as embodiments of the present technology.
[0038] Figure 4 schematically illustrates a video camera using video data compression. In Figure 4, an image capture device 180, such as a charge coupled device (CCD) image sensor and associated control and read-out electronics, generates a video signal which is passed to a compression apparatus 190. A microphone (or plural microphones) 200 generates an audio signal to be passed to the compression apparatus 190. The compression apparatus 190 generates a compressed audio / video signal 210 to be stored and / or transmitted (shown generically as a schematic stage 220). The techniques to be described below relate primarily to video data compression and decompression. It will be appreciated that many existing techniques may be used for audio data compression in conjunction with the video data compression techniques which will be described, to generate a compressed audio / video signal. Accordingly, a separate discussion of audio data compression will not be provided. It will also be appreciated that the data rate associated with video data, in particular broadcast quality video data, is generally very much higher than the data rate associated with audio data (whether compressed or uncompressed). It will therefore be appreciated that uncompressed audio data could accompany compressed video data to form a compressed audio / video signal. It will further be appreciated that although the present examples (shown in Figures 1-4) relate to audio / video data, the techniques to be described below can find use in a system which simply deals with (that is to say, compresses, decompresses, stores, displays and / or transmits) video data. That is to say, the embodiments can apply to video data compression without necessarily having any associated audio data handling at all.
[0039] Figure 4 therefore provides an example of a video capture apparatus comprising an image sensor and an encoding apparatus of the type to be discussed below. Figure 2 therefore provides an example of a decoding apparatus of the type to be discussed below and a display to which the decoded images are output.
[0040] A combination of Figure 2 and 4 may provide a video capture apparatus comprising an image sensor 180 and encoding apparatus 190, decoding apparatus 110 and a display 120 to which the decoded images are output.
[0041] Figures 5 and 6 schematically illustrate storage media, which store (for example) the compressed data generated by the apparatus 20, 60, the compressed data input to the apparatus 110 or the storage media or stages 150, 220. Figure 5 schematically illustrates a disc storage medium such as a magnetic or optical disc, and Figure 6 schematically illustrates a solid state storage medium such as a flash memory. Note that Figures 5 and 6 can also provide examples of non-transitory machine-readable storage media which store computer software which, when executed by a computer, causes the computer to carry out one or more of the methods to be discussed below.
[0042] Therefore, the above arrangements provide examples of video storage, capture, transmission or reception apparatuses embodying any of the present techniques.
[0043] Figure 7 provides a schematic overview of a video or image data compression and decompression apparatus, for encoding and / or decoding image data representing one or more images.
[0044] A controller 343 controls the overall operation of the apparatus and, in particular when referring to a compression mode, controls a trial encoding processes by acting as a selector to select various modes of operation such as block sizes and shapes, and whether the video data is to be encoded losslessly or otherwise. The controller is considered to form part of the image encoder or image decoder (as the case may be). Successive images of an input video signal 300 are supplied to an adder 310 and to an image predictor 320. The image predictor 320 will be described below in more detail with reference to Figure 8. The image encoder or decoder (as the case may be) plus the intra-image predictor of Figure 8 may use features from the apparatus of Figure 7. This does not mean that the image encoder or decoder necessarily requires every feature of Figure 7 however.
[0045] The adder 310 in fact performs a subtraction (negative addition) operation, in that it receives the input video signal 300 on a "+" input and the output of the image predictor 320 on a input, so that the predicted image is subtracted from the input image. The result is to generate a so-called residual image signal 330 representing the difference between the actual and predicted images.
[0046] One reason why a residual image signal is generated is as follows. The data coding techniques to be described, that is to say the techniques which will be applied to the residual image signal, tend to work more efficiently when there is less "energy" in the image to be encoded. Here, the term "efficiently" refers to the generation of a small amount of encoded data; for a particular image quality level, it is desirable (and considered "efficient") to generate as little data as is practicably possible. The reference to "energy" in the residual image relates to the amount of information contained in the residual image. If the predicted image were to be identical to the real image, the difference between the two (that is to say, the residual image) would contain zero information (zero energy) and would be very easy to encode into a small amount of encoded data. In general, if the prediction process can be made to work reasonably well such that the predicted image content is similar to the image content to be encoded, the expectation is that the residual image data will contain less information (less energy) than the input image and so will be easier to encode into a small amount of encoded data.
[0047] Therefore, encoding (using the adder 310) involves predicting an image region for an image to be encoded; and generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded. In connection with the techniques to be discussed below, the ordered array of data values comprises data values of a representation of the residual image region. Decoding involves predicting an image region for an image to be decoded; generating a residual image region indicative of differences between the predicted image region and a corresponding region of the image to be decoded; in which the ordered array of data values comprises data values of a representation of the residual image region; and combining the predicted image region and the residual image region. The remainder of the apparatus acting as an encoder (to encode the residual or difference image) will now be described.
[0048] The residual image data 330 is supplied to a transform unit or circuitry 340 which generates a discrete cosine transform (DCT) representation of blocks or regions of the residual image data. The DCT technique itself is well known and will not be described in detail here. Note also that the use of DCT is only illustrative of one example arrangement. Other transforms which might be used include, for example, the discrete sine transform (DST). A transform could also comprise a sequence or cascade of individual transforms, such as an arrangement in which one transform is followed (whether directly or not) by another transform. The choice of transform may be determined explicitly and / or be dependent upon side information used to configure the encoder and decoder. In other examples a so-called “transform-skip” mode can selectively be used in which no transform is applied.
[0049] Therefore, in examples, an encoding and / or decoding method comprises predicting an image region for an image to be encoded; and generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded; in which the ordered array of data values (to be discussed below) comprises data values of a representation of the residual image region.
[0050] The output of the transform unit 340, which is to say (in an example), a set of DCT coefficients for each transformed block of image data, is supplied to a quantiser 350. Various quantisation techniques are known in the field of video data compression, ranging from a simple multiplication by a quantisation scaling factor through to the application of complicated lookup tables under the control of a quantisation parameter. The general aim is twofold. Firstly, the quantisation process reduces the number of possible values of the transformed data. Secondly, the quantisation process can increase the likelihood that values of the transformed data are zero. Both of these can make the entropy encoding process, to be described below, work more efficiently in generating small amounts of compressed video data.
[0051] A data scanning process is applied by a scan unit 360. The purpose of the scanning process is to reorder the quantised transformed data so as to gather as many as possible of the non-zero quantised transformed coefficients together, and of course therefore to gather as many as possible of the zero-valued coefficients together. These features can allow so- called run-length coding or similar techniques to be applied efficiently. So, the scanning process involves selecting coefficients from the quantised transformed data, and in particular from a block of coefficients corresponding to a block of image data which has been transformed and quantised, according to a "scanning order" so that (a) all of the coefficients are selected once as part of the scan, and (b) the scan tends to provide the desired reordering. One example scanning order which can tend to give useful results is a diagonal order such as a so-called up-right diagonal scanning order. The scanning order can be different, as between transform-skip blocks and transform blocks (blocks which have undergone at least one spatial frequency transformation).
[0052] The scanned coefficients are then passed to an entropy encoder (EE) 370. Again, various types of entropy encoding may be used. Two examples are variants of the so-called CABAC (Context Adaptive Binary Arithmetic Coding) system and variants of the so-called CAVLC (Context Adaptive Variable-Length Coding) system. In general terms, CABAC is considered to provide a better efficiency, and in some studies has been shown to provide a 10-20% reduction in the quantity of encoded output data for a comparable image quality compared to CAVLC. However, CAVLC is considered to represent a much lower level of complexity (in terms of its implementation) than CABAC. Note that the scanning process and the entropy encoding process are shown as separate processes, but in fact can be combined or treated together. That is to say, the reading of data into the entropy encoder can take place in the scan order. Corresponding considerations apply to the respective inverse processes to be described below.
[0053] The output of the entropy encoder 370, along with additional data (mentioned above and / or discussed below), for example defining the manner in which the predictor 320 generated the predicted image, whether the compressed data was transformed or transformskipped or the like, provides a compressed output video signal 380.
[0054] However, a return path 390 is also provided because the operation of the predictor 320 itself depends upon a decompressed version of the compressed output data.
[0055] The reason for this feature is as follows. At the appropriate stage in the decompression process (to be described below) a decompressed version of the residual data is generated. This decompressed residual data has to be added to a predicted image to generate an output image (because the original residual data was the difference between the input image and a predicted image). In order that this process is comparable, as between the compression side and the decompression side, the predicted images generated by the predictor 320 should be the same during the compression process and during the decompression process. Of course, at decompression, the apparatus does not have access to the original input images, but only to the decompressed images. Therefore, at compression, the predictor 320 bases its prediction (at least, for inter-image encoding) on decompressed versions of the compressed images.
[0056] The entropy encoding process carried out by the entropy encoder 370 is considered (in at least some examples) to be "lossless", which is to say that it can be reversed to arrive at exactly the same data which was first supplied to the entropy encoder 370. So, in such examples the return path can be implemented before the entropy encoding stage. Indeed, the scanning process carried out by the scan unit 360 is also considered lossless, so in the present embodiment the return path 390 is from the output of the quantiser 350 to the input of a complimentary inverse quantiser 420. In instances where loss or potential loss is introduced by a stage, that stage (and its inverse) may be included in the feedback loop formed by the return path. For example, the entropy encoding stage can at least in principle be made lossy, for example by techniques in which bits are encoded within parity information. In such an instance, the entropy encoding and decoding should form part of the feedback loop.
[0057] In general terms, an entropy decoder 410, the reverse scan unit 400, an inverse quantiser 420 and an inverse transform unit or circuitry 430 provide the respective inverse functions of the entropy encoder 370, the scan unit 360, the quantiser 350 and the transform unit 340. For now, the discussion will continue through the compression process; the process to decompress an input compressed video signal will be discussed separately below.
[0058] In the compression process, the scanned coefficients are passed by the return path 390 from the quantiser 350 to the inverse quantiser 420 which carries out the inverse operation of the scan unit 360. An inverse quantisation and inverse transformation process are carried out by the units 420, 430 to generate a compressed-decompressed residual image signal 440.
[0059] The image signal 440 is added, at an adder 450, to the output of the predictor 320 to generate a reconstructed output image 460 (although this may be subject to so-called loop filtering and / or other filtering before being output - see below). This forms one input to the image predictor 320, as will be described below.
[0060] Turning now to the decoding process applied to decompress a received compressed video signal 470, the signal is supplied to the entropy decoder 410 and from there to the chain of the reverse scan unit 400, the inverse quantiser 420 and the inverse transform unit 430 before being added to the output of the image predictor 320 by the adder 450. So, at the decoder side, the decoder reconstructs a version of the residual image and then applies this (by the adder 450) to the predicted version of the image (on a block by block basis) so as to decode each block. In straightforward terms, the output 460 of the adder 450 forms the output decompressed video signal 480 (subject to the filtering processes discussed below). In practice, further filtering may optionally be applied (for example, by a loop filter 565 shown in Figure 8 but omitted from Figure 7 for clarity of the higher level diagram of Figure 7) before the signal is output.
[0061] The apparatus of Figures 7 and 8 can act as a compression (encoding) apparatus or a decompression (decoding) apparatus. The functions of the two types of apparatus substantially overlap. The scan unit 360 and entropy encoder 370 are not used in a decompression mode, and the operation of the predictor 320 (which will be described in detail below) and other units follow mode and parameter information contained in the received compressed bit-stream rather than generating such information themselves.
[0062] Figure 8 schematically illustrates the generation of predicted images, and in particular the operation of the image predictor 320. There are two basic modes of prediction carried out by the image predictor 320: so- called intra-image prediction and so-called inter-image, or motion-compensated (MC), prediction. At the encoder side, each involves detecting a prediction direction in respect of a current block to be predicted, and generating a predicted block of samples according to other samples (in the same (intra) or another (inter) image). By virtue of the units 310 or 450, the difference between the predicted block and the actual block is encoded or applied so as to encode or decode the block respectively.
[0063] (At the decoder, or at the reverse decoding side of the encoder, the detection of a prediction direction may be in response to data associated with the encoded data by the encoder, indicating which direction was used at the encoder. Or the detection may be in response to the same factors as those on which the decision was made at the encoder).
[0064] Intra-image prediction bases a prediction of the content of a block or region of the image on data from within the same image. This corresponds to so-called l-frame encoding in other video compression techniques. In contrast to l-frame encoding, however, which involves encoding the whole image by intra-encoding, in the present embodiments the choice between intra- and inter- encoding can be made on a block-by-block basis, though in other embodiments the choice is still made on an image-by-image basis.
[0065] Motion-compensated prediction is an example of inter-image prediction and makes use of motion information which attempts to define the source, in another adjacent or nearby image, of image detail to be encoded in the current image. Accordingly, in an ideal example, the contents of a block of image data in the predicted image can be encoded very simply as a reference (a motion vector) pointing to a corresponding block at the same or a slightly different position in an adjacent image.
[0066] A technique known as “block copy” prediction is in some respects a hybrid of the two, as it uses a vector to indicate a block of samples at a position displaced from the currently predicted block within the same image, which should be copied to form the currently predicted block.
[0067] Returning to Figure 8, two image prediction arrangements (corresponding to intra- and inter-image prediction) are shown, the results of which are selected by a multiplexer 500 under the control of a mode signal 510 (for example, from the controller 343) so as to provide blocks of the predicted image for supply to the adders 310 and 450. The choice is made in dependence upon which selection gives the lowest “energy” (which, as discussed above, may be considered as information content requiring encoding), and the choice is signalled to the decoder within the encoded output data-stream. Image energy, in this context, can be detected, for example, by carrying out a trial subtraction of an area of the two versions of the predicted image from the input image, squaring each pixel value of the difference image, summing the squared values, and identifying which of the two versions gives rise to the lower mean squared value of the difference image relating to that image area. In other examples, a trial encoding can be carried out for each selection or potential selection, with a choice then being made according to the cost of each potential selection in terms of one or both of the number of bits required for encoding and distortion to the picture.
[0068] The actual prediction, in the intra-encoding system, is made on the basis of image blocks received as part of the signal 460 (as filtered by loop filtering; see below), which is to say, the prediction is based upon encoded-decoded image blocks in order that exactly the same prediction can be made at a decompression apparatus. However, data can be derived from the input video signal 300 by an intra-mode selector 520 to control the operation of the intra-image predictor 530.
[0069] For inter-image prediction, a motion compensated (MC) predictor 540 uses motion information such as motion vectors derived by a motion estimator 550 from the input video signal 300. Those motion vectors are applied to a processed version of the reconstructed image 460 by the motion compensated predictor 540 to generate blocks of the inter-image prediction.
[0070] Accordingly, the units 530 and 540 (operating with the estimator 550) each act as detectors to detect a prediction direction in respect of a current block to be predicted, and as a generator to generate a predicted block of samples (forming part of the prediction passed to the units 310 and 450) according to other samples defined by the prediction direction.
[0071] The processing applied to the signal 460 will now be described.
[0072] Firstly, the signal may be filtered by a so-called loop filter 565. Various types of loop filters may be used. One technique involves applying a "deblocking" filter to remove or at least tend to reduce the effects of the block-based processing carried out by the transform unit 340 and subsequent operations. A further technique involving applying a so-called sample adaptive offset (SAO) filter may also be used. In general terms, in a sample adaptive offset filter, filter parameter data (derived at the encoder and communicated to the decoder) defines one or more offset amounts to be selectively combined with a given intermediate video sample (a sample of the signal 460) by the sample adaptive offset filter in dependence upon a value of:(i) the given intermediate video sample; or (ii) one or more intermediate video samples having a predetermined spatial relationship to the given intermediate video sample.
[0073] Also, an adaptive loop filter is optionally applied using coefficients derived by processing the reconstructed signal 460 and the input video signal 300. The adaptive loop filter is a type of filter which, using known techniques, applies adaptive filter coefficients to the data to be filtered. That is to say, the filter coefficients can vary in dependence upon various factors. Data defining which filter coefficients to use is included as part of the encoded output data-stream. The filtered output from the loop filter unit 565 in fact forms the output video signal 480 when the apparatus is operating as a decompression apparatus. It is also buffered in one or more image or frame stores 570; the storage of successive images is a requirement of motion compensated prediction processing, and in particular the generation of motion vectors. To save on storage requirements, the stored images in the image stores 570 may be held in a compressed form and then decompressed for use in generating motion vectors. For this particular purpose, any known compression I decompression system may be used. The stored images may be passed to an interpolation filter 580 which generates a higher resolution version of the stored images; in this example, intermediate samples (sub-samples) are generated such that the resolution of the interpolated image is output by the interpolation filter 580 is 4 times (in each dimension) that of the images stored in the image stores 570 for the luminance channel of 4:2:0 and 8 times (in each dimension) that of the images stored in the image stores 570 for the chrominance channels of 4:2:0. The interpolated images are passed as an input to the motion estimator 550 and also to the motion compensated predictor 540.
[0074] The way in which an image is partitioned for compression processing will now be described. At a basic level, an image to be compressed is considered as an array of blocks or regions of samples. The splitting of an image into such blocks or regions can be carried out by a decision tree, such as that described in SERIES H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audio-visual services - Coding of moving video High efficiency video coding Recommendation ITU-T H.265 12 / 2016. Also: High Efficiency Video Coding (HEVC) algorithms and Architectures, Editors: Madhukar Budagavi, Gary J. Sullivan, Vivienne Sze; chapter 3; ISBN 978-3-319-06894-7; 2014 which are incorporated herein in their respective entireties by reference.
[0075] In some examples, the resulting blocks or regions have sizes and, in some cases, shapes which, by virtue of the decision tree, can generally follow the disposition of image features within the image. This in itself can allow for an improved encoding efficiency because samples representing or following similar image features would tend to be grouped together by such an arrangement. In some examples, square blocks or regions of different sizes (such as 4x4 samples up to, say, 64x64 or larger blocks) are available for selection. In other example arrangements, blocks or regions of different shapes such as rectangular blocks or arrays (for example, vertically or horizontally oriented) can be used. Other non-square and non- rectangular blocks are envisaged. The result of the division of the image into such blocks or regions is (in at least the present examples) that each sample of an image is allocated to one, and only one, such block or region.
[0076] Transform-skip mode
[0077] Figure 9 schematically illustrates a so-called transform-skip mode. In this mode, blocks of samples, for example rectangular encoding blocks or arrays of samples such as so-called transform units (Tils) are assigned a ‘transform-skip’ mode indicator, for example by a part of the functionality of the controller 343. When the transform-skip indicator is set, as shown by the schematic bypass path 900 in Figure 9, the transform unit 340 (in the encoding path) and the inverse transform unit 430 (in the decoding path of the encoding side or in a decoder) is bypassed so that no spatial frequency transform is applied to the samples in that particular block.
[0078] The transform-skip mode is selectable by the controller 343, alongside a possible selection, of, DCT, DST or another transform mode, in dependence upon properties of the block in question, properties of nearby blocks, trial (full or partial) encodings or the like. Generally, the aim of the selection algorithm executed by the controller 343 is to improve the efficiency of the encoding of the block in question.
[0079] In some previously proposed example arrangements, transform-skip mode was restricted to 4x4 block sizes or smaller. In more recent examples, this restriction has been relaxed and the transform-skip mode can be selectively applied to larger blocks. The transform-skip mode can be applied to a Til even when the Til is actually processed as multiple (smaller) sub-TUs.
[0080] Figures 10a and 11a schematically illustrate respective scanning directions, with Figure 10a providing an example applicable to a 4x4 transform-skip block and Figure 11a providing an example applicable to a so-called transform block, which is to say a block for which transform-skip mode was not enabled and so the block has undergone a spatial frequency transform (or more than one frequency transform) by the transform unit 340 during encoding.
[0081] Referring to Figure 10a, in the case of transform-skip blocks, the scan order is in this example a diagonal order from the top left (“1”) to lower right (“16”). In contrast, as shown in Figure 11a, in the case of a transform block (as an example of an encoding block) the scan order is a diagonal order from the lower right to top left. Note that the scan order in use makes little substantive difference to the techniques to be discussed below other than in terms of which coefficients or samples are available “already encoded” or “already decoded” for use in the derivation of encoding parameters for subsequent samples or coefficients.
[0082] In the case of larger blocks, a similar scan order can be used, or sub-blocks of (for example) 4x4 coefficients such as sub-TUs can be scanned as shown, with a predetermined pattern being used to scan each sub-block in order.
[0083] In general terms, the blocks of samples or coefficients may be considered as groups of data values (or, once encoded, groups of encoded data values), each having an associated encoding order (in other words, the scan order as illustrated by the examples of Figures 10a and 11a). Referring to Figures 10b and 11 b, in at least some examples of processing to be discussed below, reference is made to samples or coefficients (which may for convenience be referred to below by the single generic term “coefficients” even in the case of transformskip blocks) which have been encoded or decoded before encoding or decoding of a given coefficient 1000, 1100. In the case of transform-skip, the previously handled coefficients relevant to at least some of the techniques discussed below will be coefficients in a predetermined grouping or pattern as shown in shaded form (one box for each coefficient), which are above and left of the given coefficient 1000. In the case of non-transform-skip operation, a similar predetermined pattern or grouping is used but here the previously handled coefficients relevant to at least some of the techniques discussed below are coefficients (shown shaded) below and to the right of the given coefficient 1100. As mentioned, these coefficients will be referred to by at least some techniques below. If any coefficient in the relevant shaded group is unavailable, for example because it would fall into another block or a not-yet encoded or not-yet-decoded block, that coefficient is simply omitted from the respective process and where necessary, the result of the process may be normalised to the reduced number of coefficients. (For example, normalisation is relevant to a process deriving a mean of the shaded coefficients but is not relevant to a process detecting a maximum or minimum of the shaded coefficients).
[0084] Luma and Chroma PSNR
[0085] As explained with reference to the encoding apparatus of Figure 7, during the encoding process a quantizer (such as quantizer 350) performs a quantization process. Various quantization techniques are known in the field of video data compression, ranging from a simple multiplication by a quantization scaling factor through to the application of complicated lookup tables under the control of a quantization parameter.
[0086] In some examples, the quantization is applied to transform coefficients of each transformed block of image data. However, in other examples (such as the aforementioned transform-skip mode) the quantization may be applied without application of a transform.
[0087] In some examples, the strength of the quantization may be set through use of a quantization parameter (“QP”). The strength of quantization will affect the quality and bitrate of the encoded video.
[0088] In general, for a lower value of QP, the quality of the encoded video is higher. However, with a lower value of QP, the encoded video will consume more bits. On the other hand, a higher value of QP will result in an encoded video that consumes fewer bits. However, the quality of the encoded video will be lower.
[0089] In examples, a quantizer step size is derived from the quantization parameter.
[0090] The quantization parameter is therefore an example of an encoding parameter which can be used by an encoder during the encoding process. In some examples, an image to be encoded may be provided in YCbCr format. Accordingly, examples of the present disclosure are described with reference to syntax elements and operations for colour components in a YCbCr format. However, examples of the present disclosure can be applied to other luma / chroma formats. More generally, an image may have a primary component (e.g. luma) and one or more secondary components (e.g. one or more chroma components). Alternatively, in some examples, an image may be applied to other colour formats. For example, embodiments of the present disclosure may be applied to images with a colour format such as RGB. Here, the image may have a primary component (e.g. G) and one or more secondary components (e.g. R and B).
[0091] Consider now Figure 12 of the present disclosure. Figure 12 of the present disclosure schematically illustrates a plot of peak signal-to-noise ratio difference between luma and chroma for a VTM encoding of a number of images.
[0092] That is, in Figure 12, peak signal-to-noise ratio (PSNR) has been generated independently for luma and chroma for a codec (here, the VVC (Versatile Video Codec) test model (VTM)) at different QP test values (QP test values of 22, 27, 32 and 37 in this example). This has been calculated for a number of different test images at these different quantization parameters. The difference between the luma and chroma PSNR (Cr-Y in red, Cb-Y in blue) is shown on the y-axis of Figure 12, for a VTM encoding of a number of images (on the x-axis) at the different QP test values (22, 27, 32 and 37).
[0093] As can be seen from Figure 12, for a given level of quantization (i.e. a given quantization parameter) a different compression quality may be achieved for luma components of the image compared to chroma components of the image.
[0094] Specifically, it can be seen in Figure 12 that for the same QP value, there is significant difference between chroma PNSR and luma PSNR. As such, there is a discrepancy between the compression quality of the luma and chroma components of an image for the same level of quantization. This discrepancy can be seen for both Cr and Cb chroma components (shown in red and blue in Figure 12 respectively).
[0095] Indeed, in general, the PSNR for chroma is higher than the PSNR for luma for the same QP value. However, the difference between luma and chroma PSNR varies for different images (shown on the x-axis) of Figure 12.
[0096] Quantization offset parameters can be used in order to adjust the luma / chroma balance. In VVC, for example, QP offset parameters such as CbQpOffset and CrQpOffset can be used in order to adjust the luma / chroma balance for Cb and Cr chroma components respectively. Alternatively or in addition, a number of other quantization offset parameters such as LMCSOffset can also be used in order to adjust the luma / chroma balance for quantization. LMCS is Luma Mapping with Chroma Scaling which is a process that maps luma samples to particular values and in some cases applies a scaling operation to the value of chroma samples.
[0097] Thus, one or more quantization offset parameters can be used in order to adjust the quantization relationship between a primary and one or more secondary components.
[0098] However, while these quantization offset parameters can be used in order to adjust the luma / chroma balance for an encoding process, there is a problem in that the difference between the compression quality of the luma and chroma components of an image may vary depending the image being encoded. Consider, again, Figure 12 of the present disclosure. Here, it can be seen that the difference between luma and chroma PSNR is different for different images (i.e. shows strong variation along the x-axis). Therefore, it is difficult to set quantization offset parameters for an encoding process in order to ensure balance between the compression quality of the luma and chroma components.
[0099] It is an aim of the present disclosure to address this issue.
[0100] Content Adaptive Adjustment of Quantization Parameters
[0101] The variation of the difference between the luma and chroma PSNR for different images (as described with reference to Figure 12 of the present disclosure) can be attributed to difference in the content of those images. For example, certain images may have certain features which result in the image being relatively easier or relatively more difficult to encode for a first component (e.g. luma) compared to a second component (e.g. chroma).
[0102] As an example, a certain image in a series of images to be encoded may have certain features which are difficult to encode in luma. However, those same features may not necessarily be difficult to encode in chroma. For the same level of quantization, the compression quality of the chroma component is therefore likely to be higher. In this case, a quantization offset parameter can be used in order to reduce the difference between the compression quality of the luma and chroma components. That is, a stronger level of quantization could be applied to the chroma components than the luma components of the image. This means that fewer bits would be required to encode the chroma components (stronger level of quantization) in order to achieve the same compression quality as for the luma component of the image.
[0103] However, a second, different, image of that series of images to be encoded may have certain features which are more difficult to encode in chroma than in luma. Accordingly, if the same quantization offset parameter is used for the second image as used for the first image, the balance between the compression quality of the luma and chroma components of the image may not be optimized.
[0104] While the variation between the compression quality of luma and chroma components has been described for different images, it will be appreciated that variation in compression quality of luma and chroma components may also be observed across different regions within an image. For example, a first region of an image may be relatively quite difficult to encode in chroma (compared to luma), while a second, different, region of the image may be relatively less difficult to encode in chroma (compared to luma). Therefore, use of a single quantization offset parameter for an entire image may lead to variation in compression quality between the luma and chroma components across the image.
[0105] Accordingly, the inventors have realized that by analyzing the chroma and luma complexity of the image, an automatic adjustment of the quantization offset parameter can be made, thus improving the balance between the compression quality of the luma and chroma components.
[0106] As such, a data encoding method is provided in accordance with embodiments of the disclosure. Figure 13 of the present disclosure schematically illustrates an encoding method in accordance with the present disclosure.
[0107] The data encoding method comprises: generating (in step S1300) one or more encoding parameters; communicating (in step S1302) the one or more encoding parameters for use by a decoding process; and encoding (in step S1304) data items representing image data samples of an image region to be encoded in dependence upon the one or more encoding parameters which have been calculated.
[0108] Figure 14 of the present disclosure schematically illustrates an encoding method in accordance with the present disclosure. In particular, Figure 14 describes the generating step S1300 of Figure 13 in more detail. That is, Figure 14 illustrates a number of sub-steps which are performed during the step S1300 of Figure 13.
[0109] In the data encoding method of Figure 14, the one or more encoding parameters include at least one quantization parameter to vary a quantization relationship between a primary and one or more secondary components for the image region, and the at least one quantization parameter is generated by: generating (in step S1400), for each of the primary component and the one or more secondary components, residual data for image data samples in the image region, the residual data indicative of a difference between the image data sample and a predicted version of that image data sample; determining (in step S1402) a complexity measure of the primary component and a complexity measure of each of the one or more secondary components in the image region in dependence upon the residual data that has been generated for the primary and the one or more secondary components respectively, wherein the complexity measure of the primary component and the complexity measure of the one or more secondary components are indicative of the energy in the image region; and generating (in step S1404) the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the complexity measure of the one or more secondary components which have been determined. The encoding method described with reference to Figures 13 and 14 may be performed by the apparatus described above, for example at least in part by the controller 343 (in respect of the steps S1300 and S1302) or the encoding apparatus described with reference to Figure 7 and other drawings (the step S4120).
[0110] A data encoding apparatus configured to perform this data encoding method and a computer program which, when implemented by a computer, causes the computer to perform this data encoding method are also provided in accordance with embodiments of the disclosure.
[0111] Furthermore, in some examples a video data capture, transmission, display and / or storage apparatus comprising the data encoding apparatus may be provided.
[0112] While embodiments of the disclosure are described with reference to data encoding, the present disclosure is not particularly limited in this regard. That is, a data decoding method, data decoding apparatus and a data decoding computer program capable of decoding data encoded by the encoding process of the present disclosure may also be provided.
[0113] In accordance with embodiments of the disclosure, automatic adjustment of the quantization point between luma and chroma can be performed. Accordingly, an adjustment to compensate for differences between the compression quality for luma and chroma components (arising from different characteristics of the luma and chroma components of an image) can be made, thus achieving a more even balance between PSNR for chroma and luma.
[0114] Further details of embodiments of the disclosure will now be described.
[0115] Residual Data
[0116] A compression and decompression apparatus of the present disclosure, for encoding and / or decoding image data representing one or more images, may include an image predictor 320 (as has been described with reference to Figures 7 and 8 of the present disclosure). Encoding image data involves predicting an image region for an image to be encoded and generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded.
[0117] If the predicted image were to be identical to the real image, the difference between the two (that is to say, the residual image) would contain zero information (zero energy) and would be very easy to encode into a small amount of encoded data.
[0118] If a real image is more complex, it will be harder for the predictor to predict the image region and the difference between the predicted image and the real image will increase. Accordingly, the residual image will contain more information (more energy) and it would be more difficult to encode the residual image into a small amount of encoded data. Residual image data (such as the difference between the real image and the predicted image) can therefore be used to determine a measure of the complexity of the image (described in more detail below), which can then be used for adjustment of the quantization offset parameter.
[0119] In the full encoding process performed by the encoder, the residual data is the difference between the input image and the prediction of the input image. However, generating the prediction of the input image can be complex and time-consuming (e.g. when using particular image predictions such as inter-image and intra-image predictions). Furthermore, in the full encoding process performed by the encoder, the residual data is calculated block by block. Thus, an average would only be available at the end of the image region (e.g. frame). Therefore, while residual data of the full encoding process can be used in order to obtain a measure of the complexity of the image, it is desirable that a more efficient method of estimating the residual data is provided (e.g. a method which can be used in parallel).
[0120] Accordingly, in embodiments of the disclosure, a relatively simple estimate of the residual data 330 may be generated by the video encoder as a pre-process. This relatively simple estimate of the residual data may then be used by the encoder to adjust the quantization offset parameter for the image (or image region) to be encoded. This provides an efficient way to calculate the quantization offset parameter for the image (or image region) to be encoded.
[0121] As an example, the relatively simple estimate of the residual data (described in more detail below) avoids complex calculations such as motion-based (inter) prediction, matrixbased intra prediction (MIP) and planar intra prediction. This relatively simple estimate of the residual data used in embodiments of the disclosure provides a simple estimate (or prediction) of the residual data which is close to the residual data obtained during a full encoding process performed by the encoder. Thus, it provides an efficient way to calculate the quantization offset parameter for the image (or image region) to be encoded).
[0122] In examples, the image region may be an entire image to be encoded. That is, in examples, the quantization parameter may be automatically adjusted on an image by image basis. In other examples, the quantization parameter may be adjusted less frequently (such as only for l-frames of a video sequence).
[0123] In other examples, the image region may only form part of an image to be encoded (such as a CTU, a tile, a slice, a sub-picture or the like). That is, in examples, the quantization parameter may be automatically adjusted for different regions within an image.
[0124] Consider, now, Figure 15 of the present disclosure. Figure 15 schematically illustrates an aspect of the generation of a residual estimation.
[0125] In the example of Figure 15, a region of an image is shown. The region of the image comprises a number of image data samples (such as image data sample 1500). An estimated predicted value for the image data sample 1500 may be taken to be a sample value 1502 above the sample 1500 or a sample value 1504 to the left of the sample 1500.
[0126] Thus, in some examples, the predicted version of the image data sample is an image data sample closest in value to the image data sample between either an adjacent image data sample to the left of the image data sample or an adjacent image data sample above the image data sample.
[0127] In some examples, one of the sample values 1502 or 1504 can be selected on a predetermined basis and used as the prediction so that the estimate of residual data corresponding to the sample 1500 is: residual = abs(value - pred)
[0128] Here, “value” represents the sample 1500, “pred” represents the sample used for the estimate of the prediction (i.e. either sample value 1502 or 1504 in this example) and the function “abs” denotes the absolute value.
[0129] More generally, an efficient estimate of the residual can be made from any but less than all of the angular prediction modes. In some embodiments, only those modes having an integer slope are used. This can avoid the need for interpolation. In some embodiments, a reduced number of angles for intra prediction are used instead of the full range of possible angles. As an example, 3 angles for intra prediction (such as above, left and above left) may be used instead of 65 possible angles in VVC.
[0130] Furthermore, in some examples, the predicted version of the image data sample is determined on the basis of two or more image data samples having a predetermined spatial relationship to the image data sample.
[0131] In another example, the prediction pred could be taken to be the mean of two or more samples having, for example, a predetermined spatial relationship to the sample 1500, for example as: pred = mean (value of 1502, value of 1504)
[0132] The set of sample values which are averaged to generate pred could include more than two sample values. The averaging process could be a weighted average so that, for example, the values of the samples 1502 and 1504 are weighted more heavily than values of other samples which are spatially further away from the sample 1500. The samples upon which the generation of pred is based could be displaced in any direction from the sample 1500 but in example arrangements they are displaced above and / or to the left of the sample 1500. The sample displaced above and / or to the left of the sample 1500 are generally the only available reconstructed samples (or blocks) when predicting the sample 1500. In examples (such as when predicting a single sample) the samples above right (e.g. sample 1506) or below left (e.g. 1508) to the sample 1500 may also be used, as they may have been used in the full (block based) intra angular prediction.
[0133] As previously explained, the relatively simple estimate of the present disclosure provides a prediction of the residuals; these predicted residuals can be used in the adjustment of the quantization offset parameter. Moreover, in some examples, as these predicted values are averaged over an area (i.e. the image region), these predicted values can provide a reliable estimate of the residuals for the area as would be obtained from a full encoding process even if small variations are observed between the predicted values and the full residuals for individual samples within that area.
[0134] In the case that any such sample is missing, for example because the location of the sample 1500 is adjacent one or more image edges, the prediction pred could be based upon one or more samples which are in fact present. In other examples, values of the estimated prediction pred could be generated for positions of the sample 1500 other than positions in the top row and / or leftmost column of samples.
[0135] In another example, multiple estimations could be generated and then the residual for that image data sample could be obtained by selecting amongst those estimations.
[0136] For example, for a set of predictions predl ... predN, where N > 1 , the derivation could be as follows: residual = min(abs(value - predl), abs(value - pred2),... abs(value - predN))
[0137] Here, "min” represents a minimum function. In this way, the best prediction (smallest residual) for the image data sample can be selected from amongst the multiple estimations which have been generated.
[0138] While the estimation of the predicted version and generation of the residual of the image data sample has been described with reference to a single image data sample (namely, image data sample 1500), it will be appreciated that this process can be performed for each of the image data samples in the image region to be encoded. That is, once the residual for image data sample 1500 has been generated, the residual for another image data sample in the image region can be generated in the same manner. Accordingly, residual data for the image data samples in the image region can be obtained.
[0139] Furthermore, in examples of the present disclosure, estimation of the predicted version of the image data sample and generation of the residual is performed independently for the primary component (e.g. the luma component of the image) and one or more secondary components of the image (e.g. one or more chroma components of the image (such as Cb and Cr)).
[0140] In this way, residual data for image data samples in the image region (indicative of a difference between the image data sample and a predicted version of that image data sample) can be generated for each of the primary component and the one or more secondary components of the image.
[0141] Complexity Measure
[0142] As has been described, a simple estimate of the predicted value may be generated for an image data sample. Then, using this simple estimate of the predicted value, the residual for that image data sample (i.e. the difference between the image data sample and the predicted value) may be generated. The size of the residual provides an indication of how close the predicted value of the image data sample is to the actual image data sample. The closer the predicted value is to the actual value of the image data sample, the smaller the residual will be. This means that it will be easier to encode the residual data into a small amount of encoded data.
[0143] The residual (or simple estimate of the residual) which has been generated may be different for different image data samples and different components of the image region.
[0144] Nevertheless, analysis of the residual data which has been generated for each of the image data samples within an image region to be encoded can therefore be used in order to determine the complexity of the primary component and the complexity of each of the one or more secondary components in the image region.
[0145] In some examples, for each of the primary component and the one or more secondary components, the complexity measure is an estimate of the magnitude of the residual data that has been generated for the primary and the one or more secondary components respectively.
[0146] For example, complexity of the luma component may be calculated as: complexity = sum Y
[0147] Here, the function sum is a function which computes the sum (total) of a set of values, and Y is the value of the residual which has been generated for a given image data sample (with the sum calculated over all image data samples in the image region). The sum of the residuals can be used to estimate the complexity because the relatively simple estimate of the residual used in the present disclosure is an absolute value. In the full encoding process, the residual is a signed value. However, the sign is not required for estimating the complexity.
[0148] The complexity measure provides an indication of the total energy in the image region in that image component. An image region with higher complexity in a given image component will contain more energy (more information) and will therefore be more difficult to encode into a small amount of encoded data as compared to an image region with lower complexity.
[0149] By analysing the complexity of the different components of the image for the image region, a comparison of the relative complexity of the image in the different components can be made (e.g. an assessment as to whether more information is contained within the luma component or the chroma component for that image region). This can then be used to automatically adjust the quantization parameters. Thus, in some examples, the estimate of the magnitude of the residual data is calculated as an absolute sum of the residual data that has been generated for the primary and the one or more secondary components respectively. That is, the residual data generated for all image data samples in the image region contribute to the determination of the complexity of the image region.
[0150] In other examples, the complexity of the image region (for a given image component) may be estimated using only a subset of the residual data which has been generated for the image region. For example, the complexity of the image region (in a given image component) can be determined using the residual data for one or more sample values which have been selected on a predetermined basis (e.g. a number of predetermined reference image data samples within the image region (such as image data samples 1500, 1502 and 1504 described with reference to Figure 15 of the present disclosure).
[0151] In other examples, the complexity of the image region (for a given image component) may be estimated using the residual data of only a single image data sample within the image region. Alternatively, the complexity of the image region (for a given image component) may be estimated using the mean of the residual data of two or more data samples within the image region.
[0152] Further alternatively, in some examples, the encoding method may comprise excluding residual values above a threshold value from the absolute sum of the residual data. That is, if the magnitude of the residual value for a given image data sample is above a certain threshold value, the residual value for that image data sample may be excluded from the determination of the complexity of that image region. Thus, only image data samples with a residual value lower than a predetermined threshold value will contribute to the calculation of the complexity for the image region.
[0153] More generally, a complexity measure of the image region (for each image component) can be determined in dependence upon the residual data which has been generated, with the complexity measure thus providing an indication of the energy in the image region in each of the image components.
[0154] Adaptation of the Quantization Parameter
[0155] As explained with reference to Figures 13 and 14, the data encoding method of the present disclosure further comprises generating the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the one or more secondary components.
[0156] That is, in embodiments of the disclosure, the relative complexity of the primary and one or more secondary components of the image for a given image region can be used in order to adjust the quantization point between the primary and one or more secondary components for that image region, thus compensating for the difference in compression quality between the different image components. In other words, the relative strength of quantization between the luma and chroma components can be adjusted.
[0157] In examples, the quantization offset parameter (used to adjust the quantization point between the primary and one or more secondary components) can be adjusted in accordance with a ratio of the complexity of the different image components in that image region.
[0158] Consider an example where the primary component is a luma component and the secondary component is a chroma component of the image. Here, the quantization offset parameter can be adjusted in accordance with the ratio of the complexity of the luma and chroma components of the image in that image region. This enables the compression quality for luma and chroma to be adjusted more appropriately.
[0159] In some examples, the quantization parameter may be adjusted using a linear model. In such an example, the quantization offset parameter may be calculated as: chroma QP = A - B*(sum C / sum Y)
[0160] Here, chroma QP is the quantization offset parameter, while A and B are constants. Furthermore, sum C is a sum of the residuals for image data samples in the image region for the chroma component (used as an estimate of the complexity of the chroma component in this example) while sum Y is a sum of the residuals for image data samples in the image region for the luma component (used as an estimate of the complexity of the luma component in this example).
[0161] While the sum of the residuals for the chroma and luma components is used as an estimate of the complexity in this example, the present disclosure is not particularly limited in this respect. More generally, a ratio of the complexity of the chroma and luma components can be used to adjust the quantization offset parameter (with the measure of complexity being calculated as has been previously described).
[0162] Furthermore, in some examples, separate complexity measures can be used for each colour component (e.g. Cr, Cb) so that each colour component has its own QP adjustment. Accordingly, in embodiments of the disclosure, the method comprises generating a quantization parameter for the Cb component and a quantization parameter for the Cr component.
[0163] Moreover, in examples, the adjustment of the quantization parameter can be performed by a video encoder (such as the video encoder described with reference to Figure 7 of the present disclosure) as a pre-process (i.e. before the full encoding process is performed).
[0164] In some examples, the value of the constant A may be 13, while the value of the constant B may be 62. More generally, the value of the constants A and B may be set depending on the image format (e.g. depending on whether 4:2:0, 4:2:2 or 4:4:4 chroma subsampling is used) and / or depending on whether the image content is standard dynamic range (SDR) or high dynamic range (HDR) image content.
[0165] As an example, chroma noise can be more (subjectively) visible than luma noise in video content with 4:2:0 sampling. In other words, at the same PSNR, chroma noise may (subjectively) be more visible than luma noise in a video with this chroma sub-sampling. Therefore, values of the constants A and B which are weighted towards a higher PSNR for chroma may be beneficial for video content with 4:2:0 sampling. That is, even though the quantization offset should be adjusted based on the relative complexity of the chroma and luma components in the image region, the adjustment should be made while weighting towards a higher PSNR for chroma in this case.
[0166] However, in video content with 4:4:4 sampling, the values of the constants A and B may be set for more equal balance between the PSNR for chroma and luma. That is, since video content with 4:4:4 sampling has no chroma subsampling, chroma noise may not be any more noticeable than luma noise at the same PSNR. Thus, the adjustment of the quantization offset parameter should be made such that average PSNR for chroma is the same as the average PSNR for luma.
[0167] Consider, now, Figure 16 of the present disclosure. Figure 16 schematically illustrates a plot of peak signal-to-noise ratio difference between luma and chroma with automatic quantization adjustment.
[0168] The plot of peak signal-to-noise ratio difference between luma and chroma shown in Figure 16 has been generated in the same way as the plot of peak signal-to-noise ratio difference between luma and chroma described with reference to Figure 12 of the present disclosure. Therefore, a detailed discussion of the generation of the plot of Figure 16 will not be repeated for brevity of disclosure. Nevertheless, it will be appreciated that the plot shown in Figure 16 of the present disclosure shows the difference between luma and chroma PSNR (Cr-Y in red, Cb-Y in blue) on the y-axis against for a number of images on the x-axis at the QP test values of 22, 27, 32 and 37.
[0169] However, in contrast to Figure 12, the data of Figure 16 has been generated with an encoding method which automatically adjusts the quantization offset between chroma and luma on the basis of the relative complexity of the chroma and luma components of the image region (i.e. using an encoding method such as that described with reference to Figures 13 and 14 of the present disclosure). Thus, for the example of Figure 16, automatic adjustment of the quantization parameter applied to the chroma component (relative to the quantization applied to the luma component) has been made.
[0170] It can be seen that the difference between chroma PSNR and luma PSNR is reduced when automatic adjustment of the quantization offset has been made (through comparison of Figure 12 with Figure 16 of the present disclosure). The example of Figure 16 of the present disclosure is for video with 4:2:0 chroma subsampling. Therefore, the adjustment has been made while still being weighted towards higher chroma PSNR. However, this could be adjusted, if required, to further reduce the difference between chroma PSNR and luma PSNR through adjustment of the constant values of the linear model used to calculate the adjusted quantization offset parameter.
[0171] An example of the invention provides:
[0172] A method comprising: compressing image data using a quantization parameter, the image data comprising luminance and chrominance information, generating a different quantization parameter for compressing chrominance information to that for luminance information in an image region by calculating a complexity value for the image region which is derived from a ratio of residual values predicted for the image region between at least some of the residual values for chrominance information and at least some of the residual values for luminance information for the image region.
[0173] An apparatus and computer program corresponding to this method are also within the scope of the disclosure.
[0174] In addition, embodiments of the present disclosure can be defined in accordance with the following numbered clauses:
[0175] 1 ) A data encoding method, comprising: generating one or more encoding parameters; communicating the one or more encoding parameters for use by a decoding process; and encoding data items representing image data samples of an image region to be encoded in dependence upon the one or more encoding parameters which have been calculated; wherein the one or more encoding parameters include at least one quantization parameter to vary a quantization relationship between a primary and one or more secondary components for the image region, and the at least one quantization parameter is generated by: generating, for each of the primary component and the one or more secondary components, residual data for image data samples in the image region, the residual data indicative of a difference between the image data sample and a predicted version of that image data sample; determining a complexity measure of the primary component and a complexity measure of each of the one or more secondary components in the image region in dependence upon the residual data that has been generated for the primary and the one or more secondary components respectively, wherein the complexity measure of the primary component and the complexity measure of the one or more secondary components are indicative of the energy in the image region; and generating the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the complexity measure of the one or more secondary components which have been determined.
[0176] 2) The method according to clause 1, wherein the primary component is a luma component and the one or more secondary components are chroma components.
[0177] 3) The method according to clause 2, wherein the one or more chroma components include a Cb and Cr component.
[0178] 4) The method according to clause 3, wherein the method comprises generating a quantization parameter for the Cb component and a quantization parameter for the Cr component.
[0179] 5) The method according to clause 2, wherein the quantization parameter defines an adjustment of a chroma quantization parameter.
[0180] 6) The method according to clause 5, wherein the quantization parameter is at least one of QpOffset and / or LMCSOffset.
[0181] 7) The method according to clause 2, wherein a chroma subsampling format of the image region to be encoded is at one of 4:2:0, 4:2:2 or 4:4:4.
[0182] 8) The method according to any preceding clause, wherein the predicted version of the image data sample is an image data sample closest in value to the image data sample between either an adjacent image data sample to the left of the image data sample or an adjacent image data sample above the image data sample.
[0183] 9) The method according to any preceding clause, wherein the predicted version of the image data sample is determined on the basis of two or more image data samples having a predetermined spatial relationship to the image data sample.
[0184] 10) The method according to any preceding clause, wherein, for each of the primary component and the one or more secondary components, the complexity measure is an estimate of the magnitude of the residual data that has been generated for the primary and the one or more secondary components respectively.
[0185] 11) The method according to clause 10, wherein the estimate of the magnitude of the residual data is calculated as an absolute sum of the residual data that has been generated for the primary and the one or more secondary components respectively.
[0186] 12) The method according to clause 11 , wherein the method comprises excluding residual values above a threshold value from the absolute sum of the residual data.
[0187] 13) The method according to any preceding clause, wherein the image region to be encoded is an image to be encoded. 14) The method according to any preceding clause, wherein the image region to be encoded is one of a coding tree unit, a tile, a slice or a sub-picture of an image to be encoded.
[0188] 15) The method according to any preceding clause, wherein generating the quantization parameter for the image region comprise use of a linear model.
[0189] 16) The method according to any preceding clause, wherein generating the quantization parameter for the image region includes calculating a ratio of the complexity measure of the primary component with the complexity measure of each of the one or more secondary components.
[0190] 17) The method according to clause 16, wherein the quantization parameter is a chroma quantization parameter calculated according to the equation: chromaQP = A - B*sumC / sumY wherein A is a constant, B is a constant, sumC is an absolute sum of the residual data for the secondary component and sumY is an absolute sum of the residual data for the primary component.
[0191] 18) The method according to clause 17, wherein A has a value of 13 and B has a value of 62.
[0192] 19) A computer program which, when implemented by a computer, causes the computer to perform the data encoding method of any preceding clause.
[0193] 20) An encoded data signal generated by the method of any preceding clause.
[0194] 21) A data encoding apparatus, comprising circuitry configured to: generate one or more encoding parameters; communicate the one or more encoding parameters for use by a decoding process; and encode data items representing image data samples of an image region to be encoded in dependence upon the one or more encoding parameters which have been calculated; wherein the one or more encoding parameters include a at least one quantization parameter to vary a quantization relationship between a primary and one or more secondary components for the image region, and, in order to generate the at least one quantization parameter, the circuitry is configured to: generate, for each of the primary component and the one or more secondary components, residual data for image data samples in the image region, the residual data indicative of a difference between the image data sample and a predicted version of that image data sample; determine a complexity measure of the primary component and a complexity measure of each of the one or more secondary components in the image region in dependence upon the residual data that has been generated for the primary and the one or more secondary components respectively, wherein the complexity measure of the primary component and the complexity measure of the one or more secondary components are indicative of the energy in the image region; and generate the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the complexity measure of the one or more secondary components which have been determined.
[0195] 22) A video data capture, transmission, display and / or storage apparatus comprising the encoding apparatus of clause 21.
[0196] 23) A data decoding method capable of decoding an encoded data signal generated by the method of any of clauses 1 to 18.
[0197] 24) A computer program which, when implemented by a computer, causes the computer to perform the data decoding method of clause 23.
[0198] 25) A data decoding apparatus comprising circuitry configured to be capable of decoding an encoded data signal generated by the data encoding apparatus of clause 21.
[0199] 26) A video data capture, transmission, display and / or storage apparatus comprising the decoding apparatus of clause 25.
[0200] In so far as embodiments of the disclosure have been described as being implemented, at least in part, by software-controlled data processing apparatus, it will be appreciated that a non-transitory machine-readable medium carrying such software, such as an optical disk, a magnetic disk, semiconductor memory or the like, is also considered to represent an embodiment of the present disclosure. Similarly, a data signal comprising coded data generated according to the methods discussed above (whether or not embodied on a non-transitory machine-readable medium) is also considered to represent an embodiment of the present disclosure.
[0201] It will be apparent that numerous modifications and variations of the present disclosure are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended clauses, the technology may be practised otherwise than as specifically described herein.
[0202] It will be appreciated that the above description for clarity has described embodiments with reference to different functional units, circuitry and / or processors. However, it will be apparent that any suitable distribution of functionality between different functional units, circuitry and / or processors may be used without detracting from the embodiments.
[0203] Described embodiments may be implemented in any suitable form including hardware, software, firmware or any combination of these. Described embodiments may optionally be implemented at least partly as computer software running on one or more data processors and / or digital signal processors. The elements and components of any embodiment may be physically, functionally and logically implemented in any suitable way. Indeed the functionality may be implemented in a single unit, in a plurality of units or as part of other functional units. As such, the disclosed embodiments may be implemented in a single unit or may be physically and functionally distributed between different units, circuitry and / or processors.
[0204] Although the present disclosure has been described in connection with some embodiments, it is not intended to be limited to the specific form set forth herein. Additionally, although a feature may appear to be described in connection with particular embodiments, one skilled in the art would recognize that various features of the described embodiments may be combined in any manner suitable to implement the technique.
[0205] Furthermore, in the present disclosure, the wording “in dependence upon” defines a relationship by which one value or parameter can be calculated from another value or parameter. That is, “A is calculated in dependence upon B” means that the value of B wholly or in part, directly or indirectly, contributes to a determination or calculation of A. Thus, when A is calculated in dependence upon B, A is at least in part based on a value of B or a value associated with B. Thus, the wording “in dependence upon” and “based on” may be used interchangeable within the present disclosure.
Claims
CLAIMS:1 . A data encoding method, comprising: generating one or more encoding parameters; communicating the one or more encoding parameters for use by a decoding process; and encoding data items representing image data samples of an image region to be encoded in dependence upon the one or more encoding parameters which have been calculated; wherein the one or more encoding parameters include at least one quantization parameter to vary a quantization relationship between a primary and one or more secondary components for the image region, and the at least one quantization parameter is generated by: generating, for each of the primary component and the one or more secondary components, residual data for image data samples in the image region, the residual data indicative of a difference between the image data sample and a predicted version of that image data sample; determining a complexity measure of the primary component and a complexity measure of each of the one or more secondary components in the image region in dependence upon the residual data that has been generated for the primary and the one or more secondary components respectively, wherein the complexity measure of the primary component and the complexity measure of the one or more secondary components are indicative of the energy in the image region; and generating the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the complexity measure of the one or more secondary components which have been determined.
2. The method according to claim 1, wherein the primary component is a luma component and the one or more secondary components are chroma components.
3. The method according to claim 2, wherein the one or more chroma components include a Cb and Cr component.
4. The method according to claim 3, wherein the method comprises generating a quantization parameter for the Cb component and a quantization parameter for the Cr component.
5. The method according to claim 2, wherein the quantization parameter defines an adjustment of a chroma quantization parameter.
6. The method according to claim 5, wherein the quantization parameter is at least one of QpOffset and / or LMCSOffset.
7. The method according to claim 2, wherein a chroma subsampling format of the image region to be encoded is at one of 4:2:0, 4:2:2 or 4:4:4.
8. The method according to claim 1 , wherein the predicted version of the image data sample is an image data sample closest in value to the image data sample between either an adjacent image data sample to the left of the image data sample or an adjacent image data sample above the image data sample.
9. The method according to claim 1 , wherein the predicted version of the image data sample is determined on the basis of two or more image data samples having a predetermined spatial relationship to the image data sample.
10. The method according to claim 1, wherein, for each of the primary component and the one or more secondary components, the complexity measure is an estimate of the magnitude of the residual data that has been generated for the primary and the one or more secondary components respectively.
11. The method according to claim 10, wherein the estimate of the magnitude of the residual data is calculated as an absolute sum of the residual data that has been generated for the primary and the one or more secondary components respectively.
12. The method according to claim 11, wherein the method comprises excluding residual values above a threshold value from the absolute sum of the residual data.
13. The method according to claim 1 , wherein the image region to be encoded is an image to be encoded.
14. The method according to claim 1 , wherein the image region to be encoded is one of a coding tree unit, a tile, a slice or a sub-picture of an image to be encoded.
15. The method according to claim 1 , wherein generating the quantization parameter for the image region comprise use of a linear model.
16. The method according to claim 1 , wherein generating the quantization parameter for the image region includes calculating a ratio of the complexity measure of the primary component with the complexity measure of each of the one or more secondary components.
17. The method according to claim 16, wherein the quantization parameter is a chroma quantization parameter calculated according to the equation: chromaQP = A - B*sumC / sumY wherein A is a constant, B is a constant, sumC is an absolute sum of the residual data for the secondary component and sumY is an absolute sum of the residual data for the primary component.
18. The method according to claim 17, wherein A has a value of 13 and B has a value of19. A computer program which, when implemented by a computer, causes the computer to perform the data encoding method of claim 1.
20. An encoded data signal generated by the method of claim 1.
21. A data encoding apparatus, comprising circuitry configured to: generate one or more encoding parameters; communicate the one or more encoding parameters for use by a decoding process; and encode data items representing image data samples of an image region to be encoded in dependence upon the one or more encoding parameters which have been calculated; wherein the one or more encoding parameters include a at least one quantization parameter to vary a quantization relationship between a primary and one or more secondary components for the image region, and, in order to generate the at least one quantization parameter, the circuitry is configured to: generate, for each of the primary component and the one or more secondary components, residual data for image data samples in the image region, the residual data indicative of a difference between the image data sample and a predicted version of that image data sample; determine a complexity measure of the primary component and a complexity measure of each of the one or more secondary components in the image region in dependence upon the residual data that has been generated for the primary and the one or more secondary components respectively, wherein the complexity measure of the primary component and the complexity measure of the one or more secondary components are indicative of the energy in the image region; and generate the at least one quantization parameter for the image region in dependence upon the complexity measure of the primary component and the complexity measure of the one or more secondary components which have been determined.
22. A video data capture, transmission, display and / or storage apparatus comprising the encoding apparatus of claim 21.
23. A data decoding method capable of decoding an encoded data signal generated by the method of claim 1.
24. A computer program which, when implemented by a computer, causes the computer to perform the data decoding method of claim 23.
25. A data decoding apparatus comprising circuitry configured to be capable of decoding an encoded data signal generated by the data encoding apparatus of claim 21.
26. A video data capture, transmission, display and / or storage apparatus comprising the decoding apparatus of claim 25.
Citation Information
Patent Citations
Method and apparatus for video coding
US20220385905A1
