Intra prediction for image and video compression

A novel intra-prediction mode using a focal point and varying prediction angles addresses the challenge of encoding blocks with converging lines, enhancing coding efficiency and reducing residual errors in video and image codecs.

JP7739517B2Active Publication Date: 2025-09-16GOOGLE LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024070714
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-02-13
Filing Date
2024-04-24
Publication Date
2025-09-16
Estimated Expiration
2040-05-14

AI Technical Summary

Technical Problem

Existing intra-prediction modes in video and image codecs struggle to optimally encode blocks containing parallel lines or patterns, such as converging lines, leading to suboptimal residual errors.

Method used

Implement a novel intra-prediction mode that uses a focal point outside the current block, determining x- and y-intercepts to generate predicted pixels with varying prediction angles, allowing for non-parallel prediction lines.

Benefits of technology

This approach reduces residual errors by generating optimal predicted blocks for patterns with converging lines, improving coding efficiency and compression performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007739517000006
    Figure 0007739517000006
  • Figure 0007739517000007
    Figure 0007739517000007
  • Figure 0007739517000008
    Figure 0007739517000008
Patent Text Reader

Abstract

To encode and decode blocks using intra-prediction.SOLUTION: A method for decoding a current block using an intra-prediction mode includes: a step for acquiring a focus, in which the focus has coordinates (a, b) in a coordinate system; and a step for generating a prediction block of the current block using first and second peripheral pixels, in which the first peripheral pixels form a first peripheral pixel line constituting an axis x and the second peripheral pixels form a second peripheral line constituting an axis y. The step for generating the prediction block includes a step for determining at least one of a segment x and a segment y for each position of the prediction block at the position (i, j) of the prediction block, and a step for determining the prediction pixel value at each position of the prediction block by using at least one of the segment x and the segment y.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to and the benefit of U.S. Provisional Patent Application No. 62 / 976,001, filed February 13, 2020, the entire disclosure of which is incorporated herein by reference. [Background technology]

[0002] A digital video stream may represent a video using a sequence of frames or still images. Digital video can be used for a variety of applications, including, for example, video conferencing, high-definition video entertainment, video advertising, or sharing of user-generated video. Digital video streams contain large amounts of data and can consume significant computing or communication resources of a computing device to process, transmit, or store the video data. Various approaches have been proposed to reduce the amount of data in a video stream, including compression and other encoding techniques.

[0003] Spatial similarity coding can be performed by dividing a frame or image into blocks that are predicted based on other blocks in the same frame or image. The difference between the block and the predicted block (i.e., the residual error) is compressed and coded into a bitstream. A decoder uses the difference frame and the reference frame to reconstruct the frame or image. Summary of the Invention [Means for solving the problem]

[0004] Disclosed herein are aspects, features, elements, and implementations for encoding and decoding blocks using intra prediction.

[0005] A first aspect is a method for coding a current block using an intra-prediction mode, the method including: obtaining a focal point, the focal point having coordinates (a, b) in a coordinate system; generating a predictive block of the current block using first and second surrounding pixels, the first surrounding pixels forming a first peripheral pixel line constituting an x-axis, the second surrounding pixels forming a second peripheral pixel line constituting a y-axis, and the first and second peripheral pixel lines forming a coordinate system having an origin; and coding a residual block corresponding to a difference between the current block and the predictive block. The step of generating the predictive block includes the steps of determining at least one of an x-intercept or a y-intercept for each position of the predictive block at position (i, j) of the predictive block, where the x-intercept is a first point where a line formed by a point centered at each position of the predictive block and the focus intersects with a first surrounding pixel line, and the y-intercept is a second point where a line formed by a point centered at each position of the predictive block and the focus intersects with a second surrounding pixel line, and determining a predicted pixel value for each position of the predictive block using at least one of the x-intercept or the y-intercept.

[0006] Another aspect is an apparatus for decoding a current block. The apparatus includes a memory and a processor. The processor is configured to execute instructions stored in the memory to decode a focal point from a compressed bitstream, obtain a predictive block of predicted pixels for the current block, each predicted pixel being at a respective position within the predictive block, and reconstruct the current block using the predictive block. Obtaining the predictive block includes executing instructions to obtain, for each position of the predictive block, a line indicating a respective prediction angle and connecting the focal point to each position, and using the line to determine a pixel value for each position.

[0007] Another aspect is a method for decoding a current block, the method including: obtaining a predictive block of predicted pixels of the current block using surrounding pixels, each predicted pixel being at a respective position within the predictive block; and encoding a focal point in the compressed bitstream, wherein obtaining the predictive block includes performing the steps of obtaining a focal point, the focal point having coordinates (a, b) in a coordinate system, the focal point being outside the current block, and the focal point being none of the surrounding pixels; obtaining, for each position of the predictive block, a line indicating a respective prediction angle, the line connecting the focal point to each position; and determining pixel values ​​for each position using the line.

[0008] It will be appreciated that aspects can be implemented in any convenient form. For example, aspects can be implemented by a suitable computer program that can be carried on a suitable carrier medium, which can be a tangible carrier medium (e.g., a disk) or an intangible carrier medium (e.g., a communication signal). Aspects can also be implemented using a suitable apparatus, which can be in the form of a programmable computer that executes a computer program arranged to implement a method. Aspects can be combined such that functionality described in the context of one aspect can be implemented in another aspect.

[0009] This description makes reference to the accompanying drawings, in which like reference numerals refer to like parts throughout the several views. [Brief explanation of the drawings]

[0010] [Figure 1] 1 is a schematic diagram of a video encoding and decoding system; [Figure 2] 1 is a block diagram of an example of a computing device that can implement a transmitting station or a receiving station. [Figure 3] FIG. 1 is a diagram of a video stream being encoded and subsequently decoded. [Figure 4]FIG. 2 is a block diagram of an encoder according to an implementation of the present disclosure. [Figure 5] FIG. 2 is a block diagram of a decoder according to an implementation of the present disclosure. [Figure 6] FIG. 2 is a block diagram of a representation of a portion of a frame according to an implementation of the present disclosure. [Figure 7] FIG. 10 is a diagram illustrating an example of an intra-prediction mode. [Figure 8] FIG. 1 shows an example of an image portion including railroad tracks. [Figure 9] FIG. 10 illustrates an example flowchart of a technique for determining a position along a line of surrounding pixels for determining a predicted pixel value, according to an implementation of the present disclosure. [Figure 10] 10A-10C illustrate examples of positions calculated by the technique of FIG. 9 in accordance with an implementation of the present disclosure. [Figure 11] FIG. 11 is a diagram showing an example of a predicted block calculated from the example of FIG. 10. [Figure 12] FIG. 10 is a flowchart diagram of a technique for intra prediction of a current block according to an implementation of this disclosure. [Figure 13] FIG. 10 is a flowchart diagram of a technique for generating a predictive block for a current block using intra prediction, according to an implementation of this disclosure. [Figure 14] 10 is a flowchart diagram of a technique for coding a current block using intra-prediction modes according to an implementation of this disclosure. [Figure 15] FIG. 15 illustrates an example 1500 illustrating focus according to an implementation of the present disclosure. [Figure 16] FIG. 10 illustrates an example showing x-intercepts and y-intercepts according to an implementation of the present disclosure. [Figure 17] FIG. 10 illustrates an example of a group of focal points according to an implementation of the present disclosure. [Figure 18] FIG. 10 illustrates an example flowchart of a technique for determining a position along a line of surrounding pixels for determining a predicted pixel value, according to an implementation of the present disclosure. [Figure 19]FIG. 10 is a flowchart diagram of a technique for generating a predictive block for a current block using intra prediction, according to an implementation of this disclosure. [Figure 20A] FIG. 20 shows an example used to explain the technique of FIG. 19. [Figure 20B] FIG. 20 shows an example used to explain the technique of FIG. 19. [Figure 21] FIG. 20 shows an example of the technique of FIG. 19 when the top surrounding pixel is used as the primary surrounding pixel. DETAILED DESCRIPTION OF THE INVENTION

[0011] As described above, compression schemes related to coding a video stream may include dividing an image into blocks and generating a digital video output bitstream (i.e., an encoded bitstream) using one or more techniques to limit the information included in the output bitstream. The received bitstream can be decoded to recreate the blocks and source images from the limited information. Encoding a video stream, or a portion thereof, such as a frame or block, may include using spatial similarities in the video stream to improve coding efficiency. For example, a current block of a video stream may be coded based on identifying differences (residuals) between previously coded pixel values ​​or between a combination of previously coded pixel values ​​and those in the current block.

[0012] Coding using spatial similarity is known as intra prediction. Intra prediction attempts to predict pixel values ​​of a current block or a single image of a frame (i.e., image, picture) of a video stream using pixels surrounding the current block, i.e., pixels within the same frame as the current block but outside the current block. Intra prediction can be performed along directions of prediction, referred to herein as prediction angles, and each direction can correspond to an intra prediction mode. An intra prediction mode uses pixels surrounding the current block being predicted. The pixels surrounding the current block are pixels outside the current block. The intra prediction mode can be signaled to the decoder by the encoder.

[0013] Many different intra-prediction modes can be supported. Some intra-prediction modes use a single value for all pixels in a predicted block generated using at least one of the surrounding pixels. Others are called directional intra-prediction modes, each with a corresponding prediction angle. Intra-prediction modes can include, for example, horizontal intra-prediction mode, vertical intra-prediction mode, and various other directional intra-prediction modes. For example, a codec may have available prediction modes corresponding to 50-60 prediction angles. Examples of intra-prediction modes are described with respect to FIG. 7.

[0014] However, intra-prediction modes of current codecs, such as those described above and with respect to FIG. 7, may not optimally code blocks of an image or scene that contain parallel lines. As is known, a scene (e.g., an image) in perspective, or one in which the image is viewed at an angle that contains parallel lines, may have one or more vanishing points. That is, parallel lines may be perceived (i.e., seen) as converging to (or diverging from) a vanishing point (or focal point). Non-limiting examples of images containing parallel lines or checkerboard patterns include striped shirts, bricks on buildings, blinds, train tracks, clapboard wood flooring, sunbeams, tree trunks, etc. For ease of explanation, parallel lines are used herein, but the disclosure is not so limited. For example, the disclosure herein can be used with parallel edges (such as the edge of a pencil in an image where the image is taken from point to point). Also, the disclosure is not limited to straight lines. The parameters described below can be used to cover curves in the prediction lines.

[0015] Such patterns are easily recognized visually. However, such patterns can be very difficult to identify and encode programmatically when viewed from perspectives other than 90-degree angles. As already mentioned, parallel lines can appear to meet at a point in the distance, as described with respect to Figure 8, which shows converging railroad tracks.

[0016] Some intra-prediction modes may be associated with a direction, and the same direction may be used to generate each of the predicted pixels of the predicted block. However, for converging lines (such as the railroad tracks in FIG. 8), each of the lines may have a different direction. Therefore, an intra-prediction mode with a specific direction may not generate an optimal predicted block for coding the current block. An optimal predicted block refers to a predicted block that minimizes the residual error between the predicted block and the current block being coded.

[0017] Implementations according to the present disclosure use a novel intra-prediction mode that can be used to code blocks containing converging lines. As shown above, the intra-prediction mode uses surrounding pixels of the current block. At a high level, a predicted block generated using an intra-prediction mode according to implementations of the present disclosure may be such that one pixel of a row of the predictive block can be copied from one or more surrounding pixels along one direction, and another pixel of the same row of the predictive block can be copied from one or more other surrounding pixels along another direction. Furthermore, zooming (in or out) can optionally be applied according to the parameters of the intra-prediction mode, as further described below.

[0018] In some embodiments, to generate a predicted block according to the intra-prediction modes of the present disclosure, the same set of surrounding pixels (i.e., the upper and / or left surrounding pixels) typically used in intra-prediction are resampled multiple times for each pixel (i.e., pixel position) of the predicted block. The surrounding pixels are treated as a continuous line of pixel values ​​and, for ease of reference, are referred to herein as a surrounding pixel line. To generate a predicted pixel of the predicted block, various positions of the surrounding pixel line are considered. However, each time a position is considered, the position is shifted from the previous position according to the parameters of the intra-prediction mode, as described further below. Note that, among the pixel positions of the surrounding pixel line, only the pixel values ​​of integer positions, i.e., the surrounding pixels themselves, are known. Therefore, sub-pixel (i.e., non-integer pixel) values ​​of the surrounding pixel line are obtained from the surrounding pixels, for example, using an interpolation or filtering operation.

[0019] In other embodiments, a directional prediction mode may be used to generate the initial predicted block. A warp (e.g., a warping function, a set of warping parameters, etc.) may then be applied to the initial predicted block to generate the predicted block. In one example, the warp may be a perspective warp. In one example, the warp may be an affine warp.

[0020] In yet other embodiments, intra prediction modes according to the present disclosure may use a focal point that is distant from the current block. The focal point may be considered as a point in space from which all pixels of the current block diverge or converge. For each predicted pixel location in the predicted block, a line is drawn connecting the pixel location to the focal point. The x- and y-intercepts of where the line intersects the x- and y-axes of a coordinate system formed by the surrounding pixels to the left and above are determined. The x- and y-intercepts are used to determine (e.g., identify, select, calculate, etc.) the surrounding pixels used to calculate the value of the predicted pixel.

[0021] In summary, for all pixels of a prediction block, a directional prediction mode such as that described with reference to Figure 7 results in parallel prediction lines. However, an intra-prediction mode according to an implementation of the present disclosure results in non-parallel prediction lines. Therefore, at least two prediction pixels can be calculated according to different prediction angles.

[0022] Intra-prediction modes according to the present disclosure may result in two or more predicted pixels being derived (e.g., calculated) using parallel prediction lines (i.e., the same prediction angle), which is merely coincidental, compared to the design and semantics of conventional directional prediction modes in which each of the predicted pixels is calculated according to the same prediction angle. For example, depending on the position of the focus, multiple predicted pixels can have the same prediction angle, whereas intra-prediction modes according to implementations of the present disclosure are such that not all predicted pixels can have the same prediction angle.

[0023] After first describing an environment in which the intra-prediction of image and video compression disclosed herein can be implemented, details are described herein. Although the intra-prediction modes according to this disclosure are described with respect to video encoders and video decoders, the intra-prediction modes can also be used in image codecs. The image codecs can be or share many aspects of the video codecs described herein.

[0024] Figure 1 is a schematic diagram of a video encoding and decoding system 100. The transmitting station 102 may be, for example, a computer having a hardware configuration as described in Figure 2. However, other suitable implementations of the transmitting station 102 are possible. For example, the processing of the transmitting station 102 may be distributed across multiple devices.

[0025] A network 104 can connect the transmitting station 102 and the receiving station 106 for encoding and decoding of the video stream. Specifically, the video stream can be encoded at the transmitting station 102, and the encoded video stream can be decoded at the receiving station 106. The network 104 can be, for example, the Internet. The network 104 can also be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a cellular telephone network, or any other means of transferring the video stream from the transmitting station 102 to the receiving station 106 in this example.

[0026] In one example, the receiving station 106 may be a computer having an internal hardware configuration as described in Figure 2. However, other suitable implementations of the receiving station 106 are possible. For example, the processing of the receiving station 106 may be distributed across multiple devices.

[0027] Other implementations of the video encoding and decoding system 100 are possible. For example, an implementation could omit the network 104. In another implementation, the video stream can be encoded and then stored for later transmission to the receiving station 106 or any other device with memory. In one implementation, the receiving station 106 receives the encoded video stream (e.g., via the network 104, a computer bus, and / or some communication path) and stores the video stream for later decoding. In an exemplary implementation, Real-Time Transport Protocol (RTP) is used for transmission of the encoded video over the network 104. In another implementation, a transport protocol other than RTP, for example, a HyperText Transfer Protocol (HTTP)-based video streaming protocol, may be used.

[0028] When used in a videoconferencing system, for example, transmitting station 102 and / or receiving station 106 may include the capabilities to both encode and decode video streams, as described below. For example, receiving station 106 may be a videoconferencing participant that receives an encoded video bitstream from a videoconferencing server (e.g., transmitting station 102) for decoding and display, and further encodes and transmits its own video bitstream to the videoconferencing server to be decoded and displayed by other participants.

[0029] 2 is a block diagram of an example computing device 200 capable of implementing a transmitting station or a receiving station. For example, the computing device 200 may implement one or both of the transmitting station 102 and the receiving station 106 of FIG. 1. The computing device 200 may be in the form of a computing system including multiple computing devices, or in the form of a single computing device, such as a mobile phone, tablet computer, laptop computer, notebook computer, desktop computer, etc.

[0030] CPU 202 in computing device 200 may be a central processing unit. Alternatively, CPU 202 may be any other type of device, or multiple devices, now existing or later developed, that can manipulate or process information. While the disclosed implementations may be implemented using a single processor, e.g., CPU 202, as shown, advantages in speed and efficiency may be achieved using multiple processors.

[0031] The memory 204 in the computing device 200 may, in implementation, be a read-only memory (ROM) device or a random-access memory (RAM) device. Other suitable types of storage devices may be used as the memory 204. The memory 204 may include code and data 206 accessed by the CPU 202 using a bus 212. The memory 204 may further include an operating system 208 and application programs 210, which include at least one program that enables the CPU 202 to perform the methods described herein. For example, the application programs 210 may include applications 1 through N, which further include a video coding application that performs the methods described herein. The computing device 200 may also include secondary storage 214, which may be, for example, a memory card used with a portable computing device 200. Because video communication sessions may include a significant amount of information, they may be stored in whole or in part in the secondary storage 214 and loaded into the memory 204 as needed for processing.

[0032] Computing device 200 may also include one or more output devices, such as a display 218. Display 218, in one example, may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. Display 218 may be coupled to CPU 202 via bus 212. Other output devices that enable a user to program or otherwise use computing device 200 may be provided in addition to, or as an alternative to, display 218. When an output device is or includes a display, the display may be implemented in a variety of ways, including a liquid crystal display (LCD), a cathode ray tube (CRT) display, or a light emitting diode (LED) display, such as an organic LED (OLED) display.

[0033] Computing device 200 may also include or communicate with image sensing device 220, such as a camera or any other now existing or later developed image sensing device 220 that is capable of sensing images, such as images of a user operating computing device 200. Image sensing device 220 may be positioned to be pointed at a user operating computing device 200. In one example, the position and optical axis of image sensing device 220 may be configured such that the field of view is immediately adjacent to display 218 and includes an area from which display 218 is viewable.

[0034] Computing device 200 may also include or communicate with a sound sensing device 222, such as a microphone or any other now existing or later developed sound sensing device capable of sensing sound near computing device 200. Sound sensing device 222 may be positioned to face a user while computing device 200 is operating, and may be configured to receive sounds, such as voice or other utterances, made by the user while the user is operating computing device 200.

[0035] While FIG. 2 depicts the CPU 202 and memory 204 of computing device 200 as integrated into a single unit, other configurations may be utilized. The operations of CPU 202 may be distributed across multiple machines (each having one or more processors) that may be coupled directly or through a local area or other network. Memory 204 may be distributed across multiple machines, such as a network-based memory or memory across multiple machines that perform the operations of computing device 200. While depicted herein as a single bus, bus 212 of computing device 200 may be comprised of multiple buses. Additionally, secondary storage 214 may be directly coupled to other components of computing device 200 or may be accessible over a network and may comprise a single integrated unit, such as a memory card, or multiple units, such as multiple memory cards. Thus, computing device 200 may be implemented in a wide variety of configurations.

[0036] FIG. 3 is a diagram of an example video stream 300 that is encoded and subsequently decoded. The video stream 300 includes a video sequence 302. At the next level, the video sequence 302 includes several adjacent frames 304. While three adjacent frames 304 are shown, the video sequence 302 can include any number of adjacent frames 304. The adjacent frames 304 can then be further subdivided into individual frames, e.g., frame 306. At the next level, the frame 306 can be divided into a series of segments 308 or planes. A segment 308 can be, for example, a subset of a frame that allows for parallel processing. A segment 308 can also be a subset of a frame that allows for separation of video data into separate colors. For example, a frame 306 of color video data can include a luminance plane and two chrominance planes. The segments 308 can be sampled at different resolutions.

[0037] Regardless of whether the frame 306 is divided into segments 308, the frame 306 may be further subdivided into blocks 310, which may contain data corresponding to, for example, 16x16 pixels within the frame 306. The blocks 310 may also be arranged to contain data from one or more segments 308 of pixel data. The blocks 310 may also be any other suitable size, such as 4x4 pixels, 8x8 pixels, 16x8 pixels, 8x16 pixels, 16x16 pixels, or more.

[0038] 4 is a block diagram of an encoder 400 according to an implementation of the present disclosure. The encoder 400 can be implemented in the transmitting station 102, such as by providing a computer software program stored in a memory, e.g., the memory 204, as described above. The computer software program can include machine instructions that, when executed by a processor, such as the CPU 202, cause the transmitting station 102 to encode video data in the manner described herein. The encoder 400 can also be implemented as specialized hardware included in the transmitting station 102, for example. The encoder 400 has the following stages that perform various functions in a forward path (indicated by solid connecting lines) to generate an encoded or compressed bitstream 420 using the video stream 300 as input: an intra / inter prediction stage 402, a transform stage 404, a quantization stage 406, and an entropy encoding stage 408. The encoder 400 can also include a reconstruction path (indicated by dotted connecting lines) to reconstruct frames for encoding future blocks. 4, the encoder 400 has the following stages for performing various functions in the reconstruction path: an inverse quantization stage 410, an inverse transform stage 412, a reconstruction stage 414, and a loop filtering stage 416. Other structural variations of the encoder 400 can be used to encode the video stream 300.

[0039] When the video stream 300 is presented for encoding, the frames 306 may be processed in units of blocks. In the intra / inter prediction stage 402, blocks may be coded using intra-frame prediction (also called intra-prediction) or inter-frame prediction (also called inter-prediction), or a combination of both. In either case, a predictive block may be formed. In the case of intra-prediction, all or part of the predictive block may be formed from samples in the current frame that have been previously coded and reconstructed. In the case of inter-prediction, all or part of the predictive block may be formed from samples in one or more previously constructed reference frames determined using motion vectors.

[0040] Next, still referring to FIG. 4, the prediction block may be subtracted from the current block in the intra / inter prediction stage 402 to generate a residual block (also called a residual). The transform stage 404 transforms the residual into transform coefficients in the frequency domain, for example, using a block-based transform. Such block-based transforms include, for example, the discrete cosine transform (DCT) and the asymmetric discrete sine transform (ADST). Other block-based transforms are also possible. Furthermore, a combination of different transforms may be applied to a single residual. In one example of applying a transform, the DCT transforms the residual block into the frequency domain, where the transform coefficient values ​​are based on spatial frequency: the lowest frequency (DC) coefficient at the top left of the matrix and the highest frequency coefficient at the bottom right of the matrix. Note that the size of the prediction block, and therefore the size of the resulting residual block, may differ from the size of the transform block. For example, the prediction block may be divided into smaller blocks to which separate transforms are applied.

[0041] The quantization stage 406 converts the transform coefficients into discrete quantized values, referred to as quantized transform coefficients, using quantizer values ​​or quantization levels. For example, the transform coefficients may be divided by the quantizer value and truncated. The quantized transform coefficients are then entropy coded by the entropy coding stage 408. Entropy coding may be performed using various techniques, including token trees and binary trees. The entropy coded coefficients are then output to a compressed bitstream 420 along with other information used to decode the block, which may include, for example, the type of prediction used, the transform type, motion vectors, and the quantizer value. The information for decoding the block may be entropy coded in block, frame, slice, and / or section headers within the compressed bitstream 420. The compressed bitstream 420 may also be referred to as a coded video stream or coded video bitstream, and these terms are used interchangeably herein.

[0042] The reconstruction path in Figure 4 (indicated by the dotted connecting line) can be used to ensure that both the encoder 400 and the decoder 500 (described below) use the same reference frames and blocks to decode the compressed bitstream 420. The reconstruction path performs functions similar to those performed during the decoding process, described in more detail below, including inverse quantizing the quantized transform coefficients in an inverse quantization stage 410 and inverse transforming the inverse quantized transform coefficients in an inverse transform stage 412 to generate a differential residual block (also called a differential residual). In a reconstruction stage 414, a predictive block predicted in the intra / inter prediction stage 402 can be added to the differential residual to create a reconstructed block. A loop filtering stage 416 can be applied to the reconstructed block to reduce distortions such as blocking artifacts.

[0043] Other variations of the encoder 400 can be used to encode the compressed bitstream 420. For example, a non-transform-based encoder 400 can directly quantize the residual signal for a particular block or frame without the transform stage 404. In another implementation, the encoder 400 can combine the quantization stage 406 and the inverse quantization stage 410 into a single stage.

[0044] 5 is a block diagram of a decoder 500 according to an implementation of the present disclosure. The decoder 500 can be implemented in the receiving station 106, for example, by providing a computer software program stored in the memory 204. The computer software program can include machine instructions that, when executed by a processor such as the CPU 202, cause the receiving station 106 to decode video data in the manner described herein. The decoder 500 can also be implemented in hardware included in the transmitting station 102 or the receiving station 106, for example. Similar to the reconstruction path of the encoder 400 discussed above, the decoder 500, in one example, includes the following stages for performing various functions to generate an output video stream 516 from a compressed bitstream 420: an entropy decoding stage 502, an inverse quantization stage 504, an inverse transform stage 506, an intra / inter prediction stage 508, a reconstruction stage 510, a loop filtering stage 512, and a deblocking filtering stage 514. Other structural variations of the decoder 500 can be used to decode the compressed bitstream 420.

[0045] When the compressed bitstream 420 is presented for decoding, data elements in the compressed bitstream 420 can be decoded by an entropy decoding stage 502 to generate a set of quantized transform coefficients. An inverse quantization stage 504 inverse quantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by a quantizer value), and an inverse transform stage 506 inverse transforms the inverse quantized transform coefficients using a selected transform type to generate differential residuals that may be identical to those created by the inverse transform stage 412 in the encoder 400. Using header information decoded from the compressed bitstream 420, the decoder 500 can use an intra / inter prediction stage 508 to create a predictive block identical to that created in the encoder 400, for example, in the intra / inter prediction stage 402. In a reconstruction stage 510, a predictive block can be added to the differential residual to create a reconstructed block. A loop filtering stage 512 can be applied to the reconstructed block to reduce blocking artifacts. Other filtering can be applied to the reconstructed block. In this example, a deblocking filtering stage 514 is applied to the reconstructed blocks to reduce blocking artifacts, and the result is output as an output video stream 516. The output video stream 516 may also be referred to as a decoded video stream, and these terms are used interchangeably herein.

[0046] Other variations of the decoder 500 can be used to decode the compressed bitstream 420. For example, the decoder 500 can generate the output video stream 516 without the deblocking filtering stage 514. In some implementations of the decoder 500, the deblocking filtering stage 514 is applied before the loop filtering stage 512. Additionally, or alternatively, the encoder 400 includes a deblocking filtering stage in addition to the loop filtering stage 416.

[0047] 6 is a block diagram of a representation of a portion 600 of a frame, such as frame 306 of FIG. 3, according to an implementation of the present disclosure. As shown, portion 600 of the frame includes four 64×64 blocks 610, which may be referred to as superblocks, in two rows and two columns of a matrix or Cartesian plane. The size of the superblocks may be large or small. While FIG. 6 is described with respect to superblocks of size 64×64, the description is easily extendable to larger (e.g., 128×128) or smaller superblock sizes.

[0048] In one example, without loss of generality, a superblock can be a basic or largest coding unit (CU). Each superblock can include four 32x32 blocks 620. Each 32x32 block 620 can include four 16x16 blocks 630. Each 16x16 block 630 can include four 8x8 blocks 640. Each 8x8 block 640 can include four 4x4 blocks 650. Each 4x4 block 650 can include 16 pixels, which can be represented by four rows and four columns in each block in a Cartesian plane or matrix. The pixels can include information representing an image captured in a frame, such as luminance information, color information, and position information. In one example, a block, such as the 16x16 pixel block shown, can include a luminance block 660, which can include luminance pixels 662, and two chrominance blocks 670 / 680, such as a U or Cb chrominance block 670 and a V or Cr chrominance block 680. The chrominance blocks 670 / 680 can include chrominance pixels 690. For example, the luminance block 660 can include 16x16 luminance pixels 662, and each chrominance block 670 / 680 can include 8x8 chrominance pixels 690, as shown. Although one arrangement of blocks is shown, any arrangement can be used. While FIG. 6 shows NxN blocks, some implementations can use NxM blocks, where N≠M. For example, 32x64 blocks, 64x32 blocks, 16x32 blocks, 32x16 blocks, or blocks of any other size can be used. In some implementations, Nx2N blocks, 2NxN blocks, or a combination thereof can be used.

[0049] In some implementations, video coding can include ordered block-level coding. Ordered block-level coding can include coding blocks of a frame in an order, such as raster scan order, where blocks can be identified and processed starting with the block in the upper left corner of the frame or a portion of the frame, and then proceeding from left to right along the rows, from the top row to the bottom row, identifying each block for processing in turn. For example, the superblock in the top row and left column of the frame can be the first block coded, and the superblock immediately to the right of the first block can be the second block coded. The second row from the top can be the second row coded, such that the superblock in the left column of the second row can be coded after the superblock in the rightmost column of the first row.

[0050] In one example, coding of blocks can include the use of quad-tree coding, which can include coding smaller block units using blocks in raster scan order. The 64x64 superblock shown in the lower left corner of the frame portion shown in Figure 6 can be coded, for example, using quad-tree coding, where the upper-left 32x32 block can be coded, then the upper-right 32x32 block, then the lower-left 32x32 block, and then the lower-right 32x32 block. Each 32x32 block can be coded using quad-tree coding, where the upper-left 16x16 block can be coded, then the upper-right 16x16 block, then the lower-left 16x16 block, and then the lower-right 16x16 block. Each 16x16 block can be coded using quad-tree coding, where the top-left 8x8 block can be coded, then the top-right 8x8 block, then the bottom-left 8x8 block, then the bottom-right 8x8 block. Each 8x8 block can be coded using quad-tree coding, where the top-left 4x4 block can be coded, then the top-right 4x4 block, then the bottom-left 4x4 block, then the bottom-right 4x4 block. In some implementations, the 8x8 block can be omitted for 16x16 blocks, and the 16x16 blocks can be coded using quad-tree coding, where the top-left 4x4 block can be coded, then the other 4x4 blocks in the 16x16 block can be coded in raster scan order.

[0051] In one example, video coding may involve compressing information contained in an original or input frame by omitting some of the information of the original frame from a corresponding encoded frame. For example, coding may involve reducing spectral redundancy, reducing spatial redundancy, reducing temporal redundancy, or a combination thereof.

[0052] In one example, reducing spectral redundancy can include using a color model based on a luminance component (Y) and two chrominance components (U and V or Cb and Cr), which may be referred to as a YUV or YCbCr color model or color space. Using the YUV color model can include using a relatively large amount of information to represent the luminance component of a portion of a frame and a relatively small amount of information to represent each chrominance component corresponding to the portion of the frame. For example, the portion of a frame can be represented by a high-resolution luminance component that can include a 16x16 block of pixels and two lower-resolution chrominance components, each of which represents the portion of the frame as an 8x8 block of pixels. The pixels can represent values ​​(e.g., values ​​ranging from 0 to 255) and can be stored or transmitted, for example, using 8 bits. Although this disclosure is described with reference to the YUV color model, any color model can be used.

[0053] Reducing spatial redundancy can include transforming the blocks into the frequency domain, as described above. For example, a unit of an encoder such as entropy encoding stage 408 in Figure 4 can perform a DCT using transform coefficient values ​​that are based on spatial frequency.

[0054] Temporal redundancy reduction can include using inter-frame similarities to encode frames using relatively small amounts of data based on one or more reference frames, which can be previously encoded, decoded, and reconstructed frames of a video stream. For example, blocks or pixels of a current frame can be similar to spatially corresponding blocks or pixels of a reference frame. Blocks or pixels of a current frame can be similar to blocks or pixels of a reference frame that are at different spatial locations. Thus, reducing temporal redundancy can include generating motion information indicative of spatial differences (e.g., a transformation between the location of a block or pixel in a current frame and the corresponding location of a block or pixel in a reference frame).

[0055] Reducing temporal redundancy may include identifying a block or pixel in a reference frame, or a portion of a reference frame, that corresponds to a pixel of the current block or current frame. For example, a reference frame or a portion of a reference frame, which may be stored in a memory, may be searched for an optimal block or pixel to use to encode the current block or pixel of the current frame. For example, the search may identify a block of the reference frame in which the difference in pixel values ​​between the reference block and the current block is minimized, and may be referred to as a motion search. The portion of the reference frame searched may be limited. For example, the portion of the reference frame searched, which may be referred to as a search area, may include a limited number of rows of the reference frame. In one example, identifying the reference block may include calculating a cost function, such as the sum of absolute differences (SAD) between pixels of blocks in the search area and pixels of the current block.

[0056] As described above, the current block can be predicted using intra prediction. Intra prediction modes use pixels surrounding the current block being predicted. The pixels surrounding the current block are pixels outside the current block. Many different intra prediction modes are available. Figure 7 illustrates examples of intra prediction modes.

[0057] Some intra-prediction modes use a single value for all pixels in a predicted block generated using at least one of the surrounding pixels. As an example, the VP9 codec includes an intra-prediction mode called true motion (TM_PRED) mode, in which all values ​​in the predicted block have the value of the predicted pixel (x, y) = (top neighbor + left neighbor - top-left neighbor) for all x and y. As another example, DC intra-prediction mode (DC_PRED) is such that each pixel in the predicted block is set to the predicted pixel (x, y) = the average value across the top row and left column.

[0058] Other intra-prediction modes, sometimes called directional intra-prediction modes, are such that each can have a corresponding prediction angle.

[0059] An intra-prediction mode may be selected by an encoder as part of a rate-distortion loop. Simply put, various intra-prediction modes may be tested to determine the type of prediction that results in the least distortion at a given rate, or the number of bits transmitted in the encoded video bitstream, including overhead bits included in the bitstream to indicate the type of prediction used.

[0060] In the example codec, the following 13 intra prediction modes can be used: DC_PRED, V_PRED, H_PRED, D45_PRED, D135_PRED, D117_PRED, D153_PRED, D207_PRED, D63_PRED, SMOOTH_PRED, SMOOTH_V_PRED, and SMOOTH_H_PRED, and PAETH_PRED. One of the 13 intra prediction modes can be used to predict luma blocks.

[0061] Intra-prediction mode 710 indicates the V_PRED intra-prediction mode, commonly referred to as the vertical intra-prediction mode, in which the predictive block pixels in the first column are set to the value of surrounding pixel A, the predictive block pixels in the second column are set to the value of pixel B, the predictive block pixels in the third column are set to the value of pixel C, and the predictive block pixels in the fourth column are set to the value of pixel D.

[0062] Intra prediction mode 720 indicates H_PRED intra prediction mode, commonly referred to as horizontal intra prediction mode, in which the prediction block pixels in the first row are set to the value of surrounding pixel I, the prediction block pixels in the second row are set to the value of pixel J, the prediction block pixels in the third row are set to the value of pixel K, and the prediction block pixels in the fourth row are set to the value of pixel L.

[0063] Intra prediction mode 730 indicates the so-called D117_PRED intra prediction mode because the direction of the arrow along which surrounding pixels are propagated to generate a diagonal predicted block is at an angle of approximately 117° from horizontal. That is, in D117_PRED, the prediction angle is 117°. Intra prediction mode 740 indicates the D63_PRED intra prediction mode, which corresponds to a prediction angle of 63°. Intra prediction mode 750 indicates the D153_PRED intra prediction mode, which corresponds to a prediction angle of 153°. Intra prediction mode 760 indicates the D135_PRED intra prediction mode, which corresponds to a prediction angle of 135°.

[0064] Prediction modes D45_PRED and D207_PRED (not shown) correspond to prediction angles of 45° and 207°, respectively. DC_PRED corresponds to a prediction mode in which all prediction block pixels are set to a single value that is a combination of surrounding pixels A to M.

[0065] In the PAETH_PRED intra-prediction mode, the predicted value of a pixel is determined as follows: 1) calculate a base value as a combination of several surrounding pixels, and 2) use one of several surrounding pixels closest to the base value as the predicted pixel. The PAETH_PRED intra-prediction mode is shown using pixel 712 (at position x=1, y=2) as an example. In the example of a combination of several surrounding pixels, the base value can be calculated as base=B+KM. That is, the base value is equal to the value of the left surrounding pixel in the same row as the pixel to be predicted + the value of the above surrounding pixel in the same column as the pixel - the value of the pixel in the upper left corner.

[0066] In SMOOTH_V intra prediction mode, the predicted pixel in the bottom row of the prediction block is estimated using the value of the last pixel in the left column (i.e., the value of the pixel at position L). The remaining pixels of the prediction block are calculated by quadratic interpolation in the vertical direction.

[0067] In SMOOTH_H intra prediction mode, the predicted pixel in the rightmost column of the prediction block is estimated using the value of the last pixel in the top row (i.e., the value of the pixel at position D). The remaining pixels of the prediction block are calculated by quadratic interpolation in the horizontal direction.

[0068] In SMOOTH_PRED intra prediction mode, the predicted pixel in the bottom row of the prediction block is estimated using the value of the last pixel in the left column (i.e., the value of the pixel at position L), and the predicted pixel in the rightmost column of the prediction block is estimated using the value of the last pixel in the top row (i.e., the value of the pixel at position D). The remaining pixels in the prediction block are calculated as a scaled weighted sum. For example, the value of the predicted pixel at position (i,j) of the prediction block is estimated using the value of the last pixel in the left column (i,j) of the prediction block. j , R, T i , and B can be calculated as a scaled weighted sum of the values ​​of pixel L j is the pixel in the left column and in the same row as the predicted pixel. Pixel R is the pixel provided by SMOOTH_H. Pixel T i is the pixel in the row above and in the same column as the predicted pixel. Pixel B is the pixel provided by SMOOTH_V. The weights can correspond to quadratic interpolation in the horizontal and vertical directions.

[0069] The intra-prediction mode selected by the encoder may be transmitted to the decoder in a bitstream. The intra-prediction mode may be entropy coded (encoded by the encoder and / or decoded by the decoder) using a context model.

[0070] Some codecs use the intra-prediction modes of the left and above neighboring blocks as context for coding the intra-prediction mode of the current block. Using Figure 7 as an example, the left neighboring block may be the block containing pixels I-L, and the above neighboring block may be the block containing pixels A-D.

[0071] Figure 770 shows the intra-prediction modes available in the VP9 codec. Coded VP9 supports a set of 10 intra-prediction modes for block sizes ranging from 4x4 to 32x32. These intra-prediction modes are DC_PRED, TM_PRED, H_PRED, V_PRED, and six diagonal prediction modes: D45_PRED, D63_PRED, D117_PRED, D135_PRED, D153_PRED, and D207_PRED, which correspond approximately to angles 45, 63, 117, 135, 153, and 207 degrees (measured counterclockwise relative to the horizontal axis).

[0072] 8 is an example of an image portion 800 that includes railroad tracks. The image portion 800 includes a first track 802 and a second track 804. In reality, the first track 802 and the second track 804 are parallel. However, in the image portion 800, the first track 802 and the second track 804 are shown to converge at a focal point 803 that is outside the image portion 800.

[0073] For purposes of explanation and clearer visualization, current block 806 is superimposed on a portion of image portion 800. Note that typically, each location (i.e., cell) of the current block corresponds to or represents one pixel. However, for purposes of explanation and clarity, each cell of current block 806 obviously includes significantly more than one pixel. Also, although not specifically marked, note that first line 802 and second line 804 each include an inner and outer line pair. The lines of each pair of lines are also parallel and converge to image portion 800 at different focal points.

[0074] Image portion 800 also includes surrounding pixels 808. The surrounding pixels are shown as being above the current block 806. However, as noted above, the surrounding pixels may be the pixel above, the top-left pixel, the left pixel, or a combination thereof.

[0075] Cell 810 contains a portion of the first rail line 802, which propagates in a southwesterly direction to the current block 806. However, the portion of the second rail line 804, shown in cell 812, propagates in a southeasterly direction to the current block 806.

[0076] As mentioned above, the unidirectional intra prediction mode cannot properly predict the current block 806 from the surrounding pixels 808 .

[0077] 9 is an example flowchart of a technique 900 for determining (e.g., selecting, calculating, deriving, etc.) positions along a peripheral pixel line (i.e., an upper peripheral pixel line) for determining a predicted pixel value, according to an implementation of the present disclosure. The technique 900 for deriving positions is merely an example, and other techniques are possible. For a predicted block (or equivalently, a current block) of size M×N, the technique 900 calculates a block (e.g., a two-dimensional array) of size M×N. The two-dimensional array is hereinafter referred to as the array POSITIONS.

[0078] Technique 900 may be implemented as a software program that may be executed by a computing device, such as, for example, transmitting station 102 or receiving station 106. The software program may be stored in a memory, such as memory 204 or secondary storage 214, and may include machine-readable instructions that, when executed by a processor, such as CPU 202, cause the computing device to perform technique 900. Technique 900 may be implemented in whole or in part in intra / inter prediction stage 402 of encoder 400 of FIG. 4 and / or intra / inter prediction stage 508 of decoder 500 of FIG. 5. Technique 900 may be implemented using dedicated hardware or firmware. Multiple processors, memories, or both may be used.

[0079] Given a current block and a set of upper surrounding pixels (i.e., integer surrounding pixel positions), technique 900 determines, for each predicted pixel of the predicted block (i.e., or equivalently, each predicted pixel position), a position along the upper surrounding pixel line from which to derive the value of the predicted pixel. As described further below, the position along the upper surrounding pixel line may be a sub-pixel position. Thus, the value at that position of the surrounding pixel line can be derived from the upper surrounding pixels (e.g., using interpolation).

[0080] Technique 900 can be summarized as resampling (e.g., repeatedly looking at, considering, etc.) a set of surrounding pixels above (e.g., positions of the surrounding pixels) for each row of the prediction block, and shifting the positions according to one or more parameters of the intra-prediction mode at each resampling.

[0081] That position can then be used to generate (e.g., calculate, etc.) a predictive block for the current block. If technique 900 is implemented by an encoder, the predictive block can be used to determine a residual block, which is then encoded into a compressed bitstream, such as compressed bitstream 420 of FIG. 4. If technique 900 is implemented by a decoder, the predictive block can be for reconstructing the current block by adding the predictive block to a residual block that is decoded from a compressed bitstream, such as compressed bitstream 420 of FIG. 5.

[0082] The peripheral pixel line can include the upper peripheral pixels (e.g., pixels A-D, or pixels A-D and M in FIG. 7). Peripheral pixel M in FIG. 7 can be considered part of the pixel above, part of the pixel to the left, or can be referred to individually. In one example, the upper peripheral pixels can include additional pixels (referred to herein as an overhang of the upper pixel), such as peripheral pixels E-H in FIG. 7 and FIG. 15. Note that the overhang of the left pixel is not shown in FIG. 7.

[0083] The positions calculated by technique 900 may be relative to a one-dimensional array containing surrounding pixels. For example, assume that the surrounding pixels available for predicting the current block are pixels A-H in Figure 7. The pixel values ​​A-H may be stored in an array periph_pixels, such as periph_pixels = [0, 0, A, B, C, D, E, F, G, H]. The following explains why the first two positions in the periph_pixels array are 0.

[0084] In one example, technique 900 may calculate negative positions corresponding to pixel positions outside the block. Negative positions correspond to positions to the left of the block. In one example, pixel values ​​that are too far from the current pixel may not be used as a predictor for the pixel, and instead, a closer pixel may be used for prediction. In the case of a negative pixel position, that pixel from another boundary (e.g., a surrounding pixel to the left) may be determined to be closer (e.g., a better predictor), as described further below.

[0085] As an implementation detail, periph_pixels can account for such a situation by including empty locations in the array periph_pixels. The periph_pixels array is shown as including two (2) empty locations (empty_slots). Thus, if technique 900 determines a position (e.g., calculated_position) of zero (0), that position corresponds to pixel value A (e.g., periph_pixels[empty_slots+calculated_position] = periph_pixels[2+0] = A). Similarly, if technique 900 calculates a position of -2, that corresponds to pixel value periph_pixels[2+(-2)] = [0] = 0. Similarly, the periph_pixels array can include training for empty slots.

[0086] In one example, technique 900 may receive as input or have access to one or more parameters of an intra-prediction mode. Technique 900 may receive the size and width of the current block (or equivalently, the size and width of the predicted block). Technique 900 may also receive one or more of the following parameters: horizontal offset (h_off), horizontal step (h_st), horizontal acceleration (h_acc), vertical offset (v_off), vertical step (v_st), and vertical acceleration (v_acc). In one example, not receiving a parameter may be equivalent to receiving a zero value for the parameter. Although the parameters are described below as additive quantities, in some examples, at least some of the parameters may equally be multiplicative values.

[0087] The horizontal offset (h_off) parameter is an offset (i.e., a position offset) used for each single vertical pixel step. The horizontal offset (h_off) can answer the question: For a new row (e.g., row=k) of a prediction block, where is the pixel position from which to derive the value of the first pixel of the new row, compared (e.g., relative) to the position of the first pixel of the previous row (e.g., row=k-1) along the surrounding pixel lines? The horizontal offset can indicate an initial prediction angle. The initial prediction angle refers to the angle at which to predict the first pixel of each row of the prediction block.

[0088] The horizontal step (h_st) parameter is an offset that can be used horizontally for the next pixel. That is, for a given predicted pixel in a row of a predicted block, the horizontal step (h_st) indicates the distance to the next position along the surrounding pixel line, relative to the position of the previous pixel in the same row. A horizontal step (h_st) less than 1 (e.g., 0.95, 0.8, etc.) can implement a zoom-out effect in the predicted block. For example, using a horizontal step (h_st) less than 1 causes the railroad tracks in Figure 8 to move away from each other in the predicted block. Similarly, using a horizontal step (h_st) greater than 1 (e.g., 1.05, 1.2, etc.) can implement a zoom-in effect in the predicted block.

[0089] The horizontal acceleration (h_acc) parameter is the change added to each subsequent horizontal step (h_st). Instead of stepping from one position to the next along the surrounding pixel line in a constant horizontal step, the horizontal acceleration (h_acc) parameter can be used as a shift to consistently move the position further. Thus, horizontal acceleration allows for transformations similar to homographic transformations.

[0090] The vertical offset (v_off) parameter is the change applied to the horizontal offset (h_off) for each subsequent row. That is, if h_off is used for the first row of the predicted block, then (h_off+v_off) is used for the second row, ((h_off+v_off)+v_off) is used for the third row, and so on. The vertical step (v_st) parameter is the change applied to the horizontal step (h_st) for each subsequent row of the predicted block. The vertical acceleration (v_acc) parameter is the change applied to the horizontal acceleration (h_acc) for each subsequent row of the predicted block.

[0091] It should be noted that acceleration in both or at least one of the directions (i.e., horizontal acceleration (h_acc) parameter and / or vertical acceleration (v_acc) parameter) allows for curve prediction, i.e., acceleration parameters can enable curve prediction.

[0092] At 902, the technique 900 initializes variables. The variable h_step_start may be initialized to the horizontal step parameter: h_step_start=h_st. The variables h_offset and h_start may be initialized to the horizontal offset: h_offset=h_off and h_start=h_off, respectively.

[0093] At 904, technique 900 initializes an outer loop variable i. Technique 900 performs 908-920 for each row of the prediction block. At 906, technique 900 determines whether there are more rows in the prediction block. If there are more rows, technique 900 proceeds to 908; if there are not more rows, technique 900 ends at 922. When technique 900 ends at 922, each pixel position in the prediction position has a respective position along the surrounding pixel line where a pixel value for each pixel position is calculated (e.g., derived, etc.) in the POSITIONS two-dimensional array.

[0094] At 908, technique 900 sets the position variable p to the variable h_start (ie, p=h_start) and the variable h_step to the variable h_step_start (ie, h_step=h_step_start).

[0095] At 910, technique 900 initializes inner loop variable j. Technique 900 performs 914-918 for each pixel in row i of the prediction block. At 912, technique 900 determines whether there are more pixel positions in the row (i.e., more columns). If there are more columns, technique 900 proceeds to 914; if there are not, technique 900 proceeds to 920 to reset (i.e., update) the variables for the next row of the prediction block, if any.

[0096] At 914, technique 900 sets position (i,j) of the POSITIONS array to the value of position variable p (i.e., POSITIONS(i,j)=p). At 916, technique 900 advances position variable p to the next horizontal position by adding h_step to position variable p (i.e., p=h_step+p). At 918, technique 900 prepares variable h_step for the next column of row i of the predicted block, if there are more unprocessed columns. Thus, technique 900 adds horizontal acceleration (h_acc) to variable h_step (i.e., h_step=h_acc+h_step). From 918, technique 900 returns to 912.

[0097] At 920, technique 900 prepares (i.e., updates) its variables for the next row of the predicted block, if any. Thus, for the next row (i.e., row=i+1), technique 900 updates h_start to h_start=h_offset+h_start, adds the vertical offset (v_off) to h_offset (i.e., h_offset=v_off+h_offset), adds the vertical step (v_st) to h_step_start (i.e., h_step_start=v_st+h_step_start), and adds the vertical acceleration (v_acc) to h_acc (i.e., h_acc=v_acc+h_acc).

[0098] 10 is an example 1000 of positions (i.e., array POSITIONS) calculated by the technique of FIG. 9 in accordance with an implementation of the present disclosure. Example 1000 is generated for an input, current block size of 8×8, horizontal offset h_off=−0.2, horizontal step h_st=1.05, horizontal acceleration h_acc=0, vertical offset v_off=0, vertical step v_st=0.06, and vertical acceleration v_acc=0. Example 1000 shows the values ​​of the two-dimensional array POSITIONS described above.

[0099] Example 1000 shows, for each position (i,j) of the prediction block, where i = 0, ..., column -1, j = 0, ..., row -1, the position of the surrounding pixel line from which the predicted value for position (i,j) is to be derived. Predictor positions 1002-1008 show example position values ​​for example 1000. Predictor position 1002, corresponding to position (3,1) of the prediction block, derives its predicted value from position 2.93 of the surrounding pixel line. Predictor position 1004, corresponding to position (6,4) of the prediction block, derives its predicted value from position 6.74 of the surrounding pixel line. Predictor position 1006, corresponding to position (0,1) of the prediction block, derives its predicted value from position -0.4 of the surrounding pixel line. Predictor position 1008, corresponding to position (0,6) of the prediction block, derives its predicted value from position -1.4 of the surrounding pixel line.

[0100] FIG. 11 is an example predictive block 1100 calculated from example 1000 of FIG. 10. Example 1100 includes a predictive block 1102 visualized as predictive block 1104. Predictive block 1102 (and equivalently, predictive block 1104) is derived (e.g., generated, calculated, etc.) using example 1000 of FIG. 10 and the location of surrounding predicted pixels 1106, which may be the top (i.e., upper) surrounding pixels. Surrounding predicted pixels 1106 may be, for example, surrounding pixels A-H of FIG. 7. Surrounding predicted pixels 1108 are visualizations of surrounding predicted pixels 1106.

[0101] In the visualization, a pixel value of zero (0) corresponds to a black square, and a pixel value of 255 corresponds to a white square. Pixel values ​​between 0 and 255 correspond to various shades of gray squares. Thus, a luminance block is shown as an example of an intra-prediction mode according to this disclosure. However, this disclosure is not so limited. The disclosed techniques also apply to chrominance blocks or any other color component blocks. In general, the techniques disclosed herein apply to any generated prediction block, which may be of any size M×N, where M and N are positive integers.

[0102] 9 may be non-integer positions (i.e., sub-pixel positions) of the surrounding pixel line. The pixel values ​​of the surrounding pixel line at the non-integer positions are derived (e.g., calculated, etc.) from available integer pixel position values ​​(i.e., surrounding pixels), such as the surrounding predicted pixels 1106.

[0103] Many techniques can be used to calculate subpixel positions (i.e., pixel values ​​at subpixel positions). For example, a multi-tap (e.g., 4-tap, 6-tap, etc.) finite impulse response (FIR) filter can be used. For example, an average of surrounding pixels can be used. For example, bilinear interpolation can be used. For example, bicubic interpolation of four pixels of surrounding pixels (e.g., the top row or left column) can be used. For example, a convolution operation can be used. The convolution operation can use pixels other than the surrounding pixels. In one example, a convolution kernel of size N×N can be used. Therefore, N rows (columns) of the upper (left) neighboring block can be used. For illustration, a 4-tap filter or a 4×1 convolution kernel with weights (−0.1, 0.6, 0.6, −0.1) can be used. Therefore, if we calculate the pixel value at a location between pixel1 and pixel2 in a set of four pixels (pixel0, pixel1, pixel2, pixel3), we can calculate it as clamp(-0.10*pixel0+0.6*pixel1+0.6*pixel2-0.10*pixel3,0,255), where the clamp() operation sets any calculated value less than zero to zero and any calculated value greater than 255 to 255.

[0104] Prediction block 1102 shows the use of bilinear interpolation. For a sub-pixel position of a surrounding pixel line, the two nearest integer pixels are found. The predictor value is calculated as a weighted sum of the two nearest integer pixels. The weights depend on the distance of the sub-pixel position to the two integer pixel positions.

[0105] Given the position pos of a peripheral pixel line, the pixel value pix_val at pos can be calculated as pix_val = left_weight x left_pixel + right_weight x right_pixel, where Left_pixel is the pixel value of the nearest integer pixel adjacent to the left of position pos, and Right_pixel is the pixel value of the nearest integer pixel adjacent to the right of position pos.

[0106] The position of the left_pixel can be calculated as left_pos = floor(pos), where floor() is a function that returns the largest integer less than or equal to pos. Therefore, floor(6.74) = 6. Position 6.74 is the position of predictor position 1004 in Figure 10. The position of the right_pixel can be calculated as right_pos = ceiling(pos), where ceiling() is a function that returns the smallest integer greater than or equal to pos. Therefore, ceiling(6.74) = 7.

[0107] In one example, right_weight can be calculated as right_weight=pos-left_pos, and left_weight can be calculated as left_weight=1-right_weight. Thus, for position 6.74 of predictor position 1004, right_weight=6.74-6=0.74, and left_weight=1-0.74=0.26. Pixel value 1112 of prediction block 1102 is a value derived from predictor position 1004 in FIG. 10. Thus, pixel value 1112 is calculated as ((255×0.26)+(0×0.74))=66.

[0108] Similarly, predictor value 1110 is the predictor pixel value calculated from predictor position 1006 in FIG. 10 (i.e., −0.4). Therefore, left_pos and right_pos are −1 and 0, respectively. right_weight and left_weight are 0.6 and 0.4, respectively. The right neighboring pixel value is the neighboring pixel value of the neighboring predicted pixel 1106 at position 0. Therefore, the right neighboring pixel value is pixel 1114, which has a value of 0. The left neighboring pixel is unavailable. Therefore, the left neighboring pixel value is 0. Therefore, predictor value 1110 is calculated as ((0×0.4)+(0×0.6))=0.

[0109] How the parameters (i.e., parameter values) of the intra-prediction modes are used is described above with respect to Figures 10 and 11. There are a number of ways to select the parameter values.

[0110] In one example, the mode selection process of the encoder may test all possible parameter values ​​to find the optimal combination of parameter values ​​that results in the smallest residual. In one example, the smallest residual may be the one that results in the best rate-distortion value. In one example, the smallest residual may be the one that results in the smallest residual error. The smallest residual error may be a mean squared error. The smallest residual error may be a sum of absolute difference errors. Any other suitable error measure may be used. The encoder may encode the parameter values ​​of the optimal combination of parameter values ​​in the encoded bitstream in addition to an indication of the intra-prediction mode itself. The decoder may decode the parameter values ​​of the optimal combination of parameter values. In one example, the indication of the intra-prediction mode itself may be a numeric value (e.g., an integer) that instructs the decoder to perform intra prediction of the current block using the intra-prediction parameters, as described herein.

[0111] Testing all possible values ​​for each parameter can be an impractical solution, so you can choose a finite number of values ​​for each parameter and test a finite number of value combinations.

[0112] For example, the horizontal offset (h_off) parameter may be selected from a limited range of values. In one example, the limited range of values ​​may be [-4, +4]. A step value may be used to select a horizontal offset (h_off) parameter value within the limited range to test. In one example, the step may be 0.25 (or some other value). Thus, values ​​of -4, -3.75, -3.5, -3.25, ..., 3.75, 4 may be tested. In one example, the vertical offset (v_off) parameter may be selected similarly to the horizontal offset parameter.

[0113] For the horizontal step (h_st) and vertical step (v_st), values ​​relatively close to 1 can be selected. Any other values ​​may result in zooming in the predicted block too quickly. Therefore, values ​​in the range of [0.9, 1.1] can be tested for the horizontal step (h_st) and vertical step (v_st). Generally, however, the horizontal step (h_st) and vertical step (v_st) can each be selected from the range of [-4, 4] with a step value that may be 0.25. The selected horizontal acceleration (h_acc) and vertical acceleration (v_acc) parameter values ​​may be close to 0. In one example, the horizontal acceleration (h_acc) and vertical acceleration (v_acc) parameter values ​​may be 0 or 1, respectively. More generally, the horizontal parameters and corresponding vertical parameters can have values ​​and / or ranges of values.

[0114] In another example, the encoder may select parameter values ​​based on a likely best set of parameter values. The likely best set of parameter values ​​may be referred to herein as predicted parameter values. The likely best set of parameter values ​​may be derived by predicting the surrounding pixels from neighboring pixels. That is, for top surrounding pixels, the surrounding pixels constitute the bottom row of the previously reconstructed block, and for left surrounding pixels, the surrounding pixels constitute the rightmost column of the previously reconstructed block. Thus, the surrounding pixel's neighboring row, column, or both (as the case may be) may be used as a predictor for the surrounding pixel. Since the predictor for the surrounding pixel and the surrounding pixel itself are known, the parameter values ​​may be derived therefrom. In this case, the encoder need not encode the likely best set of parameter values ​​in the compressed bitstream, because the decoder can perform exactly the same process as the encoder to derive the likely best set of parameter values. Therefore, the encoder only needs to encode in the bitstream an indication of the intra-prediction mode itself.

[0115] In another example, differential parameter values ​​can be encoded by an encoder. For example, the encoder can derive optimal parameter values ​​as described above, and can also derive a likely best set of parameter values ​​(i.e., predicted parameter values) as described above. The encoder then encodes the respective differences between the optimal parameter values ​​and the likely best set of parameter values, in addition to an indication of the intra-prediction mode. That is, for example, with respect to a horizontal offset (h_off), the encoder can derive an optimal horizontal offset (opt_h_off) and a likely best horizontal offset (predicted_h_offset). The encoder then encodes the difference (opt_h_off-predicted_h_offset).

[0116] FIG. 12 is a flowchart diagram of a technique 1200 for intra-prediction of a current block according to an implementation of the present disclosure. The intra-prediction mode uses surrounding pixels of the current block. The surrounding pixels of the current block may be previously predicted pixels in the same video frame or image as the current block. The current block may be a luminance block, a chrominance block, or any other color component block. The size of the current block may be M×N, where M and N are positive integers. In an example, M is equal to N. In an example, M is not equal to N. For example, the size of the current block may be 4×4, 4×8, 8×4, 8×8, 16×16, or any other current block size. The technique 1200 generates a prediction block of the current block that is the same size as the current block. The technique 1200 may be implemented in an encoder such as the encoder 400 of FIG. 4. The technique 1200 may be implemented in a decoder such as the decoder 500 of FIG. 5.

[0117] Technique 1200 may be implemented as a software program that may be executed by a computing device such as, for example, transmitting station 102 or receiving station 106. The software program may be stored in a memory such as memory 204 or secondary storage 214 and may include machine-readable instructions that may be executed by a processor such as CPU 202 to cause the computing device to perform technique 1200. In at least some implementations, technique 1200 may be performed in whole or in part by intra / inter prediction stage 402 of encoder 400 of FIG. 4. In other implementations, technique 1200 may be performed in whole or in part by intra / inter prediction stage 508 of decoder 500 of FIG. 5.

[0118] Technique 1200 can be implemented using dedicated hardware or firmware. Some computing devices can have multiple memories, multiple processors, or both. The steps or operations of technique 1200 can be distributed using different processors, memories, or both. The use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory, as well as devices having multiple processors or multiple memories that can be used in performing some or all of the described steps.

[0119] At 1202, technique 1200 selects surrounding pixels of a current block. The surrounding pixels are used to generate a prediction block of the current block. In one example, the surrounding pixels may be pixels above the current block. In one example, the surrounding pixels may be pixels to the left of the current block. In one example, the surrounding pixels may be a combination of pixels above and to the left of the current block. When implemented by a decoder, selecting the surrounding pixels may include reading (e.g., decoding) an indication (e.g., syntax element) from the compressed bitstream that indicates which surrounding pixels are used.

[0120] For each position (i.e., pixel position) of the predicted block, technique 1200 performs steps 1206 through 1208. Thus, if the size of the current block is M×N, the predicted block can include M*N pixel positions. Thus, at 1204, technique 1200 determines whether there are any pixel positions of the predicted block for which steps 1206 through 1208 have not yet been performed. If there are any pixel positions that have not yet been performed, technique 1200 proceeds to 1206; if there are no more, technique 1200 proceeds to 1210.

[0121] At 1206, the technique 1200 selects two respective pixels of the surrounding pixels as pixel locations of the prediction block. In one example, the technique 1200 first selects locations along a line of consecutive surrounding pixels where the surrounding pixels are integer pixel locations. At 1208, the technique 1200 calculates a predicted pixel (i.e., a pixel value) for the pixel location of the prediction block by interpolating the two respective pixels.

[0122] In one example, selecting positions along the line of consecutive surrounding pixels may be as described with respect to FIG. 9. Thus, selecting two respective ones of the surrounding pixels may include selecting two respective ones of the surrounding pixels for calculating a first predicted pixel of the predictive block and selecting two respective ones of the surrounding pixels for calculating a second predicted pixel of the predictive block. The second predicted pixel may be a horizontally adjacent pixel of the first predicted pixel. The first two respective ones and the second two respective ones may be selected according to an intra-prediction mode parameter.

[0123] As described above, the intra-prediction mode parameters may include at least two of a horizontal offset, a horizontal step, or a horizontal acceleration. In one example, the intra-prediction mode parameters may include a horizontal offset, a horizontal step, and a horizontal acceleration. As described above, the horizontal offset may indicate an initial prediction angle, the horizontal step may be used as a subsequent offset for subsequent predicted pixels in the same row, and the horizontal acceleration may indicate a change in the horizontal offset to be added to each subsequent horizontal step.

[0124] For example, the horizontal offset may be selected from a limited range based on a step value. In one example, the limited range may be from -4 to 4. In one example, the step value may be 0.25. In one example, the horizontal (vertical) step may be selected from a range from -4 to 4 based on the step value. The step value may be 0.25 or some other value. In one example, the horizontal (vertical) acceleration may be 0. In another example, the horizontal (vertical) acceleration may be 1.

[0125] As further described above, the intra-prediction mode parameters may also include at least two of a vertical offset, a vertical step, or a vertical acceleration. In one example, the intra-prediction mode parameters may include a vertical offset, a vertical step, and a vertical acceleration. The vertical offset may indicate a first change to the horizontal offset to be applied to each subsequent row of the prediction block. The vertical step may indicate a second change to the horizontal step to be applied to each subsequent row of the prediction block. The vertical acceleration may indicate a third change to the horizontal acceleration to be applied to each subsequent row of the prediction block.

[0126] In one example, calculating the predicted pixel by interpolating two respective pixels may include calculating the predicted pixel using bilinear interpolation.

[0127] At 1210, technique 1200 codes a residual block corresponding to the difference between the current block and the predictive block. When implemented by an encoder, technique 1200 encodes the residual block in a compressed bitstream. When implemented by a decoder, technique 1200 decodes the residual block from the compressed bitstream. The decoded residual block can be added to the predictive block to reconstruct the current block.

[0128] When implemented by a decoder, technique 1200 may also include decoding the intra-prediction mode parameter from the compressed bitstream. In another example, as described above, the intra-prediction mode parameter may be derived by predicting surrounding pixels from other previously reconstructed pixels, including the surrounding pixels, according to the intra-prediction mode parameter.

[0129] 13 is a flowchart diagram of a technique 1300 for generating a predictive block for a current block using intra prediction according to an implementation of this disclosure. The intra prediction mode uses surrounding pixels of the current block, which may be as described with respect to technique 1200 of FIG. 12. The current block may be as described with respect to technique 1200 of FIG. 12. Technique 1300 may be implemented in an encoder such as encoder 400 of FIG. 4. Technique 1300 may be implemented in a decoder such as decoder 500 of FIG. 5.

[0130] Technique 1300 may be implemented as a software program that may be executed by a computing device such as, for example, transmitting station 102 or receiving station 106. The software program may be stored in a memory such as memory 204 or secondary storage 214 and may include machine-readable instructions that may be executed by a processor such as CPU 202 to cause the computing device to perform technique 1300. In at least some implementations, technique 1300 may be performed in whole or in part by intra / inter prediction stage 402 of encoder 400 of FIG. 4. In other implementations, technique 1300 may be performed in whole or in part by intra / inter prediction stage 508 of decoder 500 of FIG. 5.

[0131] Technique 1300 can be implemented using dedicated hardware or firmware. Some computing devices can have multiple memories, multiple processors, or both. The steps or operations of technique 1300 can be distributed using different processors, memories, or both. The use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory, as well as devices having multiple processors or multiple memories that can be used in performing some or all of the described steps.

[0132] At 1302, technique 1300 determines surrounding pixels for generating a prediction block of the current block. Determining surrounding pixels can mean selecting which of the surrounding pixels to use, as described with respect to 1202 of Figure 12. The surrounding pixels can be considered to be integer pixel positions along a surrounding pixel line (i.e., a continuous line of surrounding pixels).

[0133] At 1304, technique 1300 determines a respective sub-pixel position of a surrounding pixel line for each pixel of the predictive block. Determining the respective sub-pixel positions may be as described with respect to FIG. 9. The sub-pixel positions of the surrounding pixel line as used herein also encompass integer pixel positions. That is, for example, the determined sub-pixel position may be the position of one of the surrounding pixels itself.

[0134] At 1306, for each predicted pixel of the predictive block, the technique 1300 calculates a predicted pixel as an integer-pixel interpolation of surrounding pixels corresponding to each predicted pixel's respective sub-pixel position. In one example, the interpolation may be a nearest integer-pixel interpolation, as described above with respect to FIG. 11 . In one example, bilinear interpolation may be used. In another example, integer-pixel filtering may be performed to obtain the predicted pixel of the predictive block.

[0135] In one example, determining the respective sub-pixel positions of the surrounding pixels for each pixel of the prediction block may include, for each row pixel of a first row of the prediction block, determining the respective sub-pixel positions using parameters comprising at least two of a horizontal offset, a horizontal step, or a horizontal acceleration. As described above, the horizontal offset may indicate an initial prediction angle. As described above, the horizontal step may be used as a subsequent offset for subsequent prediction pixels in the same row. As described above, the horizontal acceleration may indicate a change in the horizontal offset added to each subsequent horizontal step.

[0136] In one example, determining respective sub-pixel positions of surrounding pixels for each pixel of the predictive block may include determining respective sub-pixel positions for each pixel of a second row of the predictive block, and the parameters further include at least two of a vertical offset, a vertical step, or a vertical acceleration. As described above, the vertical offset may indicate a first change to a horizontal offset to be applied to each subsequent row of the predictive block. As described above, the vertical step may indicate a second change to a horizontal step to be applied to each subsequent row of the predictive block. As described above, the vertical acceleration may indicate a third change to a horizontal acceleration to be applied to each subsequent row of the predictive block.

[0137] In one example, when implemented by a decoder, technique 1300 may include decoding parameters from a compressed bitstream. In one example, decoding parameters from a compressed bitstream may include decoding parameter differences, deriving predicted parameter values, and, for each parameter, adding each parameter difference to each predicted parameter value, as described above.

[0138] As mentioned above, in one embodiment, a directional prediction mode may be used to generate an initial predicted block. A warp (e.g., a warping function, a set of warping parameters, parameters, etc.) may then be applied to the initial predicted block to generate a predicted block.

[0139] In one example, the warp parameters can be derived using the current block and the initial predicted block. Any number of techniques can be used to derive the warp parameters. For example, a random sample consensus (RANSAC) method can be used to fit a model (i.e., warp model, parameters) to the matching points between the current block and the initial predicted block. RANSAC is an iterative algorithm that can be used to estimate warp parameters (i.e., parameters) between two blocks. In one example, the most matching pixels between the current block and the initial predicted block can be used to derive the warp parameters. The warp can be a homograph warp, an affine warp, a similarity warp, or some other warp.

[0140] A homograph warp can use eight parameters to project some pixels of the current block onto some pixels of the initial predicted block. A homograph warp is not constrained to a linear transformation between coordinates in two spaces. Therefore, the eight parameters that define a homograph warp can be used to project pixels of the current block onto a quadrilateral portion of the initial predicted block. Therefore, a homograph warp supports translation, rotation, scaling, aspect ratio changes, shearing, and other non-parallelogram warps.

[0141] Affine warping uses six parameters to project pixels of the current block onto some pixels of the initial predicted block. An affine warp is a linear transformation between coordinates in two spaces defined by the six parameters. Therefore, the six parameters that define an affine warp can be used to project pixels of the current block onto a parallelogram that is part of the initial predicted block. Therefore, affine warping supports translation, rotation, scale, aspect ratio change, and shear.

[0142] Similarity warping uses four parameters to project pixels of the current block onto pixels of the initial predicted block. Similarity warping is a linear transformation between coordinates in two spaces defined by four parameters. For example, the four parameters can be a translation along the x-axis, a translation along the y-axis, a rotation value, and a zoom value. Therefore, the four parameters that define the similarity model can be used to project pixels of the current block onto the square of the initial predicted block. Therefore, similarity warping supports square-to-square transformations with rotation and zoom.

[0143] In one example, the warp parameters can be transmitted from the encoder to the decoder in the compressed bitstream in addition to the directional intra-prediction mode. The decoder can use the directional intra-prediction mode to generate the initial predicted block. The decoder can then use the transmitted parameters to decode the current block.

[0144] In another example, the parameters can be derived by the decoder. For example, to determine the warp parameters, the decoder can use previously decoded pixels, as described above. For example, to predict surrounding pixels and thereby determine the warp parameters, pixels in the same block as the surrounding pixels can be used, as described above. That is, since the surrounding pixels are already known, the best warp parameters for predicting the surrounding pixels can be determined from their neighboring pixels.

[0145] In another example, differential warp parameters can be transmitted by the encoder as described above. For example, predicted warp parameters can be derived using neighboring pixels of peripheral parameters, and optimal warp parameters are derived as described above. The difference between the optimal warp parameters and the predicted warp parameters can be transmitted in the compressed bitstream.

[0146] The above description concerns the case where only the upper peripheral pixel is used, at least with respect to Figures 9 to 11. For example, if no other peripheral pixel (e.g., the left peripheral pixel) is available, only the upper peripheral pixel can be used. For example, even if the left peripheral pixel is available, only the upper peripheral pixel can be used.

[0147] Using the left peripheral pixel can be the same as using the top peripheral pixel. In one example, if the top peripheral pixel is unavailable, only the left peripheral pixel can be used. In another example, even if the top peripheral pixel is available, only the left peripheral pixel can be used.

[0148] 18 is an example flowchart of a technique 1800 for determining positions along a left peripheral pixel line for determining predicted pixel values, according to an implementation of this disclosure. For a predicted block (or equivalently, a current block) of size M×N, the technique 1800 calculates a block (e.g., a two-dimensional array) of size M×N. The two-dimensional array is hereinafter referred to as the array POSITIONS.

[0149] Given a current block and a set of left surrounding pixels (i.e., integer surrounding pixel positions), technique 1800 determines, for each predicted pixel of the predicted block (i.e., or equivalently, each predicted pixel position), a position along the left surrounding pixel line from which to derive the value of the predicted pixel. As described further below, the position along the left surrounding pixel line may be a sub-pixel position. Thus, the value at that position of the left surrounding pixel line can be derived from the left surrounding pixels (e.g., using interpolation).

[0150] The technique 1800 may be summarized as resampling (e.g., repeatedly looking at, considering, etc.) a set of left surrounding pixels (e.g., positions of left surrounding pixels) for each column of a predictive block, and at each resampling, shifting positions according to one or more parameters of an intra-prediction mode. The positions may then be used to generate (e.g., calculate, etc.) a predictive block for the current block.

[0151] Because technique 1800 is very similar to technique 900, a detailed description of technique 1800 is omitted. In technique 1800, the roles (i.e., uses) of horizontal offset (h_off), horizontal step (h_st), horizontal acceleration (h_acc), vertical offset (v_off), vertical step (v_st), and vertical acceleration (v_acc) are reversed from their roles in technique 900. That is, whenever a horizontally related parameter is used in technique 900, the corresponding vertical parameter is used instead in technique 1800, and vice versa. Thus, 1802-1822 may be similar to 902-922, respectively. Note that whereas in technique 900 the outer iteration (at 906) repeats rows of the predicted block and the inner iteration (at 912) repeats columns of the predicted block, in technique 1800 the outer iteration (at 1906) repeats columns of the predicted block and the inner iteration (at 1812) repeats rows of the predicted block.

[0152] 19 is a flowchart diagram of a technique 1900 for generating a predictive block of a current block using intra prediction according to an implementation of this disclosure. The technique 1900 uses both surrounding pixels above and to the left to generate the predictive block. The current block may be as described with respect to technique 1200 of FIG. 12. The technique 1900 may be implemented in an encoder such as encoder 400 of FIG. 4. The technique 1900 may be implemented in a decoder such as decoder 500 of FIG. 5.

[0153] Technique 1900 may be implemented as a software program that may be executed by a computing device such as, for example, transmitting station 102 or receiving station 106. The software program may be stored in a memory such as memory 204 or secondary storage 214 and may include machine-readable instructions that may be executed by a processor such as CPU 202 to cause the computing device to perform technique 1900. In at least some implementations, technique 1900 may be performed in whole or in part by intra / inter prediction stage 402 of encoder 400 of FIG. 4. In other implementations, technique 1900 may be performed in whole or in part by intra / inter prediction stage 508 of decoder 500 of FIG. 5.

[0154] Technique 1900 can be implemented using dedicated hardware or firmware. Some computing devices can have multiple memories, multiple processors, or both. The steps or operations of technique 1900 can be distributed using different processors, memories, or both. The use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory, as well as devices having multiple processors or multiple memories that can be used in performing some or all of the described steps.

[0155] Technique 1900 is illustrated with reference to Figures 20A-20B, which are shown with the following inputs: current block size 8x8, horizontal offset h_off=0.25, horizontal step h_st=1, horizontal acceleration h_acc=1, vertical offset v_off=4, vertical step v_st=1, and vertical acceleration v_acc=0.

[0156] At 1902, technique 1900 selects a first peripheral pixel of the current block. The first peripheral pixel is along a first edge of the current block. The first peripheral pixel is selected as a primary pixel for generating a predicted block. In one example, the first peripheral pixel may be an upper peripheral pixel. In one example, the first peripheral pixel may be a left peripheral pixel. As described further below, the primary pixel is a pixel for which a position along a first peripheral pixel line is calculated, as described with respect to either technique 900 (when the first peripheral pixel is an upper peripheral pixel) or technique 1800 (when the first peripheral pixel is a left peripheral pixel).

[0157] When implemented by an encoder, technique 1900 can be performed once using the top surrounding pixel as the first surrounding pixel and a second time using the left surrounding pixel as the first surrounding pixel. The encoder can test both to determine which provides a better prediction of the current block. In one example, technique 1900 can transmit, in a compressed bitstream, such as compressed bitstream 420 of FIG. 4, a first indication of whether the first or second surrounding pixel will be used as the primary pixel for generating the predicted block. That is, for example, if the top (left) surrounding pixel is used as the primary pixel, the first indication can be a bit value of 0 (1). Other values ​​of the first indication are also possible.

[0158] Thus, when implemented by a decoder, technique 1900 may select the first surrounding pixel by decoding the first representation from a compressed bitstream. In another example, the decoder may derive whether the first surrounding pixel is the top or left surrounding pixel by predicting the row above (left column) from the adjacent row above (left column) according to the techniques described herein.

[0159] For each position (i.e., pixel position) of the predicted block, technique 1900 performs 1906 through 1910. Thus, if the size of the current block is M×N, the predicted block can include M*N pixel positions. Thus, in 1904, technique 1900 determines whether there are any pixel positions of the predicted block for which 1906 through 1910 have not yet been performed. If there are any pixel positions that have not yet been performed, technique 1900 proceeds to 1906; if there are no more, technique 1900 proceeds to 1910.

[0160] At 1906, technique 1900 determines a first intercept along a first continuous line that includes the first peripheral pixel at each integer position. Thus, if the first pixel position is the top peripheral pixel, the first intercept is a y-axis intercept, and if the first pixel position is the left peripheral pixel, the first intercept is an x-axis intercept.

[0161] 20A shows the location 2010 of the values ​​in the above two-dimensional array POSITIONS when the upper surrounding pixel is used as the primary pixel of the first surrounding pixel. The location 2010 can be calculated using technique 900. Thus, the location 2010 provides the location within the upper surrounding row.

[0162] Exemplary Figure 20B shows the location 2050 of the values ​​in the above two-dimensional array POSITIONS when the left surrounding pixel is used as the primary pixel of the first surrounding pixel. The location 2050 can be calculated using technique 1800. Thus, the location 2050 provides the location within the left surrounding column.

[0163] At 1908, the technique 1900 uses the location of each predicted pixel and the first intercept to determine a second intercept along a second continuous line that includes second surrounding pixels, the second surrounding pixels being along a second edge of the current block that is perpendicular to the first edge.

[0164] If the first predicted pixel is an upper predicted pixel, the second predicted pixel may be a left predicted pixel. If the first predicted pixel is a left predicted pixel, the second predicted pixel may be an upper predicted pixel. Other combinations of the first and second predicted pixels are also possible. For example, combinations of right and upper surrounding pixels, right and lower surrounding pixels, or left and lower surrounding pixels are possible.

[0165] In one example, the second intercept may be calculated by connecting a line between the predicted pixel location and the first intercept and extending the line toward the second continuous line.

[0166] Next, Figure 16, which will be further described below, is used as an example. If the current predicted pixel is predicted pixel 1604 and the first intercept is y-intercept 1648, the second intercept can be obtained by connecting predicted pixel 1604 and y-intercept 1648 and extending the line toward the x-axis. Therefore, the second intercept is x-intercept 1646. Similarly, if the current predicted pixel is predicted pixel 1604 and the first intercept is x-intercept 1646, the second intercept can be obtained by connecting predicted pixel 1604 and x-intercept 1646 and extending the line toward the y-axis. Therefore, the second intercept is y-intercept 1648.

[0167] Block 2012 in Figure 20A shows the x-intercept when the first peripheral pixel is the top peripheral pixel. Block 2052 in Figure 20B shows the y-intercept when the first peripheral pixel is the left peripheral pixel. The intercept can be calculated using one of the formulas in Equation (1).

[0168] For purposes of illustration, consider a predicted pixel 2010A at a predicted location (1,3). Thus, taking into account the top and left predicted pixels, the predicted pixel 2010A is at location (2,4) in a coordinate system having an origin where the top and left surrounding pixels intersect. The first intercept (i.e., y-intercept) is at 7.5. Thus, a line can be formed by the two points (2,4) and (0,7.5). Thus, the x-intercept can be calculated as (-7.5 / ((7.5-4) / (0-2))) = 4.29, as shown by the x-intercept value 2012A.

[0169] As another example, predicted pixel 2050A, located at location (1,1) in the predicted block, is located at location (2,2) in a coordinate system that includes the top and left surrounding pixels. The first intercept (i.e., the x-intercept) is at 11. Thus, a line can be formed by the two points (2,2) and (11,0). Therefore, the y-intercept can be calculated as (-11 * (0-2) / (11-2)) = 2.44, as shown by y-intercept value 2052A.

[0170] At 1910, the technique 1900 calculates a value for each predicted pixel using at least one of the first intercept and the second intercept.

[0171] In one example, the value of the predicted pixel may be calculated as a weighted sum of a first intercept and a second intercept. More specifically, the value of the predicted pixel may be calculated as a weighted sum of a first pixel value at the first intercept and a second pixel value at the second intercept. The weights may be inversely proportional to the distances from the location of the predicted pixel to the first intercept and the second intercept, respectively. In this way, the value of the predicted pixel may be obtained as a bilinear interpolation of the first pixel value and the second pixel value. As is known, the distance between two points (a, b) and (c, d) is

[0172]

number

[0173] It can be calculated as:

[0174] In another example, instead of a weighted sum, the value of the predicted pixel can be calculated based on the closest distance, i.e., the one of the x-intercept and y-intercept that is closer to the predicted pixel (based on the calculated distance) can be used to calculate the value of the predicted pixel.

[0175] Distances 2014 and 2016 in Figure 20A indicate the distances from each of the predicted pixel locations to their respective y-intercepts and x-intercepts when the first surrounding pixel is the left surrounding pixel. For example, for a predicted pixel at location (2,4) (i.e., predicted pixel 2010A at location (1,3) of the predicted block) that has a y-intercept of 7.5 (i.e., point (0,7.5)), distance 2014A is

[0176]

number

[0177] and the distance 2016A to the x-intercept (4.29,0) is

[0178]

number

[0179] Similarly, distances 2054 and 2056 in Figure 20B indicate the distances from each of the predicted pixel locations to their respective y- and x-intercepts when the first surrounding pixel is the left surrounding pixel.

[0180] Thus, when using a weighted sum for the predicted pixel at location (1,4), the weights for the x- and y-intercepts are (4.61 / (4.61+4.03))=0.53 and (1-0.53)=0.47, respectively. The pixel value at each of the x- and y-intercepts can be calculated as above (e.g., as an interpolation of the two nearest integer pixel values).

[0181] When using the closest distance, the value of the predicted pixel at position (1,4) of the predicted block can be calculated using only the pixel value at the y-intercept because 4.03 (i.e., distance 2014A) is less than 4.61 (i.e., distance 2016A).

[0182] In some situations, the x-intercept or y-intercept may not terminate (e.g., be negative), as explained below with respect to Figure 14. In such cases, as also explained with respect to Figure 14, the predicted value can be calculated based only on the available intercept values.

[0183] In the encoder, the technique 1900 can select one of nearest distance, weighted sum, or some other function to generate the prediction block. In one example, the technique 1900 can generate a respective prediction block for each possible function and select one of the prediction blocks that generates the best prediction. Thus, the technique 1900 can encode a second representation of the selected function in the compressed bitstream to combine the first surrounding pixels and the second surrounding pixels to obtain the prediction block. As described, the function can be a weighted sum, nearest distance, or some other function.

[0184] When implemented by a decoder, technique 1900 receives, in the compressed bitstream, a second indication of a function for combining the first surrounding pixels and the second surrounding pixels to obtain the predictive block, which the decoder uses to generate the predictive block.

[0185] Figure 21 shows an example 2100 of the technique of Figure 19 when the top surrounding pixel is used as the primary surrounding pixel. An example of a predicted block generated using the left surrounding block as the primary surrounding pixel is not shown.

[0186] Example 2100 illustrates different prediction blocks that can be generated using surrounding pixels. The prediction block of example 2100 is generated using top surrounding pixel 2102 (visualized using top pixel 2104), left surrounding pixel 2106 (visualized using left pixel 2108), or a combination thereof. As noted above, top left surrounding pixel 2110 may be the origin of the coordinate system.

[0187] Prediction block 2120 (visualized as prediction block 2122) shows the use of only the primary surrounding pixels (i.e., the top surrounding pixels). Thus, even if the left surrounding pixels are available, prediction block 2120 is generated as described with respect to Figures 10-11.

[0188] Prediction block 2130 (visualized as prediction block 2132) shows the use of only the non-primary surrounding pixels (i.e., the left surrounding pixels). Thus, prediction block 2130 can be generated by using the primary surrounding pixels (i.e., the upper surrounding pixels) to obtain a position in the row as described with respect to position 2010 of FIG. 20A, obtaining an x-intercept as described with respect to block 2012 of FIG. 20A, and calculating a predicted pixel value using the x-intercept in a manner similar to that described with respect to prediction block 1102 of FIG. 11.

[0189] Prediction block 2140 (visualized as prediction block 2142) illustrates a prediction block generated using a weighted sum, as described above with respect to Figure 19. Prediction block 2150 (visualized as prediction block 2152) illustrates a prediction block generated using nearest distance, as described above with respect to Figure 19.

[0190] As described above, the intra prediction modes according to the present disclosure can be defined in terms of a focal point. The focal point can be defined as a point where all points of the prediction occur. That is, each point of the prediction block can be considered to be connected to the focal point. Similarly, the focal point can be considered as a point within a distance where parallel lines in a perspective image intersect.

[0191] 14 is a flowchart diagram of a technique 1400 for coding a current block using an intra-prediction mode according to an implementation of this disclosure. The current block is coded using a focus. The intra-prediction mode uses pixels surrounding the current block. The current block may be coded as described with respect to technique 1200 of FIG. 12. Technique 1400 may be implemented in an encoder such as encoder 400 of FIG. 4. Technique 1400 may be implemented in a decoder such as decoder 500 of FIG. 5.

[0192] Technique 1400 may be implemented as a software program that may be executed by a computing device such as, for example, transmitting station 102 or receiving station 106. The software program may be stored in a memory such as memory 204 or secondary storage 214 and may include machine-readable instructions that may be executed by a processor such as CPU 202 to cause the computing device to perform technique 1400. In at least some implementations, technique 1400 may be performed in whole or in part by intra / inter prediction stage 402 of encoder 400 of FIG. 4. In other implementations, technique 1400 may be performed in whole or in part by intra / inter prediction stage 508 of decoder 500 of FIG. 5.

[0193] Technique 1400 can be implemented using dedicated hardware or firmware. Some computing devices can have multiple memories, multiple processors, or both. The steps or operations of technique 1400 can be distributed using different processors, memories, or both. The use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory, as well as devices having multiple processors or multiple memories that can be used in performing some or all of the described steps.

[0194] The technique 1400 can be best understood with reference to FIGS.

[0195] FIG. 15 is a diagram illustrating an example 1500 illustrating a focus according to an implementation of the present disclosure. The example 1500 illustrates a current block 1502 to be predicted. That is, a prediction block is generated for the current block 1502. The current block 1502 has a width 1504 and a height 1506. Thus, the current block 1502 is of size W×H. In the example 1500, the current block is shown as 8×4. However, the present disclosure is not so limited. The current block can have any size. For ease of explanation, pixel locations are shown as squares in the example 1500. A particular value of a pixel can be more accurately considered as the value at the center (i.e., center) of the square.

[0196] The current block 1502 is to be predicted using surrounding pixels. The surrounding pixels may be or may include the top surrounding pixels 1508. The surrounding pixels may be or may include the left surrounding pixels 1512. The top surrounding pixels 1508 may include a number of pixels equal to the width 1504 (W). The left surrounding pixels 1512 may include a number of pixels equal to the height 1506 (H). For convenience or reference, the top-left surrounding pixel 1509 may be considered to be part of the left surrounding pixel 1512, part of the top surrounding pixel 1508, or part of both the left surrounding pixel 1512 and the top surrounding pixel 1508.

[0197] The top peripheral pixels 1508 may include top peripheral pixel overhangs 1510. The number of overhangs of the top peripheral pixels 1508 is denoted as W0. In the example 1500, W0 is shown as equal to 8 pixels. However, the disclosure is not so limited and the top peripheral pixel overhangs 1510 may include any number of pixels.

[0198] The left peripheral pixel 1512 may include a left peripheral pixel overhang 1514. The number of left peripheral pixel overhangs 1514 is denoted as H0. In the example 1500, H0 is shown as equal to 2 pixels. However, the disclosure is not so limited and the left peripheral pixel overhang 1514 may include any number of pixels.

[0199] Although the left surrounding pixels 1512 are discrete pixels, the left surrounding pixels 1512 can be thought of as pixel values ​​at integer positions in a line of contiguous surrounding pixels. Thus, the left surrounding pixels 1512 (e.g., the first surrounding pixel) form a first line of surrounding pixels that make up the x-axis 1530. Although the top surrounding pixels 1508 are discrete pixels, the top surrounding pixels 1508 can be thought of as pixel values ​​at integer positions in a line of contiguous surrounding pixels. Thus, the top surrounding pixels 1508 (e.g., the second surrounding pixel) form a second line of surrounding pixels that make up the y-axis 1532.

[0200] Exemplary pixels of current block 1502 are shown: pixel 1518, which is in the upper right corner of current block 1502; pixel 1522, which is in the lower left corner of current block 1502; and pixel 1526. Each of pixels 1518, 1522, and 1526 can be thought of as having coordinates (i,j) whose center may be in the upper left corner of the current block. Thus, pixel 1518 is at coordinates (7,0), pixel 1522 is at coordinates (0,3), and pixel 1526 is at coordinates (5,3).

[0201] The focal point 1516 is shown as being outside and distant from the current block, and is at coordinates (a, b) in a coordinate system centered at the intersection between the x-axis 1530 and the y-axis 1532.

[0202] As noted above, each pixel in current block 1502 emanate from focal point 1516. Thus, line 1520 connects pixel 1518 to focal point 1516, line 1524 connects pixel 1522 to focal point 1516, and line 1528 connects pixel 1526 to focal point 1516.

[0203] The x-intercept xO of line 1520 (i.e., where line 1520 intersects with x-axis 1530) is point 1534, and the y-intercept yO of line 1520 (i.e., where line 1520 intersects with y-axis 1532) is point 1535. The x-intercept xO of line 1524 (i.e., where line 1524 intersects with x-axis 1530) is point 1536, and the y-intercept yO of line 1524 (i.e., where line 1524 intersects with y-axis 1532) is point 1537. The x-intercept xO of line 1528 (i.e., where line 1528 intersects with x-axis 1530) is point 1538, and the y-intercept yO of line 1528 (i.e., where line 1528 intersects with y-axis 1532) is point 1539.

[0204] Point 1534 has a negative value (i.e., a negative x-intercept). Points 1536 and 1538 have positive values. Point 1535 has a positive value (i.e., a positive y-intercept). Points 1537 and 1539 are negative values.

[0205] As is known, given two points on a line with coordinates (a, b) and (i, j), the x-intercept and y-intercept can be calculated using equation (1).

[0206]

number

[0207] 16 is an example illustrating x- and y-intercepts according to an implementation of the present disclosure. The example in FIG. 16 shows the positive and negative x- and y-intercepts of a predicted pixel 1604 (or, equivalently, a current pixel) at position (i, j) of a current block 1612 given different positions of focus.

[0208] Example 1600 shows a focal point 1602 and a line 1606 that passes through (e.g., connects) predicted pixel 1604 to focal point 1602. The x-intercept 1608 is a negative value. The y-intercept 1610 is a positive value. Example 1620 shows a focal point 1622 and a line 1624 that passes through (e.g., connects) predicted pixel 1604 to focal point 1622. The x-intercept 1626 is a positive value. The y-intercept 1628 is a negative value. Example 1640 shows a focal point 1642 and a line 1644 that passes through (e.g., connects) predicted pixel 1604 to focal point 1642. The x-intercept 1646 is a positive value. The y-intercept 1648 is a positive value.

[0209] Returning again to Figure 14, the technique 1400 obtains a focal point at 1402. The focal point has coordinates (a, b) in the coordinate system as described with respect to Figure 15.

[0210] When implemented by a decoder, obtaining the focus may include decoding an intra-prediction mode from a compressed bitstream. The compressed bitstream may be compressed bitstream 420 of Figure 5. The intra-prediction mode may indicate the focus.

[0211] In one example, each intra-prediction mode of available intra-prediction modes may be associated with an index (e.g., a value). Decoding the index from the compressed bitstream instructs the decoder to perform intra-prediction of the current block according to the intra-prediction mode (i.e., the semantics of the intra-prediction mode). In one example, the intra-prediction mode may indicate coordinates of a focus point. For example, an intra-prediction mode value of 45 may indicate that the focus point is at coordinates (-1000, -1000), an intra-prediction mode value of 46 may indicate that the focus point is at coordinates (-1000, -850), and so on. Thus, for example, if 64 focus points are possible, then 64 intra-prediction modes are possible, each indicating a focus point location. In one example, hundreds of focus points (and equivalently, intra-prediction modes) are available. Although the focus point locations are given in Cartesian coordinates herein, the focus coordinates may be given in polar coordinates. The angle of the polar coordinates may be relative to an x-axis, such as x-axis 1530 in FIG. 15.

[0212] In another example, obtaining the focus point may include decoding coordinates of the focus point from a compressed bitstream. For example, the compressed bitstream may include an intra-prediction mode indicating intra-prediction using the focus point followed by the coordinates of the focus point.

[0213] When implemented by an encoder, obtaining a focus point may include selecting a focus point from a plurality of candidate focus points. That is, the encoder selects an optimal focus point for encoding the current block. The optimal focus point may be one that results in optimal encoding of the current block. In one example, the plurality of candidate focus points may be divided into groups of candidate focus points. Each group of candidate focus points may be arranged on the circumference of a respective circle. In one example, each group of candidate focus points may include 16 candidate focus points.

[0214] FIG. 17 illustrates an example focus group 1700 according to an implementation of the present disclosure. As described above, there may be hundreds of focus candidate locations, which may be located anywhere in the space outside the current block. The focus candidate locations are a subset of all possible focus points in the space outside the current block. The space outside the current block may be centered (i.e., have an origin) at an upper left peripheral pixel, such as the upper left peripheral pixel 1509 in FIG. 15. The center of the space may be any other point. In one example, the center may be the center point of the current block.

[0215] To limit the search space, only a subset of all possible focal points can be considered as candidate focal points. There are many ways to reduce the search space to candidate focal points. In one example, the candidate focal points can be grouped into groups. Each group of candidate focal points can be arranged on the circumference of a circle. In one example, three circles can be considered. The three circles can be shell 1702, shell 1704, and shell 1706. The focal points are shown as black circles on each shell (e.g., foci 1708-1712). However, any number of circles can be used. Each circle (or shell) roughly corresponds to the slope (e.g., convergence rate) of the line connecting the predicted pixel to the focal points on the circumference of the circle. Note that example 1700 is merely illustrative and is not drawn to scale.

[0216] The shell 1702 can correspond to a far-away focal point. Thus, given a focal point on the shell 1702, the slope of the line from each predicted pixel position to the focal point can be approximately the same. The shell 1702 can have a radius in the range of thousands of pixels. The farther the focal point, the more similar (e.g., approximate) intra-prediction using the far-away focal point can be to directional intra-prediction.

[0217] The shell 1706 can correspond to a nearby focal point. Thus, given a focal point on the shell 1702, the lines from the focal point to each predicted pixel location can appear to fan out. Thus, the slope of the lines can vary widely. The shell 1706 can have a radius in the range of tens of pixels. For example, the radius can be 20, 30, or some other such number of pixels.

[0218] The shell 1704 may correspond to a circle with a medium radius, which may be in the range of several hundred pixels.

[0219] As explained above, a circle (shell) can have an impractical number of focal points, but only a sampling of the focal points is used as candidate focal points. The candidate focal points in each group (i.e., on each shell) can be equally spaced. For example, assuming each group contains N (e.g., 8, 16, etc.) candidate focal points, the N foci can be spaced 360 / N (e.g., 45, 22.5, etc.) degrees apart.

[0220] In one example, obtaining a focal point in 1402 in the encoder can include testing each of the candidate focal points to identify an optimal focal point. In another example, an outermost optimal focal point of the outermost shell (shell 1702) can be identified by performing intra-prediction using each of the focal points of the outermost shell. Foci corresponding to the outermost optimal focal point (e.g., at the same angle) can then be tried to determine whether any of them yields a more optimal predicted block. Other heuristic techniques can also be used. For example, a binary search can be used.

[0221] Returning to Figure 14, the technique 1400 may generate a predictive block using first and second surrounding pixels at 1404. The first surrounding pixel may be a left surrounding pixel, such as left surrounding pixel 1512 (including top-left surrounding pixel 1509). The second surrounding pixel may be top surrounding pixel 1508.

[0222] As described above, the first surrounding pixels form a first peripheral pixel line constituting an x-axis, such as x-axis 1530 in FIG. 15 , the second surrounding pixels form a second peripheral pixel line constituting a y-axis, such as y-axis 1532 in FIG. 15 , and the first peripheral pixel line and the second peripheral pixel line form a coordinate system having an origin. Generating the prediction block may include performing 1404_4 to 1404_6 for each position (i.e., each pixel) of the prediction block. Each pixel of the prediction block is at position (i,j). If the size of the block is M×N, 1404_4 to 1404_6 are performed M*N times.

[0223] In 1404_2, the technique 1400 determines whether there are any other positions in the prediction block for which pixel values ​​have not been determined (e.g., not calculated). If there are, the technique 1400 proceeds to 1404_4. Otherwise, the technique 1400 proceeds to 1406.

[0224] At 1404_4, technique 1400 may determine (eg, calculate, identify, etc.) at least one of the x-intercept or y-intercept of the predicted pixel at (i,j).

[0225] The x-intercept is the first point (e.g., x-intercept 1608, x-intercept 1626, x-intercept 1646) where the line (e.g., line 1606, line 1624, line 1644) formed by points centered at each position of the predicted block (e.g., predicted pixel 1604) and the focal point (e.g., focal point 1602, focal point 1622, focal point 1642) intersects with the first surrounding pixel line (e.g., the x-axis).

[0226] The y-intercept is a second point (e.g., y-intercept 1609, y-intercept 1627, y-intercept 1647) where a line (e.g., line 1606, line 1624, line 1644) formed by points centered at each location of the predicted block (e.g., predicted pixel 1604) and the focal point (e.g., focal point 1602, focal point 1622, focal point 1642) intersects with a second surrounding pixel line (e.g., the y-axis).

[0227] The x-intercept and / or y-intercept can be calculated using equation (1). However, in some situations, a line passing through the predicted pixel and the focal point may not cross one of the axes. For example, a line that is nearly parallel to the x-axis may not be considered to cross the x-axis, and a line that is nearly parallel to the y-axis may not be considered to cross the y-axis. If b = j + ε, the line may not be considered to cross the x-axis, and if a = i + ε, the line may not be considered to cross the y-axis, where ε is a small threshold close to zero. Therefore, the x-intercept can be identified as i and the y-intercept can be identified as j without using equation (1).

[0228] At 1404_6, the technique 1400 can determine a predicted pixel value for each position (i.e., (i,j)) of the predicted block using at least one of the x-intercept or the y-intercept. From 1404_6, the technique 1400 returns to 1404_2.

[0229] In one example, determining the predicted pixel value may include determining the predicted pixel value at each location using at least one of the x-intercept or the y-intercept, provided that the other of the x-intercept or the y-intercept is a negative value. For example, for example 1600 in FIG. 16, the x-intercept 1608 is a negative value, so the predicted pixel value at location (i, j) of the predicted block is calculated using only the y-intercept 1610, which is a positive value. For example, for example 1620 in FIG. 16, the y-intercept 1628 is a negative value, so the predicted pixel value at location (i, j) of the predicted block is calculated using only the x-intercept 1626, which is a positive value.

[0230] In one example, determining the predicted pixel value may include determining the predicted pixel value at each location as a weighted combination of a first pixel value at the x-intercept and a second pixel value at the y-intercept, provided that the x-intercept is positive and the y-intercept is positive.

[0231] In one example, determining the predicted pixel value may include setting the pixel value at each position of the predicted block to the value of the first peripheral pixel at position i of the first peripheral pixel line, under the condition that i is equal to a (i.e., i is very close to a). That is, if i≈a, set p(i,j)=L[i]. That is, if the line is approximately parallel to the y-axis, set the predicted pixel value p(i,j) to the value of the left peripheral pixel L[i] corresponding to the horizontal direction.

[0232] Similarly, in one example, determining the predicted pixel value may include setting the pixel value of each position of the predicted block to the value of the second peripheral pixel at position j of the second peripheral pixel line, provided that j is equal to b (i.e., j is very close to b). That is, if j≈b, set p(i,j)=T[j]. That is, if the line is approximately parallel to the x-axis, set the predicted pixel value p(i,j) to the value T[j] of the upper (i.e., top) peripheral pixel corresponding to the vertical direction.

[0233] In one example, determining the predicted pixel value may include setting the pixel value of each position of the predicted block to the pixel value at the intersection of the first peripheral pixel line and the second peripheral pixel line, provided that the x-intercept is zero and the y-intercept is zero. That is, if the x-intercept and y-intercept are zero, the predicted pixel value may be set to the upper-left peripheral pixel value.

[0234] The pseudocode in Table I shows an example of setting a predicted pixel value p(i,j) at position (i,j) of a predicted block using a focus at (a,b), where i=0,...,width-1 and j=0,...,height-1.

[0235] As described above, for a given pixel (i,j), a line is drawn connecting the focal points at (a,b) and (i,j). The x- and y-intercepts are calculated. Depending on these intercepts, the predicted pixel value p(i,j) is obtained by interpolating or extrapolating the intercept value from the top or left boundary pixel.

[0236] Specifically, let L[k] denote the arrangement of left boundary pixels (e.g., left peripheral pixel 1512 in FIG. 15 and top-left peripheral pixel 1509 in FIG. 15) for positive integer positions k, where k=0, 1, ..., H+H0, and let T[k] denote the arrangement of top boundary pixels (e.g., top peripheral pixel 1508 and top-left peripheral pixel 1509 in FIG. 15) for positive integer positions k, where k=0, 1, ..., W+W0. Note that T[0]=L[0]. Also, let f L (z) and f T Let (z) denote the interpolation function at point z with high precision (real-valued) obtained from the boundary pixels L[k], T[k] by the appropriate interpolation formula (i.e., interpolation function). For integer positions, f is the interpolation function for z=k=0, 1, ..., H+H0. L f for (z)=L[k], z=k=0, 1, ..., W+W0 T Note that (z)=T[k].

[0237] [Table 1]

[0238] In row 1 of Table I, if the focal point and predicted pixel at (i,j) are on the same horizontal line, then in row 2, the predicted pixel p(i,j) is set to the value L[i] of the left surrounding pixel on the same horizontal line. More specifically, the focal point and predicted pixel may not be perfectly horizontally aligned. Thus, (i==a) can mean that the line connecting the focal point and predicted pixel passes through a square centered at L[i].

[0239] In row 3, if the focal point and predicted pixel are on the same vertical line, then in row 4, the predicted pixel p(i,j) is set to the value T[j] of the surrounding pixel above that is on the same vertical line. More specifically, the focal point and predicted pixel may not be perfectly vertically aligned. Thus, (j==b) can mean that the line connecting the focal point and predicted pixel passes through a square centered at T[j].

[0240] In lines 6-7, the x-intercept (x0) and y-intercept (y0) are calculated according to equation (1). In line 8, if the x-intercept (x0) and y-intercept (y0) are at the origin, then in line 9, the predicted pixel p(i,j) is set to the upper-left surrounding pixel L[0]. More specifically, the x-intercept (x0) and / or y-intercept (y0) may not be exactly zero. Thus, x0==0&& y0==0 can mean that the x-intercept and y-intercept are within a square (i.e., pixel) centered at the origin.

[0241] In line 10, if the x-intercept (x0) is positive but the y-intercept (y0) is negative, then in line 11 the predicted pixel is calculated using the interpolation function f L In line 12, if the x-intercept (x0) is negative and the y-intercept (y0) is positive, then in line 13 the predicted pixel p(i,j) is derived only from the x-intercept (x0) using the interpolation function f T is derived only from the y-intercept (y0) using

[0242] In line 14, if both the x-intercept (x0) and the y-intercept (y0) are positive values, the predicted pixel p(i,j) is a weighted combination of the interpolations of the x-intercepts (x0), i.e., f L (x0)) and y-intercept (y0) interpolation (i.e., f T The weighting of the x-intercept (x0) or the y-intercept (y0) depends on whether the predicted pixel p(i,j) is farther away from the x-intercept (x0) or the y-intercept (y0). If the x-intercept (x0) is farther away (i.e., line 15), the weighting of the y-intercept (y0) is greater in line 16. On the other hand, if the y-intercept (y0) is farther away (i.e., line 17), the weighting of the x-intercept (x0) is greater in line 18. Lines 20-21 are included for completeness and are intended to cover the situation where both the x-intercept (x0) and the y-intercept (y0) are negative, which is impossible.

[0243] In some situations, at least some of the top or left surrounding pixels may be unavailable. For example, the current block may be a block at the top edge of the image or at the left edge of the image. In such situations, the unavailable surrounding pixels may be considered to have a value of zero.

[0244] Interpolation function f L and f T can be any interpolation function. The interpolation functions may be the same or different interpolation functions. The interpolation functions may be as described above with respect to FIG. 9. For example, the interpolation function may be a finite impulse response (FIR) filter. For example, the interpolation filter may be a bilinear interpolation, as described above. That is, given an x-intercept (or y-intercept) value, the nearest integer pixel may be determined, and a weighted sum of the nearest integer pixels may be used in the bilinear interpolation. Interpolation, as used herein, encompasses both interpolation and extrapolation.

[0245] Returning to Figure 14, at 1406, technique 1400 codes a residual block corresponding to the difference between the current block and the predictive block. When implemented by an encoder, technique 1400 calculates the residual block as the difference between the current block and the predictive block and encodes the residual block in a compressed bitstream. When implemented by a decoder, technique 1400 codes the residual block by decoding it from the compressed bitstream. The decoder can then add the residual block to the predictive block to reconstruct the current block.

[0246] Another aspect of the disclosed implementation is a technique for encoding a current block. The technique includes using surrounding pixels to obtain a prediction block of predicted pixels of the current block. Each predicted pixel is located at a respective position (i, j) within the prediction block. Obtaining the prediction block can include obtaining a focal point, where the focal point has coordinates (a, b) in a coordinate system; obtaining a line indicating a respective prediction angle for each position of the prediction block; and using the line to determine a pixel value for each position. As described above, the line connects the focal point to each position. The focal point may be outside the current block, and the focal point may be one of the surrounding pixels, as described with respect to Figures 15 to 17, but it does not have to be. As described above, each predicted pixel of the prediction block can have a prediction angle that is different from the prediction angles of all other predicted pixels. Depending on the position of the focal point, multiple predicted pixels can have the same prediction angle, but intra prediction modes according to implementations of the present disclosure are such that not all predicted pixels can have the same prediction angle.

[0247] Encoding the current block may include encoding, in the compressed bitstream, an intra-prediction mode that indicates the focus. As noted above, the value associated with the intra-prediction mode may indicate the location of the focus.

[0248] As described above, the peripheral pixels can include left peripheral pixels and top peripheral pixels. Determining the pixel value at each location using a line can include determining an x-intercept of the line, determining a y-intercept of the line, and using the x-intercept and y-intercept to determine the pixel value. The x-intercept is a first point where the line intersects with the left axis that includes the left peripheral pixels of the current block. The y-intercept is a second point where the line intersects with the top axis that includes the top peripheral pixels of the current block.

[0249] As described above and with respect to FIG. 17, obtaining a focal point may include selecting a focal point from a plurality of candidate focal points. The plurality of candidate focal points may be divided into groups of candidate focal points. Each group of candidate focal points may be arranged on the circumference of a respective circle.

[0250] Another aspect of the disclosed implementation is a technique for decoding a current block, which includes decoding a focus point from a compressed bitstream, obtaining a prediction block of predicted pixels of the current block, and reconstructing the current block using the prediction block. Obtaining the prediction block includes obtaining, for each position of the prediction block, a line indicating a respective prediction angle, the line connecting the focus point to each position, and using the line to determine pixel values ​​for each position.

[0251] The step of determining a pixel value at each location using the line can include determining an x-intercept of the line, determining a y-intercept of the line, and using the x-intercept and y-intercept to determine the pixel value. The x-intercept is a first point where the line intersects with a left axis comprising a left peripheral pixel of the current block. The y-intercept is a second point where the line intersects with a top axis comprising a top peripheral pixel of the current block.

[0252] Determining the pixel value using the x-intercept and the y-intercept can include determining the pixel value as a weighted combination of a first pixel value at the x-intercept and a second pixel value at the y-intercept. Determining the pixel value using the x-intercept and the y-intercept can include determining the pixel value using the x-intercept or the y-intercept, provided that one of the x-intercept or the y-intercept is a negative value.

[0253] The step of decoding the focus from the compressed bitstream may include decoding an intra-prediction mode from the compressed bitstream that is indicative of the focus.

[0254] For ease of explanation, techniques 900, 1200, 1300, 1400, 1800, and 1900 are each depicted and described as a series of blocks, steps, or operations. However, blocks, steps, or operations according to the present disclosure may occur in various orders and / or simultaneously. Furthermore, other steps or operations not shown and described herein may be used. Furthermore, not all illustrated steps or operations are required to implement a technique in accordance with the disclosed subject matter.

[0255] The above encoding and decoding aspects illustrate some encoding and decoding techniques. However, it should be understood that as these terms are used in the claims, encoding and decoding can mean compressing, decompressing, converting, or any other processing or modification of data.

[0256] The word “example” or “implementation” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as an “example” or “implementation” should not necessarily be construed as preferred or advantageous over other aspects or designs. Rather, use of the word “example” or “implementation” is intended to concretely present a concept. As used in this application, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from the context, “X includes A or B” is intended to mean any of the natural inclusive permutations. That is, “X includes A or B” is satisfied in any of the foregoing examples if X includes A, X includes B, or X includes both A and B. Furthermore, the articles “a” and “an” as used in this application or the appended claims should be construed generally to mean “one or more” unless otherwise specified or clearly directed to the singular form from the context. Furthermore, use of the terms "an implementation" or "one implementation" throughout is not intended to refer to the same embodiment or implementation unless so described.

[0257] The transmitting station 102 and / or receiving station 106 (and the algorithms, methods, instructions, etc. stored therein and / or executed by, including the encoder 400 and decoder 500) can be realized in hardware, software, or any combination thereof. Hardware can include, for example, a computer, an intellectual property (IP) core, an application-specific integrated circuit (ASIC), a programmable logic array, an optical processor, a programmable logic controller, microcode, a microcontroller, a server, a microprocessor, a digital signal processor, or any other suitable circuitry. In the claims, the term "processor" should be understood to encompass any of the foregoing hardware, alone or in combination. The terms "signal" and "data" are used interchangeably. Furthermore, portions of the transmitting station 102 and the receiving station 106 do not necessarily have to be implemented in the same way.

[0258] Furthermore, in one aspect, for example, the transmitting station 102 or the receiving station 106 may be implemented using a computer or processor with a computer program that, when executed, performs any of the respective methods, algorithms, and / or instructions described herein. Additionally or alternatively, a special purpose computer / processor may be utilized that may include other hardware for performing any of the methods, algorithms, or instructions described herein.

[0259] The transmitting station 102 and the receiving station 106 may be implemented on a computer, for example, in a video conferencing system. Alternatively, the transmitting station 102 may be implemented on a server, and the receiving station 106 may be implemented on a device separate from the server, such as a handheld communication device. In this example, the transmitting station 102 may encode content into an encoded video signal using the encoder 400 and transmit the encoded video signal to the communication device. The communication device may then decode the encoded video signal using the decoder 500. Alternatively, the communication device may decode content stored locally on the communication device, e.g., content not transmitted by the transmitting station 102. Other implementation schemes for the transmitting station 102 and the receiving station 106 are available. For example, the receiving station 106 may be a generally stationary personal computer rather than a portable communication device, and / or the device including the encoder 400 may also include the decoder 500.

[0260] Furthermore, all or a portion of implementations of the present disclosure may take the form of a computer program product, for example, accessible from a tangible computer-usable or computer-readable medium. The computer-usable or computer-readable medium may be, for example, any device that can tangibly contain, store, communicate, or transport a program for use by or in connection with any processor. The medium may be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable media may also be utilized.

[0261] The above embodiments, implementations, and aspects have been described to enable easy understanding of the present disclosure and not to limit the present disclosure. On the contrary, the present disclosure is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, the scope of which should be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures permitted under law. [Explanation of symbols]

[0262] 100 Video Encoding and Decoding System 102 Transmitting Station 104 Network 106 receiving stations 200 computing devices 202 CPU 204 memory 206 Data 208 Operating Systems 210 Application Program 212 Bus 214 Secondary Storage 218 Display 220 Image sensing device 222 Sound-sensing devices 300 video streams 302 Video Sequences 304 Adjacent Frames 306 frames 308 segments 310 Block 400 Encoder 402 Intra / Inter prediction stage 404 Conversion Phase 406 quantization steps 408 Entropy Encoding Stage 410 Inverse Quantization Stage 412 Inverse transformation stage 414 Reconstruction Phase 416 Loop Filtering Stage 420 compressed bitstream 500 decoder 502 Entropy Decoding Stage 504 Inverse Quantization Stage 506 Inverse transformation stage 508 Intra / Inter prediction stage 510 Reconstruction Phase 512 Loop Filtering Stage 514 Deblocking Filtering Stage 516 output video streams 600 pieces 610 64x64 blocks 620 32x32 blocks 630 16x16 blocks 640 8x8 blocks 650 4x4 blocks 660 Luminance Block 662 luminance pixels 670 U or Cb chrominance block 680 V or Cr chrominance block 690 chrominance pixels 710 Intra Prediction Mode 712 pixels 720 Intra Prediction Mode 730 Intra Prediction Mode 740 Intra Prediction Mode 750 Intra Prediction Modes 760 Intra Prediction Mode 770 Figures 800 image part 802 First Railroad Track 804 Second Railroad Track 806 Current Block 808 surrounding pixels 810 cells 812 cells 900 techniques 1000 examples 1002 predictor positions 1004 Predictor Position 1006 Predictor Position 1008 Predictor Position 1100 examples 1102 predicted blocks 1104 Prediction Block 1106 Surrounding predicted pixels 1108 Surrounding Prediction Pixels 1110 predictor values 1112 pixel values 1114 pixels 1200 Techniques 1300 techniques 1400 techniques 1500 examples 1502 current block 1504 width 1506 height 1508 surrounding pixels 1509 upper left surrounding pixels 1512 Left Surrounding Pixels 1516 focus 1518 pixels 1520 line 1522 pixels 1524 line 1526 pixels 1528 line 1530 x-axis 1532 y-axis 1534 points 1535 points 1536 points 1537 points 1538 points 1539 points 1600 examples 1602 focus 1604 predicted pixels 1606 line 1608 x intercept 1609 y-intercept 1610 y-intercept 1612 blocks 1620 examples 1622 focus 1624 line 1626 x intercept 1627 y-intercept 1628 y-intercept 1640 examples 1642 focus 1644 line 1646 x intercept 1647 y-intercept 1648 y-intercept 1700 examples 1702 Shell 1704 Shell 1706 Shell 1708~1712 Focus 1800 techniques 1900 techniques 2010 position 2010A predicted pixels 2012 Block 2014 distance 2016 distance 2050 position 2050A predicted pixels 2052 blocks 2054 distance 2056 distance 2100 examples 2104 surrounding pixels 2106 Left Surrounding Pixels 2108 left pixel 2110 Top left surrounding pixels 2120 predicted blocks 2122 predicted blocks 2130 predicted blocks 2132 predicted blocks 2140 prediction blocks 2142 predicted blocks 2150 predicted blocks 2152 predicted blocks

Claims

1. A method of identifying focal points, the focal points having coordinates (a, b) in a coordinate system, selected from a plurality of candidate focal points divided into groups of candidate focal points, each group of candidate focal points positioned on the circumference of a respective circle; generating a prediction block of the current block using the first plurality of surrounding pixels and the second plurality of surrounding pixels; the first plurality of peripheral pixels forming a first peripheral pixel line that constitutes an x-axis; the second plurality of peripheral pixels forming a second peripheral pixel line that constitutes a y-axis; the first peripheral pixel line and the second peripheral pixel line form the coordinate system having an origin; and generating the predicted block comprises: determining at least one of an x-intercept or a y-intercept for each position of the prediction block at position (i,j) of the prediction block; the x-intercept is a first point where a line formed by a point centered at each of the positions of the prediction block and the focus intersects with the first peripheral pixel line; the y-intercept being a second point where the line formed by the point and the focus centered at each of the locations of the prediction block intersects with the second peripheral pixel line; determining a predicted pixel value for each of the locations of the predicted block using the at least one of the x-intercept or the y-intercept; Including steps and coding a residual block corresponding to a difference between the current block and the predicted block; A method comprising:

2. determining the predicted pixel value at each location of the predicted block using the at least one of the x-intercept or the y-intercept, 2. The method of claim 1, comprising determining the predicted pixel value at each location using the other of the at least one of the x-intercept or the y-intercept, provided that the other of the at least one of the x-intercept or the y-intercept is a negative value.

3. determining the predicted pixel value at each location of the predicted block using the at least one of the x-intercept or the y-intercept, 3. The method of claim 2, further comprising determining the predicted pixel value at each location as a weighted combination of a first pixel value at the x-intercept and a second pixel value at the y-intercept, provided that the x-intercept is positive and the y-intercept is positive.

4. determining the predicted pixel value at each location of the predicted block using the at least one of the x-intercept or the y-intercept, 2. The method of claim 1, comprising: setting a pixel value at each position of the predictive block to a value of a first predetermined surrounding pixel of the first plurality of surrounding pixels at position i of the first surrounding pixel line, provided that i in the position (i,j) is equal to a in the coordinates (a,b).

5. determining the predicted pixel value at each location of the predicted block using the at least one of the x-intercept or the y-intercept, 2. The method of claim 1, further comprising: setting a pixel value of each position of the predictive block to a value of a second predetermined surrounding pixel of the second plurality of surrounding pixels at position j of the second surrounding pixel line, provided that j of the position (i,j) is equal to b of the coordinates (a,b).

6. determining the predicted pixel value at each location of the predicted block using the at least one of the x-intercept or the y-intercept, 2. The method of claim 1, comprising setting a pixel value at each location of the predicted block to a pixel value at an intersection of the first surrounding pixel line and the second surrounding pixel line, provided that the x-intercept is zero and the y-intercept is zero.

7. A step of decoding a focus from a compressed bitstream, the focus being one of a plurality of candidate focuses, the focus having coordinates (a, b) in a coordinate system, the plurality of candidate focuses being divided into groups of candidate focuses, each group of candidate focuses being arranged on the circumference of a respective circle; Obtaining a prediction block of prediction pixels of a current block, each prediction pixel being at a respective position within the prediction block, the step of obtaining the prediction block comprising: For each position of the predicted block, obtaining a line indicating each predicted angle and connecting said focal point to each of said positions; using said line to determine a pixel value for each said location; reconstructing the current block using the predicted block; Including, method.

8. determining the pixel value at each of the locations using the line, determining an x-intercept of the line, the x-intercept being the first point where the line intersects a left axis comprising left surrounding pixels of the current block; determining a y-intercept of the line, the y-intercept being a second point where the line intersects an upper axis with the upper perimeter pixels of the current block; determining the pixel value using the x-intercept and the y-intercept; 8. The method of claim 7, comprising:

9. determining the pixel value using the x-intercept and the y-intercept, determining the pixel value as a weighted combination of a first pixel value at the x-intercept and a second pixel value at the y-intercept. The method of claim 8.

10. determining the pixel value using the x-intercept and the y-intercept, determining the pixel value using the x-intercept or the y-intercept, provided that the other of the x-intercept or the y-intercept is a negative value; The method of claim 8.

11. 11. An apparatus comprising a processor configured to perform the method of any one of claims 1 to 10.

12. A method according to claim 7, further comprising: The device for decoding the current block.

13. Generating an encoded bitstream by performing, by an apparatus, the method of any one of claims 1 to 6; storing the bitstream on a non-transitory computer-readable storage medium. method.

Citation Information

Patent Citations

  • Spatial prediction encoding method, decoding method, device, and system

    EP2665276A1

  • Intra-prediction for video coding using perspective information

    WO2018231087A1