Method, apparatus, and computer program for video encoding
Patent Information
- Application Number
- JP2024212379
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-09-28
- Filing Date
- 2024-12-05
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2039-06-20
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. patent application Ser. No. 16 / 147,503, entitled "METHOD AND APPARATUS FOR VIDEO CODING," filed on Sep. 28, 2018 (now U.S. Patent No. 10.284.866), the entire contents of which are incorporated herein by reference, which in turn claims priority to U.S. Provisional Application No. 62 / 693,050, entitled "METHODS AND APPARATUS FOR WIDE ANGULAR INTRA PREDICTION IN VIDEO COMPRESSION," filed on July 2, 2018.
[0002] Technical Field This disclosure describes embodiments that relate generally to video encoding. [Background technology]
[0003] The description provided herein is intended to generally present the context of the present disclosure. Work described in this Background, including work of the currently designated inventors and aspects that may not qualify as prior art at the time of filing, are not admitted explicitly or implicitly as prior art to the present disclosure.
[0004] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video may include a sequence of pictures, each with spatial dimensions of, for example, 1920x1080 luma samples and associated chroma samples. The sequence of pictures may have a fixed or variable picture rate (also informally called frame rate) of, for example, 60 pictures per second or 60 Hz. Uncompressed video has significant bitrate requirements. For example, 1080p60 4:2:0 video (resolution of 1920x1080 luma samples at 60 Hz frame rate) with 8 bits per sample requires a bandwidth approaching 1.5 Gbit / s. One hour of such video requires more than 600 GB of storage capacity.
[0005] One of the goals of video encoding and decoding is to reduce redundancy in the video input signal by compression. Compression can help reduce the bandwidth or storage space requirements mentioned above, in some cases by more than two orders of magnitude. Lossless compression, lossy compression, and combinations thereof can be employed. Lossless compression refers to techniques that reconstruct an exact replica of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may differ from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal useful in the expected application. In the case of video, lossy compression is widely used. The amount of distortion that is tolerated depends on the application, for example, users of certain consumer streaming applications tolerate higher distortion than users of television streaming applications. The achievable compression ratio can reflect that the higher the permitted / tolerable distortion, the higher the achievable compression ratio.
[0006] Video encoders and decoders can use several broad types of techniques, including motion compensation, transformation, quantization, and entropy coding.
[0007] Video codec techniques may include a technique called intra-coding, in which sample values are represented without reference to samples from previously reconstructed reference pictures or other data. In some video codecs, a picture is spatially subdivided into sample blocks. If all sample blocks are coded in intra mode, the picture may be an intra picture. Intra pictures and their derivatives (e.g., separate decoder refresh pictures) can be used to reset the decoder state, and therefore can be used as the first picture or still image in a coded video bitstream and video session. Samples of intra blocks may be transformed, and the transform coefficients may be quantized before entropy coding. Intra prediction is a technique that minimizes sample values in a pre-transform domain. In some cases, the smaller the transformed DC value and the smaller the AC coefficients, the fewer bits are required to represent the entropy coded block for a particular quantization step size.
[0008] Typically, intra-coding, as known for example from MPEG-2 generation coding techniques, does not use intra-prediction. However, some new video compression techniques include techniques that attempt to do so from metadata and / or surrounding sample data obtained during the coding / decoding of spatially adjacent and preceding data blocks in decoding order. Hereinafter, such techniques are referred to as "intra-prediction" techniques. It should be noted that, at least in some cases, intra-prediction uses only reference data from the current picture being reconstructed, and does not use reference data from a reference picture.
[0009] Intra prediction may take many different forms. If a particular video coding technique can use one or more such techniques, the technique used may be coded as an intra prediction mode. In some cases, a mode may have sub-modes and / or parameters that may be coded separately or included in the mode codeword. Since what codeword is used for a particular mode / sub-mode / parameter combination may affect the coding efficiency gain from intra prediction, entropy coding techniques may be used to convert the codeword into a bitstream.
[0010] Certain modes of intra prediction were introduced via H.264, refined in H.265, and further refined in new coding techniques such as the Joint Search Model (JEM), Versatile Video Coding (VVC), and Benchmark Set (BMS). The predictor block can be formed using neighboring sample values belonging to already available samples. According to the direction, the sample values of the neighboring samples are copied to the predictor block. The reference to the direction in use can be coded into the bitstream, or it can be predicted itself. Summary of the Invention [Problem to be solved by the invention]
[0011] Referring to FIG. 1, a subset of 9 known prediction directions from the 35 possible prediction directions of H.265 is depicted in the bottom right. The point (101) where the arrows converge represents the predicted sample. The arrows represent the direction in which the sample is predicted. For example, arrow (102) represents predicting sample (101) from one or more samples in the top right corner that make an angle of 45 degrees with the horizontal. Similarly, arrow (103) represents predicting sample (101) from one or more samples in the bottom right corner that make an angle of 22.5 degrees with the horizontal.
[0012] Continuing with reference to FIG. 1, a square block (104) of 4×4 samples (indicated by a thick dashed line) is depicted at the top right. The square block (104) contains 16 samples, each sample represented by "S", its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample (from the top) in the Y dimension and the first sample (from the left) in the X dimension. Similarly, sample S44 is the fourth sample in the block (104) in both the Y and X dimensions. Since the size of the block is 4×4 samples, S44 is at the bottom right. Additionally, reference samples are depicted that follow a similar numbering scheme. The reference samples are represented by R, its Y position (e.g., row index) and its X position (column index) relative to the block (104). In both H.264 and H.265, the predicted samples are adjacent to the block being reconstructed, so there is no need to use negative values.
[0013] Intra-picture prediction is performed by copying reference sample values from neighboring samples according to a signaled prediction direction. For example, assume that the coded video bitstream includes signaling indicating that for the block, samples are predicted from one or more prediction samples in the prediction direction that matches the arrow (102), i.e., in the upper right corner and at a 45 degree angle with the horizontal. In this case, samples S41, S32, S23, and S14 are predicted from the same R05. Then, sample S44 is predicted from R08.
[0014] In certain cases, especially when the orientation is not divisible by 45 degrees, the values of multiple reference samples may be combined, for example by interpolation, to calculate the reference sample.
[0015] As video coding techniques develop, the number of possible directions also increases. In H.264 (2003), nine different directions can be represented. This increases to 33 in H.265 (2013), and at the time of disclosure, JEM / VVC / BMS can support up to 65 directions. Experiments have already been carried out to identify the most likely directions, and certain techniques in entropy coding are used to represent these possible directions with a small number of bits, with certain penalties for relatively impossible directions. Also, it may be possible to predict the direction itself based on the neighboring directions used in neighboring decoded blocks.
[0016] FIG. 2 is a schematic diagram 201 showing the increasing number of prediction directions over time based on the 65 intra prediction directions of JEM.
[0017] The mapping of intra-prediction direction bits to indicate directions in the encoded video bitstream may vary for different video coding techniques, ranging from simple direct mappings involving prediction directions, intra-prediction modes, and codewords, to complex adaptive schemes involving most likely modes and similar techniques. Those skilled in the art will be readily familiar with these techniques. However, in all cases, there will be some directions that are statistically less likely to appear in the video content than certain other directions. Because video compression aims to reduce redundancy, in a well-functioning video coding technique, these relatively impossible directions are represented with a larger number of bits compared to the more likely directions. [Means for solving the problem]
[0018] Aspects of the present disclosure provide a method and apparatus for video encoding. In some examples, the apparatus includes a processing circuit. The processing circuit decodes prediction information of a first block from an encoded video bitstream. The first block is a non-square block, and the prediction information of the first block indicates a first intra-prediction mode in a first set of intra-prediction modes for square blocks. Then, the processing circuit determines that the first intra-prediction mode is within a subset of intra-prediction modes disabled for the non-square block in the first set of intra-prediction modes for square blocks, and remaps the first intra-prediction mode to a second intra-prediction mode in a second set of intra-prediction modes for the non-square block. The second set of intra-prediction modes does not include the subset of the disabled intra-prediction modes. The processing circuit also reconstructs at least one sample of the first block based on the second intra-prediction mode.
[0019] In some examples, the processing circuit determines an intra prediction angle parameter associated with the second intra prediction mode and reconstructs at least one sample of the first block based on the intra prediction angle parameter. In examples, the second intra prediction mode is not included in the first set of intra prediction modes.
[0020] In some examples, the processing circuitry determines the second set of intra prediction modes based on a shape of the first block. In some embodiments, the processing circuitry calculates an aspect ratio of the first block and determines a subset of disabled intra prediction modes for the non-square block based on the aspect ratio of the first block. As an example, if a ratio of a long side to a short side of the first block is less than or equal to 2, the subset of disabled intra prediction modes has a first number of disabled intra prediction modes, and if the ratio is greater than or equal to 4, the subset of disabled intra prediction modes has a second number of disabled intra prediction modes, the second number being greater than the first number.
[0021] Also, in some embodiments, the processing circuit determines that the width of the first block is greater than the height of the first block and detects that the first intra prediction mode is within a subset of disabled intra prediction modes in the first set of intra prediction modes starting with a left-bottom diagonal mode, while in other embodiments, the processing circuit determines that the height of the first block is greater than the width of the first block and detects that the first intra prediction mode is within a subset of disabled intra prediction modes in the first set of intra prediction modes starting with a right-bottom diagonal mode.
[0022] In some embodiments, the processing circuit determines that the width of the first block is greater than the height of the first block and remaps the first intra-prediction mode to the second intra-prediction mode by adding a value to a mode number associated with the first intra-prediction mode. In some examples, the processing circuit determines that the height of the first block is greater than the width of the first block and converts the first intra-prediction mode to the second intra-prediction mode by subtracting a value from the mode number associated with the first intra-prediction mode.
[0023] Aspects of the present disclosure further provide a non-transitory computer-readable medium for storing instructions that, when executed by a computer, cause the computer to perform a method for video encoding. [Brief description of the drawings]
[0024] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and drawings. [Figure 1] 1 is a schematic diagram of a subset of intra-prediction modes according to H.265. [Diagram 2] FIG. 11 is an explanatory diagram of the intra prediction direction according to JEM. [Diagram 3] FIG. 3 is a schematic diagram of a simplified block diagram of a communication system (300) according to an embodiment. [Figure 4]FIG. 4 is a schematic diagram of a simplified block diagram of a communication system (400) according to an embodiment. [Diagram 5] FIG. 2 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment; [Figure 6] FIG. 2 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment; [Figure 7] 4 shows a block diagram of an encoder according to another embodiment. [Figure 8] 4 shows a block diagram of a decoder according to another embodiment; [Figure 9] A schematic diagram (900) is shown to illustrate an example of a wide-angle mode. [Figure 10] Some examples of remapping normal intra-prediction modes to wide-angle modes are given below. [Figure 11] Some other examples of remapping normal intra-prediction modes to wide-angle modes are given below. [Figure 12] 1 shows a schematic diagram for explaining a normal intra prediction direction and a wide-angle intra prediction direction. [Figure 13] 13 shows a flow chart outlining a process (1300) according to an embodiment of the present disclosure. [Figure 14] FIG. 1 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] FIG. 3 illustrates a simplified block diagram of a communication system (300) according to an embodiment of the present disclosure. The communication system (300) includes a plurality of terminal devices that can communicate with each other, for example, via a network (350). For example, the communication system (300) includes a first pair of terminal devices (310), (320) connected to each other via the network (350). In the example of FIG. 3, the first pair of terminal devices (310), (320) perform one-way data transmission. For example, the terminal device (310) can encode video data (e.g., a video picture stream captured by the terminal device (310)) and transmit it to another terminal device (320) via the network (350). The encoded video data may be transmitted in the form of one or more encoded video bitstreams. The terminal device (320) can receive the encoded video data from the network (350), decode the encoded video data to reconstruct the video pictures, and display the video pictures based on the reconstructed video data. One-way data transmission is common, for example in media service applications.
[0026] In another embodiment, the communication system (300) includes a second pair of terminal devices (330), (340) for performing a bidirectional transmission of encoded video data, which may occur, for example, during a video conference. For the bidirectional data transmission, in an example, each of the terminal devices (330), (340) may encode and transmit video data (e.g., a video picture stream captured by the terminal device) to another of the terminal devices (330), (340) via the network (350). Each of the terminal devices (330), (340) may further receive encoded video data transmitted from another of the terminal devices (330), (340), and further decode the encoded video data to reconstruct video pictures and display the video pictures on an accessible display device based on the reconstructed video data.
[0027] In the example of FIG. 3, the terminal devices (310), (320), (330), and (340) are shown as a server, a personal computer, and a smartphone, but the principles of the present disclosure are not limited thereto. The embodiments of the present disclosure apply to laptop computers, tablets, media players, and / or dedicated video conferencing equipment. The network (350) represents any number of networks, including, for example, wired and / or wireless communication networks, for transmitting encoded video data between the terminal devices (310), (320), (330), and (340). The communication network (350) can exchange data in circuit-switched and / or packet-switched channels. Exemplary networks include telecommunications networks, local area networks, wide area networks, and / or the Internet. For purposes described in this application, the architecture and topology of the network (350) may not be important to the operation of the present disclosure, unless otherwise described below.
[0028] 4 shows an arrangement of video encoders and video decoders in a streaming environment. As an example of applications of the disclosed subject matter, the disclosed subject matter applies equally to other applications that support video, including video conferencing, digital television, storing compressed video, and the like on digital media, including CDs, DVDs, memory sticks, and the like.
[0029] The streaming system may include a capture subsystem (413), which may include a video source (401), such as a digital camera, for creating an uncompressed video picture stream (402). In an example, the video picture stream (402) includes samples captured from the digital camera. The video picture stream (402) is processed by an electronic device (420) that includes a video encoder (403) coupled to the video source (401), the video picture stream depicted as a thick line to emphasize the amount of data that is larger compared to the encoded video data (404) (or encoded video bitstream). The video encoder (403) may include hardware, software, or a combination thereof to realize or implement aspects of the disclosed subject matter, which are described in detail below. The encoded video data (404) (or encoded video bitstream (404)) can be stored in the streaming server (405) for future use, and the encoded video data is depicted as a thin line to emphasize its small amount of data compared to the video picture stream (402). One or more streaming client subsystems, such as the client subsystems (406), (408) in FIG. 4, can access the streaming server (405) to retrieve replicas (407), (409) of the encoded video data (404). The client subsystem (406) may include a video decoder (410), for example in an electronic device (430). The video decoder (410) decodes the incoming replica (407) of the encoded video data and creates an outgoing video picture stream (411) that can be rendered on a display (412) (e.g., a screen) or other rendering device (not shown). In some streaming systems, the encoded video data 404, 407, and 409 (e.g., a video bitstream) may be encoded according to a particular video encoding / compression standard, examples of which include the ITU-T H.265 recommendation.In an example, a video coding standard under development is informally called Versatile Video Coding, or VVC, and the disclosed subject matter may be used in the context of VVC.
[0030] Additionally, the electronics 420, 430 may include other components (not shown). For example, the electronics 420 may include a video decoder (not shown) and the electronics 430 may include a video encoder (not shown).
[0031] 5 shows a block diagram of a video decoder (510) according to an embodiment of the present disclosure. The video decoder (510) can be included in an electronic device (530). The electronic device (530) can include a receiver (531) (e.g., receiving circuitry). The video decoder (510) can be used in place of the video decoder (410) in the example of FIG. 4.
[0032] The receiver (531) can receive one or more encoded video sequences to be decoded by the video decoder (510), in the same or another embodiment, one encoded video sequence at a time, with the decoding of each encoded video sequence being independent of the other encoded video sequences. The encoded video sequences can be received from a channel (501), where the channel (612) can be a hardware / software link to a storage device for storing the encoded video data. The receiver (531) can receive the encoded video data with other data attached, for example encoded audio data and / or auxiliary data streams that are forwarded to a respective using entity (not shown). The receiver (531) can separate the encoded video sequences from the other data. To prevent network jitter, a buffer memory (515) can be coupled between the receiver (531) and the entropy decoder / parser (520), hereinafter referred to as the "parser (520)". In certain applications, the buffer memory (515) is part of the video decoder (510). In other applications, the buffer memory may be external to the video decoder (510) (not shown). In yet other applications, there may be a buffer memory (not shown) external to the video decoder (510), e.g., to prevent network jitter, and another buffer memory (515) internal to the video decoder (510), e.g., to handle broadcast timing. When the receiver (531) receives data from a store-and-forward device with sufficient bandwidth and controllability, or from an isochronous real-time network, the buffer memory (515) may not be needed, or the buffer memory (315) may be smaller.For use in a best effort packet network such as the Internet, a buffer memory (515) may be required, which may be relatively large and advantageously have an adaptive size, and may be realized at least in part in an operator system or similar element (not shown) external to the video decoder (510).
[0033] The video decoder (510) may include a parser (520) to reconstruct symbols (521) based on the encoded video sequence. These categories of symbols may include information for managing the operation of the video decoder (510) and for controlling a display device such as a display (512) (e.g., a screen) that is not part of the electronic device (530) but may be coupled to the electronic device (530) as shown in FIG. 5. The control information for the display device may be in the form of supplemental enhancement information (SEI) messages or video usability information (VUI) parameter set fragments (not shown). The parser (520) may parse / entropy decode the received encoded video sequence. The encoding of the encoded video sequence may conform to a video coding technique or standard and may follow a variety of principles including variable length coding, Huffman coding, arithmetic coding with or without context-dependent coding, etc. The parser (520) extracts a subgroup parameter set for at least one of the subgroups of pixels in the video decoder from the encoded video sequence based on at least one parameter corresponding to the group, including a Group of Pictures (GOP), picture, tile, slice, macroblock, coding unit (CU), block, transform unit (TU), prediction unit (PU), etc. The parser (520) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, etc.
[0034] The parser (520) can create symbols (521) by performing an entropy decoding / parsing operation on the video sequence received from the buffer memory (515).
[0035] The reconstruction of the symbols (521) involves a number of different units, depending on the type of coded video picture or part thereof (e.g., inter-picture vs. intra-picture, inter-block vs. intra-block) and other factors. The units involved and the type of involvement can be controlled by subgroup control information that the parser (520) parses from the coded video sequence. For simplicity, the flow of such subgroup control information between the parser (520) and the following units is not shown.
[0036] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into the following functional units. In an actual implementation operating under business constraints, some of these units may closely interact with each other and may be at least partially integrated with each other. However, for purposes of illustrating the disclosed subject matter, a conceptual subdivision into the following functional units is appropriate:
[0037] The first unit is a scalar / inverse transform unit (551). The scalar / inverse transform unit (551) receives quantized transform coefficients and control information as symbols (521) from the parser (520), including the transform scheme to be used, block size, quantization factor, quantization scaling matrix, etc. The scalar / inverse transform unit (551) can output blocks containing sample values that can be input to an aggregator (555).
[0038] In some cases, the output samples of the scaler / inverse transform unit (551) may relate to intra-coded blocks, i.e., blocks that do not use prediction information from a previously reconstructed picture, but can use prediction information from a previously reconstructed portion of the current picture. Such prediction information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) generates a block of the same size and shape as the block being reconstructed using surrounding already reconstructed information obtained from the current picture buffer (558). For example, the current picture buffer (558) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (555) adds, on a sample-by-sample basis, the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551).
[0039] In other cases, the output samples of the scaler / inverse transform unit (551) may relate to an inter-coded, potentially motion-compensated block. In such cases, the motion compensation prediction unit (553) may access the reference picture memory (557) to obtain samples for prediction. After motion compensation of the obtained samples based on the symbols (521) for the block, these samples are added by the aggregator (555) to the output of the scaler / inverse transform unit (551) (in such cases, referred to as residual samples or residual signals) to generate output sample information. The addresses in the reference picture memory (557) for the motion compensation prediction unit (553) to obtain the prediction samples are controlled by a motion vector, which is obtained by the motion compensation prediction unit (553) and has the form of a symbol (521) having X, Y and reference picture components, for example. Motion compensation may further include interpolation of sample values extracted from the reference picture memory (557) when sub-sample accurate motion vectors are used, motion vector prediction mechanisms, etc.
[0040] The output samples of the aggregator (555) are processed by various loop filtering techniques in a loop filter unit (556). The video compression techniques can include in-loop filtering techniques, but they can also be responsive to meta information obtained during decoding of a previous part (in decoding order) of the coded picture or coded video sequence, and to previously reconstructed loop filtered sample values. The in-loop filtering techniques are controlled by parameters contained in the coded video sequence (also called coded video bitstream) and provided to the loop filter unit (556) as symbols (521) from the parser (520).
[0041] The output of the loop filter unit (556) may be a sample stream that can be output to a display device (512) and stored in a reference picture memory (557) for use in future inter-picture prediction.
[0042] Once a coded picture is fully reconstructed, it can be used as a reference picture for future prediction. For example, once a coded picture corresponding to a current picture is fully reconstructed and the coded picture is recognized as a reference picture (e.g., via the parser (520)), the current picture buffer (558) can become part of the reference picture memory (557), and a new current picture buffer can be reallocated before starting the reconstruction of a subsequent coded picture.
[0043] The video decoder (510) may perform decoding operations according to a given video compression technique, for example in the ITU-T H.265 Recommendation standard. The encoded video sequence may comply with the syntax specified by the video compression technique or standard used, in the sense that the encoded video sequence conforms to both the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. In particular, the profile may select a particular tool from all tools available in the video compression technique or standard as the only tool available according to this profile. Compliance also requires that the complexity of the encoded video sequence is within a range limited by the level of the video compression technique or standard. In some cases, the level limits the maximum picture size, the maximum frame rate, the maximum reconstruction sample rate (e.g., measured in megasamples / second), the maximum reference picture size, etc. The limits placed by the level may be further limited, in some cases, by metadata for managing the HRD buffer signaled in the encoded video sequence, and the specifications of the hypothetical reference decoder (HRD).
[0044] In an embodiment, the receiver (531) can receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data can be used by the video decoder (510) to properly decode the data and / or more accurately reconstruct the original video data. The additional data can be in the form of, for example, temporal, spatial, or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0045] 6 shows a block diagram of a video encoder (603) according to an embodiment of the present disclosure. The video encoder (603) is included in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) may be used in place of the video encoder (403) in the example of FIG. 4.
[0046] The video encoder (603) receives video samples from a video source (601) (which is not part of the electronic device (620) in the example of FIG. 6), which can capture video images that are encoded by the video encoder (603). In another example, the video source (601) is part of the electronic device (620).
[0047] The video source (601) may provide a source video sequence in the form of a digital video sample stream, which may have any suitable bit depth (e.g.: 8-bit, 10-bit, 12-bit, etc.), any color space (e.g. BT.601 Y CrCB, RGB, etc.), and any suitable sampling configuration (e.g. Y CrCb 4:2:0, Y CrCb 4:4:4), to be encoded by the video encoder (603). In a media service system, the video source (601) may be a storage device for storing pre-prepared videos. In a video conferencing system, the video source (601) may be a camera for capturing local image information as a video sequence. The video data may be provided as a number of separate pictures that convey motion when viewed in sequence. The pictures themselves may be organized as a spatial pixel array, where each pixel may contain one or more samples, depending on the sampling configuration, color space, etc. used. The relationship between pixels and samples is readily understood by those skilled in the art. The following description focuses on samples.
[0048] According to an embodiment, the video encoder (603) can encode and compress pictures of a source video sequence into an encoded video sequence (643) in real-time or under any other time constraint required by the application. Running at an appropriate encoding rate is one of the functions of the controller (650). In some embodiments, the controller (650) controls and is operatively coupled to other functional units described below. For simplicity, coupling is not shown. Parameters established by the controller (650) may include rate control related parameters (picture skip, quantizer, lambda value for rate distortion optimization techniques, etc.), picture size, group of pictures (GOP) placement, maximum motion vector search range, etc. The controller (650) may be configured to have other suitable functions, which are associated with the video encoder (603) optimized for a particular system design.
[0049] In some embodiments, the video encoder (603) is arranged to operate in an encoding loop. As a very simplified explanation, in an example, the encoding loop can include a source encoder (630) (e.g., responsible for creating a symbol-like symbol stream based on an input picture to be encoded and a reference picture) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in the same way that the (remote) decoder creates the sample data (because in the video compression techniques considered in the disclosed subject matter, any compression between the symbols and the encoded video bitstream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). The decoding of the symbol stream produces bit-exact results that are independent of the location of the decoder (local or remote), so that the contents in the reference picture memory (634) are bit-exact between the local and remote encoders. In other words, the predictive part of the encoder sees as reference picture samples exactly the same sample values that the decoder "sees" when using prediction during decoding. This basic principle of reference picture synchrony (and the drift that occurs when synchrony cannot be maintained, e.g., from channel errors) also applies in several related fields.
[0050] The operation of the "local" decoder (633) may be the same as the operation of the "remote" decoder (e.g., the video decoder (510)) described in detail above in conjunction with Figure 5. However, and referring again briefly to Figure 5, if symbols are available and the entropy encoder (645) and parser (520) losslessly encode / decode the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (510), including the buffer memory (515) and parser (520), may not be fully implemented in the local decoder (633).
[0051] In this case, in addition to the analysis / entropy decoding present in the decoder, it is understood that any decoder technique will necessarily be present in the corresponding encoder in essentially the same functional form. For this reason, the disclosed subject matter focuses on the operation of the decoder. The description of the encoder technique can be simplified since the encoder technique and the fully described decoder technique are mutually inverse. Further details are only necessary in certain areas and are provided below.
[0052] During operation, in some examples, the source encoder (630) may perform motion-compensated predictive encoding, i.e., perform predictive encoding on an input picture with reference to one or more previously encoded pictures from a video sequence designated as “reference pictures.” In this manner, the encoding engine (632) encodes differences between pixel blocks of the input picture and pixel blocks of reference pictures that can be selected as predictive references for the input picture.
[0053] The local video decoder (633) can decode the encoded video data of the pictures that can be designated as reference pictures based on the symbols created by the source encoder (630). The operation of the encoding engine (632) can advantageously be a lossy process. If the encoded video data can be decoded by a video decoder (not shown in FIG. 6), the reconstructed video sequence can generally be a replica of the source video sequence with some errors. The local video decoder (633) can replicate the decoding process performed by the video decoder on the reference pictures and store the reconstructed reference pictures in a reference picture cache (634). In this way, as reconstructed reference pictures obtained from a remote video decoder (without transmission errors), the video encoder (603) can locally store replicas of reconstructed reference pictures with common content.
[0054] The predictor (635) performs a prediction search for the coding engine (632). That is, for a new picture to be coded, the predictor (635) can search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or metadata, such as reference picture motion vectors, block shapes, etc., that can be used as suitable prediction references for the new picture. The predictor (635) can find suitable prediction references by operating pixel block by pixel block on the sample blocks. In some cases, as determined by the search results obtained by the predictor (635), the input picture can have prediction references extracted from multiple reference pictures stored in the reference picture memory (634).
[0055] The controller (650) can manage the encoding operations of the source encoder (630), including, for example, setting parameters for encoding the video data and subgroup parameters.
[0056] The output of all of the functional units can be entropy coded in an entropy coder (645) that converts the symbols produced by each functional unit into an encoded video sequence by losslessly compressing the symbols according to techniques known to those skilled in the art (e.g., Huffman coding, variable length coding, arithmetic coding, etc.).
[0057] The transmitter (640) can buffer the encoded video sequence created by the entropy encoder (645) in preparation for transmission over a communication channel (660), which may be a hardware / software link to a storage device for storing the encoded video data. The transmitter (640) can merge the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (sources not shown).
[0058] The controller (650) can manage the operation of the video encoder (603). During encoding, the controller (650) assigns each encoded picture a particular encoding picture type, which can affect the encoding technique applied to the corresponding picture. For example, pictures are typically assigned as one of the following picture types:
[0059] An intra picture (I-picture) may be a picture that is coded and decoded without using any other picture in a sequence as a source of prediction. Some video codecs allow different types of intra pictures, including, for example, independent decoder refresh ("IDR") pictures. Those skilled in the art are aware of these variations of I-pictures and their corresponding uses and characteristics.
[0060] A predicted picture (P picture) may be a picture that is encoded and decoded using intra- or inter-prediction, which uses at most one motion vector and reference index to predict sample values for each block.
[0061] A bidirectionally predicted picture (B-picture) may be a picture that is encoded and decoded using intra- or inter-prediction, which uses at most two motion vectors and reference indexes to predict sample values for each block. Similarly, a multiple predicted picture applies more than two reference pictures and associated metadata to the reconstruction of a single block.
[0062] A source picture is generally spatially subdivided into a number of sample blocks (e.g., blocks of 4x4, 8x8, 4x8 or 16x16 samples, respectively) and can be coded block by block. These blocks can be predictively coded with reference to other (coded) blocks, which are determined by the coding assignment applied to the block's corresponding picture. For example, blocks of an I-picture can be non-predictively coded, or they can be predictively coded (spatial or intra prediction) with reference to coded blocks of the same picture. Pixel blocks of a P-picture can be predictively coded via spatial or temporal prediction with reference to one previously coded reference picture. Blocks of a B-picture can be predictively coded via spatial or temporal prediction with reference to one or two previously coded reference pictures.
[0063] The video encoder (603) may perform encoding operations based on a given video encoding technique or standard, for example in the ITU-T H.265 recommendation, in which the video encoder (603) may perform various compression operations, including predictive encoding operations that use temporal and spatial redundancies in the input video sequence, such that the encoded video data conforms to a syntax specified by the video encoding technique or standard being used.
[0064] In an embodiment, the transmitter (640) transmits additional data along with the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, Supplemental Enhancement Information (SEI) messages, Video Usability Information (VUI) parameter set fragments, etc.
[0065] A video may be captured as multiple source pictures (video pictures) in a time sequence. Intra-picture prediction (commonly abbreviated as intra-prediction) uses spatial correlation in a particular picture, while inter-picture prediction uses correlation (temporal or otherwise) between pictures. In an example, a particular picture being coded / decoded, called a current picture, is divided into blocks. If a block in the current picture is similar to a reference block in a previously coded and still buffered reference picture in the video, the block in the current picture may be coded by a vector called a motion vector. The motion vector points to a reference block in the reference picture, and may have a third dimension to identify the reference picture when multiple reference pictures are used.
[0066] In some embodiments, bidirectional prediction techniques can be used for inter-picture prediction. Bidirectional prediction techniques use two reference pictures, a first reference picture and a second reference picture, that are earlier in decoding order than the current picture in the video (but may be earlier and later, respectively, in display order). A block in the current picture can be coded with a first motion vector that points to a first reference block in the first reference picture and a second motion vector that points to a second reference block in the second reference picture. A block can be predicted by a combination of the first and second reference blocks.
[0067] In addition, to improve coding efficiency, a merge mode technique is used for inter-picture prediction.
[0068] According to some embodiments of the present disclosure, prediction such as inter-picture prediction and intra-picture prediction is performed for each block. For example, according to the HEVC standard, a picture in a video picture sequence is divided into coding tree units (CTUs) for compression, and the CTUs in a picture have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. A CTU typically includes three coding tree blocks (CTBs), one luma CTB and two chroma CTBs. Each CTU can be recursively quad-tree divided into one or more coding units (CUs). For example, a 64×64 pixel CTU may be divided into one 64×64 pixel CU, or four 32×32 pixel CUs, or sixteen 16×16 pixel CUs. In an example, each CU is analyzed to determine a prediction type for the CU, such as an inter prediction type or an intra prediction type. The CU is divided into one or more prediction units (PUs) according to temporal and / or spatial predictability. Each PU generally includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in coding (encoding / decoding) is performed for each prediction block. When using a luma prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values (e.g., luma values) of 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, etc.
[0069] 7 shows a diagram of a video encoder (703) according to another embodiment of the present disclosure. The video encoder (703) is arranged to receive a processed block of sample values (e.g., a predictive block) in a current video picture in a video picture sequence, and to encode the processed block into a coded picture that is part of a coded video sequence. In an example, the video encoder (703) is used in place of the video encoder (403) in the example of FIG. 4.
[0070] In an example of HEVC, the video encoder (703) receives a matrix of sample values for a processing block, the processing block being, for example, a prediction block of 8×8 samples. The video encoder (703) determines whether to optimally encode the processing block using intra mode, inter mode, or bidirectional prediction mode, for example, by rate-distortion optimization. If the processing block is encoded in intra mode, the video encoder (703) encodes the processing block into an encoded picture using an intra prediction technique, and if the processing block is encoded in inter mode or bidirectional prediction mode, the video encoder (703) may encode the processing block into an encoded picture using an inter prediction or bidirectional prediction technique, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, which does not use any coded motion vector components outside the predictor, but obtains motion vectors from one or more motion vector predictors. In some other video encoding techniques, there may be motion vector components applied to the theme block. In an example, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the mode of the processing block.
[0071] In the example of FIG. 7, the video encoder (703) includes an inter encoder (730), an intra encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721), and an entropy encoder (725), concatenated as shown in FIG. 7.
[0072] The inter encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the current block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter prediction information (e.g., redundant information description from an inter coding technique, motion vectors, merge mode information), and calculate an inter prediction result (e.g., a predicted block) using any suitable technique based on the inter prediction information. In some examples, the reference picture is a decoding reference picture that is decoded based on the coded video information.
[0073] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), possibly compare the current block with coded blocks in the same picture, generate transformed quantized coefficients, and possibly further generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques).
[0074] The generic controller (721) is arranged to determine generic control data and control other components of the video encoder (703) based on the generic control data. In an example, the generic controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, if the mode is an intra mode, the generic controller (721) controls the switch (726) to select an intra mode result for use by the residual calculator (723) and controls the entropy encoder (725) to select intra prediction information for inclusion in the bitstream, and if the mode is an inter mode, the generic controller (721) controls the switch (726) to select an inter prediction result for use by the residual calculator (723) and controls the entropy encoder (725) to select inter prediction information for inclusion in the bitstream.
[0075] The residual calculator (723) is arranged to calculate a difference (residual data) between the received block and a prediction result selected from the intra coder (722) or the inter coder (730). The residual coder (724) operates on the residual data and is arranged to encode the residual data to generate transform coefficients. In an example, the residual coder (724) is arranged to transform the residual data in the frequency domain to generate transform coefficients. The transform coefficients are then quantized to obtain quantized transform coefficients.
[0076] The entropy encoder (725) is arranged to format the bitstream to include the encoded block. The entropy encoder (725) is arranged to include various information in accordance with an appropriate standard, such as the HEVC standard. In an example, the entropy encoder (725) is arranged to include in the bitstream general control data, selected prediction information (e.g., intra prediction information or inter prediction information), residual information, and other appropriate information. Note that, according to the disclosed subject matter, there is no residual information when encoding a block in a bi-predictive mode or a merged sub-mode of an inter mode.
[0077] 8 shows a diagram of a video decoder (810) according to another embodiment of the present disclosure. The video decoder (810) is arranged to receive coded pictures that are part of a coded video sequence and to decode the coded pictures to generate reconstructed pictures. In an example, the video decoder (810) is used in place of the video decoder (410) in the example of FIG. 4.
[0078] In the example of FIG. 8, the video decoder (810) includes an entropy decoder (871), an inter decoder (880), a residual decoder (873), a reconstruction module (874), and an intra decoder (872), concatenated as shown in FIG. 8.
[0079] The entropy decoder (871) is arranged to reconstruct certain symbols based on the coded picture, which indicate syntax elements that constitute the coded picture. Such symbols may include, for example, a mode for coding a block (e.g., intra mode, inter mode, bi-predictive mode, merge submode or the latter two in another submode), prediction information (e.g., intra prediction information or inter prediction information) that can identify some samples or metadata used for prediction by the intra decoder (872) or the inter decoder (880), respectively, residual information, for example in the form of quantized transform coefficients, etc. In an example, if the prediction mode is an inter or bi-predictive mode, it provides the inter prediction information to the inter decoder (880), and if the prediction type is an intra prediction type, it provides the intra prediction information to the intra decoder (872). The residual information is dequantized and provided to the residual decoder (873).
[0080] An inter decoder (880) is configured to receive the inter prediction information and to generate inter prediction results based on the inter prediction information.
[0081] The intra decoder (872) is configured to receive the intra prediction information and to generate a prediction result based on the intra prediction information.
[0082] The residual decoder (873) is arranged to perform inverse quantization to extract inverse quantized transform coefficients, and to process the inverse quantized transform coefficients to transform the residual from the frequency domain to the spatial domain. The residual decoder (873) may also require some control information (to include quantizer parameters (QP)), which may be provided from the entropy decoder (871) (datapath is not shown since this is only low volume control information).
[0083] The reconstruction module (874) is arranged to combine in the spatial domain the residual output from the residual decoder (873) with a prediction result (output from an inter-prediction module or an intra-prediction module, as the case may be) to form a reconstructed block, which may be part of a reconstructed picture, which may in turn be part of a reconstructed video, although other suitable operations, such as a deblocking operation, may be performed to improve visual quality.
[0084] It should be noted that any suitable technique may be used to implement the video encoder (403), (603), (703) and the video decoder (410), (510), (810). In an embodiment, the video encoder (403), (603), (703) and the video decoder (410), (510), (810) may be implemented by one or more integrated circuits. In another embodiment, the video encoder (403), (603), (703) and the video decoder (410), (510), (810) may be implemented by one or more processors executing software instructions. According to some aspects of the present disclosure, in the case of intra prediction, a wide angle mode may be used to compress the video and reduce bandwidth or storage space requirements.
[0085] FIG. 9 shows a schematic diagram (900) for explaining an example of a wide-angle mode. In general, intra prediction is in the range from the upper right 45 degree direction (corresponding to the arrow pointing to 34 in FIG. 9, indicating mode 34) to the lower left 45 degree direction (corresponding to the arrow pointing to 2 in FIG. 9, indicating mode 2), and is called a normal intra prediction mode. When applying the 35 HEVC intra prediction mode, mode 2 is called a lower left diagonal mode, and mode 34 is called a upper right diagonal mode. Wide angles beyond the prediction direction range covered by the normal intra prediction mode correspond to wide-angle intra prediction modes.
[0086] In some examples, the wide-angle intra-prediction direction is associated with one normal intra-prediction direction. For example, the wide-angle intra-prediction direction and the associated intra-prediction direction capture the same directionality but use reference samples on the opposite side (left column or top row). In an example, the wide-angle intra-prediction mode is signaled by sending a one-bit flag for the associated direction with a wide-angle "inverted mode" available. In the example of FIG. 9, the first direction with an arrow pointing to 35 is the wide-angle intra-prediction direction and is associated with the second direction with an arrow pointing to 03. Therefore, the first direction can be signaled by sending a one-bit flag for the second direction.
[0087] In an embodiment, for 33-directional angle intra prediction, the availability of new modes is limited to the 10 directional modes closest to the 45-degree diagonal top right mode (i.e., mode 34 when using 35 normal intra modes) and the bottom left mode (i.e., mode 2 when using 35 normal intra modes). The actual sample prediction process follows the prediction process in HEVC or VVC.
[0088] The example of FIG. 9 shows 33 intra prediction directions associated with modes 2 to 34. In the example, when the width of the block is greater than the height of the block, the directions associated with modes 35 and 36 can be used as wide-angle intra prediction directions. Then, modes 3 and 4 have an extra flag that indicates whether to use the indicated mode or the inverted wide-angle directions of modes 35 and 36. Some examples (e.g., Global Video Coding Test Model 1 (VTM1)) support square blocks and non-square blocks with partition structures of quad-tree, binary tree, and ternary tree (QT+BT+TT). If intra prediction for square blocks and non-square blocks is designed to use the same intra prediction mode (e.g., modes 2 to 34) for square blocks, the intra prediction modes (e.g., modes 2 to 34 in the example of FIG. 9) are not efficient for non-square blocks. Wide-angle prediction modes (e.g., modes 35 and 36 in the example of FIG. 9) can be used to more efficiently code non-square blocks.
[0089] In some examples, the signaling of wide-angle intra prediction depends on the intra prediction mode, so there is a problem of parsing dependency when parsing the wide-angle control flag (the intra prediction mode must be reconstructed in the parsing process).
[0090] In some embodiments, some intra prediction modes for square blocks are remapped to wide-angle prediction modes for non-square blocks. In an example, the remapping process removes some intra prediction modes for square blocks from the set of intra prediction modes originally used for the square blocks, and adds the same number of wide-angle prediction modes to the set of intra prediction modes to form a new set of intra prediction modes for a particular non-square block. Thus, a certain number of modes in the intra prediction mode set are changed, and other modes are kept the same. In some examples, the certain number of changed modes depends on the shape of the block, for example, the aspect ratio of the block.
[0091] For square blocks, a set of normal intra prediction modes is applied for intra prediction, and the number of modes of the set of normal intra prediction modes may be 35, 67, etc. For non-square blocks, some modes may be removed from the set of normal intra prediction modes, and the same number of wide-angle modes (as the removed modes) may be added to the remaining normal intra prediction modes to form a new set of intra prediction modes. Thus, in the example, the signaled mode indexes for non-square blocks and square blocks are the same, and non-square blocks and square blocks share the same mode encoding algorithm. For 35 normal intra prediction modes, the indexes of the added top right wide-angle modes are mode 35, mode 36, mode 37, mode 38, etc., and the indexes of the added bottom left wide-angle modes are mode-1, mode-2, mode-3, mode-4, etc.
[0092] 10 and 11 show two examples of remapping some normal intra prediction modes to wide-angle modes. In FIG. 10, modes 2 to 34 relate to the intra prediction directions shown in FIG. 10. Modes 2 to 34, together with modes 0 and 1, form a set of normal intra prediction modes for a square block. In the example of FIG. 10, modes 2 and 3 (indicated by dashed lines) are removed from the set of normal intra prediction modes. Also, wide-angle modes 35 and 36 (indicated by dotted lines) are added, where the direction of mode 35 is opposite to that of mode 3 (indicated by (1001)) and the direction of mode 36 is opposite to that of mode 4 (indicated by (1002)). Thus, modes 4 to 36, together with modes 0 and 1, form a new set of intra prediction modes for a particular non-square block.
[0093] 11, mode 33 and mode 34 (indicated by dashed lines) are removed, and wide-angle mode-1 and mode-2 (indicated by dotted lines) are added. The direction of mode-1 is opposite to that of mode 33 (indicated by (1101)), and the direction of mode-2 is opposite to that of mode 32 (indicated by (1102)). Thus, mode-2, mode-1, and modes 2 through 32, together with modes 0 and 1, form a new set of intra-prediction modes for a particular non-square block.
[0094] In one embodiment, the angular distance between the removed normal mode and the added wide-angle mode is greater than 90 degrees and less than or equal to 180 degrees. For example, if there are 35 normal intra prediction modes and the width is greater than the height, remove mode 2 to mode 5 and add wide-angle modes 35 to mode 38; if the height is greater than the width, remove mode 31 to mode 34 and add mode-1 to mode-4. In another example, if there are 67 normal intra prediction modes and the width is greater than the height, remove mode 2 to mode 9 and add mode 67 to mode 74; if the height is greater than the width, remove mode 59 to mode 66 and add mode-1 to mode-8.
[0095] In an alternative embodiment, the normal modes removed and the wide-angle modes added are in the opposite directions. For example, if there are 35 normal intra-prediction modes and the width is greater than the height, remove modes 3 to 6 and add wide-angle modes 35 to 38; if the height is greater than the width, remove modes 30 to 33 and add modes-1 to -4. Also, for example, if there are 67 normal intra-prediction modes and the width is greater than the height, remove modes 3 to 10 and add wide-angle modes 67 to 74; if the height is greater than the width, remove modes 58 to 65 and add wide-angle modes-1 to -8.
[0096] In an alternative embodiment, if the width is greater than the height, remove some normal modes in the bottom-left direction and add an equal number of wide-angle modes in the top-right direction; otherwise, if the height is greater than the width, remove some modes in the top-right direction and add an equal number of wide-angle modes in the bottom-left direction.
[0097] For example, if there are 35 normal intra prediction modes and the width is greater than the height, modes 2 to 5 are removed and wide-angle modes 35 to 38 are added; if the height is greater than the width, modes 31 to 34 are removed and wide-angle modes-1 to -4 are added.
[0098] In an alternative embodiment, for all non-square block shapes, the number of removed normal intra prediction modes is fixed. For all non-square blocks, remove N normal intra prediction modes and add N wide-angle modes accordingly. For example, when using 35 normal modes, N may be between 1 and 7, when using 67 normal modes, N may be between 2 and 14, and when using 129 normal intra prediction modes, N may be between 4 and 28.
[0099] In a subembodiment, N may be signaled as an advanced syntax element (e.g., in the sequence parameter set (SPS), picture parameter set (PPS), slice header) or as a common syntax element or parameter for a region of the picture.
[0100] In one example, if there are 35 normal intra prediction modes, then 4 normal intra modes are removed, and if there are 67 normal intra prediction modes, then 8 normal intra modes are removed.
[0101] In an alternative embodiment, the number of removed regular intra prediction modes depends on the shape of the non-square block.
[0102] In some examples, when width / height ≤ 2 or height / width ≤ 2 (aspect ratio = width / height, 1 < aspect ratio ≤ 2, or 1 / 2 ≤ aspect ratio < 1), M normal intra prediction modes are removed. Also, when width / height ≥ 4 or height / width ≥ 4 (aspect ratio ≥ 4 or aspect ratio ≤ 1 / 4), N normal intra prediction modes are removed. Also, in the example, when 2 < aspect ratio < 4 or 1 / 4 ≤ aspect ratio < 1 / 2, P normal intra prediction modes are removed. In the example, M is not equal to N. In one example, when there are 35 normal intra prediction modes, M is equal to 3 and N is equal to 5, and when there are 67 normal intra prediction modes, M is equal to 6 and N is equal to 10. P may be the same as M or N, or may be different from both M and N.
[0103] In a sub - embodiment, M and N can be signaled as advanced syntax elements (e.g., in a sequence parameter set (SPS), a picture parameter set (PPS), a slice header), or as common syntax elements and parameters for a region of the picture. In another example, the number of removed normal intra prediction modes depends on the encoded information and includes, but is not limited to, the width of the block, the height of the block, and the ratio of the width to the height of the block, the size of the block region.
[0104] In an alternative embodiment, the removed normal intra prediction mode starts from the lower - left diagonal mode (i.e., mode 2 when using 35 modes) or the upper - right diagonal mode (i.e., mode 34 when using 35 modes), and the added wide - angle mode starts from the nearest corner beyond the lower - left diagonal mode or the upper - right diagonal mode (i.e., mode 1 or mode 35).
[0105] In some examples, the removed normal modes and added wide-angle modes may be contiguous or non-contiguous. In one example, if there are 35 normal intra-prediction modes and the width is greater than the height, remove modes 2 through 5 and add wide-angle modes 35 through 38. In another example, if there are 35 normal intra-prediction modes and the width is greater than the height, remove modes 2 through 5 and add wide-angle modes 35, 37, 38, and 39.
[0106] In an alternative embodiment, the used / removed normal intra-prediction modes are used to indicate the added wide-angle modes. As a result, the unused normal intra-prediction modes are still signaled, but the meaning of these unused normal intra-prediction modes is converted to the added wide-angle modes. For example, if the width is greater than the height, remove mode 2, but continue to signal mode 2. For one non-square block, if the decoder decodes mode 2 and the width is greater than the height, the decoder converts mode 2 to mode 35.
[0107] In an alternative embodiment, to obtain the most probable mode (MPM) of the current block, if the intra prediction of the neighboring block exceeds the intra prediction direction range of the current block, the mode of the neighboring block is mapped to the closest direction covered by the direction range of the intra prediction of the current block. For example, the current block is a square block, the block to its left is a non-square block, and the mode number of the block to the left is 35. Mode 35 is not covered by the mode range of the current block. Therefore, the mode of the block to the left is mapped to the closest mode 34 covered by the mode range of the current block.
[0108] In some embodiments, an intra prediction process is performed on a rectangular block by wide-angle prediction. The intra prediction process receives inputs such as an intra prediction mode (represented by predModeIntra), a width of the current block (represented by nWidth), a height of the block (represented by nHeight), neighboring samples (represented by p[x][y], (x=-1, y=-1 to nWidth+nHeight-1) (x=0 to nWidth+nHeight-1, y=-1)), and a variable cIdx that specifies color components of the current block. The intra prediction process can generate prediction samples predSamples[x][y], where x=0 to nWidth-1, y=0 to nHeight-1.
[0109] In some embodiments, the intra prediction process is performed based on a mapping between the intra prediction mode predModeIntra and the angle parameter intraPredAngle.
[0110] 12 is a schematic diagram illustrating 43 intra prediction directions. The 43 intra prediction directions include 33 normal intra prediction directions corresponding to normal intra prediction modes, mode 2 to mode 34, and further include five wide-angle directions extending beyond mode 34 (as shown in mode 35 to mode 39) and five wide-angle directions extending beyond mode 2 (as shown in mode -1 to mode -5).
[0111] 12 further shows a top staff and a left staff. In some examples, the angle parameter intraPredAngle is measured by the top staff or the left staff. Table 1 specifies a mapping table between the intra prediction mode predModeIntra and the angle parameter intraPredAngle. [Table 1]
[0112] In the example, the incoming intra prediction mode predModeIntra is one of the normal intra prediction modes removed, and the incoming intra prediction mode predModeIntra is converted to a wide-angle mode based on the aspect ratio (nWidth / nHeight) of the current block.
[0113] For example, if nWidth / nHeight=2 and 2≦predModeIntra≦4, then predModeIntra←predModeIntra+33. Specifically, if the width nWidth of a block is twice the height nHeight of the block, a new set of intra prediction modes for the block is formed by removing three normal intra prediction modes (modes 2, 3, and 4) from the set of normal intra prediction modes, and adding three wide-angle modes (modes 35, 36, and 37) and the remaining normal intra prediction modes. If the input intra prediction mode predModeIntra corresponds to one of the removed modes, the intra prediction mode predModeIntra is converted to a wide-angle mode.
[0114] Also, if nWidth / nHeight≧4 and 2≦predModeIntra≦6, predModeIntra←predModeIntra+33. Specifically, if the width nWidth of the block is four times or more the height nHeight of the block, five normal intra prediction modes (mode 2, mode 3, mode 4, mode 5, mode 6) are removed from the set of normal intra prediction modes, and five wide-angle modes (mode 35, mode 36, mode 37, mode 38, and mode 39) are added to the remaining normal intra prediction modes to form a new set of intra prediction modes for the block. If the input intra prediction mode predModeIntra corresponds to one of the removed modes, the intra prediction mode predModeIntra is converted to a wide-angle mode.
[0115] Also, if nHeight / nWidth=2 and 32≦predModeIntra≦34, predModeIntra←predModeIntra-35. Specifically, when the height nHeight of a block is twice the width nWidth of the block, three normal intra prediction modes (mode 34, mode 33, and mode 32) are removed from the set of normal intra prediction modes, and three wide-angle modes (mode-1, mode-2, and mode-3) are added to the remaining normal intra prediction modes to form a new set of intra prediction modes for the block. If the input intra prediction mode predModeIntra corresponds to one of the removed modes, the intra prediction mode predModeIntra is converted to a wide-angle mode.
[0116] Also, if nHeight / nWidth≧4 and 30≦predModeIntra≦34, predModeIntra←predModeIntra-35. Specifically, if the height nHeight of the block is four times or more the width nWidth of the block, five normal intra prediction modes (mode 34, mode 33, mode 32, mode 31, mode 30) are removed from the set of normal intra prediction modes, and five wide-angle modes (mode-1, mode-2, mode-3, mode-4, and mode-5) are added to the remaining normal intra prediction modes to form a new set of intra prediction modes for the block. If the input intra prediction mode predModeIntra corresponds to one of the removed modes, the intra prediction mode predModeIntra is converted to a wide-angle mode.
[0117] Then, according to the intra prediction mode predModeIntra, a corresponding angle parameter intraPredAngle can be determined, for example, based on Table 1. According to an appropriate video encoding standard (e.g., the HEVC standard), prediction samples predSamples[x][y] can be calculated based on the angle parameter intraPredAngle.
[0118] In another example, 65 normal intra prediction directions are applied to intra prediction of square blocks. For example, as shown in FIG. 2, the 65 normal intra prediction directions correspond to mode 2 to mode 66 as normal intra prediction modes. Mode 2 to mode 66, mode 0 (planar mode), and mode 1 (DC mode) form a set of 67 intra prediction modes for square blocks. In some embodiments, a certain number of normal intra prediction modes are removed and the same number of wide-angle modes are added to a new set of intra prediction modes for rectangular blocks, where the number depends on the aspect ratio of the rectangular block.
[0119] In some embodiments, an intra prediction process is performed on a rectangular block (current block) by wide-angle prediction. The intra prediction process receives inputs such as an intra prediction mode predModeIntra, a width of the current block nWidth, a height of the block nHeight, and neighboring samples (represented as p[x][y], where (x=-1, y=-1 to nWidth+nHeight-1) (x=0 to nWidth+nHeight-1, y=-1)). The intra prediction process can generate prediction samples predSamples[x][y], where x=0 to nWidth-1 and y=0 to nHeight-1.
[0120] In the example, the variable whRatio is clamped to be equal to min(abs(Log2(nWidth / nHeight)),2). If nWidth is greater than nHeight but less than twice nHeight, whRatio is less than 1. If nWidth is equal to twice nHeight, whRatio is equal to 1. If nWidth is greater than twice nHeight but less than four times nHeight, whRatio is in the range (1, 2). If nWidth is four times nHeight, whRatio is equal to 2. If nWidth is more than four times nHeight, whRatio is equal to 2.
[0121] Similarly, if nHeight is greater than nWidth but less than twice nWidth, whRatio is less than 1. If nHeight is equal to twice nWidth, whRatio is equal to 1. If nHeight is greater than twice nWidth but less than four times nWidth, whRatio is in the range (1, 2). If nHeight is four times nWidth, whRatio is equal to 2. If nHeight is more than four times nWidth, whRatio is equal to 2. Thus, whRatio is a function of the block shape and is independent of the block's orientation.
[0122] In the example, the incoming intra prediction mode predModeIntra is one of the normal intra prediction modes removed, and the incoming intra prediction mode predModeIntra is converted to a wide mode based on the whRatio of the current block.
[0123] For example, if nWidth is greater than nHeight but less than twice nHeight, whRatio is less than 1, and a new set of intra prediction modes for the block is formed by removing six normal intra prediction modes (modes 2 to 7) from the set of normal intra prediction modes, and adding six wide-angle modes (modes 67 to 72) to the remaining normal intra prediction modes. If the incoming intra prediction mode predModeIntra corresponds to one of the removed modes (greater than or equal to 2 and less than 8), the intra prediction mode predModeIntra is converted to a wide-angle mode by adding 65.
[0124] Also, if nWidth is four or more times greater than nHeight, a new set of intra prediction modes for the block is formed by removing 10 normal intra prediction modes (modes 2 to 11) from the set of normal intra prediction modes and adding 10 wide-angle modes (modes 67 to 76) to the remaining normal intra prediction modes. If the input intra prediction mode predModeIntra corresponds to one of the removed modes (greater than or equal to 2 and less than 12), the intra prediction mode predModeIntra is converted to a wide-angle mode by adding 65.
[0125] Also, if nHeight is greater than nWidth but less than twice nWidth, then whRatio is less than 1, and a new set of intra prediction modes for the block is formed by removing six normal intra prediction modes (mode 61 to mode 66) from the set of normal intra prediction modes and adding six wide-angle modes (mode-1 to mode-6) to the remaining normal intra prediction modes. If the incoming intra prediction mode predModeIntra corresponds to one of the removed modes (greater than or equal to 61 and less than 67), then the intra prediction mode predModeIntra is converted to a wide-angle mode by subtracting 67.
[0126] Also, if nHeight is four or more times greater than nWidth, a new set of intra prediction modes for the block is formed by removing 10 normal intra prediction modes (mode 57 to mode 66) from the set of normal intra prediction modes and adding 10 wide-angle modes (mode-1 to mode-10) to the remaining normal intra prediction modes. If the input intra prediction mode predModeIntra corresponds to one of the removed modes (greater than or equal to 57 and less than 67), the intra prediction mode predModeIntra is converted to a wide-angle mode by subtracting 67.
[0127] Then, according to the intra prediction mode predModeIntra, a corresponding angle parameter intraPredAngle can be determined, for example, based on a lookup table. Then, according to an appropriate video encoding standard (e.g., the HEVC standard), prediction samples predSamples[x][y] can be calculated based on the angle parameter intraPredAngle.
[0128] FIG. 13 shows a flow chart for outlining a process (1300) according to an embodiment of the present disclosure. The process (1300) can be used to reconstruct a block coded in intra mode, generating a prediction block for the block being reconstructed. In various embodiments, the process (1300) is performed by a processing circuit in the terminal device (310), (320), (330), or (340), a processing circuit performing the function of the video encoder (403), a processing circuit performing the function of the video decoder (410), a processing circuit performing the function of the video decoder (510), a processing circuit performing the function of the intra prediction module (552), a processing circuit performing the function of the video encoder (603), a processing circuit performing the function of the predictor (635), a processing circuit performing the function of the intra encoder (722), a processing circuit performing the function of the intra decoder (872), or the like. In some embodiments, the process (1300) is implemented by software instructions, such that the processing circuit performs the process (1300) when the processing circuit executes the software instructions. The process starts at (S1301) and proceeds to (S1310).
[0129] At (S1310), prediction information for the block is decoded. In an example, the processing circuit decodes the prediction information for the block from the encoded video bitstream. In some examples, the block is a non-square block, and the prediction information for the block indicates a first intra-prediction mode, the first intra-prediction mode being included in a first set of intra-prediction modes for square blocks.
[0130] At (S1320), the processing circuitry determines whether the first intra-prediction mode is within the subset of intra-prediction modes disabled for non-square blocks. If the first intra-prediction mode is within the subset of intra-prediction modes disabled for non-square blocks, processing proceeds to (S1330); otherwise, processing proceeds to (S1350).
[0131] At (S1330), the first intra prediction mode is remapped to a second intra prediction mode in a second set of intra prediction modes for non-square blocks, the second intra prediction mode being a wide-angle intra prediction mode that is not in the first set of intra prediction modes for square blocks, the second set of intra prediction modes not including the subset of the disabled intra prediction modes.
[0132] At (S1340), samples of the block are reconstructed based on the second intra-prediction mode. In some examples, corresponding angle parameters can be determined according to the second intra-prediction mode, for example, based on a look-up table. Then, samples of the block can be calculated based on the angle parameters according to an appropriate video encoding standard (e.g., the HEVC standard). Then, the process proceeds to S1399 and ends.
[0133] At (1350), samples of the block are reconstructed based on the first intra-prediction mode. In some examples, corresponding angle parameters can be determined according to the first intra-prediction mode, for example based on a look-up table. Then, samples of the block can be calculated based on the angle parameters according to an appropriate video encoding standard (e.g., the HEVC standard). The process proceeds to S1399 and ends.
[0134] The techniques described above may be implemented as computer software by computer-readable instructions and physically stored on one or more computer-readable media. For example, Figure 14 illustrates a computer system (1400) suitable for implementing some embodiments of the disclosed subject matter.
[0135] Computer software may be encoded in any suitable machine code or computer language, and may be, through mechanisms such as assembling, compiling, linking, etc., produced code including instructions that may be executed directly by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or may be interpreted, executed by microcode, etc.
[0136] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablets, servers, smartphones, gaming devices, Internet of Things devices, etc.
[0137] The components of computer system (1400) illustrated in Figure 14 are exemplary in nature and are not intended to imply any limitation on the scope or functionality of the computer software used to implement embodiments of the present disclosure. The arrangement of components should not be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the exemplary embodiment of computer system (1400).
[0138] The computer system (1400) may include a number of human interface input devices. Such human interface input devices may respond to one or more human user inputs, for example, by tactile input (e.g., keystrokes, slides, data glove movements), audio input (e.g., voice, claps), visual input (e.g., posture), olfactory input (not shown). The human interface devices may also be used to capture certain media that are not necessarily directly related to conscious human input, such as, for example, audio (e.g., voice, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a static image capture device), and video (e.g., two-dimensional video, three-dimensional video including stereo video).
[0139] The human interface input devices may include one or more of a keyboard (1401), a mouse (1402), a touchpad (1403), a touch panel (1410), a data glove (not shown), a joystick (1405), a microphone (1406), a scanner (1407), and an image capture device (1408) (only one of each is shown).
[0140] The computer system (1400) may further include certain human interface output devices. Such human interface output devices may stimulate one or more of the human user's senses, for example, through haptic output, sound, light, and smell / taste. Such human interface output devices may include haptic output devices (e.g., haptic feedback via a touch panel (1410), data gloves (not shown), or joystick (1405), but also haptic feedback devices that are not used as input devices), audio output devices (e.g., speakers (1409), headphones (not shown)), visual output devices (e.g., screens (1410), including CRT screens, LCD screens, plasma screens, and OLED screens, each with or without touch screen input capabilities and with or without haptic feedback capabilities, some of which may be capable of outputting two-dimensional visual output or three or more dimensional output, such as by means of stereo output), virtual reality glasses (not shown), holographic displays, and smoke tanks (not shown)), and printers (not shown).
[0141] The computer system (1400) may further include human accessible storage devices and associated media, including, for example, optical media such as a CD / DVD ROM / RW (1420) having media such as CDs / DVDs (1421), thumb drives (1422), removable hard drives or solid state drives (1423), conventional magnetic media (e.g., magnetic tape and floppy disks (not shown)), dedicated ROM / ASIC / PLD based devices (e.g., dongles (not shown)), and the like.
[0142] Additionally, those skilled in the art should understand that the term "computer-readable medium" as used in connection with the presently disclosed subject matter does not include transmission media, carrier waves, or other transitory signals.
[0143] The computer system (1400) may further include an interface to one or more communication networks. The network may be, for example, a wireless, wired, optical, etc. network. The network may be, for example, a local, wide area, metropolitan, in-vehicle, industrial, real-time, delay tolerant, etc. network. Examples of networks include, for example, local area networks such as Ethernet, wireless LANs, cellular networks (including GSM, 3G, 4G, 5G, LTE, etc.), television wired or wireless wide area digital network television (including cable television, satellite television, and terrestrial television), in-vehicle and industrial networks (including CANBus), etc. Some networks typically require an external network interface adapter that connects to some general-purpose data port or peripheral bus (1449) (e.g., a USB port on the computer system (1400)), while other networks are typically integrated into the core of the computer system (1400) by connecting to a system bus (e.g., an Ethernet interface on a PC computer system, or a cellular network interface on a smartphone computer system) as described below. Using any of these networks, the computer system (1400) can communicate with other entities. Such communications may be one-way, receive only (e.g., broadcast television), one-way transmit only (e.g., a CANbus to a CANbus device), or two-way (e.g., using a local or wide area digital network to reach another computer system). Specific protocols and protocol stacks may be used for each of these networks and network interfaces as described above.
[0144] The human interface devices, human accessible storage and network interfaces may be attached to a core (1440) of the computer system (1400).
[0145] The cores (1440) may include one or more central processing units (CPUs) (1441), graphics processing units (GPUs) (1442), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1443), hardware accelerators for specific tasks (1444), etc. These devices may be connected via a system bus (1448), along with read only (ROM) (1445), random access memory (1446), and internal mass storage (e.g., internal hard disk drives, SSDs, etc. that are not user accessible) (1447). In some computer systems, the system bus (1448) may be accessible in the form of one or more physical plugs, allowing expansion with additional CPUs, GPUs, etc. Peripheral devices may be connected to the core's system bus (1448) directly or via a peripheral bus (1449). Peripheral bus architectures include PCI, USB, etc.
[0146] The CPU (1441), GPU (1442), FPGA (1443) and accelerator (1444) can execute certain instructions that combine to make up the computer code. The computer code can be stored in ROM (1445) or RAM (1446). Temporary data can also be stored in RAM (1446) and permanent data is stored, for example, in internal mass storage (1447). A cache memory can be used to allow fast storage and retrieval of any memory in the memory, and the cache memory can be closely associated with one or more of the CPU (1441), GPU (1442), mass storage (1447), ROM (1445), RAM (1446), etc.
[0147] The computer-readable medium can bear computer code for performing various computer implemented operations, and the medium and computer code can be specially designed and constructed for the purposes of the present disclosure, or they can be of the type well known and available to those skilled in the art of computer software.
[0148] By way of example and not limitation, a computer system having the architecture (1400), and in particular the core (1440), may provide functionality realized by a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software implemented in one or more tangible computer-readable media. Such computer-readable media may be media related to user-accessible mass storage, as described above, and specific storage devices with the core (1440), such as a core internal mass storage (1447) or a ROM (1445), which is non-transitory. Software of various embodiments for implementing the present disclosure may be stored in such devices and executed by the core (1440). Depending on the particular needs, the computer-readable media may include one or more storage devices or chips. The software may cause the core (1440), and in particular the processor therein (including a CPU, GPU, FPGA, etc.) to perform certain operations or certain parts of certain operations described herein, including defining data structures stored in the RAM (1446) and modifying such data structures through operations defined by the software. Additionally or alternatively, the computer system may provide functionality by logic hardwired or otherwise implemented in circuitry (e.g., accelerator (1444)) that may operate in place of or in conjunction with software to perform particular operations or portions of particular operations described herein. Where appropriate, references to software may include logic, and conversely, references to logic may include software. Where appropriate, references to computer-readable media may include circuitry (e.g., integrated circuits (ICs)) on which software is stored for execution, circuitry embodying logic for execution, or both. The present disclosure includes any appropriate combination of hardware and software.
[0149] While this disclosure has described several exemplary embodiments, there are modifications, substitutions, and various substitute equivalents that fall within the scope of this disclosure. It should thus be understood that those skilled in the art can contemplate many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are therefore within its spirit and scope. [Appendix A] Acronyms JEM: Joint exploration model VVC: Versatile video coding (VVC) BMS: Benchmark set HEVC: High Efficiency Video Coding (HEVC) SEI: Supplementary Enhancement Information VUI: Video Usability Information (VUI) GOP: Groups of Pictures TU: Transform Units PU: Prediction Unit CTU: Coding Tree Unit CTB: Coding Tree Block PB: Prediction Block HRD: Hypothetical Reference Decoder (HRD) SNR: Signal to noise ratio (SNR) CPU: Central Processing Unit GPU: Graphics Processing Unit CRT: Cathode Ray Tube (CRT) LCD: Liquid Crystal Display OLED: Organic Light-Emitting Diode CD: Compact Disc DVD: Digital Video Disc (DVD) ROM: Read-Only Memory RAM: Random Access Memory ASIC: Application-Specific Integrated Circuit (ASIC) PLD: Programmable Logic Device (PLD) LAN: Local Area Network GSM: Global System for Mobile communications LTE: Long-Term Evolution CANBus: Controller Area Network Bus USB: Universal Serial Bus PCI: Peripheral Component Interconnect FPGA: Field Programmable Gate Array SSD: Solid-state drive (SSD) IC: Integrated Circuit (IC) CU: Coding Unit (CU)
Claims
1. A method for video decoding performed by a decoder, comprising the step of decoding prediction information of a first block from an encoded video bitstream, wherein the first block is a non-square block, and the prediction information of the first block indicates a first intra prediction mode in a first set of intra prediction modes for square blocks, and the first set of intra prediction modes for the square blocks includes modes numbered from 2 to 66 from the lower left diagonal direction mode to the upper right diagonal direction mode; determining that the first intra prediction mode is within a subset of invalid intra prediction modes for the non-square block in the first set of intra prediction modes for the square block; remapping the first intra prediction mode to a second intra prediction mode in a second set of intra prediction modes for the non-square block, wherein the second set of intra prediction modes does not include the subset of invalid intra prediction modes; reconstructing at least one sample of the first block based on the second intra prediction mode; and when the width of the first block is greater than the height of the first block, the subset of invalid intra prediction modes includes some of the first several modes among modes 2 to 66; the remapping step includes adding 65 to the mode number associated with the first intra prediction mode and remapping the first intra prediction mode to the second intra prediction mode; the intra prediction mode numbered 66 + n is the reverse of the intra prediction mode 2 + n, where n is an integer; a method.
2. The step of reconstructing at least one sample of the first block based on the second intra prediction mode according to claim 1 includes: determining an intra prediction angle parameter associated with the second intra prediction mode; reconstructing the at least one sample of the first block based on the intra prediction angle parameter; and the method according to claim 1.
3. The method according to claim 1 or 2, wherein the second intra prediction mode is not included in the first set of intra prediction modes.
4. The method according to any one of claims 1 to 3, further comprising a step in which the decoder determines the second set of intra prediction modes based on the shape of the first block.
5. The decoder calculates the aspect ratio of the first block, and determines a subset of invalid intra prediction modes for the non-square block based on the aspect ratio of the first block. The method according to any one of claims 1 to 4, further comprising the above.
6. The decoder determines that the width of the first block is greater than the height of the first block, and detects that the first intra prediction mode is within a subset of the invalid intra prediction modes starting from the lower left diagonal direction mode in the first set of intra prediction modes. The method according to any one of claims 1 to 5, further comprising the above.
7. When the width is greater than the height but less than twice the height, the invalid intra prediction modes for the non-square block are intra prediction modes 2 to 7, and the wide-angle modes included in the second set of intra prediction modes but not included in the first set of intra prediction modes are intra prediction modes 67 to 72. The method according to any one of claims 1 to 6.
8. When the width is 4 times or more the height, the invalid intra prediction modes for the non-square block are intra prediction modes 2 to 11, and the wide-angle modes included in the second set of intra prediction modes but not included in the first set of intra prediction modes are intra prediction modes 67 to 76. The method according to claim 7.
9. An apparatus including a processing circuit, wherein the processing circuit is configured to execute the video decoding method according to any one of claims 1 to 8.
10. A program for causing a computer to execute the video decoding method according to any one of claims 1 to 8.
11. A video encoding method executed by an encoder, which is a step of determining a second intra prediction mode in a second set of intra prediction modes associated with the non-square block for predictive encoding of a first block that is a non-square block of an image. The second set of intra prediction modes includes a wide-angle mode that is not in the first set of intra prediction modes associated with the square block, and the first set of intra prediction modes for the square block includes modes numbered from 2 to 66 from the bottom-left diagonal direction mode to the top-right diagonal direction mode, step; Encoding at least one sample of the first block based on the second intra prediction mode; Determining prediction information indicating an intra prediction mode of the first block, wherein when the second intra prediction mode is one of the wide-angle modes, the prediction information is a number corresponding to that one of the wide-angle modes, in the first set of intra prediction modes for the square block, a first intra prediction mode obtained by remapping to a first intra prediction mode within a subset of intra prediction modes that are invalid for the non-square block; comprising; When the width of the first block is greater than the height of the first block, the subset of invalid intra prediction modes includes some of the first several modes among modes 2 to 66, and the remapping step includes subtracting 65 from the mode number associated with the second intra prediction mode and remapping the second intra prediction mode to the first intra prediction mode; The intra prediction mode of number 66 + n is the reverse of the direction of intra prediction mode 2 + n, where n is an integer; Method.
12. An apparatus including a processing circuit, wherein the processing circuit is configured to execute the video encoding method according to claim 11.
13. A program for causing a computer to execute the video encoding method according to claim 11.
14. A method of transmitting a bitstream, executed by an encoder, Determining a second intra prediction mode in a second set of intra prediction modes associated with the non-square block for predictive encoding of a first block that is a non-square block of an image, The second set of intra prediction modes includes a wide-angle mode that is not in the first set of intra prediction modes associated with the square block, and the first set of intra prediction modes for the square block includes modes numbered from 2 to 66 from the lower left diagonal direction mode to the upper right diagonal direction mode, step; Encoding at least one sample of the first block based on the second intra prediction mode; Determining prediction information indicating the intra prediction mode of the first block, wherein when the second intra prediction mode is one of the wide-angle modes, the prediction information is the number corresponding to that one of the wide-angle modes, within a subset of intra prediction modes that are invalid for the non-square block in the first set of intra prediction modes for the square block, a step of indicating a first intra prediction mode obtained by remapping; Transmitting a bitstream representing at least the encoded at least one sample and the prediction information; including When the width of the first block is greater than the height of the first block, the subset of invalid intra prediction modes includes some of the first few modes among modes 2 to 66, and the remapping step includes subtracting 65 from the mode number associated with the second intra prediction mode and remapping the second intra prediction mode to the first intra prediction mode; The intra prediction mode of number 66 + n is the reverse of the direction of intra prediction mode 2 + n, where n is an integer; Method.