Video encoding and decoding method and device, equipment, medium and bit stream storage method

By using scaling factors related to video block size and a modified lookup table to optimize the pixel prediction process in video encoding and decoding, the problem of complex intra-frame prediction calculations is solved, and the calculation efficiency and processing speed are improved.

CN120835145APending Publication Date: 2025-10-24BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511149397.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

In existing video coding and decoding technologies, the pixel prediction calculation process of intra-frame prediction is complex, making it difficult to improve the calculation efficiency.

Method used

The interpolation items of pixel prediction are scaled by a scaling factor based on the video block size, and pixel correction is performed through a preset correction lookup table. The pixel prediction process is optimized in combination with a pipeline algorithm.

Benefits of technology

The dynamic range of pixel prediction is reduced, the computational complexity is simplified, and the computational efficiency and processing speed are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835145A_ABST
    Figure CN120835145A_ABST
Patent Text Reader

Abstract

The invention relates to a video coding and decoding method and device, equipment, a medium and a bit stream storage method, and the video coding method comprises the steps: responding to the determination that a current block is coded in a plane mode, executing pixel prediction for a current pixel in the current block, and obtaining a prediction value of the current pixel, the method includes applying a scaling factor for an interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, where the scaling factor is derived based on a size of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of video coding, and in particular, to a video coding method and device, equipment, medium and a method of storing a bitstream. BACKGROUND

[0002] Digital video supports are available in various electronic devices, such as digital televisions, laptop computers, or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video gaming devices, smartphones, video teleconferencing devices, video streaming devices, etc. The electronic devices transmit and receive, or otherwise communicate, digital video data, over communication networks, and / or store the digital video data on storage devices. Due to the limited bandwidth capacity of communication networks, and the limited storage capacity of storage devices, video data is compressed prior to transmission or storage according to one or more video coding standards, to reduce the amount of data used for transmitting or storing video data. For example, video coding standards include Versatile Video Coding (VVC), Joint Exploration Test Model (JEM), High Efficiency Video Coding (HEVC / H.265), Advanced Video Coding (AVC / H.264), Moving Picture Experts Group (MPEG) coding, etc. Video coding typically employs prediction methods (e.g., inter-prediction, intra-prediction, etc.) that take advantage of inherent redundancies in video data. Video coding aims to compress video data into a form that uses a lower bit rate, while avoiding or minimizing losses in video quality.

[0003] However, as the video coding technology develops, the improvement of video coding quality brings complex calculations, for example, in the video coding using the planar mode of intra-prediction, since the calculation process of pixel prediction is still relatively complex, the calculation efficiency is difficult to improve. SUMMARY

[0004] The present disclosure provides a video coding method and device, equipment, medium and a method of storing a bitstream, to at least solve the problem that the calculation efficiency is difficult to improve due to the calculation process of pixel prediction being still relatively complex. The technical solutions of the present disclosure are as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a video coding method is provided, the video coding method comprising: in response to determining that a current block is coded in a planar mode, performing pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, wherein the pixel prediction comprises: applying a scaling factor to a interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0006] Optionally, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0007] Optionally, the scaling factor is applied by: weighted averaging the interpolation terms; and dividing or multiplying each of the results of the weighted averaging by or with the scaling factor, respectively.

[0008] Optionally, the video encoding method further comprises: performing pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the pixel correction comprises: obtaining a correction factor corresponding to the current block based on a size of the current block; looking up a preset correction lookup table based on the correction factor and a position of the current pixel to obtain a correction value corresponding to the current pixel; and applying the correction value to the prediction value to obtain the final prediction value of the current pixel.

[0009] Optionally, the correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors, each correction value sequence comprising a plurality of correction values, the correction factors representing scaling ratios of pixels, and the plurality of correction values corresponding to a plurality of pixel positions, wherein the looking up the preset correction lookup table based on the correction factor and the position of the current pixel to obtain the correction value corresponding to the current pixel comprises: determining a correction value sequence corresponding to the current block from the plurality of correction value sequences according to the correction factor corresponding to the current block; and determining the correction value corresponding to the current pixel from the correction value sequence corresponding to the current block according to the position of the current pixel, wherein the correction lookup table is obtained by: determining a correction value corresponding to each combination of a correction factor and a pixel position by substituting all possible combinations of the correction factors and the pixel positions into a preset correction model; and obtaining the correction lookup table based on the correction values corresponding to all combinations.

[0010] Optionally, the video encoding method further comprises: storing the prediction value in a register and storing the final prediction value in a memory based on a pipelining algorithm.

[0011] According to a second aspect of the embodiments of the present disclosure, a video decoding method is provided, which comprises: in response to determining that a current block is decoded in a planar mode, performing pixel prediction on a current pixel in the current block to obtain a prediction value of the current pixel, wherein the pixel prediction comprises: applying a scaling factor to interpolation terms in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0012] Optionally, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0013] Optionally, the scaling factor is applied by: weighted averaging the interpolation terms; and dividing or multiplying each of the results of the weighted averaging by or with the scaling factor, respectively.

[0014] Optionally, the video decoding method further comprises: performing pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the pixel correction comprises: obtaining a correction factor corresponding to the current block based on a size of the current block; looking up a preset correction lookup table based on the correction factor and a position of the current pixel to obtain a correction value corresponding to the current pixel; and applying the correction value to the prediction value to obtain the final prediction value of the current pixel.

[0015] Optionally, the correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors, each correction value sequence comprising a plurality of correction values, the correction factors representing scaling ratios of pixels, and the plurality of correction values corresponding to a plurality of pixel positions, wherein the looking up the preset correction lookup table based on the correction factor and the position of the current pixel to obtain the correction value corresponding to the current pixel comprises: determining a correction value sequence corresponding to the current block from the plurality of correction value sequences according to the correction factor corresponding to the current block; and determining the correction value corresponding to the current pixel from the correction value sequence corresponding to the current block according to the position of the current pixel, wherein the correction lookup table is obtained by: determining a correction value corresponding to each combination of the plurality of correction factors and the plurality of pixel positions by substituting all possible combinations of the plurality of correction factors and the plurality of pixel positions into a preset correction model; and obtaining the correction lookup table based on the correction values corresponding to all combinations.

[0016] Optionally, the video decoding method further comprises: storing the prediction value in a register and storing the final prediction value in a memory based on a pipelining algorithm.

[0017] According to a third aspect of the embodiments of the present disclosure, a video encoding apparatus is provided, which comprises an encoding module configured to, in response to determining that a current block is encoded in a planar mode, perform pixel prediction on a current pixel in the current block to obtain a prediction value of the current pixel, wherein the encoding module comprises an encoding prediction module configured to: apply a scaling factor to interpolation terms in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0018] According to a fourth aspect of the embodiments of the present disclosure, a video decoding apparatus is provided, including: a decoding module configured to, in response to determining that a current block is decoded in a planar mode, perform pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, wherein the decoding module includes a decoding prediction module configured to: apply a scaling factor to downscale a dynamic range of the pixel prediction for an interpolation term in the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0019] According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing processor-executable instructions, wherein the processor-executable instructions, when executed by the processor, cause the processor to perform the video encoding method or the video decoding method according to the example embodiments of the present disclosure.

[0020] According to a sixth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the video encoding method or the video decoding method according to the example embodiments of the present disclosure.

[0021] According to a seventh aspect of the embodiments of the present disclosure, a computer program product is provided, having instructions for storing a bitstream, wherein the bitstream includes: video data generated by the video encoding method according to the example embodiments of the present disclosure; or video data to be decoded by the video decoding method according to the example embodiments of the present disclosure.

[0022] According to an eighth aspect of the embodiments of the present disclosure, a method for storing a bitstream is provided, including: generating a bitstream according to the video encoding method according to the example embodiments of the present disclosure; and storing the bitstream.

[0023] According to a ninth aspect of the embodiments of the present disclosure, a method for transmitting a bitstream is provided, including: generating a bitstream according to the video encoding method according to the example embodiments of the present disclosure; and transmitting the bitstream.

[0024] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0025] According to the video coding scheme of the present disclosure, for the planar mode of intra prediction, in the pixel prediction, a scaling factor related to the size of the video block can be used to scale the interpolation term of the pixel, so that the dynamic range of the pixel prediction is reduced, the complexity of the calculation is reduced, and the overall throughput is low due to the large dynamic range in the pixel prediction process. The calculation efficiency can be improved.

[0026] In addition, according to the video coding and decoding scheme disclosed in the present invention, by predetermining a correction lookup table and storing the correction value for each pixel position in the lookup table, the pixel correction calculation can be simplified. For pixels that do not require pixel correction, the correction calculation does not need to be performed, thereby improving the calculation speed and efficiency of pixel correction.

[0027] In addition, according to the video encoding and decoding scheme disclosed in the present invention, the pixel prediction process and the pixel correction process can be combined for execution to avoid repeated memory reading and writing caused by executing the pixel prediction process and the pixel correction process separately. This can improve the reading and writing time of the entire block, which is beneficial to improving the processing speed of video encoding and decoding.

[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

[0030] Figure 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.

[0031] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0032] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0033] Figure 4 A schematic diagram showing the intra mode defined in VVC.

[0034] Figure 5 A schematic diagram showing multiple reference lines used for intra prediction.

[0035] Figure 6A and Figure 6B Schematic diagrams showing reference samples for position-dependent intra prediction combining (PDPC) in the upper right diagonal mode and the lower left diagonal mode, respectively.

[0036] Figure 7A A schematic diagram of sub-partitioning for 4×8 CU and 8×4 CU is shown.

[0037] Figure 7B A schematic diagram showing sub-partitions for CUs other than 4×8 CUs, 8×4 CUs, and 4×4 CUs is shown.

[0038] Figure 8 A diagram showing the positions of the left and above samples of a CU involved in cross-component linear model (CCLM) prediction is shown.

[0039] Figure 9 A diagram showing a matrix weighted intra prediction (MIP) process is shown.

[0040] Figure 10 A diagram showing a planar mode calculation process for intra prediction is shown.

[0041] Figure 11 A diagrammatic flowchart showing a video encoding method according to some embodiments of the disclosure is shown.

[0042] Figure 12 A diagrammatic flowchart showing pixel correction according to some embodiments of the disclosure is shown.

[0043] Figure 13 A diagram showing a pixel correction region in a current block according to some embodiments of the disclosure is shown.

[0044] Figure 14 A diagrammatic flowchart showing a video decoding method according to some embodiments of the disclosure is shown.

[0045] Figure 15 is a diagram showing a computing environment coupled with a user interface according to some embodiments of the disclosure. DETAILED DESCRIPTION

[0046] Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But various alternatives can be used without departing from the scope of the claims, and the subject matter can be practiced in embodiments without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices having digital video capabilities.

[0047] It should be noted that the terms "first", "second", and the like, used in the description and in the claims of the disclosure, as well as the terms "left", "right", and the like, used in the description and the claims of the disclosure, are used to distinguish between objects, and are not used to describe any particular sequential or chronological order. It is to be understood that data so designated can be interchanged, where appropriate, so that the embodiments of the disclosure described herein can be carried out in sequences other than those illustrated by, or described in, the disclosure.

[0048] Figure 1 is a block diagram showing an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the disclosure. As shown inFigure 1 As shown in FIG. 1, system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. Source device 12 and destination device 14 can comprise any of a wide variety of electronic devices, including a cloud server, a server computer, a desktop or laptop computer, a tablet computer, a smart phone, a set-top box, a digital television, a camera, a display device, a digital media player, a video gaming console, a video streaming device, and the like. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capability.

[0049] In some implementations, destination device 14 can receive the encoded video data to be decoded via link 16. Link 16 can comprise any type of communication medium or device capable of moving the encoded video data from source device 12 to destination device 14.

[0050] In other implementations, the encoded video data can be transmitted from output interface 22 to storage device 32. Subsequently, the encoded video data in storage device 32 can be accessed by destination device 14 via input interface 28.

[0051] As Figure 1 As shown in FIG. 1, source device 12 includes video source 18, video encoder 20, and output interface 22. Video source 18 can comprise a source such as a video capture device (e.g., a video camera), a video archive containing previously captured video, a video feed interface to receive video from a video content provider, and / or a computer graphics system for generating computer graphics video as the source video.

[0052] The captured, pre-captured, or computer-generated video can be encoded by video encoder 20. The encoded video data can be transmitted directly to destination device 14 via output interface 22 of source device 12. The encoded video data can also (or alternatively) be stored onto storage device 32 for later access by destination device 14 or other devices, for decoding and / or playback.

[0053] Destination device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 can include a receiver and / or a modem, and receives encoded video data over link 16. The encoded video data communicated over link 16, or provided on storage device 32, can include a variety of syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements can be included within the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.

[0054] Video encoder 20 and video decoder 30 can operate according to a proprietary standard or industry standard, such as VVC, HEVC, MPEG-4, Part 10, AVC, or extensions of such standards. It should be understood that the application is not limited to a specific video coding / decoding standard and can be applicable to other video coding / decoding standards. It is generally contemplated that video encoder 20 of source device 12 can be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that video decoder 30 of destination device 14 can be configured to decode video data according to any of these current or future standards.

[0055] Video encoder 20 and video decoder 30 can be implemented as any of a variety of suitable encoder and / or decoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic circuitry, software, hardware, firmware or any combinations thereof. When implemented partially in software, an electronic device can 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 video coding / decoding operations disclosed in the present disclosure. Each of video encoder 20 and video decoder 30 can be included in one or more encoders or decoders, either of which can be integrated as part of a combined encoder / decoder (CODEC) in a respective device.

[0056] Figure 2 FIG. 1 is a block diagram illustrating an example video encoder 20 according to some embodiments described in the present application. Video encoder 20 can perform intra-prediction encoding and inter-prediction encoding on video blocks within a video frame. Intra-prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-prediction encoding relies on temporal prediction to reduce or remove temporal redundancy in video data within neighboring video frames or pictures of a video sequence. It should be noted that in the field of video coding, the term “frame” can be used as a synonym for the term “image” or “picture.”

[0057] As Figure 2As shown in FIG, video encoder 20 includes video data memory 40, prediction processing unit 41, decoded picture buffer (DPB) 64, adder 50, transform processing unit 52, quantization unit 54, and entropy coding unit 56. Prediction processing unit 41 further includes motion estimation unit 42, motion compensation unit 44, segmentation unit 45, intra prediction processing unit 46, and intra block copy (BC) unit 48. In some embodiments, video encoder 20 also includes an inverse quantization unit 58 for video block reconstruction, an inverse transform processing unit 60, and adder 62. A loop filter 63, such as a deblocking filter, can be located between adder 62 and DPB 64 to filter block boundaries to remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter, a cross-component sample adaptive offset (CCSAO) filter, and / or an adaptive loop filter (ALF)) can also be used to filter the output of adder 62. In some examples, the loop filter may be omitted, and the decoded video block may be provided directly by summer 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

[0058] Video data memory 40 may store video data to be encoded by the components of video encoder 20. Figure 1 Video source 18 is shown obtaining video data in video data memory 40. DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for use by video encoder 20 in encoding the video data (e.g., in intra or inter prediction coding modes).

[0059] like Figure 2 As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into slices, tiles (e.g., a set of video blocks), or other larger coding units (CUs) according to a predefined splitting structure associated with the video data, such as a quadtree (QT) structure. It should be noted that the terms "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU), or a transform unit (TU) and / or may be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB), or a transform block (TB)) and / or a sub-block.

[0060] Prediction processing unit 41 can select one of a plurality of possible predictive encoding modes, e.g., one of a plurality of intra-predictive encoding modes or one of a plurality of inter-predictive encoding modes, for the current video block based on the error results (e.g., coding rate and level of distortion). Prediction processing unit 41 can provide the resulting intra- or inter-predicted block to summer 50 to generate a residual block, and to summer 62 to reconstruct the encoded block for use as part of a reference frame at a later time. Prediction processing unit 41 also provides syntax elements, e.g., motion vectors, intra-mode indicators, partitioning information, and other such syntax information, to entropy encoding unit 56.

[0061] To select an appropriate intra-predictive encoding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 can perform intra-predictive encoding of the current video block in relation to one or more neighboring blocks in the same frame as the current block being encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 perform inter-predictive encoding of the current video block in relation to one or more predictive blocks in one or more reference frames to provide temporal prediction. Video encoder 20 can perform multiple encoding passes, e.g., to select a suitable encoding mode for each block of video data.

[0062] In some implementations, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating motion vectors according to a predetermined pattern within a sequence of video frames, the motion vectors indicating displacement of video blocks within the current video frame relative to predictive blocks within a reference video frame. Motion estimation performed by motion estimation unit 42 is a process of generating motion vectors that estimate motion for video blocks. For example, a motion vector can indicate displacement of a video block within a current video frame or picture relative to a predictive block within a reference frame that is related to a current block being encoded within the current frame. The predetermined pattern can designate video frames in the sequence as P-frames or B-frames. Intra-BC unit 48 can determine vectors for intra-BC encoding (e.g., block vectors) in a similar manner as motion vectors determined by motion estimation unit 42 for inter-prediction, or can utilize block vectors determined by motion estimation unit 42.

[0063] Whether the predictive block is from the same frame according to intra-prediction or a different frame according to inter-prediction, video encoder 20 can form pixel difference values by subtracting pixel values of the predictive block from pixel values of the current video block being encoded, thereby forming a residual video block. The pixel difference values forming the residual video block can include both luma component differences and chroma component differences.

[0064] Intra prediction processing unit 46 can encode the current block using various intra prediction modes, e.g., during a separate encoding pass, and can select a suitable intra prediction mode to use from the tested intra prediction modes (or, in some examples, the mode selection unit). Intra prediction processing unit 46 can provide information indicating the selected intra prediction mode for the block to entropy encoding unit 56. Entropy encoding unit 56 can encode information indicating the selected intra prediction mode in the bitstream.

[0065] After prediction processing unit 41 determines a prediction block for the current video block via either inter prediction or intra prediction, summer 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block can be included in one or more TUs and is provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform, e.g., a discrete cosine transform (DCT) or a conceptually similar transform.

[0066] Transform processing unit 52 can send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce bit rate. The quantization process can also reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting a quantization parameter. In some examples, quantization unit 54 can then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 can perform the scan.

[0067] After quantization, entropy encoding unit 56 entropy encodes the quantized transform coefficients using, e.g., context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding methodology or technique, into a video bitstream. The encoded bitstream can then be transmitted to video decoder 30, as shown in FIG. 3, or archived, as shown in storage device 32, for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 can also entropy encode motion vectors and other syntax elements for the current video frame being encoded. Figure 1 Figure 1

[0068] ​​The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for generating a reference block used to predict other video blocks. As noted above, the motion compensation unit 44 can generate a motion compensated prediction block from one or more reference blocks of a frame stored in the DPB 64. The motion compensation unit 44 can also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values for use in motion estimation.

[0069] The summer 62 adds the reconstructed residual block to the motion compensated prediction block produced by the motion compensation unit 44 to produce a reference block for storage in the DPB 64. The reference block can then be used by the intra BC unit 48, the motion estimation unit 42, and the motion compensation unit 44 as a prediction block to inter predict another video block in a subsequent video frame.

[0070] Figure 3 FIG. 1 shows a block diagram of an example video decoder 30 in accordance with some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, a summer 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra prediction unit 84, and an intra BC unit 85. The video decoder 30 can perform a decoding process substantially reciprocal to the encoding process described above in connection with the video encoder 20. Figure 2 The decoding process described in connection with the video encoder 20 is substantially reciprocal. For example, the motion compensation unit 82 can generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra prediction unit 84 can generate prediction data based on intra prediction mode indicators received from the entropy decoding unit 80.

[0071] In some examples, embodiments of the present disclosure can be dispersed among one or more of the units of the video decoder 30. For example, the intra BC unit 85 can perform embodiments of the present application alone or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 can not include the intra BC unit 85, and the functionality of the intra BC unit 85 can be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.

[0072] The video data memory 79 can store video data, such as an encoded video bitstream, to be decoded by the other components of the video decoder 30. The video data stored in the video data memory 79 can be obtained, for example, from the storage device 32, from a local video source, such as a camera, via wired or wireless network communication of video data, or by accessing a physical data storage medium, such as a flash drive or hard disk.

[0073] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0074] When a video frame is encoded as an intra-frame prediction coded (I) frame or for intra-frame coded prediction blocks in other types of frames, intra-frame prediction unit 84 of prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-frame prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0075] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can use a default construction technique to construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92.

[0076] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block, as defined by video encoder 20.

[0077] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for a video block of the current video frame by parsing motion vectors and other syntax elements, and then uses the prediction information to generate a prediction block for the current video block being decoded.

[0078] Motion compensation unit 82 may also perform interpolation to calculate interpolated values ​​for sub-integer pixels of a reference block using interpolation filters, such as those used by video encoder 20 during encoding of the video block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from received syntax elements and use these interpolation filters to produce the prediction block.

[0079] Inverse quantization unit 86 inverse quantizes quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80 using the same quantization parameter calculated by video encoder 20 for each video block in the video frame to determine a degree of quantization. Inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct the residual blocks in the pixel domain.

[0080] After motion compensation unit 82 or intra BC unit 85 generates the prediction block for the current video block based on the vectors and other syntax elements, adder 90 reconstructs the decoded video block for the current video block by adding the residual block from inverse transform processing unit 88 to the corresponding prediction block generated by motion compensation unit 82 and intra BC unit 85. In-loop filter 91, e.g., a de-blocking filter, a SAO filter, a CCSAO filter, and / or an ALF, can be located between adder 90 and DPB 92 to further process the decoded video block. In some examples, in-loop filter 91 can be omitted, and the decoded video block can be directly provided by adder 90 to DPB 92. The decoded video blocks in a given frame are then stored in DPB 92, which stores reference frames for subsequent motion compensation of video blocks that follow. DPB 92 or a memory device separate from DPB 92 can also store decoded video for later presentation on a display device (e.g., display device 34 of FIG. 1). Figure 1

[0081] In general, the basic intra prediction scheme applied in VVC remains almost the same as that of HEVC, except that several prediction tools are further extended, added, and / or improved, e.g., extended intra prediction with wide-angle intra modes, multi-reference line (MRL) intra prediction, PDPC, intra sub-partition (ISP) prediction, CCLM prediction, and MIP.

[0082] Extended Intra Prediction with Wide-Angle Intra Modes

[0083] Similar to HEVC, VVC uses a set of reference samples neighboring (i.e., above or to the left of) the current CU to predict the samples of the current CU. However, in order to capture finer edge directions that exist in natural videos, especially high-resolution (e.g., 4K) video content, the number of angular intra modes is extended from 33 in HEVC to 93 in VVC. Figure 4 A schematic diagram showing the intra modes defined in VVC is shown. As Figure 4 ​Among the 93 angular intra modes, modes 2 to 66 are the traditional angular intra modes, modes -1 to -14 and modes 67 to 80 are the wide-angle intra modes. In addition to the angular intra modes, the planar mode (mode 0 in Figure 4 Figure 4

[0084] Since the quad-tree / binary-tree / ternary-tree partitioning structure is applied in VVC, there are rectangular video blocks in addition to square video blocks for intra prediction in VVC. Since a given video block has unequal width and height, various sets of angular intra modes can be selected from the 93 angular intra modes for different block shapes. More specifically, for square video blocks and rectangular video blocks, 65 angular intra modes out of the 93 angular intra modes are supported in addition to the planar mode and the DC mode for each block shape. When the rectangular block shape of a video block satisfies certain conditions, the index of the wide-angle intra mode of the video block can be adaptively determined by the video decoder 30 according to the index of the traditional angular intra mode received from the video encoder 20 using the mapping relationship shown in Table 1 below. That is, for non-square blocks, the wide-angle intra mode is signaled by the video encoder 20 using the index of the traditional angular intra mode, which is mapped to the index of the wide-angle intra mode after being parsed by the video decoder 30, so as to ensure that the total number of intra modes (i.e., 67), i.e., the planar mode, the DC mode, and 65 angular intra modes out of the 93 angular intra modes, remains unchanged and the intra mode coding method remains unchanged. Therefore, good signaling efficiency of intra modes is achieved while providing a consistent design across different block sizes.

[0085] Table 1 shows the mapping relationship between the index of the traditional angular intra mode and the index of the wide-angle intra mode for intra prediction of different block shapes in VCC, where W represents the width of the video block and H represents the height of the video block.

[0086]

[0087] Table 1

[0088] MRL Intra Prediction

[0089] Similar to the intra prediction in HEVC, all intra modes (i.e., the planar mode, the DC mode, and the angular intra modes) in VVC utilize the reference sample set above and to the left of the current video block for intra prediction. However, unlike the use of only the nearest reference sample row / column (i.e., Figure 5 ​​HEVC, in VVC, MRL intra prediction is introduced in which two additional reference sample rows / columns can be used in addition to the nearest reference sample row / column (i.e., Figure 5 Intra prediction is performed using the selected reference sample row / column (i.e., the first row 201, the second row 203, or the third row 205 in FIG. 2). The index of the selected reference sample row / column is signaled from the video encoder 20 to the video decoder 30. When a non-nearest reference sample row / column (e.g., the second row 203 or the third row 205 in FIG. 2) is selected, the planar mode is excluded from the set of intra modes that can be used to predict the current video block. MRL intra prediction is disabled for the first row / column video block within a CTU to prevent the use of extended reference samples outside the current CTU. Figure 5 Intra prediction is performed using the selected reference sample row / column (i.e., the first row 201, the second row 203, or the third row 205 in FIG. 2). The index of the selected reference sample row / column is signaled from the video encoder 20 to the video decoder 30. When a non-nearest reference sample row / column (e.g., the second row 203 or the third row 205 in FIG. 2) is selected, the planar mode is excluded from the set of intra modes that can be used to predict the current video block. MRL intra prediction is disabled for the first row / column video block within a CTU to prevent the use of extended reference samples outside the current CTU.

[0090] PDPC

[0091] As mentioned previously, intra prediction samples are generated from a neighboring reference sample set, which can introduce discontinuity along the block boundary between the current video block and its neighboring video blocks. The PDPC tool is introduced in VVC to address such issues by employing a weighted combination of the intra prediction samples and the boundary reference samples. In VVC, PDPC can be enabled for the following intra modes without signaling: the planar mode, the DC mode, the angular intra modes with index less than or equal to the index of the horizontal intra mode (i.e., mode 18), and the angular intra modes with index greater than or equal to the index of the vertical intra mode (i.e., mode 50) and less than or equal to 80. PDPC is not applied if the block differential pulse code modulation (BDPCM) mode is applied to the current block or the index of the selected reference sample row / column for MRL intra prediction is greater than 0. Assuming the prediction sample of the current sample located at coordinate (x, y) is pred(x, y), the modified prediction sample pred'(x, y) after performing PDPC can be calculated as follows:

[0092] pred'(x, y) = Clip3(0, (1 « BitDepth) - 1, (wL x R -1,y’ + wT x R x’,-1 + (64 - wL - wT) x pred(x, y) + 32) » 6) (1)

[0093] where Bitdepth represents the bit depth of the sample, R x’,-1 and R -1,y’ represent the reference samples located at the upper boundary and the left boundary of the current sample, respectively, wL and wT are the weights adaptively selected according to the intra mode and the block size of the current block, ">>" represents the bit right shift operation, and "<<" represents the bit left shift operation.

[0094] The function Clip3(x, y, z) in equation (1) can be defined as:

[0095]

[0096] Figure 6A Figure 6B Figures 1 and 2 respectively show a schematic of reference samples for PDPC in the right-up diagonal mode and the left-down diagonal mode. The prediction sample pred(x, y) is located at (x, y) within the prediction block. The reference samples R x’,-1 have horizontal coordinate x' = x + y + 1 and vertical coordinate -1, and the reference samples R -1,y’ have horizontal coordinate -1 and vertical coordinate y' = x + y + 1.

[0097] ISP prediction

[0098] ISP prediction is a tool applied to luma intra prediction modes, which divides a luma video block vertically or horizontally into 2 or 4 sub-partitions depending on the block size of the luma video block, as shown in Table 2. For example, for ISP, the minimum block size is 4x8 or 8x4. Figure 7A Figure 7B Figures 3 and 4 respectively show a schematic of sub-partitions depending on the block size. If the block size WxH of a video block (e.g., block 401 shown in Figure 3) is equal to 4x8 or 8x4, the video block is divided into 2 sub-partitions. Figure 7A Figure 7B If the block size WxH of a video block (e.g., block 403 shown in Figure 4) is greater than 4x8 or 8x4, the video block is divided into 4 sub-partitions. The CU size limit for ISP can be 64x64 at maximum. All sub-partitions satisfy the condition of having at least 16 samples.

[0099] Block size Number of sub-partitions 4×4 Not partitioned 4x8 and 8x4 2 All other feasible cases 4

[0100] Table 2

[0101] For each sub-partition, the reconstructed samples are obtained by adding the residual signal to the prediction signal. Here, the residual signal is generated by processing such as entropy decoding, inverse quantization, and inverse transform. The reconstructed samples of each sub-partition can be used to generate the prediction of the next sub-partition. In addition, the first sub-partition to be processed is the sub-partition containing the top-left sample of the CU, and after the first sub-partition is processed, the ISP prediction continues downward (for horizontal split as shown in Figure 7A Figure 7B and rightward (for vertical split as shown in Figure 7A Figure 7B All sub-partitions share the same intra prediction mode.

[0102] CCLM prediction ​​​​​

[0103] To reduce the cross-component redundancy, CCLM prediction mode is used in VVC, in which the chroma samples of a CU are predicted based on the reconstructed luma samples rec L (i,j) is predicted using the following linear model:

[0104] pred C (i,j) = a rec L '(i,j) + β (3)

[0105] where pred C (i,j) denotes the predicted chroma samples in the CU, rec L '(i,j) denotes the down-sampled reconstructed luma samples of the CU obtained by down-sampling the reconstructed luma samples rec L (i,j) and a and β are linear model parameters derived from at most four neighboring chroma samples and their corresponding down-sampled luma samples. Given that the size of the current chroma block is W x H, W' and H' are obtained as follows:

[0106] - When LM mode is applied, W' = W, H' = H;

[0107] - When LM_A mode is applied, W' = W + H;

[0108] - When LM_L mode is applied, H' = H + W.

[0109] where in LM mode, both the above and left samples of the CU are used to calculate the linear model parameters; in LM_A mode, only the above samples of the CU are used to calculate the linear model parameters; and in LM_L mode, only the left samples of the CU are used to calculate the linear model parameters.

[0110] If the positions of the above samples of the chroma block are labeled as S[0,-1]... S[W'-1,-1] and the positions of the left samples of the chroma block are labeled as S[-1,0]... S[-1,H'-1], the positions of the four neighboring chroma samples are selected as follows:

[0111] - When LM mode is applied and both the above and left samples are available, S[W' / 4,-1], S[3*W' / 4,-1], S[-1,H' / 4] and S[-1,3*H' / 4] are selected as the positions of the four neighboring chroma samples;

[0112] - when LM_A mode is applied and top sample is available or when only top sample is available, S[W' / 8,-1], S[3*W' / 8,-1], S[5*W' / 8,-1] and S[7*W' / 8,-1] are selected as the positions of the four neighboring chroma samples;

[0113] - when LM_L mode is applied and left sample is available or when only left sample is available, S[-1,H' / 8], S[-1,3*H' / 8], S[-1,5*H' / 8] and S[-1,7*H' / 8] are selected as the positions of the four neighboring chroma samples.

[0114] Four neighboring luma samples corresponding to the selected positions are obtained by a downsampling operation and the obtained four neighboring luma samples are compared four times to find two larger values x 0 A and x 1 A and two smaller values x 0 B and x 1 B The chroma sample values corresponding to the two larger values and the two smaller values are denoted as y 0 A , y 1 A , y 0 B and y 1 B respectively. Then, X a , X b , Y a and Y b are obtained as follows:

[0115]

[0116] Finally, the linear model parameters a and b are obtained according to the following equations:

[0117]

[0118] b = Y b - a · X b (5)

[0119] Figure 8 A schematic diagram showing the positions of the left and top samples involved in the CCLM mode is shown, including the positions of the left and top samples of an NxN chroma block 501 in a CU and the positions of the left and top samples of a 2Nx2N luma block 503 in the CU.

[0120] The above parameter calculation is performed as part of the decoding process, so no syntax elements are used to pass the values of a and b from the video encoder 20 to the video decoder 30.

[0121] MIP

[0122] MIP is a newly added intra prediction method in VVC. In the MIP prediction method, a prediction signal of samples of a rectangular block is generated based on the following three steps: averaging, matrix-vector multiplication, and linear interpolation, by taking as input a column of H reconstructed neighboring boundary samples on the left side of the rectangular block and a row of W reconstructed neighboring boundary samples above the rectangular block with width W and height H, as shown in Figure 9

[0123] First step: averaging neighboring samples

[0124] Four samples or eight samples are determined by averaging neighboring boundary samples bdry top and bdry left based on the block size and shape. Specifically, neighboring boundary samples bdry top and bdry left are reduced to boundary samples bdry top and bdry left by averaging neighboring boundary samples bdry top and bdry left based on the block size according to a predefined rule. For example, if Index top is equal to 0, neighboring boundary samples bdry top and bdry left are reduced to boundary samples bdry top and bdry left by averaging neighboring boundary samples bdry top and bdry left based on the block size according to the predefined rule. and The reduced boundary samples bdry and bdry are then concatenated into a reduced boundary vector bdry red , so that the size of the reduced boundary vector bdry red is 4 for a block with shape 4x4, and the size of the reduced boundary vector bdry red is 8 for all other shapes of blocks. If Index mode refers to the MIP mode, the concatenation is defined as follows:

[0125]

[0126] Second step: matrix-vector multiplication

[0127] A matrix-vector multiplication is performed by taking the averaged samples in the reduced boundary vector bdry red as input, then adding an offset, to generate a reduced prediction signal of a down-sampled sample set in the original block. More specifically, the reduced prediction signal pred red is calculated as:

[0128] pred red = A bdry red+ b (7)

[0129] Here, A is a matrix of size W red H red with 4 columns (in case W = H = 4) or 8 columns (in all other cases). b is an offset vector of size W red H red .

[0130] Here, W red and H red are defined as:

[0131]

[0132] The matrix A and the offset vector b are taken from one of the sets S0, S1, S2. The index idx of the set S idx from which the matrix A and the offset vector b are taken is defined as follows:

[0133]

[0134] Here, each coefficient of the matrix A is represented with 8-bit precision. The set S0 consists of 16 matrices and 16 offset vectors , i∈{0,..., 15}, each matrix having 16 rows and 4 columns, each offset vector having size 16. The matrices and offset vectors of this set are used for blocks of size 4x4. The set S1 consists of 8 matrices and 8 offset vectors , i∈{0,..., 7}, each matrix having 16 rows and 8 columns, each offset vector having size 16. The set S2 consists of 6 matrices and 6 offset vectors , i∈{0,..., 5}, each matrix having 64 rows and 8 columns, each offset vector having size 64.

[0135] Step 3: Interpolation

[0136] The prediction signal at the remaining positions is generated from the reduced prediction signal of the downsampled sample set by linear interpolation, where the linear interpolation is a single step linear interpolation in each direction. Irrespective of the block shape or block size, the interpolation is first performed in the horizontal direction and then in the vertical direction.

[0137] As described in the foregoing, in the planar mode of intra prediction, the calculation process of pixel prediction is still relatively complex, which makes it difficult to improve the calculation efficiency.

[0138] Take Versatile Video Coding (VVC) as an example. As the latest generation of the international video codec standard, VVC can improve the compression rate by 50% while maintaining the same quality compared to the previous generation HEVC. However, its computational complexity is very high, especially during client decoding. Specifically, VVC consists of two main computational modules: arithmetic decoding and reconstruction. During the reconstruction process, the computational complexity of both the intra-frame prediction module and the inter-frame prediction module is relatively high.

[0139] For example, Figure 10 As shown in FIG, in the planar mode of intra prediction, the output of pixel prediction can be a predicted block with a width of W and a height of H; the input of pixel prediction can include the top reference pixel refTop and the left reference pixel refLeft. For any pixel point (X, Y) in the block to be predicted, its predicted value can be expressed, for example, by the following equation (11):

[0140] pred(X,Y)=(((W-1-X)*refLeft[Y]+(X+1)*refTop[W])*H+((H-1-Y)*refTop[X]+(Y+1)*refLeft(H))*W+W*H) / (W*H*2) (11)

[0141] Among them, pred(X,Y) represents the predicted value of the pixel point (X,Y), refLeft[Y] represents the left reference pixel at height Y, refTop[X] represents the upper reference pixel at width X, refTop[W] represents the upper reference pixel at width W, and refLeft(H) represents the left reference pixel at height H.

[0142] Although the above expression for calculating the predicted value is shown, it is not limited thereto and other expressions may be used. For example, the predicted value of the pixel point (X, Y) may also be expressed by the following equation (12):

[0143] pred(X,Y)=(((W-1-X)*refLeft[Y]+(X+1)*refTop[W]) / W+((H-1-Y)*refTop[X]+(Y+1)*refLeft(H)) / H+1) / 2 (12)

[0144] In addition, after the predicted value pred(X, Y) is obtained, pixel correction can be performed on the predicted value. Specifically, in the current block, the closer the predicted pixel is to the reference pixel position, the more it needs to be corrected based on the close reference pixel. The correction process can be expressed by the following equations (13) and (14):

[0145] scale = (log2(W) + log2(H) - 2) / 4 (13)

[0146] pred(X, Y) = pred(X, Y) + (((32 » ((Y * 2) » scale)) * (refTop(X) - pred(X, Y)) + (32 » ((X * 2) » scale)) * (refLeft(Y) - pred(X, Y))) » 6) (14)

[0147] wherein scale represents a scaling ratio of the image, and (32 » ((Y * 2) » scale)) and (32 » ((X * 2) » scale)) represent scaling terms for scaling the current pixel.

[0148] In the above pixel prediction process, the calculation of the linear interpolation of the prediction is particularly complex, and the overall throughput is low when optimized using, for example, the ARMv8 SIMD instruction set. For example, in the case of 8-bit input pixels, the intermediate results reach 32 bits.

[0149] In addition, in the above pixel correction process, the correction calculation formula is particularly complex, and the correction calculation is only needed when X and / or Y are at special values (for example, when close to the reference pixel), and can not be needed when X and / or Y are far away from the reference pixel. If the above correction calculation formula is used for calculation for each pixel, there will be a large amount of redundant calculation, resulting in a decrease in calculation efficiency.

[0150] In addition, in the overall calculation process of the above pixel prediction and correction, the prediction and correction processes need to be executed in sequence, and there is repeated memory reading and writing, resulting in low calculation efficiency.

[0151] To solve or at least alleviate at least part of the above problems, exemplary embodiments of the present disclosure propose a video encoding method, a video decoding method, a video encoding apparatus, a video decoding apparatus, an electronic device, a computer-readable storage medium, a computer program product, a method of storing a bitstream, and a method of transmitting a bitstream. The following will be described in detail with reference to Figures 11 to 14

[0152] According to a first aspect of embodiments of the present disclosure, a video encoding method is provided. The method can reduce the dynamic range of pixel prediction, reduce the complexity of calculation, avoid the dynamic range being too large in the pixel prediction process, resulting in low overall throughput, and can improve the calculation efficiency.

[0153] Figure 11 A schematic flow of a video encoding method according to exemplary embodiments of the present disclosure is shown. As shown in​Figure 11 As shown in the video encoding method can comprise: in response to determining that the current block is encoded in the planar mode, performing pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel.

[0154] Here, the pixel prediction can comprise applying a scaling factor to the interpolation term in the pixel prediction to reduce the dynamic range of the pixel prediction, wherein the scaling factor can be derived based on the size of the current block.

[0155] As an example, the current block can be or correspond to a CTU, a CU, a PU or a TU, and / or can be or correspond to a respective block and / or sub-block, and the current pixel can be any pixel in the current block.

[0156] In the above pixel prediction process, the interpolation term can represent predicting a pixel within the current block based on a variation trend (e.g. a linear variation trend) of the reference pixels in the width direction or the height direction of the current block, for example, the interpolation term can comprise a horizontal interpolation term (corresponding to the width direction of the block) and / or a vertical interpolation term (corresponding to the height direction of the block).

[0157] Taking the formula (11) in the above as an example, the interpolation term can comprise a horizontal interpolation term (((W-1-X)*refLeft[Y]+(X+1)*refTop[W])*H and a vertical interpolation term ((H-1-Y)*refTop[X]+(Y+1)*refLeft(H))*W.

[0158] Taking the formula (12) in the above as an example, the interpolation term can comprise a horizontal interpolation term (((W-1-X)*refLeft[Y]+(X+1)*refTop[W]) / W and a vertical interpolation term ((H-1-Y)*refTop[X]+(Y+1)*refLeft(H)) / H.

[0159] Although examples of the interpolation term are described herein in combination with the formula (11) and the formula (12) in the above, embodiments of the present disclosure are not limited thereto, and the interpolation term can also have other forms of expression in the pixel prediction of the planar mode, and any form of interpolation term can apply the pixel prediction method of the embodiments of the present disclosure.

[0160] For the above interpolation term, a scaling factor can be applied thereto to reduce the dynamic range of the interpolation term, so as to reduce the overall dynamic range of the pixel prediction, and avoid the problem of dynamic range overflow in the calculation process.

[0161] Here, the specific value or form of the scaling factor can correspond to the form of the interpolation term adopted, and taking the formula (11) in the above as an example, the scaling factor for reducing the interpolation term can be applied to the transverse interpolation term and the longitudinal interpolation term, so that the dynamic range of each interpolation term is reduced; taking the formula (12) in the above as an example, the scaling factor for amplifying the interpolation term can be applied to the transverse interpolation term and the longitudinal interpolation term, so that the dynamic range of each interpolation term is reduced.

[0162] In an example, the scaling factor can be the smaller one of the length and the width of the current block, and by dividing the interpolation term by the scaling factor, the interpolation term can be rounded, so as to reduce the dynamic range. For example, the smaller one of the length and the width of the current block minWH = min(W, H), the larger one of the length and the width of the current block maxWH = max(W, H), and the scaling factor can be minWH.

[0163] As an example, the scaling factor can be applied in the following manner: weighted average of the interpolation term; and dividing each of the results of the weighted average by the scaling factor. For example, when the interpolation term is weighted averaged by the length and / or the width of the current block, in response to the length and / or the width of the current block being in the numerator of the weighted interpolation term, the scaling factor can be divided by each of the results of the weighted average.

[0164] Taking the formula (11) as an example, the formula (11) can represent the weighted average of the interpolation term, and each of the results of the weighted average can be divided by the scaling factor, specifically, the numerator and the denominator of the formula (11) can be divided by the scaling factor minWH, to obtain the following formula (15):

[0165]

[0166] Here, after applying the scaling factor minWH, the interpolation terms are respectively and Wherein, ((W-1-X)*refLeft[Y]+(X+1)*refTop[W]) and ((H-1-Y)*refTop[X]+(Y+1)*refLeft(H)) can be understood as the linear interpolation of the current pixel (X, Y).

[0167] For the interpolation term after applying the scaling factor, since the width W and the height H of the current block are both less than or equal to 64 pixels, the maximum value of each of the above interpolation terms does not exceed maxWH*255.

[0168] In this case, the prediction value can satisfy the following formula (16):

[0169]

[0170] Further, the prediction value can satisfy the following formula (17):

[0171] pred(X, Y)≤(255*(W+H)+maxWH) / (maxWH*2) (17)

[0172] Here, since the maximum value of (W+H) is 128, 255*(W+H)≤255*128, thus, after applying the scaling factor, the interpolation term can be less than the dynamic range of 16 bits.

[0173] In another example, the scaling factor can be the larger one of the length and the width of the current block, by multiplying the interpolation term by the scaling factor, the interpolation term can be rounded, thus reducing the dynamic range. For example, the smaller one of the length and the width of the current block minWH=min(W, H), the larger one of the length and the width of the current block maxWH=max(W, H), the scaling factor can be minWH.

[0174] As an example, the scaling factor can be applied by: weighted averaging the interpolation term; multiplying the scaling factor to each of the results of the weighted averaging respectively. For example, when the interpolation term is weighted averaged by the length and / or the width of the current block, in response to the length and / or the width of the current block being in the denominator of the weighted interpolation term, the scaling factor can be multiplied to each of the results of the weighted averaging respectively.

[0175] Taking formula (12) as an example, formula (12) can represent the weighted averaging of the interpolation term, the scaling factor can be multiplied to each of the results of the weighted averaging respectively, specifically, the scaling factor minWH can be multiplied to the numerator and the denominator of formula (12) simultaneously, to obtain the following formula (18):

[0176]

[0177] Here, after applying the scaling factor minWH, the interpolation terms are respectively and As described above, ((W-1-X)*refLeft[Y]+(X+1)*refTop[W]) and ((H-1-Y)*refTop[X]+(Y+1)*refLeft(H)) can be understood as the linear interpolation of the current pixel (X, Y).

[0178] For the interpolation term after applying the scaling factor, since the width W and the height H of the current block are both less than or equal to 64 pixels, the maximum value of each of the above interpolation terms does not exceed maxWH*255.

[0179] In this case, the prediction value can satisfy the following formula (19):

[0180]

[0181] Further, the prediction value can satisfy the formula (17) above, and thus, after applying the scaling factor, the interpolation term can be less than the dynamic range of 16 bits.

[0182] By the above-mentioned manner of applying the scaling factor, the interpolation term of the pixel can be weighted and averaged in the integer range, thereby avoiding the dynamic range being too large in the pixel prediction calculation, resulting in low calculation efficiency.

[0183] In addition, in the embodiments of the present disclosure, the video encoding method can be executed by a preset instruction set, which counts and retains the result of the right shift operation, for example, rounding, during the right shift operation, so that the dynamic range of the prediction value can be further reduced after applying the scaling factor.

[0184] For example, the preset instruction set is an instruction set based on the ARMv8 architecture. Specifically, the addition right shift operation after the offset term maxWH can use the rshrn instruction specific to the ARMv8 SIMD, so that the right shift operation can be implemented without adding maxWH. Here, by using the ARMv8 platform SIMD instruction set, the complex calculation in the source code can be removed.

[0185] In this way, after applying the scaling factor, all numbers including the interpolation term and the offset term can be represented by 16 bits, the throughput is doubled compared to 32 bits in the related art, and the intermediate result of the calculation can not exceed the expression range of 16 bits, thereby effectively improving the calculation throughput by means of mathematical equivalent transformation.

[0186] Referring back to Figure 11 The video encoding method can further include: step S1120, performing pixel correction on the prediction value to obtain a final prediction value of the current pixel. Here, the final prediction value of the current pixel can be obtained according to the size of the current block and the position of the current pixel. For example, as shown in Figure 12 The pixel correction can include:

[0187] In step S1210, the correction factor corresponding to the current block can be obtained based on the size of the current block.

[0188] As an example, the size of the current block can be substituted into the formula (13) above to obtain the corresponding correction factor sclae, which represents the scaling ratio of the current block.

[0189] At step S1220, a preset correction lookup table can be looked up based on the correction factor and the position of the current pixel to obtain a correction value corresponding to the current pixel.

[0190] As an example, the correction lookup table can include a plurality of correction value sequences corresponding to a plurality of correction factors one by one, each of the correction value sequences can include a plurality of correction values, wherein different correction value sequences correspond to different correction factors, the correction factors represent the scaling ratio of the pixels, and the plurality of correction values in each correction value sequence correspond to a plurality of pixel positions one by one. Here, the correction lookup table can be applied to the pixel correction in the height direction and / or the width direction.

[0191] As an example, the correction lookup table can be obtained by: substituting all possible combinations of the plurality of correction factors and the plurality of pixel positions into a preset correction model to determine a correction value corresponding to each combination; and obtaining the correction lookup table based on the correction values corresponding to all combinations. By determining the correction lookup table in advance, a large number of repeated operations in the prediction process can be avoided.

[0192] For example, considering that the possible values of the correction factor scale are only 0 or 1 or 2, and the height and width of the block are both less than or equal to 64 pixels, each correction factor can be combined with each pixel position and substituted into a correction model such as formula (14) above, for example, into the scaling term of the model, to obtain a correction value corresponding to each combination, for example, each correction value can represent the scaling term value corresponding to the corresponding pixel position under the corresponding correction factor.

[0193] By combining 0, 1 and 2 with 64 pixel positions respectively, a correction lookup table g_table represented as 3x64 can be obtained, specifically, the correction lookup table g_table can have 3 correction value sequences, and each correction value sequence can include 64 correction values. In addition, the length and width of the current block can be less than or equal to the number of correction values in each correction value sequence, for example, when the length / width of the current block is n pixels, the first n correction values in the correction value sequence can be sequentially corresponding to the n pixels of the length / width of the current block.

[0194] In the above example, by substituting each correction factor and each pixel position into the scaling term (32>>((Y*2)>>scale)) or (32>>(X*2)>>scale) in the above formula (14), the obtained correction lookup table g_table can be represented as, for example:

[0195] g_table[3]

[64] = {

[0196] 32,8,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

[0197] 32,16,8,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

[0198] 32,32,16,16,8,8,4,4,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

[0199] }.

[0200] Here, each row in g_table[3]

[64] corresponds to a correction factor scale, for example, 0, 1, and 2, respectively, and the elements in each row can correspond to pixel positions in the width or height direction, for example, pixel positions 0 to 63. In addition, the same correction lookup table can be applied to both the width and height directions.

[0201] Based on the above-mentioned correction lookup table, in step S1220, the correction value corresponding to the current pixel can be obtained in the following manner: according to the correction factor corresponding to the current block, the correction value sequence corresponding to the current block is determined from multiple correction value sequences; according to the position of the current pixel, the correction value corresponding to the current pixel is determined from the correction value sequence corresponding to the current block.

[0202] For example, when the correction factor is 0 and the current pixel is (1, 2), the first row in the correction lookup table g_table[3]

[64] corresponding to the current block can be determined, and the correction value of the current pixel in the width direction (e.g., the X direction) can be determined as 32, e.g., the value of the scaling term (32 » ((X*2) » scale)) is 32; the correction value of the current pixel in the height direction (e.g., the Y direction) can be determined as 8, e.g., the value of the scaling term (32 » ((Y*2) » scale)) is 8. In this way, the values of the scaling terms (32 » ((X*2) » scale)) and (32 » ((Y*2) » scale)) used for correction can be uniquely determined according to the correction factor (e.g., the above-mentioned scale) corresponding to the current block and the position (e.g., the value of X or Y) of the current pixel, and thus, when the pixel correction calculation is performed using, for example, the above formula (13), the scaling terms (32 » ((X*2) » scale)) and (32 » ((Y*2) » scale)) do not need to be calculated.

[0203] In step S1230, the correction value can be applied to the prediction value to obtain the final prediction value of the current pixel.

[0204] In this step, the final prediction value of the current pixel can be determined based on the correction value and the prediction value of the current pixel by using a correction calculation such as the above formula (14).

[0205] As an example, as shown in the above correction lookup table g_table[3]

[64] , for some pixel positions, the values of the scaling terms (32 » ((X*2) » scale)) and (32 » ((Y*2) » scale)) are 0, and thus, for these pixel positions, pixel correction can not need to be performed.

[0206] For example, as shown in the above correction lookup table g_table[3]

[64] , for some pixel positions, the values of the scaling terms (32 » ((X*2) » scale)) and (32 » ((Y*2) » scale)) are 0, and thus, for these pixel positions, pixel correction can not need to be performed. Figure 13 For example, as shown in the above correction lookup table g_table[3]

[64] , for some pixel positions, the values of the scaling terms (32 » ((X*2) » scale)) and (32 » ((Y*2) » scale)) are 0, and thus, for these pixel positions, pixel correction can not need to be performed.

[0207] Taking the sequence of correction values in the first row of the correction lookup table g_table[3]

[64] as an example, the region S0 corresponds to the pixel positions whose values of the scaling terms (32 >> ((X*2) >> scale)) and (32 >> ((Y*2) >> scale)) are 32, 8, 2; the region S1 corresponds to the pixel positions whose values of one of the scaling terms (32 >> ((X*2) >> scale)) and (32 >> ((Y*2) >> scale)) are 32, 8, 2 and the values of the other are 0; and the region S2 corresponds to the pixel positions whose values of the scaling terms (32 >> ((X*2) >> scale)) and (32 >> ((Y*2) >> scale)) are both 0.

[0208] Therefore, different corrections can be performed according to the distance of the pixel from the reference pixel, and in the case that the pixel is far from the reference pixel, no pixel correction is needed, so that a large amount of calculation can be saved.

[0209] In the pixel correction described above, by pre-determining the correction lookup table, complex correction calculation formula can be avoided in the pixel correction, and the required correction value can be directly obtained by table lookup, so that the complexity of the correction is simplified, and the calculation speed and efficiency are improved.

[0210] In addition, the video encoding method according to the embodiments of the present disclosure can further include: storing the prediction value in a register and storing the final prediction value in a memory based on a pipeline algorithm.

[0211] Specifically, by using the pipeline algorithm, the pixel prediction and correction process can be combined together as a whole process, and by reasonable design of the calculation pipeline, the prediction value is stored in the register, and then the pixel correction operation is directly performed, without the need to store the prediction value in the memory first, and then acquire the prediction value from the memory for correction, and store the obtained final prediction value in the memory again, so that the reading and writing time of the whole current block can be saved, and the number of overall memory accesses of the pixel prediction and correction is reduced by such operation fusion.

[0212] For the planar mode of the intra prediction, the basic idea of the mode is to perform linear interpolation using surrounding pixels, and the mode has been implemented on various platforms, such as CPU general instruction set and ARMv8 instruction set, however, the calculation efficiency is relatively low.

[0213] In this regard, in the video encoding method of the exemplary embodiments of the present disclosure, the planar mode acceleration can be implemented on the client side using an instruction set based on the ARMv8 architecture, and compared with the advanced open source implementation, the calculation speed can be improved by 62.2% under the same test conditions.

[0214] According to a second aspect of embodiments of the present disclosure, a video decoding method is provided, comprising Figure 14 As shown in FIG. 14, the video decoding method can comprise: in response to determining that the current block is decoded in the planar mode, performing pixel prediction on a current pixel in the current block to obtain a prediction value of the current pixel.

[0215] Here, the pixel prediction can comprise: applying a scaling factor to an interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0216] As an example, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0217] As an example, the scaling factor is applied by: weighted averaging the interpolation term; and dividing or multiplying each term in the result of the weighted averaging by or with the scaling factor, respectively.

[0218] As an example, as shown in FIG. 14, the video decoding method can further comprise: in response to determining that the current block is decoded in the planar mode, performing pixel prediction on a current pixel in the current block to obtain a prediction value of the current pixel. Figure 14

[0219] As an example, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0220] As an example, the video decoding method can further comprise: storing the prediction value in a register and storing the final prediction value in a memory based on a pipelining algorithm.

[0221] ​The specific manners in which the respective units perform operations in the steps in the embodiments of the video decoding method have been described in detail in the embodiments of the video encoding method, and can be performed correspondingly in the video encoding method, which will not be described in detail here.

[0222] According to a third aspect of embodiments of the present disclosure, a video encoding apparatus is provided, which can include an encoding module configured to perform pixel prediction for a current pixel in a current block to obtain a prediction value of the current pixel in response to determining that the current block is encoded in a planar mode, wherein the encoding module includes an encoding prediction module configured to apply a scaling factor to a interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0223] As an example, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0224] As an example, the encoding module is configured to apply the scaling factor by: weighted averaging the interpolation term; and dividing or multiplying each of results of the weighted averaging by or with the scaling factor, respectively.

[0225] As an example, the encoding module includes an encoding correction module configured to perform pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the encoding correction module is configured to perform the pixel correction by: obtaining a correction factor corresponding to the current block based on the size of the current block; looking up a preset correction lookup table based on the correction factor and a position of the current pixel to obtain a correction value corresponding to the current pixel; and applying the correction value to the prediction value to obtain the final prediction value of the current pixel.

[0226] As an example, the correction lookup table includes a plurality of correction value sequences corresponding to a plurality of correction factors one-to-one, each of the correction value sequences includes a plurality of correction values, the correction factor represents a scaling ratio of a pixel, and the plurality of correction values correspond to a plurality of pixel positions one-to-one. The encoding correction module is configured to: determine, according to the correction factor corresponding to the current block, a correction value sequence corresponding to the current block from the plurality of correction value sequences; and determine, according to the position of the current pixel, a correction value corresponding to the current pixel from the correction value sequence corresponding to the current block. The correction lookup table is obtained by: determining a correction value corresponding to each combination of a plurality of correction factors and a plurality of pixel positions by substituting all possible combinations of the plurality of correction factors and the plurality of pixel positions into a preset correction model; and obtaining the correction lookup table based on the correction values corresponding to all the combinations.

[0227] As an example, the video encoding apparatus further includes an encoding storage unit configured to store the prediction value in a register and store the final prediction value in a memory based on a pipeline algorithm.

[0228] As to the apparatus in the above embodiments, the specific manners in which the respective units perform operations have been described in detail in the embodiments of the method, and thus will not be elaborated here.

[0229] According to a fourth aspect of embodiments of the present disclosure, a video decoding apparatus is provided, which comprises a decoding module configured to, in response to determining that a current block is decoded in a planar mode, perform pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, wherein the decoding module comprises a decoding prediction module configured to apply a scaling factor to a interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

[0230] As an example, the scaling factor is the smaller one or the larger one of a length and a width of the current block.

[0231] As an example, the decoding module is configured to apply the scaling factor by: weighted averaging the interpolation term; and dividing or multiplying each of results of the weighted averaging by or with the scaling factor, respectively.

[0232] As an example, the decoding module comprises a decoding correction module configured to perform pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the encoding correction module is configured to perform the pixel correction by: obtaining a correction factor corresponding to the current block based on the size of the current block; looking up a preset correction lookup table based on the correction factor and a position of the current pixel to obtain a correction value corresponding to the current pixel; and applying the correction value to the prediction value to obtain the final prediction value of the current pixel.

[0233] As an example, the correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors one by one, each of the correction value sequences comprises a plurality of correction values, the correction factor represents a scaling ratio of a pixel, and the plurality of correction values correspond to a plurality of pixel positions one by one. The decoding correction module is configured to: determine, according to the correction factor corresponding to the current block, a correction value sequence corresponding to the current block from the plurality of correction value sequences; and determine, according to the position of the current pixel, a correction value corresponding to the current pixel from the correction value sequence corresponding to the current block. The correction lookup table is obtained by: determining a correction value corresponding to each combination by substituting all possible combinations of the plurality of correction factors and the plurality of pixel positions into a preset correction model; and obtaining the correction lookup table based on the correction values corresponding to all the combinations.

[0234] As an example, the video encoding apparatus further comprises a decoding storage unit configured to store the prediction value in a register and store the final prediction value in a memory based on a pipeline algorithm.

[0235] As to the apparatus in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0236] According to a fifth aspect of embodiments of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor-executable instructions, when executed by the processor, cause the processor to perform the video encoding method or the video decoding method according to the exemplary embodiments of the present disclosure.

[0237] By way of example, an electronic device need not be a single device, but can be a collection of devices or circuits that individually or jointly execute the above instructions (or sets of instructions) to perform the above operations. An electronic device can also be part of an integrated control system or system manager, or can be configured as a server that interfaces with other local or remote (e.g., via wireless transmission) devices.

[0238] In an electronic device, a processor can include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor can also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0239] A processor can execute instructions or code stored in a memory, where the memory can also store data. Instructions and data can also be transmitted and received via a network interface device using any known transmission protocol.

[0240] A memory can be integrated with a processor, such as arranging RAM or flash memory within an integrated circuit microprocessor, etc. In addition, a memory can include a separate device, such as an external disk drive, a storage array, or other storage device usable by any database system. The memory and the processor can be operatively coupled, or can communicate with each other, for example, through an I / O port, a network connection, etc., so that the processor can read files stored in the memory.

[0241] In addition, an electronic device can also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.). All components of an electronic device can be connected to each other via a bus and / or a network.

[0242] In an exemplary embodiment, there can also be provided a computer-readable storage medium that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform a video encoding method or a video decoding method according to an exemplary embodiment of the disclosure.

[0243] The computer-readable storage medium can be, for example, a memory including instructions, and can be, optionally, a read-only memory (ROM), a random access memory (RAM), a random access programmable read-only memory (PROM), an electrically erasable programmable read-only memory (EEPROM), a dynamic random access memory (DRAM), a static random access memory (SRAM), a flash memory, a non-volatile memory, a CD-ROM, a CD-R, a CD+R, a CD-RW, a CD+RW, a DVD-ROM, a DVD-R, a DVD+R, a DVD-RW, a DVD+RW, a DVD-RAM, a BD-ROM, a BD-R, a BD-R LTH, a BD-RE, a Blu-ray or an optical disc memory, a hard disk drive (HDD), a solid state drive (SSD), a card-type memory such as a multimedia card, a secure digital (SD) card, or an extreme digital (XD) card, a magnetic tape, a floppy disk, a magneto-optical data storage device, an optical data storage device, a hard disk, a solid state disk, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and provide the computer program and any associated data, data files, and data structures to a processor or a computer so that the processor or the computer can execute the computer program. The computer program in the above-described computer-readable storage medium can be executed in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc., and, in addition, in one example, the computer program and any associated data, data files, and data structures are distributed over a networked computer system so that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner by one or more processors or computers.

[0244] In an exemplary embodiment, there can also be provided a computer program product having instructions for storing a bitstream, wherein the bitstream includes video data generated by a video encoding method according to an exemplary embodiment of the disclosure or video data to be decoded by a video decoding method according to an exemplary embodiment of the disclosure.

[0245] In an exemplary embodiment, there can also be provided a method of storing a bitstream, the method including generating a bitstream according to a video encoding method according to an exemplary embodiment of the disclosure and storing the bitstream.

[0246] In an example embodiment, a method of transmitting a bitstream can also be provided, the method including generating a bitstream according to the video encoding method as described in the example embodiments of the present disclosure; and transmitting the bitstream.

[0247] Figure 15 A computing environment 1510 is shown coupled with a user interface 1550. The computing environment 1510 can be part of a data processing server. The computing environment 1510 includes a processor 1520, a memory 1530, and an input / output (I / O) interface 1540.

[0248] The processor 1520 generally controls the overall operation of the computing environment 1510, such as operations associated with displaying, data acquisition, data communication, and image processing. The processor 1520 can include one or more processors for executing instructions to perform all or some of the steps in the above-described methods. In addition, the processor 1520 can include one or more modules that facilitate interaction with other components of the processor 1520. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, a graphics processing unit (GPU), etc.

[0249] The memory 1530 is configured to store various types of data to support the operation of the computing environment 1510. The memory 1530 can include predetermined software 1532. Examples of such data include instructions for any application or method operating on the computing environment 1510, video data sets, image data, etc. The memory 1530 can be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0250] The I / O interface 1540 provides an interface between the processor 1520 and peripheral interface modules (e.g., a keyboard, a click wheel, a button, etc.). The button can include, but is not limited to, a home button, a start scanning button, and a stop scanning button. The I / O interface 1540 can be coupled with an encoder and a decoder.

[0251] In an embodiment, a non-transitory computer-readable storage medium including a plurality of programs, for example, in the memory 1530, and / or storing a bitstream generated by the above-described encoding method or a bitstream to be decoded by the above-described decoding method, which can be executed by the processor 1520 in the computing environment 1510 for performing the above-described methods is also provided. In one example, the plurality of programs can be executed by the processor 1520 in the computing environment 1510 to, for example, generate a bitstream according to the video encoding method as described in the example embodiments of the present disclosure, and transmit the bitstream. Figure 2The bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) can be received by a video decoder 30 in a computing environment 1510 and can also be executed by a processor 1520 in the computing environment 1510 for performing the above-described decoding method in decoding video data from the received bitstream or data stream. In another example, the plurality of programs can be executed by the processor 1520 in the computing environment 1510 for performing the above-described encoding method in encoding video information (e.g., video blocks representing video frames, and / or associated one or more syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1520 in the computing environment 1510 for (e.g., transmitting to a video encoder 20 in a computing environment 1500) Figure 3 The bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) can be received by a video decoder 30 in a computing environment 1510 and can also be executed by a processor 1520 in the computing environment 1510 for performing the above-described decoding method in decoding video data from the received bitstream or data stream. In another example, the plurality of programs can be executed by the processor 1520 in the computing environment 1510 for performing the above-described encoding method in encoding video information (e.g., video blocks representing video frames, and / or associated one or more syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1520 in the computing environment 1510 for (e.g., transmitting to a video encoder 20 in a computing environment 1500) Figure 2 The bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) can be received by a video decoder 30 in a computing environment 1510 and can also be executed by a processor 1520 in the computing environment 1510 for performing the above-described decoding method in decoding video data from the received bitstream or data stream. In another example, the plurality of programs can be executed by the processor 1520 in the computing environment 1510 for performing the above-described encoding method in encoding video information (e.g., video blocks representing video frames, and / or associated one or more syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1520 in the computing environment 1510 for (e.g., transmitting to a video encoder 20 in a computing environment 1500) Figure 3 The bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) can be received by a video decoder 30 in a computing environment 1510 and can also be executed by a processor 1520 in the computing environment 1510 for performing the above-described decoding method in decoding video data from the received bitstream or data stream. In another example, the plurality of programs can be executed by the processor 1520 in the computing environment 1510 for performing the above-described encoding method in encoding video information (e.g., video blocks representing video frames, and / or associated one or more syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1520 in the computing environment 1510 for (e.g., transmitting to a video encoder 20 in a computing environment 1500)

[0252] In an embodiment, a bitstream generated by the above-described encoding method or to be decoded by the above-described decoding method is provided. In an embodiment, a bitstream including encoded video information generated by the above-described encoding method or to be decoded by the above-described decoding method is provided.

[0253] In an embodiment, a computing device is also provided, including one or more processors (e.g., the processor 1520), and a non-transitory computer-readable storage medium or memory 1530 in which a plurality of programs that can be executed by the one or more processors are stored, wherein the one or more processors, when executing the plurality of programs, are configured to perform the above-described methods.

[0254] In an embodiment, a computer program product having instructions for storing or transmitting a bitstream including encoded video information generated by the above-described encoding method or to be decoded by the above-described decoding method is also provided. In an embodiment, a computer program product including a plurality of programs in, for example, the memory 1530, which can be executed by the processor 1520 in the computing environment 1510 for performing the above-described methods is also provided. For example, the computer program product can include a non-transitory computer-readable storage medium.

[0255] In embodiments, the computing environment 1510 can be implemented by one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.

[0256] In embodiments, a method of storing a bitstream is also provided, including: storing the bitstream on a digital storage medium, wherein the bitstream includes encoded video information generated by the above-described encoding method or encoded video information to be decoded by the above-described decoding method.

[0257] In embodiments, a method for transmitting a bitstream generated by the above-described encoder is also provided. In embodiments, a method for receiving a bitstream to be decoded by the above-described decoder is also provided.

[0258] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the disclosure. Many modifications, variations, and alternatives to the parts, components, and methods described herein will be apparent to those skilled in the art from the teachings herein without departing from the spirit of the disclosure.

[0259] Unless otherwise specifically noted, the order of steps in the methods according to the present disclosure are merely illustrative and the steps in the methods according to the present disclosure can be modified, combined or deleted according to actual situations. In addition, at least one of the steps in the methods according to the present disclosure can be adjusted, combined or deleted according to actual needs.

[0260] Examples are chosen and described in order to explain the principles of the disclosure and to enable others skilled in the art to best utilize the various embodiments and implementations of the disclosure together with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the disclosure is not to be limited to the specific examples disclosed and that modifications and other embodiments are intended to be included within the scope of this disclosure.

[0261] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such features that are evident to those skilled in the art to which the disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure is indicated by the following claims.

[0262] It should be understood that the present disclosure is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method of video coding, the method comprising: The video encoding method comprises: in response to determining that a current block is encoded in a planar mode, performing pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, wherein the pixel prediction comprises: applying a scaling factor to an interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

2. The video coding method of claim 1, wherein, The scaling factor is a smaller one or a larger one of a length and a width of the current block.

3. The video coding method of claim 1, wherein, The scaling factor is applied in the following manner: weighting average is performed on the interpolation term; each of the results of the weighting average is divided by or multiplied by the scaling factor respectively.

4. The video coding method of claim 1, wherein, The video encoding method further comprises: performing pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the pixel correction comprises: obtaining a correction factor corresponding to the current block based on a size of the current block; looking up a preset correction lookup table based on the correction factor and a position of the current pixel to obtain a correction value corresponding to the current pixel; applying the correction value to the prediction value to obtain the final prediction value of the current pixel.

5. The video coding method of claim 4, wherein, The correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors one by one, each correction value sequence comprising a plurality of correction values, the correction factor representing a scaling ratio of a pixel, and the plurality of correction values corresponding to a plurality of pixel positions one by one, wherein the looking up a preset correction lookup table based on the correction factor and the position of the current pixel to obtain a correction value corresponding to the current pixel comprises: determining a correction value sequence corresponding to the current block from the plurality of correction value sequences according to the correction factor corresponding to the current block; determining a correction value corresponding to the current pixel from the correction value sequence corresponding to the current block according to the position of the current pixel, wherein the correction lookup table is obtained in the following manner: determining a correction value corresponding to each combination by substituting all possible combinations of correction factors and pixel positions into a preset correction model; obtaining the correction lookup table based on the correction values corresponding to all combinations.

6. A method of video decoding, comprising: The video decoding method comprises: in response to determining that a current block is decoded in a planar mode, performing pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, wherein the pixel prediction comprises: applying a scaling factor to an interpolation term in the pixel prediction to reduce a dynamic range of the pixel prediction, wherein the scaling factor is derived based on a size of the current block.

7. The video decoding method of claim 6, wherein, The scaling factor is a smaller one or a larger one of a length and a width of the current block.

8. The video decoding method of claim 6, wherein, The scaling factor is applied in the following manner: weighting average is performed on the interpolation term; each of the results of the weighting average is divided by or multiplied by the scaling factor respectively.

9. The video decoding method of claim 6, wherein, The video decoding method further comprises: performing pixel correction on the prediction value to obtain a final prediction value of the current pixel, wherein the pixel correction comprises: obtaining a correction factor corresponding to the current block based on a size of the current block; The correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors one by one, each correction value sequence comprises a plurality of correction values, the correction factor represents a scaling ratio of a pixel, and the plurality of correction values correspond to a plurality of pixel positions one by one. The correction value is applied to the prediction value to obtain the final prediction value of the current pixel.

10. The video decoding method of claim 9, wherein, The correction lookup table comprises a plurality of correction value sequences corresponding to a plurality of correction factors one by one, each correction value sequence comprises a plurality of correction values, the correction factor represents a scaling ratio of a pixel, and the plurality of correction values correspond to a plurality of pixel positions one by one, The method comprises: According to the correction factor corresponding to the current block, a correction value sequence corresponding to the current block is determined from the plurality of correction value sequences; According to the position of the current pixel, a correction value corresponding to the current pixel is determined from the correction value sequence corresponding to the current block, The method comprises: By substituting all possible combinations of the plurality of correction factors and the plurality of pixel positions into a preset correction model, a correction value corresponding to each combination is determined; Based on the correction values corresponding to all combinations, the correction lookup table is obtained.

11. A video encoding apparatus, comprising: The video encoding apparatus comprises: The encoding module is configured to, in response to determining that a current block is encoded in a planar mode, perform pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, The encoding module comprises an encoding prediction module configured to: Apply a scaling factor to the interpolation term in the pixel prediction to reduce the dynamic range of the pixel prediction, wherein the scaling factor is derived based on the size of the current block.

12. A video decoding apparatus, comprising: The video decoding apparatus comprises: The decoding module is configured to, in response to determining that a current block is decoded in a planar mode, perform pixel prediction for a current pixel in the current block to obtain a prediction value of the current pixel, The decoding module comprises a decoding prediction module configured to: Apply a scaling factor to the interpolation term in the pixel prediction to reduce the dynamic range of the pixel prediction, wherein the scaling factor is derived based on the size of the current block.

13. An electronic device, comprising: The electronic device comprises: A processor; and A memory for storing processor-executable instructions, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the video encoding method according to any one of claims 1 to 5 or the video decoding method according to any one of claims 6 to 10.

14. A computer-readable storage medium, characterized in that, The method comprises:

15. A method of storing a bitstream, the method comprising: Generating a bitstream according to the video encoding method according to any one of claims 1 to 5; and Storing the bitstream. ​