Method and device for adaptively determining blending modes
Adaptive blending mode determination in video coding optimizes predictor accuracy and reduces complexity by considering block characteristics, enhancing coding efficiency and picture quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2025-01-07
- Publication Date
- 2026-07-16
AI Technical Summary
Existing video coding methods, such as OBIC, use a fixed number of angular and non-angular modes for blending, which do not consider the varying characteristics of different coding blocks, leading to inefficiencies in coding efficiency and complexity.
Adaptive determination of blending modes by counting angular mode occurrences, selecting candidate modes based on block parameters, determining weights, and performing blending operations to optimize predictor accuracy and reduce complexity.
Improves coding efficiency by reducing bitrate and enhancing picture quality while minimizing computational complexity on both encoder and decoder sides.
Smart Images

Figure CN2025071115_16072026_PF_FP_ABST
Abstract
Description
METHOD AND DEVICE FOR ADAPTIVELY DETERMINING BLENDING MODESTECHNICAL FIELD
[0001] The present invention relates to the field of video encoding and decoding, more particularly to a method and a device of adaptively determining blending modes.BACKGROUND
[0002] Video coding (video encoding and decoding) is widely used in digital video applications such as broadcast digital television, video distribution over the internet and mobile networks, real-time conversational applications such as video conferencing, video chat and, DVD and blu-ray discs, and security applications for camcorders.
[0003] With the development of block-based video coding in the h. 261 standard, video coding standards including MPEG-1 video, MPEG-2 video, ITU-T H. 262 / MPEG-2, ITU-T H. 263, ITU-T H. 264 / MPEG-4 part 10 advanced video coding (Advanced Video Coding, AVC) , ITU-T H. 265 / high efficiency video coding (High Efficiency Video Coding, HEVC) , and extensions of such standards, such as scalability and / or 3D (wireless-dimension) extensions have evolved. As video creation and use becomes more widespread, video traffic becomes the biggest burden on communication networks and data storage. One of the goals of most video coding standards is therefore to reduce the bit rate without sacrificing picture quality compared to previous standards.
[0004] In the traditional motion-based intra-prediction, a coding block is reconstructed by combining the residuals with a prediction block generated from the reference blocks. This is also called motion compensation. In general, coding efficiency is related to the similarity between the coding block and the prediction block, which implies the distortion level.
[0005] Occurrence-based intra coding (OBIC) derives the intra prediction modes of the current block based on the sample-wise occurrence of the intra modes in the spatial neighborhood of the block. The OBIC method uses the Histogram of Occurrence (HoO) , which consists of the intra modes and their sample-wise occurrences. For this mode, adjacent and non-adjacent spatial neighboring blocks are checked and the intra prediction modes of the blocks are collected to build the occurrence histogram. The occurrences are calculated based on the number of samples that are coded in a certain intra prediction mode in that neighborhood. Several modes with the highest occurrence are selected from the histogram and used for final prediction by blending the prediction of the selected modes.
[0006] The existing OBIC design uses a predefined number of angular modes with a predefined non-angular mode to generate the final predictor. This approach can have various issues and restrictions in terms of the accuracy of the blended predictor and the coding complexity introduced by this tool. A predictor is expected to be as similar to the coding block as possible, and the accuracy of the blended predictor can be interpreted as the similarity between a predictor and the corresponding coding block, which can be measured by well-known metrics, such as Sum of Squared Difference (SSD) and Sum of Absolute Difference (SAD) .
[0007] The origin intention of OBIC-like methods is to save the bits used to indicate the mode index. In other words, they make the mode be implicitly derived both from the encoder side and decoder side following the same manner. Then, in the developing process of these tools, it is found that a blending of several high probable modes rather than one single mode can achieve better coding efficiency. However, the number of modes is fixed for all blocks, and does not consider the different characteristics among different coding blocks. Hence, there is still room for the improvement of coding efficiency.
[0008] The usage of a non-angular mode in OBIC is quite empirical. Considering different characteristics among coding blocks, whether to use a non-angular mode for blending is still a question that need to be further explored. Reasonable usage of the non-angular mode will be helpful to the coding efficiency. On the contrary, inappropriate blending with a non-angular mode may lead to degradation on coding efficiency and extra coding complexity on blending.SUMMARY
[0009] An object of the present disclosure is to propose a method and a device for making the blending process more adaptive to different coding blocks, which can solve issues in the prior art and / or other issues.
[0010] In a first aspect of the present disclosure, a method of adaptively determining blending modes applied to a video decoder is proposed. The method includes: counting occurrences of angular modes of a current coding block associated with samples in reconstructed block in a neighborhood of the current coding block to derive a Histogram of Occurrence (HoO) of the current coding block; selecting a plurality of candidate angular modes with the most occurrences from the angular modes according to a parameter of the current coding block; selecting angular modes for blending from the plurality of candidate angular modes based on a first condition; determining weights of the angular modes for blending; and performing blending operation for the current coding block by employing the angular modes for blending according to the weights.
[0011] In a second aspect of the present disclosure, a video decoder is configured to perform the above methods.
[0012] In a third aspect of the present disclosure, a non-transitory machine-readable storage medium has stored thereon instructions that, when executed by a computer, cause the computer to perform the above method.
[0013] In a fourth aspect of the present disclosure, a chip includes a processor, configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the above method.
[0014] In a fifth aspect of the present disclosure, a computer readable storage medium, in which a computer program is stored, causes a computer to execute the above method.
[0015] In a sixth aspect of the present disclosure, a computer program product includes a computer program, and the computer program causes a computer to execute the above method.
[0016] In a seventh aspect of the present disclosure, a computer program causes a computer to execute the above method.
[0017] In contrast to prior art, the present disclosure proposes a method of adaptively determining blending modes applied to a video decoder. The method includes: counting occurrences of angular modes of a current coding block associated with samples in reconstructed block in a neighborhood of the current coding block to derive a Histogram of Occurrence (HoO) of the current coding block; selecting a plurality of candidate angular modes with the most occurrences from the angular modes according to a parameter of the current coding block; selecting angular modes for blending from the plurality of candidate angular modes based on a first condition; determining weights of the angular modes for blending; and performing blending operation for the current coding block by employing the angular modes for blending according to the weights.
[0018] The first aspect is that the invention can improve the coding efficiency. The most appropriate number of the modes to be blended is unlikely to be a fixed number for each induvial coding blocks. Blending more or less modes rather than the best number of modes may reduce the similarity between the final predictor and the coding block. Lower similarity means poor prediction performance and more significant residuals. Finally, more bits will be required to encode the signals and affect the coding efficiency. Moreover, not only the adaption of blending modes, but also all the other innovation points in this invention aim to produce a better predictor for final prediction. From the perspective of bitrate and picture quality, the invention can reduce the bitrate and improve the picture quality. As to the bitrate reduction, more accurate prediction leads to smaller residuals, and therefore less numbers of bits required to be transferred from an encoder to a decoder. As the invention improves the accuracy of prediction and thus prediction provides better Peak signal-to-noise ratio (PSNR) as compared with the prior art, picture quality can be improved at the same time.
[0019] The other aspect is that the invention can reduce the coding complexity both on the encoder side and decoder side. By excluding some less significant angular modes, and / or the non-angular mode for blending, the complexity consumed by the blending operation will be reduced, which involves sample-wise multiplication operation and is computationally intensive. As blending is required on both the encoder side and the decoder side, the coding complexity of the encoder and the decoder can be reduced simultaneously.BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to illustrate the embodiments of the present disclosure or related art more clearly, the following figures will be described in the embodiments are briefly introduced. It is obvious that the drawings are merely some embodiments of the present disclosure, a person having ordinary skill in this field can obtain other figures according to these figures without paying the premise.
[0021] FIG. 1 is a block diagram illustrating a video encoding and decoding system according to an embodiment of the present disclosure.
[0022] FIG. 2 illustrates a block diagram of a video encoder depicted in FIG. 1.
[0023] FIG. 3 illustrates a block diagram of a video decoder depicted in FIG. 1.
[0024] FIG. 4 illustrates a flow chart of a method of adaptively determining blending modes applied to a video decoder according to an embodiment of the present disclosure.
[0025] FIG. 5 illustrates 67 intra prediction modes supported by VVC according to an embodiment of the present disclosure.
[0026] FIG. 6 illustrates a flow chart of a method of adaptively determining blending modes applied to a video decoder according to another embodiment of the present disclosure.
[0027] FIG. 7 illustrates a flow chart of a step S605 applied to a video decoder according to an embodiment of the present disclosure.
[0028] FIG. 8 illustrates a flow chart of a step S605 applied to a video decoder according to another embodiment of the present disclosure.
[0029] FIG. 9 is an example of a computing device according to an embodiment of the present disclosure.DETAILED DESCRIPTION OF EMBODIMENTS
[0030] Embodiments of the present disclosure are described in detail with the technical matters, structural features, achieved objects, and effects with reference to the accompanying drawings as follows. Specifically, the terminologies in the embodiments of the present disclosure are merely for describing the purpose of the certain embodiment, but not to limit the disclosure.
[0031] Video coding refers to the processing of a sequence of images that form a video sequence. Video coding includes video encoding and video decoding. Video encoding is performed on the source side, involving compressing the original video image to reduce the amount of data needed to represent the video image (for more efficient storage and / or transmission) . Video decoding is performed on the destination side, involving inverse processing with respect to the encoder to reconstruct the video image.
[0032] For lossless video coding, the original video image may be reconstructed, i.e., the reconstructed video image has the same quality as the original video image. For lossy video coding, further compression (e.g., by quantization) is performed to reduce the amount of data representing video images that cannot be fully reconstructed at the decoder. That is, the quality of the reconstructed video images is lower or worse than the quality of the original video images.
[0033] Each picture of a video sequence is divided into a set of non-overlapping blocks. At the encoder, video is encoded by using intra-picture prediction and / or inter-picture prediction to generate a prediction block, subtracting the prediction block from a current coding block to obtain a residual block, transforming the residual block in the transform domain and quantizing the residual block to reduce the amount of data to be transmitted (compression) . At the decoder, inverse processing with respect to the encoder is applied to the encoded block or compressed block to reconstruct the current coding block for presentation. Furthermore, the encoder replicates the decoder processing loop so that both will generate the same predictions (e.g., intra-picture prediction and inter-picture prediction) and reconstructions to process the subsequent block.
[0034] As used in the present disclosure, the term “video coder” refers to both video encoders and video decoders. Similarly, the terms “video coding” or “coding” may refer to video encoding or video decoding. The term "picture" , the term "frame" or "picture" may be used as synonyms in the field of video coding. It should be assumed that techniques described with reference to coding may be performed by either a video encoder or a video decoder. In some portions of this application, certain techniques may be described with reference to video decoding or to a video decoder. It should not be assumed, however, that such techniques are not applicable to video encoding or may be not be performed by a video encoder. Such techniques may, for example, be performed as part of determining how to encode video data or may be performed as part of a video decoding loop in a video encoder. As used in this disclosure, the term “current coding block” refers to a block currently being coded, as opposed to a block that is already coded or yet to be coded. Similarly, a current coding unit (CU) , prediction unit (PU) , or transform unit (TU) , refers to a coding unit, prediction unit, or transform unit that is currently being coded.
[0035] FIG. 1 is a block diagram illustrating a video encoding and decoding system 1 according to an embodiment of the present disclosure. As shown in FIG. 1, the video encoding and decoding system 1 includes a source device 10 that provides encoded video data to be decoded by a destination device 200. In particular, the source device 10 provides the video data to the destination device 200 via a direct communication link (e.g., a direct wired connection or a wireless connection) or any type of network (e.g., a wired network or a wireless network or any combination thereof, or any type of private and public networks, or any combination thereof) .
[0036] The source device 10 and the destination device 200 may be a wide range of devices such as desktop computers, notebook computers, mobile phones, tablet computers, display devices, televisions, cameras, digital media players, video gaming consoles, video streaming device. The source device 10 and the destination device 200 may be equipped for wireless communication. Thus, the source device 10 and the destination device 200 may be wireless communication devices. The source device 10 is a video encoding device for encoding video data. The destination device 200 is a video decoding device for decoding video data.
[0037] As illustrated in FIG. 1, the source device 10 includes a video source 102, a memory 104 configured to store video data, a video encoder 110, and an output interface 108. The destination device 200 includes an input interface 208, a memory 204 configured to store encoded video data, a video decoder 220, and a display device 202. According to the embodiment of the present disclosure, the video encoder 110 of the source device 10 and the video decoder 220 of the destination device 200 may be configured to classify, by processing circuitry, luma samples of a neighboring luma block of a reference block and luma samples of a neighboring luma block of a current coding block into a plurality of groups, deriving, by the processing circuitry, one or more local illumination compensation parameters for each group of the plurality of groups to generate a plurality of local illumination compensation parameters for the current coding block, deriving, by the processing circuitry, a plurality of linear models between the neighboring luma block of the reference block and the neighboring luma block of the current coding block using the plurality of local illumination compensation parameters for the current coding block, and generating, by the processing circuitry, a prediction block using the plurality of linear models. Thus, the source device 10 is a video encoding device, while destination device 200 is a video decoding device.
[0038] In other examples, the source device 10 and the destination device 200 include other components or arrangements. For example, the source device 10 may receive video data from an external video source, such as an external camera. The destination device 200 may interface with an external display device, rather than including an integrated display device.
[0039] The system 10 is merely one example. Techniques for processing video data may be performed by any digital video encoding and / or decoding device. Although generally the techniques of this disclosure are performed by a video encoding device, the techniques may also be performed by a video encoder / decoder, typically referred to as a “CODEC. ” The source device 10 and the destination device 200 are merely examples of such coding devices in which the source device 10 generates coded video data for transmission to the destination device 200. In some embodiments, the source device 10 and the destination device 200 may operate in a substantially symmetrical manner such that each of the source device 10 and the destination device 200 include video encoding and decoding components. Hence, the system 1 may support one-way or two-way video transmission between the source device 10 and the destination device 200, e.g., for video streaming, video playback, video broadcasting, or video telephony.
[0040] The video source 102 of the source device 10 may include a video capture device, such as a video camera, a video archive containing previously captured video, and / or a video feed interface to receive video data from a video content provider. The video source 102 may generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. The source device 10 may comprise one or more data storage media (e.g., memory 104) configured to store the video data. The techniques described in this disclosure may be applicable to video coding in general, and may be applied to wireless and / or wired applications. In each case, the captured, pre-captured, or computer-generated video may be encoded by the video encoder 110. The output interface 108 may be used, for example, to package the encoded image data into a suitable format (e.g., packets) and / or to process the encoded image data for transmission over a communication link or network using any type of transmission encoding or processing.
[0041] The input interface 208 (e.g., a receiver) forms a corresponding part of the output interface 108 and may be used to receive the transmitted data and to process the transmitted data using any type of corresponding transmission decoding or processing and / or unpacking to obtain the encoded image data.
[0042] In some embodiments, encoded data may be output from output interface 108 to a storage device. Similarly, encoded data may be accessed from the storage device by input interface. The storage device may include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data. In a further example, the storage device may correspond to a file server or another intermediate storage device that may store the encoded video generated by source device 10. The destination device 200 may access stored video data from the storage device via streaming or download. The file server may be any type of server capable of storing encoded video data and transmitting that encoded video data to the destination device 200. Example file servers include a web server (e.g., for a website) , an FTP server, network attached storage (NAS) devices, or a local disk drive. The destination device 200 may access the encoded video data through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection) , a wired connection (e.g., DSL, cable modem, etc. ) , or a combination of both that is suitable for accessing encoded video data stored on a file server. The transmission of encoded video data from the storage device may be a streaming transmission, a download transmission, or a combination thereof.
[0043] The techniques may be applied to video coding in support of any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet streaming video transmissions, such as dynamic adaptive streaming over HTTP (DASH) , digital video that is encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications. In some embodiments, system 1 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
[0044] The input interface 208 may be configured to receive encoded video data. The memory 204 may be configured to store encoded video data, such as encoded video data (e.g., a bitstream) received by the input interface 208. The display device 202 displays the decoded video data to a user, and may comprise any of a variety of display devices such as a liquid crystal display (LCD) , an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (liquid crystal on silicon, LCoS) , a digital light processor (digital light processor, DLP) , or another type of display device.
[0045] The video encoder 110 and video decoder 220 each may be implemented as any of a variety of suitable encoder circuitry, such as one or more microprocessors, digital signal processors (DSPs) , application specific integrated circuits (ASICs) , field programmable gate arrays (FPGAs) , discrete logic, software, hardware, firmware or any combinations thereof. When the techniques are implemented partially in software, a device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 110 and video decoder 220 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in a respective device.
[0046] In some embodiments, the video encoder 110 and video decoder 220 may operate according to a video coding standard developed by the video coding joint working group (joint collaboration team on video coding, JCT-VC) of the ITU-T video coding expert group (video coding experts group, VCEG) and the ISO / IEC moving picture expert group (motion picture experts group, MPEG) with reference to high-efficiency video coding (high-efficiency video coding, HEVC) or multi-function video coding (versatile video coding, VVC) . Those of ordinary skill in the art will appreciate that embodiments of the present invention are not limited to HEVC or VVC.
[0047] The image can be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be referred to as pixels. The number of samples in the horizontal and vertical directions of the array or image defines the size and / or resolution of the image. To represent color, three color components are employed, i.e., an image may be represented by or include three sample arrays. In RGB format or color space, the image includes corresponding arrays of red, green, and blue samples. However, in video coding, each pixel is typically represented by a luminance and chrominance format or color space, such as YCbCr, which includes a luminance component indicated by Y (sometimes replaced with L) and two chrominance components indicated by Cb and Cr. The luminance (or luma) component Y represents the luminance or gray-scale intensity (e.g., as in a gray-scale image) , while the two chrominance (or chroma) components Cb and Cr represent the chrominance or color information components. Accordingly, an image in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr) . The RGB formatted image may be converted or transformed to YCbCr format and vice versa. This process is also known as color conversion or conversion. If the image is monochromatic, the image may include only luminance sample values. Accordingly, for example, the image may be an array of luma samples in a monochrome format or one array of luma samples and two corresponding arrays of chroma samples in a 4: 2: 0, 4: 2: 2, and 4: 4: 4 color format.
[0048] Please refer to FIG. 2 illustrating a block diagram of a video encoder 110 illustrated in FIG. 1. The video encoder 110 includes multiple modules, including a block partitioning unit 1101, a transform and quantization unit 1102, an intra-frame estimation unit 1103, an intra-frame prediction unit 1104, a motion compensation unit 1105, a motion estimation unit 1106, an inverse transformation and inverse quantization unit 1107, a filter control analysis unit 1108, a filtering unit 1109, an encoding unit 1110, an encoded image buffer unit 1111, and a subtractor 1112.
[0049] Original video signals comprise video frames. Each video frame can be divided into blocks by a block partitioning unit 1101. These blocks may also be referred to as root blocks (root blocks) , macro blocks (H. 264 / AVC) , or coding tree blocks (coding tree block, CTB) or Coding Tree Units (CTU) (H. 265 / HEVC and VVC) . The block partitioning unit 1101 may be used to use the same block size for all images in the video sequence and to define a corresponding grid of block sizes, or to change the block sizes between images or groups or subsets of images and to divide each image into corresponding blocks. For each of the video frames, the subtractor 1112 generates residual pixel information of a residual frame by subtracting the video frame by prediction blocks output by the intra-frame prediction unit 1104 or the motion compensation unit 1105. The residual pixel information obtained after intra-frame prediction (motion compensation) , is transformed by the transformation and quantization unit 1102. The transformation includes transforming the residual pixel information from the pixel domain to a transform domain, and the resulting transform parameters are quantized to further reduce the bit rate. The intra-frame estimation unit 1103 performs intra-frame estimation, and the intra-frame prediction unit 1104 performs intra-frame prediction on the video reconstruction blocks. The intra estimation unit 1103 and the intra prediction unit 1104 are used to determine the optimal intra prediction direction (i.e., the target prediction direction) of the video reconstructed block. Motion estimation performed by the motion estimation unit 1106 is a process of generating a motion vector that can estimate the motion of the video reconstruction block, and then motion compensation is performed by the motion compensation unit 1105 based on the determined motion vector. After determining an intra-frame prediction mode, the intra-frame prediction unit 1104 provides selected intra-frame predicted data to the encoding unit 1110, and the motion estimation unit 1106 also sends calculated motion vector data to the encoding unit 1110. The inverse transform and inverse quantization unit 1107 reconstructs the video reconstruction blocks and reconstructs a residual block in the pixel domain, and the filtering unit 1109 is controlled by the filter analysis unit 1108 to remove the blocking artifacts in the reconstructed residual block, and the encoding unit 1110 adds the reconstructed residual block to the prediction block of the encoded image buffer unit 1111 to generate a reconstructed block. The encoding unit 1110 is used for encoding various encoding parameters and quantized transform parameters (quantized transform parameters) into bitstream, and outputs the bitstream of the video signals. The encoded image buffer unit 1111 is used for storing reconstructed blocks as the reference blocks for intra-frame prediction. As the video image encoding progresses, new reconstructed blocks are continuously generated, and these blocks may be stored in the encoded image buffer unit 1111.
[0050] Please refer to FIG. 3 illustrating a block diagram of a video decoder 220 as illustrated in FIG. 1. The video decoder 220 may include multiple modules comprising a decoding unit 2201, an inverse transform and inverse quantization unit 2202, an intra-frame prediction unit 2203, a motion compensation unit 2204, a filtering unit 2205, a decoded image buffer unit 2206, and a post filtering unit 2207.
[0051] The input signals of video frames are encoded by the video decoder 220 to obtain an output bitstream. The video decoder 220 transmits the bitstream to the video decoder 220. The video decoder 220 receives the bitstream representing the video frames in an encoded format (i.e., in a compressed format) . In the video decoder 220, the bitstream is processed by the decoding unit 2201 to obtain decoded transform parameters. The inverse transform and inverse quantization unit 2202 process the transform parameters to generate a residual block in the pixel domain. The intra-frame prediction unit 2203 is operable to generate an intra-frame prediction block for a current video decoding block based on a determined intra-frame prediction mode and data from previously decoded blocks of the current video frame or picture. The motion compensation unit 2204 determines the intra-frame prediction information for the current video decoding block and generates an intra-frame prediction block by parsing the motion vector and other associated syntax elements. Finally, the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 2202 and the corresponding prediction block generated by the intra-frame prediction unit 2203 or the motion compensation unit 2204. In order to improve video quality, the decoded video blocks are filtered through the filtering unit 2205 to remove blocking artifacts. The decoded video block is then stored in the decoded image buffer unit 2206 as the reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., to reproduce and reconstruct the original video signals. The output video can be optionally further processed by a post filtering unit 2207 for more suitable or enhanced viewing experiences.
[0052] An image includes multiple blocks each of which is a two-dimensional array or matrix of samples having intensity values (sample values) , but is smaller than the dimension of the image. The number of samples in the horizontal and vertical directions of the block defines the size of the block. That is, a block is an array of samples of M × N (M columns by N rows) . The block may comprise, for example, one sample array (e.g., a luminance array in the case of a monochrome image, or a luminance or chrominance array in the case of a color image) or three sample arrays (e.g., one luminance array and two chrominance arrays in the case of a color image) or any other number and / or variety of arrays, depending on the color format applied.
[0053] The video encoder 110 as shown in FIG. 2 may be used to encode the image on a block-by-block basis, e.g., encoding and prediction performed in each block. The video decoder 220 shown in FIG. 3 is used to divide and encode a picture by using slices (also referred to as video slices) , where a picture may be divided into or encoded using one or more slices (typically non-overlapping) , and each slice may include one or more blocks (e.g., CTUs) where each block may be rectangular.
[0054] The encoder 110 may be configured to select a reference block from a plurality of reference blocks in the same or different ones of a plurality of other pictures and to provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current coding block as intra-frame prediction parameters. This offset is also called Motion Vector (MV) .
[0055] The motion compensation unit 2204 is for receiving inter-prediction parameters and for performing inter-prediction based on the inter-prediction parameters to obtain the inter-prediction block. The motion compensation performed by the motion compensation unit 2204 may involve fetching or generating a prediction block based on the motion vector determined by the motion estimation, possibly performing interpolation of sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that may be used to encode an image block. Upon receiving a motion vector of a PU of a current coding block, the motion compensation unit 2204 may place a prediction block to which the motion vector points in one of the reference image lists.
[0056] In the implementation of the present disclosure, a function of prediction coding is to construct a predictive value of the current coding block by using the existing reconstructed picture in space or time during video encoding, and only transmit a difference value between an original value and the predictive value, to achieve the purpose of reducing the amount of transmitted data. In luma prediction, the original value and predictive value herein may be an original value and predictive value of luma. In chroma prediction, the original value and predictive value herein may be an original value and predictive value of chroma.
[0057] A function of intra prediction is to construct a predictive value of the current coding block using sample units in the above row and sample units in the left column which are neighboring to the current coding block. Each sample unit of the current coding block is predicted using the restored neighboring samples around the current coding block (i.e., the sample units in the above neighboring row and the sample units in the left neighboring column of the current coding block) .
[0058] For example, the current coding block is a luma block. When a luma predictive value of the current coding block is constructed using neighboring samples, luma prediction for the current coding block is carried out using a plurality of prediction directions in turn to obtain a luma predictive value matrix corresponding to each of the prediction directions. A difference matrix corresponding to each of the prediction directions is determined based on each luma predictive value matrix and a luma original value matrix of the current coding block. Evaluation parameter values corresponding to the prediction directions are determined based on each difference matrix, and the evaluation parameter values are used to indicate the prediction effect of the corresponding prediction directions on the current coding block. A target prediction direction is determined from the plurality of prediction directions based on each of the evaluation parameter values. For example, on the premise of ensuring the video restoration quality, a prediction direction in which the minimum quantity of bits for picture coding can be obtained is determined as the target prediction direction. Then the target prediction direction is written into a bitstream.
[0059] It should be noted that an intra prediction device in accordance with an implementation of the present disclosure may be either an encoder or a decoder, and the implementation of the present disclosure is not limited thereto.
[0060] Please refer to FIG. 4 illustrating a flow chart of a method of adaptively determining blending modes applied to a video decoder according to an embodiment of the present disclosure. The method includes steps S400-S408. The present disclosure proposes a method of adaptively determining blending modes to make the blending process more adaptive to different coding blocks after obtaining the Histogram of Occurrence (HoO) .
[0061] At Step S400, count occurrences of angular modes in neighboring reconstructed blocks of a current coding block to derive a Histogram of Occurrence (HoO) for the current coding block.
[0062] At Step S401, a maximum number of the angular modes for blending is determined based on a parameter of the current coding block.
[0063] At step S402, a plurality of candidate angular modes with the most occurrences is selected from the angular modes according to a parameter of the current coding block.
[0064] At step S404, angular modes for blending from the plurality of candidate angular modes are selected based on a first condition.
[0065] At step S406, weights of the angular modes for blending are determined.
[0066] At step S408, blend predictors by employing the angular modes for blending according to the weights.
[0067] Please refer to FIG. 4 in conjunction to FIG. 5 illustrating 67 intra prediction modes supported by VVC according to an embodiment of the present disclosure.
[0068] Illustratively, 67 intra prediction directions, i.e., prediction modes, are supported by VVC, where the intra prediction directions with index numbers 2-66 are shown in FIG. 5.
[0069] It should be noted that in order to adapt to the increasing demand for video resolution and express directions of video contents more precisely and accurately, 33 luma intra prediction angular modes defined in H. 265 / HEVC is expanded to 65 luma intra prediction angular modes in H.266 / VVC as illustrated in FIG. 5. Number 0 represents a planar mode, number 1 represents a DC mode, and numbers 2-66 represent 65 angular modes (from bottom-left to top-right) , with a total of 67 intra prediction modes, where 2-66 herein are absolute angle numbers.
[0070] In the implementation of the present disclosure, an intra prediction direction with an index number 66 it taken as an example to propose a method of constructing a luma predictive value of each of the sample units of the current coding block. Data in the above neighboring row of the current coding block are sample units that have been predicted. Each of the sample units of the current coding block is filled according to the sample unit with the top-right diagonal (i.e., the prediction direction with the index number 66) .
[0071] In addition, there are two ways to construct prediction blocks in a relative flat manner, the DC mode and the planer mode, respectively. In the DC mode, the whole current coding block is filled with an average value of feature values (e.g., chroma values or luma values) in the previous row or the left column, while in the planer mode, the current coding block is filled in a gradual manner.
[0072] Luma modes are predicted according to 0-66 directions in FIG. 5 in turn, and a prediction direction that best matches the current coding block (e.g., in which the difference value is smallest or the rate distortion cost is smallest) is selected as the target prediction direction, and the luma predictive value of each of the sample units of the current coding block is constructed, which is the basic principle of luma intra prediction. After obtaining the target prediction direction and a difference value corresponding to each of the sample units corresponding to the target prediction direction, an encoder writes the difference value corresponding to each of the sample units and an index number of the target prediction direction corresponding to the current coding block into a bitstream. After receiving the bitstream, the decoder analyzes the received bitstream to obtain the index number of the target prediction direction, and could then calculate the luma predictive value of each of the sample units in the corresponding current coding block, and adds the luma predictive value to the difference value obtained by analyzing bitstream in order to obtain a luma reconstructed value of the corresponding sample unit.
[0073] At step S400, several coding blocks are selected from certain positions based on a predefined rule, and the intra modes they used are counted on a pixel basis to build a HoO. For example, occurrences of 65 angular modes (mapping to number 2-66 in FIG. 5) of reconstructed blocks in a neighborhood of the current coding block are counted to derive a Histogram of Occurrence (HoO) for the current coding block. That is, the Histogram of Occurrence depicts a relationship between 65 angular modes and their occurrences. Finally, in the following embodiments, the angular modes in HoO will be sorted according to their occurrences in a descending order, where a first angular mode is indicative of the most occurrences of the angular blending mode, and a last angular mode is indicative of the least occurrences of the angular blending mode.
[0074] At step S401, a maximum number of the angular modes for blending is determined based on a parameter of the current coding block. Optionally, the parameter of the current coding block is indicative of the size of the current coding block.
[0075] In this embodiment, the maximum number of angular modes varies according to the size of the coding block. As the texture complexity tends to be different among different sizes of coding blocks, it is proposed to determine the maximum number of modes to be blended according to the block size. Generally speaking, because larger blocks can have more complicated textures, the maximum number of modes allowed for a larger block will not be smaller than that for a smaller block.
[0076] The block size (i.e. an array of samples) can be expressed as M x N (M columns by N rows) , where M and N are the width and height of the coding block, respectively. In this embodiment, the total number of samples M x N in a coding block is used to compare the block size. Examples of adapting the maximum number of angular modes allowed in OBIC for the block size is showed in Table 1, Table 2, and Table 3.
[0077] Table 1
[0078] Table 2
[0079] Table 3
[0080] It should be clarified that other combinations of sample numbers in a coding block and the maximum number of angular modes are also possible, as long as the maximum number of angular modes goes along the number of samples non-decreasingly.
[0081] It is noted that the maximum number of angular modes allowed is not the exact number of angular modes that will be used for blending. It means that the final number of angular modes for blending will not exceed this number. For example, If the maximum number of angular modes allowed for a coding block is five, but only four angular modes in the HoO with non-zero occurrences, then the final number of angular modes for blending will not be greater than four.
[0082] At step S402, candidate angular modes with the most occurrences are selected from the 65 angular modes according to a parameter of the current coding block. The adoption of an angular mode for blending is determined by the specific occurrence values. Several top-ranked angular modes with the most occurrences can be selected as candidate angular modes. For example, the top-five-ranked candidate angular modes (e.g. the first angular mode through the fifth angular mode in the sorted HoO) with the most occurrences are selected from the 65 angular modes. In this embodiment, the ultimate number of angular modes is related to the occurrence of each angular mode.
[0083] At step S404, angular modes for blending from the plurality of candidate angular modes are selected based on a first condition. In a first embodiment of the present disclosure, the adoption of an angular mode for blending is determined by the specific occurrence values of the top-ranked angular modes. For example, the occurrence of the fifth angular mode may be less than one fifth of that of the first angular mode. Such angular modes that have relatively few occurrences may be regarded as a kind of noise when generating the final blended predictor. Hence, in this embodiment, besides the occurrence ranking, the specific values of the occurrences will also be considered when making a decision on the adoption of the top-ranked angular modes.
[0084] In a second embodiment of the present disclosure, the first condition is determined by relative occurrence ratios of the candidate angular modes, where a relative occurrence ratio of a candidate angular mode stands for a ratio between an occurrence of the candidate angular mode and a sum of occurrences of the candidate angular modes. Only the top-ranked angular modes with the accumulative relative occurrence ratio less than a first threshold will be used for blending.
[0085] Assuming that the maximum number of angular modes for blending is K, K can be five as specified by the current design, or the maximum number of angular modes determined based on table 1-table 3 as stated in the above embodiment, or be the number of all the angular modes, or determined by any other methods. The calculation of the relative occurrence ratio for the ith angular mode r (i) is as follows: where o (i) and o (j) are the ith and jth top-ranked occurrences in the HoO, respectively.
[0086] The accumulative relative occurrence ratio of the ith sorted angular mode acc_r (i) means the accumulative sum of the relative occurrence ratios of the top i+1 angular modes (candidate angular modes) in the HoO, which can be calculated as the following:
[0087] Based on the definition of accumulative relative occurrence ratio, whether the ith sorted angular mode in the top K angular modes will be used for blending is determined based on the following condition:
[0088] accr (i) <P, i=1, 2, …, Equation 3
[0089] where P is a first threshold ranging between (0, 1] .
[0090] The first threshold can be, for example, 0.8, and it is noteworthy that P can be other values. At the same time, it should be noticed that the first angular mode with the most occurrence in HoO will always be employed for blending without the checking the condition in Equation 3.
[0091] In conclusion, for each angular mode in the top K candidate angular modes, whether it will be kept for blending will be determined by calculating its relative occurrence ratio according to Equation 1, calculating its accumulative relative occurrence ratio according to Equation 2, and comparing its accumulative relative occurrence ratio with the first threshold P according to Equation 3. If the accumulative relative occurrence ratio is greater than or equal to the first threshold P, this candidate angular mode will not be used for blending. Otherwise, this candidate angular mode is kept as the angular mode for blending.
[0092] In a third embodiment of the present disclosure, the first condition is indicative of a relative occurrence ratio of the candidate angular mode less than a second threshold T. Only the top-ranked modes with the relative occurrence ratio greater than a second threshold T will be used for blending. Instead of using the accumulative relative occurrence ratio, the relative occurrence ratio is employed in this embodiment to exclude some angular modes with less occurrences.
[0093] For each angular mode that belongs to the K candidate angular modes in HoO, the first condition is checked as follows: r (i) >T, i=1, 2, …, Equation 4 where T is a second threshold ranging between [0, 1) .
[0094] For example, the second threshold T can be 0.1, and it is noteworthy that second threshold T can be other values. At the same time, it should be noticed that the first angular mode with the most occurrence in HoO will always be employed for blending without the checking the condition in Equation 4.
[0095] In conclusion, for each angular mode in the top K candidate angular modes, whether it will be kept for blending will be determined by calculating its relative occurrence ratio according to Equation 1, and comparing its relative occurrence ratio with the second threshold T according to Equation 4. If the relative occurrence ratio is smaller than or equal to the second threshold T, this candidate angular mode will not be used for blending. Otherwise, this candidate angular mode is kept as the angular mode for blending.
[0096] As the angular mode for blending is determined from the candidate angular modes, weights of the angular modes for blending are determined. Finally, at step S408, blend predictors by employing the angular modes for blending according to the weights to generate a final predictor.
[0097] Please refer to FIG. 6 illustrating a flow chart of a method of adaptively determining blending modes applied to a video decoder according to another embodiment of the present disclosure. The method includes steps S600-S608. The present disclosure proposes another method of adaptively determining blending modes to make the blending process more adaptive to different coding blocks after obtaining the Histogram of Occurrence (HoO) .
[0098] At Step S600, count occurrences of angular modes in reconstructed blocks in a neighborhood of the current coding block to derive a Histogram of Occurrence (HoO) for the current coding block.
[0099] At Step S601, a maximum number of the angular modes for blending is determined based on a parameter of the current coding block.
[0100] At step S602, a plurality of candidate angular modes with the most occurrences are selected from the angular modes according to a parameter of the current coding block.
[0101] At step S604, angular modes for blending from the plurality of candidate angular modes are selected based on a first condition.
[0102] At step S605, employing a non-angular mode based on a second condition.
[0103] At step S606, weights of the angular modes for blending and a weight of the non-angular mode are determined.
[0104] At step S608, blend predictors by employing the angular modes for blending and the non-angular mode according to the weights.
[0105] In this embodiment, steps S600, S601, S602 and S604 are similar to steps S400, S401, S402, and S404, their operating principle and functions will not be repeated.
[0106] After the angular modes for blending from the plurality of candidate angular modes are selected, the present disclosure proposes a usage of a non-angular mode for blending to improve the prediction performance. According to the embodiment of the present disclosure, one non-angular mode, e.g. a block vector (BV) -based mode or the planar mode, is used for blending according to the characteristics of each coding block.
[0107] If two angles relating to the candidate angular modes are close, it is regarded that the discrepancy of the two corresponding angular modes is insignificant, otherwise the discrepancy of the two corresponding angular modes is defined as significant. In practice, since an intra mode index has one-to-one correspondence with an angular mode as illustrated in FIG. 5 and angular intervals of two adjacent angular modes are approximately equal among all the angular modes, it is proposed to use the difference of the intra mode indexes to represent the discrepancy of the angular modes.
[0108] Based on the definition above, a non-angular mode for blending is optionally employed according to the discrepancy of the angular modes in this embodiment. More specifically, a non-angular mode for blending is employed only when the discrepancy of the angular modes used for blending is significant. The idea behind this embodiment is that the texture in a coding block is supposed to have obvious directionality if the prediction directions of all the angular modes are similar, and thus blending with a non-angular mode is unlikely to be helpful or is even harmful.
[0109] In this embodiment, the adoption of a non-angular mode for blending depends on the significance of the discrepancy of the angular modes for blending. Please refer to FIG. 7 illustrating a flow chart of a step S605 applied to a video decoder according to an embodiment of the present disclosure. The step S605 further includes steps S6051-S6058.
[0110] Step S6051: determine whether a number of the angular modes for blending is less than an employing threshold.
[0111] Step S6052: Identify a maximum index of the angular modes for blending and a minimum index of the angular modes for blending.
[0112] Step S6054: determine whether a difference (Imax-Imin) between the maximum index of the angular modes for blending and the minimum index of the angular modes for blending equals to or is less than an index threshold Td.
[0113] Step S6056: no non-angular mode is employed for blending.
[0114] Step S6058: an additional non-angular mode is employed for blending.
[0115] At step S6051, a comparison between the number of angular modes for blending and an employing threshold Tn is made. If the number of angular modes for blending is less than an employing threshold Tn, blending with a non-angular mode will always be performed in this embodiment. The employing threshold Tn can be 2 or other positive integers.
[0116] At step S6052, a maximum index Imax of the angular modes for blending and a minimum index Imin of the angular modes for blending are identified, when a number of the angular modes for blending equals to or is in excess of an employing threshold Tn. All the indexed of the angular modes for blending will be compared individually, and then both of them can be obtained.
[0117] At step S6054, a difference (Imax-Imin) between the maximum angular mode index Imax and the minimum angular mode index Imin is compared with an index threshold Td. The employing threshold Td can be 6, 17 or other positive integers. The difference (Imax-Imin) represents the significance of texture directionality. The smaller the difference (Imax-Imin) is, the more significant the consistency of texture directionality is. The comparison can be formulated as:
[0118] Imax-Imin≤Td , Equation 5
[0119] When the difference (Imax-Imin) is less than or equal to the index threshold Td, a non-angular mode will not be used (Step S6058) . When the difference (Imax-Imin) is greater than the index threshold Td, an additional non-angular mode will be employed for blending (Step S6056) .
[0120] In another embodiment, the adoption of a non-angular mode for blending is determined by the occurrences of intra modes in the reconstructed block in the neighborhood of the current coding block. Please refer to FIG. 8 illustrating a flow chart of a step S605 applied to a video decoder according to another embodiment of the present disclosure. The step S605 further includes steps S6061-S6068.
[0121] Step S6061: count occurrences of angular modes and non-angular modes in the reconstructed block in the neighborhood of the current coding block.
[0122] Step S6062: calculate an angular-related factor according to the occurrences of the angular modes in the reconstructed block in the neighborhood of the current coding block.
[0123] Step S6064: calculate a non-angular-related factor according to the occurrences of the non-angular modes in the reconstructed block in the neighborhood of the current coding block.
[0124] Step S6065: determine whether the non-angular-related factor is greater than the angular-related factor multiplying a predefined constant.
[0125] Step S6066: no non-angular mode is employed for blending.
[0126] Step S6068: an additional non-angular mode is employed for blending.
[0127] In this embodiment, an occurrence comparison of angular modes and non-angular modes in the reconstructed block in the neighborhood of a current coding block is used to indicate the directionality significance of the current coding block. If the directionality is insignificant, a non-angular mode will be added for blending. Otherwise, only angular modes will be blended.
[0128] At step S6061, count occurrence Oang, i of ith angular modes, and count occurrence Onon-ang, j of the jth non-angular modes in the reconstructed block in the neighborhood of the current coding block.
[0129] At step S6062, calculate an angular-related factor Oang according to the occurrences of the angular modes in the reconstructed block in the neighborhood of the current coding block. The angular-related factor Oang is calculated by the following equation:
[0130] where Oang, i means the occurrence of ith angular mode and Wang, i means the weight for ith angular mode.
[0131] At step S6064, calculate a non-angular-related factor Onon-ang according to the occurrences of the non-angular modes in the reconstructed block in the neighborhood of the current coding block. The non-angular-related factor Onon-ang is calculated by the following equation:
[0132] where Onon-ang, j means the occurrence of jth non-angular mode and Wnon-ang, j means the weight for jth non-angular mode.
[0133] At Step S6065: determine whether the non-angular-related factor Onon-ang is greater than the angular-related factor Oang multiplying a predefined constant h. The usage of a non-angular mode for blending depends on the following equation:
[0134] h×Oang< Onon-ang. Equation 8
[0135] The predefined constant h can be 0.1or other positive constants.
[0136] A non-angular mode with the most occurrences for blending is employed to generate the final blended predictor, when the non-angular-related factor Onon-ang is greater than the angular-related factor Oang multiplying the predefined constant h (Step S6058) . Only several angular modes will be blended without employing any non-angular mode, when the non-angular-related factor Onon-ang equals to or is less than the angular-related factor Oang multiplying the predefined constant h (Step S6056) .
[0137] Optionally, there are several possible ways to determine the weight Wnon-ang, j for jth non-angular mode and the weight Wang, i for ith angular mode. For example, the weight Wang, i and the weight Wnon-ang, j are the same constant, e.g. 1. It is noteworthy that other positive values can also be assigned to the weights Wang, i and Wnon-ang, j.
[0138] Optionally, the weight Wnon-ang, j for jth non-angular mode and the weight Wang, i for ith angular mode can be different. Furthermore, different occurrence weights can be assigned to different modes. In this embodiment, each angular mode can have its own non-negative occurrence weight, as the its association strength to the directionality varies. With reference to FIG. 5, for example, horizontal angular mode (number 18 as shown in FIG. 5) and vertical angular mode (number 50 as shown in FIG. 5) are top-ranked in the usage statistics of the angular modes because of the characteristics of texture directionality in captured videos (with higher prior probability of usage) . Hence, the occurrences of horizontal angular mode (number 18 as shown in FIG. 5) and vertical angular mode (number 50 as shown in FIG. 5) have stronger correlation with the texture directionality with a certain noise level. Hence, it is reasonable to assign larger weights to the angular modes with the prediction angles closer to horizontal or vertical. For example, the weight for horizontal angular mode and weight for vertical angular mode are set to 2, and weight Wang, i for other angular values are set to 1.
[0139] Referring to FIG. 5, another example is to set the weight Wang, i for horizontal angular mode 18 and weight Wang, i for vertical angular mode 50 are set to 3, set the weight values of the two angular modes with the prediction angles closest to horizontal and the two angular modes with the prediction angles closest to vertical to 2, and set the occurrences to other angular modes to 1. For the 65 angular modes presented in FIG. 5, the weight values for horizontal angular mode 18 and vertical angular mode 50 are set to 3, the weight values for modes 17, 19, 49, 51 are set to 2, and those for other angular modes is set to 1.
[0140] It is noteworthy that other occurrence weights for the angular modes are also possible, as long as they follow the principle that larger weights are assigned to the angular modes with the prediction angles closer to horizontal direction or vertical direction.
[0141] As to the occurrence weights for the non-angular modes, larger weights can be assigned to the BV-based prediction modes, such as IBC or IntraTMP, and / or the planar mode, because one of them will used for blending if it is decided to use a non-angular mode. For example, the weights for IBC, IntraTMP, and the planar mode are set to 2, while other non-angular modes to 1. Another example is to set the weight values for the planar mode to 1, for IBC and IntraTMP to 2, and for other non-angular modes to 1.
[0142] It is noted that a mode can be excluded from counting by setting its weight to 0. By this way, it is possible to consider only a subset of angular modes or non-angular modes when computing the angular-related factor Oang and the non-angular-related factor Onon-ang, respectively.
[0143] An example is that the weight for the planar mode is set to 1 while the weights for other non-angular modes are 0. In a case that the non-angular-related factor Onon-ang is only related to the occurrence of the planar mode.
[0144] Another example is that the weights for the planar mode, IBC and IntraTMP are set to 1 while the weights for other non-angular modes are 0. In a case that the non-angular-related factor Onon-ang is only related to the occurrence of IBC, IntraTMP and the planar mode.
[0145] In another embodiment, no non-angular mode is used to generate the final blended predictor. For example, weights are all set to zero for all non-angular modes. The mechanism of OBIC is basically using the texture directions of the neighboring coding blocks to predict the texture direction of the current coding block, and there is actually no obvious theoretical support that employing a non-directional mode for blending will be beneficial in general.
[0146] In another embodiment, the weight for a non-angular mode for blending is determined according to the number of selected angular modes. It is proposed to determine the weight for the non-angular mode negatively correlated to the number of selected angular modes. The relationship between the weight fnon-ang for a non-angular mode and the number L of angular modes for blending is based on the following equation:
[0147] where Δ and b are predefined constants.
[0148] For example, values for Δ and b can be and respectively. Other values for the two parameters are also allowed, as long as the weight fnon-ang for a non-angular mode ranging between (0, 1) .
[0149] The relationship between the weight for a non-angular mode for blending and the number of angular modes for blending can be also determined by a look-up table. Table 4 depicts a mapping relationship between the weight for a non-angular mode for blending and the number of angular modes for blending. Table 4
[0150] Table 5 depicts another mapping relationship between the weight for a non-angular mode for blending and the number of angular modes for blending. Table 5
[0151] It is worth noting that other possible values for different number of angular modes are also possible, no matter it is determined by a formulated way or a look-up table, as long as the weight becomes greater or at least not less when the number of angular modes for blending gets smaller.
[0152] In another embodiment, the weight for a non-angular mode for blending is determined according the occurrences of angular modes and non-angular modes in the reconstructed block in the neighborhood of the current coding block. The weight fnon-ang of a non-angular mode for blending is determined by the following equation:
[0153] where Oang stands for the angular-related factor, Onon-ang stands for the non-angular-related factor, γ stands for a scale factor, and δ stands for a bias factor.
[0154] The definitions and computations of the angular-related factor Oang and the non-angular-related factor Onon-ang are derived in Equation 6 and Equation 7, respectively. In a case that the scale factor γ and the bias factor δ are set as 1 and 0, respectively, the weight fnon-ang of a non-angular mode for blending equals to the occurrence ratio of the non-angular modes. Moreover, γ and δ can be other values.
[0155] Another possible way to determine the weight fnon-ang of a non-angular mode for blending by referring to a look-up table. For example, as depicted in table 6, a mapping relationship between the weight for a non-angular mode for blending and the occurrence ratio of the non-angular modes.
[0156] Table 6
[0157] For example, as depicted in table 7, another mapping relationship between the weight for a non-angular mode for blending and the occurrence ratio of the non-angular modes.
[0158] Table 7
[0159] It is noted that other possible weights for different occurrence ratios are also possible, as long as the weight becomes smaller or at least not greater when the occurrence ratio gets smaller.
[0160] In another embodiment, the selection of angular mode or non-angular mode for blending is determined by machine-learned model. The machine-learned model includes but is not limited to decision tree, support vector machines, neural network, logistic regression.
[0161] In one example, a decision tree may be used to determine whether a given mode will be used for blending or not. The features used for decision in tree node may include: · block size-related information, including: ‐ height of current coding block, width of current coding block, ratio between height and width of current coding block, number of samples in the current coding block; ‐ difference of any of the abovementioned items between reference block and current coding block (including absolute difference and relative difference) · intra mode-related information, including: ‐ mode index (e.g., intra mode index, difference between the maximum angular mode index and the minimum angular mode index) ‐ mode occurrence (e.g., occurrence ratio of mode, including accumulative relative occurrence ratio of the mode, relative occurrence ratio of the mode; occurrence of modes in the neighborhood, including occurrence of angular modes in the neighborhood, occurrence of non-angular modes in the neighborhood, ratio between occurrences of angular modes and non-angular modes in the neighborhood) · similarity-related information, including: ‐ similarity between current and reference block (e.g., mean-square error (MSE) , mean-absolute error (MAE) , structural similarity (SSIM) , multi-scale structural similarity (MS-SSIM) , difference of DC component, difference of sample mean, difference of sample standard deviation, difference of sample variance) · sample distance in pixels, accounting for adjacent / non-adjacent neighbors. · prediction accuracy of reference HoO blocks, including ‐ sum of coding residues, averaged coding residue per-sample.
[0162] FIG. 9 is an example of a computing device 1500 according to an embodiment of the present disclosure. Any suitable computing device can be used for performing the operations described herein. For example, FIG. 9 illustrates an example of the computing device 1500 that can implement some embodiments of FIG. 1 to FIG. 8 using any suitably configured hardware and / or software. In some embodiments, the computing device 1500 can include a processor 1512 that is communicatively coupled to a memory 1514 and that executes computer-executable program code and / or accesses information stored in the memory 1514. The processor 1512 may include a microprocessor, an application-specific integrated circuit ( “ASIC” ) , a state machine, or other processing device. The processor 1512 can include any of a number of processing devices, including one. Such a processor can include or may be in communication with a computer-readable medium storing instructions that, when executed by the processor 1512, cause the processor to perform the operations described herein.
[0163] The memory 1514 can include any suitable non-transitory computer-readable medium. The computer-readable medium can include any electronic, optical, magnetic, or other storage device capable of providing a processor with computer-readable instructions or other program code. Non-limiting examples of a computer-readable medium include a magnetic disk, a memory chip, a read-only memory (ROM) , a random access memory (RAM) , an application specific integrated circuit (ASIC) , a configured processor, optical storage, magnetic tape or other magnetic storage, or any other medium from which a computer processor can read instructions. The instructions may include processor-specific instructions generated by a compiler and / or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, visual basic, java, python, perl, javascript, and actionscript.
[0164] The computing device 1500 can also include a bus 1516. The bus 1516 can communicatively couple one or more components of the computing device 1500. The computing device 1500 can also include a number of external or internal devices such as input or output devices. For example, the computing device 1500 is illustrated with an input / output ( “I / O” ) interface 1518 that can receive input from one or more input devices 1520 or provide output to one or more output devices 1522. The one or more input devices 1520 and one or more output devices 1522 can be communicatively coupled to the I / O interface 1518. The communicative coupling can be implemented via any suitable manner (e.g., a connection via a printed circuit board, connection via a cable, communication via wireless transmissions, etc. ) . Non-limiting examples of input devices 1520 include a touch screen (e g., one or more cameras for imaging a touch area or pressure sensors for detecting pressure changes caused by a touch) , a mouse, a keyboard, or any other device that can be used to generate input events in response to physical actions by a user of a computing device. Non-limiting examples of output devices 1522 include a liquid crystal display (LCD) screen, an external monitor, a speaker, or any other device that can be used to display or otherwise present outputs generated by a computing device.
[0165] The computing device 1500 can execute program code that configures the processor 1512 to perform one or more of the operations described above with respect to some embodiments of FIG. 1 to FIG. 8. The program code can include an encoder 1526 and / or a video decoder 1528. The program code may be resident in the memory 1514 or any suitable computer-readable medium and may be executed by the processor 1512 or any other suitable processor.
[0166] The computing device 1500 can also include at least one network interface device 1524. The network interface device 1524 can include any device or group of devices suitable for establishing a wired or wireless data connection to one or more data networks 1528. Non limiting examples of the network interface device 1524 include an Ethernet network adapter, a modem, and / or the like. The computing device 1500 can transmit messages as electronic or optical signals via the network interface device 1524.
[0167] A person having ordinary skill in the art understands that each of the units, algorithm, and steps described and disclosed in the embodiments of the present disclosure are realized using electronic hardware or combinations of software for computers and electronic hardware. Whether the functions run in hardware or software depends on the condition of application and design requirement for a technical plan. A person having ordinary skill in the art can use different ways to realize the function for each specific application while such realizations should not go beyond the scope of the present disclosure. It is understood by a person having ordinary skill in the art that he / she can refer to the working processes of the system, device, and unit in the above-mentioned embodiment since the working processes of the above-mentioned system, device, and unit are basically the same. For easy description and simplicity, these working processes will not be detailed.
[0168] It is understood that the disclosed system, device, and method in the embodiments of the present disclosure can be realized with other ways. The above-mentioned embodiments are exemplary only. The division of the units is merely based on logical functions while other divisions exist in realization. It is possible that a plurality of units or components are combined or integrated in another system. It is also possible that some characteristics are omitted or skipped. On the other hand, the displayed or discussed mutual coupling, direct coupling, or communicative coupling operate through some ports, devices, or units whether indirectly or communicatively by ways of electrical, mechanical, or other kinds of forms.
[0169] The units as separating components for explanation are or are not physically separated. The units for display are or are not physical units, that is, located in one place or distributed on a plurality of network units. Some or all of the units are used according to the purposes of the embodiments. Moreover, each of the functional units in each of the embodiments can be integrated in one processing unit, physically independent, or integrated in one processing unit with two or more than two units.
[0170] If the software function unit is realized and used and sold as a product, it can be stored in a readable storage medium in a computer. Based on this understanding, the technical plan proposed by the present disclosure can be essentially or partially realized as the form of a software product. Or, one part of the technical plan beneficial to the conventional technology can be realized as the form of a software product. The software product in the computer is stored in a storage medium, including a plurality of commands for a computational device (such as a personal computer, a server, or a network device) to run all or some of the steps disclosed by the embodiments of the present disclosure. The storage medium includes a USB disk, a mobile hard disk, a read-only memory (ROM) , a random access memory (RAM) , a floppy disk, or other kinds of media capable of storing program codes.
[0171] In contrast to prior art, the present disclosure proposes a method of adaptively determining blending modes applied to a video decoder. The method includes: counting occurrences of angular modes of a current coding block associated with samples in reconstructed block in a neighborhood of the current coding block to derive a Histogram of Occurrence (HoO) of the current coding block; selecting a plurality of candidate angular modes with the most occurrences from the angular modes according to a parameter of the current coding block; selecting angular modes for blending from the plurality of candidate angular modes based on a first condition; determining weights of the angular modes for blending; and performing blending operation for the current coding block by employing the angular modes for blending according to the weights. The first aspect is that the invention can improve the coding efficiency. The most appropriate number of the modes to be blended is unlikely to be a fixed number for each induvial coding blocks. Blending more or less modes rather than the best number of modes may reduce the similarity between the final predictor and the coding block. Lower similarity means poor prediction performance and more significant residuals. Finally, more bits will be required to encode the signals and affect the coding efficiency. Moreover, not only the adaption of blending modes, but also all the other innovation points in this invention aim to produce a better predictor for final prediction. From the perspective of bitrate and picture quality, the invention can reduce the bitrate and improve the picture quality. As to the bitrate reduction, more accurate prediction leads to smaller residuals, and therefore less numbers of bits required to be transferred from an encoder to a decoder. As the invention improves the accuracy of prediction and thus prediction provides better Peak signal-to-noise ratio (PSNR) as compared with the prior art, picture quality can be improved at the same time.
[0172] The other aspect is that the invention can reduce the coding complexity both on the encoder side and decoder side. By excluding some less significant angular modes, and / or the non-angular mode for blending, the complexity consumed by the blending operation will be reduced, which involves sample-wise multiplication operation and is computationally intensive. As blending is required on both the encoder side and the decoder side, the coding complexity of the encoder and the decoder can be reduced simultaneously.
[0173] While the present disclosure has been described in connection with what is considered the most practical and preferred embodiments, it is understood that the present disclosure is not limited to the disclosed embodiments but is intended to cover various arrangements made without departing from the scope of the broadest interpretation of the appended claims.
Claims
1.A method of adaptively determining blending modes, applied to a video decoder, comprising:counting occurrences of angular modes in neighboring reconstructed blocks of a current coding block to derive a Histogram of Occurrence (HoO) for the current coding block;selecting a plurality of candidate angular modes with the most occurrences from the angular modes according to a parameter of the current coding block;selecting angular modes for blending from the plurality of candidate angular modes based on a first condition;determining weights of the angular modes for blending; andblending predictors by employing the angular modes for blending according to the weights.2.The method as claimed in claim 1, further comprising:determining a maximum number of the angular modes for blending based on the parameter of the current coding block;wherein the first condition is indicative of the maximum number.3.The method as claimed in claim 2, wherein the parameter of the current coding block is a size of the current coding block.4.The method as claimed in claim 1, wherein the first condition is determined by relative occurrence ratios of the candidate angular modes, where a relative occurrence ratio of a candidate angular mode stands for a ratio between an occurrence of the candidate angular mode and a sum of occurrences of the candidate angular modes of the current coding block.5.The method as claimed in claim 4, wherein the first condition is indicative of a sum of relative occurrence ratios of the candidate angular modes less than a first threshold.6.The method as claimed in claim 4, wherein the first condition is indicative of a relative occurrence ratio of the candidate angular mode less than a second threshold.7.The method as claimed in claim 1, further comprising:employing a non-angular mode when a number of the angular modes for blending is less than an employing threshold.8.The method as claimed in claim 1, further comprising:identifying a maximum index of the angular modes for blending and a minimum index of the angular modes for blending, when a number of the angular modes for blending equals to or is in excess of an employing threshold; andemploying a non-angular mode when a difference between the maximum index of the angular modes for blending and the minimum index of the angular modes for blending greater than an index threshold.9.The method as claimed in claim 1, further comprising:counting occurrences of angular modes and non-angular modes in the reconstructed block in the neighborhood of the current coding block;calculating an angular-related factor according to the occurrences of the angular modes in the reconstructed block in the neighborhood of the current coding block;calculating a non-angular-related factor according to the occurrences of the non-angular modes in the reconstructed block in the neighborhood of the current coding block; andemploying a non-angular mode with the most occurrences for blending, when the non-angular-related factor is greater than the angular-related factor multiplying a predefined constant.10.The method as claimed in any one of claims 7-9, wherein the determining weights of selected angular modes comprises:determining the weights of angular modes for blending, and determining weights of the non-angular mode for blending; andthe blending predictors by employing the angular modes for blending according to the weights comprises:blending predictors by employing the angular modes for blending and the non-angular mode for blending according to the weights.11.The method as claimed in claim 10, wherein the non-angular mode comprises a planer mode and a block vector (BV) mode.12.The method as claimed in claim 10, wherein the determining weights of the non-angular mode for blending comprises:determining the weights of the non-angular mode for blending based on the number of angular modes for blending.13.The method as claimed in claim 10, wherein the determining weights of the non-angular mode for blending comprises:determining the weights of the non-angular mode for blending based on occurrence ratio of the non-angular modes in the neighborhood of the current coding block.14.The method as claimed in claim 10, wherein when the non-angular-related factor is less than the angular-related factor multiplying the predefined constant, setting the weights of the non-angular mode for blending as 0.15.A video encoder comprising:a memory storing instructions;a processor coupled to the memory;wherein the processor is configured to perform the method as claimed in any one of claims 1 to 14.16.A non-transitory computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform the method as claimed in any one of claims 1 to 14.17.A chip, comprising:a processor, configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the method as claimed in any one of claims 1-14.18.A computer program product, comprising a computer program, wherein the computer program causes a computer to execute the method as claimed in any one of claims 1-14.