Systems and methods for performing intra-prediction encoding in video coding
By exporting the intra-frame prediction angle parameters and setting the values of the scaling variables, the intra-frame prediction sample filtering process of video blocks is optimized, which solves the problem of insufficient intra-frame prediction coding efficiency in existing video coding standards and achieves more efficient video compression.
Patent Information
- Application Number
- CN202080045133.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-28
- Filing Date
- 2020-06-24
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2040-06-24
AI Technical Summary
Existing video coding standards such as ITU-T H.264, ITU-T H.265, JEM and JVET-N1001 have room for efficiency improvement in intra-frame predictive coding technology, especially in the process of predictive mode and sample filtering of video blocks, where it is difficult to achieve higher compression efficiency.
The encoding process of video blocks is optimized by deriving intra-frame prediction angle parameters, setting the value of scaling variables based on the inverted angle parameters, and performing position-dependent intra-frame prediction sample filtering.
It improves the compression efficiency of video coding, enhances the accuracy of intra-frame prediction and compression performance, and is suitable for video coding systems of future video coding standards.
Smart Images

Figure CN113994681B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to video coding, and more specifically to techniques for performing intra prediction. BACKGROUND
[0002] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, laptop or desktop computers, tablet computers, digital recording devices, digital media players, video gaming devices, cellular telephones, including so-called smartphones, medical imaging devices, and the like. Digital video can be coded according to a video coding standard. Video coding standards define the format of a compliant bitstream encapsulating encoded video data. A compliant bitstream is a data structure that can be received and decoded by a video decoding device to generate reconstructed video data. Video coding standards can incorporate video compression techniques. Examples of video coding standards include ISO / IEC MPEG-4 Visual and ITU-T H.264 / AVC (also known as ISO / IEC MPEG-4 AVC) and High-Efficiency Video Coding (HEVC). HEVC is described in High Efficiency Video Coding (HEVC), ITU-T H.265 Recommendation, December 2016, which is incorporated by reference, and is referred to herein as ITU-T H.265. Extensions and improvements to ITU-T H.265 are currently being considered for the development of next generation video coding standards. For example, the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) (collectively, the Joint Video Exploration Team (JVET)) are working on standardizing video coding technology with compression capabilities significantly exceeding those of the current HEVC standard. Joint Exploration Test Model 7 (JEM 7), Algorithm Description of Joint Exploration Test Model 7 (JEM 7), ISO / IEC JTC1 / SC29 / WG11 Document: JVET-G1001, July 2017, Torino, IT, which is incorporated by reference herein, describes the coding features under exploration by the JVET in the Joint Test Model development, which is a potential enhancement to ITU-T H.265 functionality. It is noted that the coding features of JEM 7 are implemented in the JEM reference software. As used herein, the term JEM collectively refers to the algorithms included in JEM 7 and the implementation of the JEM reference software. Further, in response to the “Joint Call for Proposals on Video Compression with Capabilities beyond HEVC,” jointly issued by VCEG and MPEG, multiple groups submitted descriptions of video coding tools at the 10th Meeting of ISO / IEC JTC1 / SC29 / WG11, April 16-20, 2018, San Diego, CA.According to various descriptions of video coding tools, a final initial draft text of a video coding specification is described in “Versatile Video Coding (Draft 1),” i.e., document JVET-J1001-v2, 10th Meeting of ISO / IEC JTC1 / SC29 / WG11, San Diego, CA, USA, April 16-20, 2018, which is incorporated by reference herein and referred to as JVET-J1001. The current development of the next generation video coding standard by VCEG and MPEG is referred to as the Versatile Video Coding (VVC) project. “Versatile Video Coding (Draft 5),” i.e., document JVET-N1001-v8, 14th Meeting of ISO / IEC JTC1 / SC29 / WG11, Geneva, CH, March 19-27, 2019, which is incorporated by reference herein and referred to as JVET-N1001, represents the current iteration of the draft text of a video coding specification corresponding to the VVC project.
[0003] Video compression techniques enable the storage and transmission of video data at a lower bit rate, while maintaining the visual quality of the video data. Video compression techniques can reduce the data rate by exploiting the redundancies inherent in a video sequence. Video compression techniques can sub-divide a video sequence into progressively smaller portions (i.e., a group of pictures within a video sequence, a picture within a group of pictures, a region within a picture, a sub-region within a region, etc.). Intra-picture prediction coding techniques (e.g., spatial prediction techniques within a picture) and inter-picture prediction techniques (i.e., techniques across pictures (temporal)) can be used to generate difference values between the video data to be coded and reference units of video data. The difference values can be referred to as residual data. The residual data can be coded as quantized transform coefficients. Syntax elements can relate to the residual data and the reference coded units (e.g., intra-prediction mode indices and motion information). The residual data and the syntax elements can be entropy coded. The entropy coded residual data and the syntax elements can be included in a data structure that forms a compliant bitstream. SUMMARY
[0004] In one example, a method of encoding video data includes deriving an intra prediction angle parameter, deriving an inverse angle parameter based on the intra prediction angle parameter, setting a value of a scaling variable based on the derived inverse angle for a prediction mode included in a defined set of prediction modes, and performing a position dependent intra prediction sample filtering process using the value of the scaling variable.
[0005] In one example, an apparatus comprising one or more processors configured to: derive an intra prediction angle parameter; derive an inverse angle parameter based on the intra prediction angle parameter; for a defined set of prediction modes, set a value of a scaling variable based on the derived inverse angle; and perform a position dependent intra prediction sample filtering process using the value of the scaling variable. BRIEF DESCRIPTION OF DRAWINGS
[0006] FIG. 1 FIG. 1 is a conceptual diagram illustrating an example of a set of pictures encoded according to quadtree multi-type tree partitioning according to one or more techniques of this disclosure.
[0007] FIG. 2A FIG. 2A is a conceptual diagram illustrating an example of encoding a block of video data according to one or more techniques of this disclosure.
[0008] FIG. 2B FIG. 2B is a conceptual diagram illustrating an example of encoding a block of video data according to one or more techniques of this disclosure.
[0009] FIG. 3 FIG. 3 is a conceptual diagram illustrating an example of video component sampling formats that can be used according to one or more techniques of this disclosure.
[0010] FIG. 4 FIG. 4 is a conceptual diagram illustrating a data structure that encapsulates encoded video data and corresponding metadata according to one or more techniques of this disclosure.
[0011] FIG. 5 FIG. 5 is a block diagram illustrating an example of a system that can be configured to encode and decode video data according to one or more techniques of this disclosure.
[0012] FIG. 6 FIG. 6 is a block diagram illustrating an example of a video encoder that can be configured to encode video data according to one or more techniques of this disclosure.
[0013] FIG. 7 FIG. 7 is a block diagram illustrating an example of a video decoder that can be configured to decode video data according to one or more techniques of this disclosure. DETAILED DESCRIPTION
[0014] In general, this disclosure describes various techniques for encoding video data. In particular, this disclosure describes techniques for performing intra prediction. It should be noted that although the techniques of this disclosure are described with respect to ITU-T H.264, ITU-T H.265, JEM, and JVET-N1001, the techniques of this disclosure can be applied universally to video encoding. For example, in addition to those techniques included in ITU-T H.265, JEM, and JVET-N1001, the encoding techniques described herein can be incorporated into video encoding systems, including video encoding systems based on future video coding standards, including video block structures, intra prediction techniques, inter prediction techniques, transform techniques, filtering techniques, and / or other entropy encoding techniques. Accordingly, references to ITU-T H.264, ITU-T H.265, JEM, and / or JVET-N1001 are for descriptive purposes and should not be construed as limiting the scope of the techniques described herein. Moreover, it should be noted that the incorporation of documents by reference herein is for descriptive purposes and should not be construed as limiting or creating ambiguity with respect to the terms used herein. For example, where a definition of a term provided in one incorporated reference is different from that in another incorporated reference and / or as used herein, the term should be interpreted in a manner that broadly includes each respective definition and / or in a manner that includes each particular definition in the alternative.
[0015] In one example, a method of encoding video data includes setting a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and performing a position-dependent intra prediction sample filtering process based on the value of the scaling variable.
[0016] In one example, an apparatus for encoding video data includes one or more processors configured to set a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and perform a position-dependent intra prediction sample filtering process based on the value of the scaling variable.
[0017] In one example, a non-transitory computer-readable storage medium includes instructions stored thereon that, when executed, cause one or more processors of a device to set a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and perform a position-dependent intra prediction sample filtering process based on the value of the scaling variable.
[0018] In one example, an apparatus includes means for setting a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and means for performing a position-dependent intra prediction sample filtering process based on the value of the scaling variable.
[0019] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims.
[0020] Video content includes a video sequence composed of a series of frames (or pictures). A series of frames can also be referred to as a group of pictures (GOP). Each video frame or picture can be divided into one or more regions. The regions can be defined according to elementary units (e.g., video blocks) and a set of rules that define the regions. For example, the rules that define the regions can be that the regions must be an integer number of video blocks arranged in a rectangle. In addition, the video blocks in a region can be ordered according to a scan pattern (e.g., raster scan). As used herein, the term “video block” can generally refer to a region of a picture, or can more specifically refer to a maximum array of sample values that can be predictively coded, sub-partitions thereof, and / or corresponding structures. In addition, the term “current video block” can refer to a region of a picture that is being coded or decoded. A video block can be defined as an array of sample values. It should be noted that in some cases, pixel values can be described as including sample values of respective components of video data, which can also be referred to as color components (e.g., luma (Y) and chroma (Cb and Cr) components or red, green, and blue components). It should be noted that in some cases, the terms “pixel value” and “sample value” can be used interchangeably. In addition, in some cases, a pixel or sample can be referred to as a pel. A video sampling format (which can also be referred to as a chroma format) can define a number of chroma samples included in a video block relative to a number of luma samples included in the video block. For example, for a 4:2:0 sampling format, the sampling rate of the luma component is twice that of the chroma components in both the horizontal and vertical directions.
[0021] A video encoder can perform predictive coding on video blocks and sub-partitions thereof. Video blocks and sub-partitions thereof can be referred to as nodes. ITU-T H.264 specifies macroblocks comprising 16x16 luma samples. That is, in ITU-T H.264, pictures are segmented into macroblocks. ITU-T H.265 specifies a similar coding tree unit (CTU) structure (which can be referred to as a largest coding unit (LCU)). In ITU-T H.265, pictures are segmented into CTUs. In ITU-T H.265, for a picture, the CTU size can be set to comprise 16x16, 32x32, or 64x64 luma samples. In ITU-T H.265, a CTU is composed of respective coding tree blocks (CTBs) for each component of video data (e.g., luma (Y) and chroma (Cb and Cr)). It should be noted that video having one luma component and two corresponding chroma components can be described as having two channels, i.e., a luma channel and a chroma channel. Further, in ITU-T H.265, a CTU can be partitioned according to a quadtree (QT) partitioning structure, which causes the CTBs of the CTU to be partitioned into coding blocks (CBs). That is, in ITU-T H.265, a CTU can be partitioned into quadtree leaf nodes. According to ITU-T H.265, one luma CB along with two corresponding chroma CBs and associated syntax elements are referred to as a coding unit (CU). In ITU-T H.265, a minimum allowed size of a CB can be signaled. In ITU-T H.265, the minimum allowed minimum size of a luma CB is 8x8 luma samples. In ITU-T H.265, the decision to code a picture region using intra prediction or inter prediction is made at the CU level.
[0022] In ITU-T H.265, a CU is associated with a prediction unit (PU) structure having its root at the CU. In ITU-T H.265, the PU structure allows partitioning of luma CBs and chroma CBs to generate corresponding reference samples. That is, in ITU-T H.265, a luma CB and a chroma CB can be partitioned into respective luma prediction blocks and chroma prediction blocks (PBs), where a PB includes sample values to which the same prediction is applied. In ITU-T H.265, a CB can be divided into 1, 2, or 4 PBs. ITU-T H.265 supports PB sizes from 64x64 samples down to 4x4 samples. In ITU-T H.265, square PBs are supported for intra prediction, where a CB can form a PB or a CB can be partitioned into four square PBs. In ITU-T H.265, in addition to square PBs, rectangular PBs are also supported for inter prediction, where a CB can be halved vertically or horizontally to form PBs. Further, it should be noted that in ITU-T H.265, for inter prediction, four asymmetric PB partitions are supported, where a CB is partitioned into two PBs at one quarter of the height (top or bottom) or width (left or right) of the CB. Intra prediction data (e.g., intra prediction mode syntax elements) or inter prediction data (e.g., motion data syntax elements) corresponding to a PB are used to generate reference and / or predicted sample values for the PB.
[0023] JEM specifies a CTU having a maximum size of 256x256 luma samples. JEM specifies a quadtree plus binary tree (QTBT) block structure. In JEM, the QTBT structure allows quadtree leaf nodes to be further divided by a binary tree (BT) structure. That is, in JEM, the binary tree structure allows quadtree leaf nodes to be recursively divided vertically or horizontally. In JVET-N1001, a CTU is partitioned according to a quadtree plus multi-type tree (QTMT or QT+MTT) structure. The QTMT in JVET-N1001 is similar to the QTBT in JEM. However, in JVET-N1001, in addition to indicating binary splits, the multi-type tree can also indicate so-called ternary (or ternary tree (TT)) splits. A ternary split divides one block into three blocks either vertically or horizontally. In the case of a vertical TT split, the block is split at one quarter of its width from the left edge and at one quarter of its width from the right edge, and in the case of a horizontal TT split, the block is split at one quarter of its height from the top edge and at one quarter of its height from the bottom edge. Again referring to FIG. 1 , FIG. 1 An example is shown in which a CTU is partitioned into quadtree leaf nodes and the quadtree leaf nodes are further partitioned according to BT splits or TT splits. That is, in FIG. 1 , the dashed lines indicate additional binary and ternary splits in the quadtree.
[0024] As noted above, each video frame or picture can be divided into one or more regions. For example, according to ITU-T H.265, each video frame or picture can be partitioned to include one or more slices, and further partitioned to include one or more tiles, where each slice includes a sequence of CTUs (e.g., arranged in a raster scan order), and where a tile is a sequence of CTUs corresponding to a rectangular region of a picture. It should be noted that in ITU-T H.265, a slice is a sequence of one or more slice segments starting with an independent slice segment and containing all subsequent dependent slice segments (if any) before the next independent slice segment (if any). A slice segment (like a slice) is a sequence of CTUs. Thus, in some cases, the terms “slice” and “slice segment” can be used interchangeably to indicate a sequence of CTUs arranged in a raster scan order. Further, it should be noted that in ITU-T H.265, a tile can be composed of CTUs contained in more than one slice, and a slice can be composed of CTUs contained in more than one tile. However, ITU-T H.265 specifies that one or both of the following conditions should be met: (1) all CTUs in a slice belong to the same tile; and (2) all CTUs in a tile belong to the same slice.
[0025] With respect to JVET-N1001, a slice needs to be composed of an integer number of tiles, rather than just an integer number of CTUs. In JVET-N1001, a tile is a rectangular region of CTU rows within a particular tile in a picture. Further, in JVET-N1001, a tile can be partitioned into multiple tiles, each composed of one or more CTU rows within the tile. A tile that is not partitioned into multiple tiles is also referred to as a tile. However, a tile that is a proper subset of a tile is not referred to as a tile. Thus, in some video coding techniques, a slice that includes a group of CTUs that do not form a rectangular region of a picture can or can not be supported. Further, it should be noted that in some cases, a slice can need to be composed of an integer number of complete tiles, and in such cases, the slice is referred to as a tile group. The techniques described herein can apply to tiles, slices, tiles, and / or tile groups. FIG. 1 is a conceptual diagram illustrating an example of a group of pictures including slices. In FIG. 1 In the example shown, Pic3 is shown to include two slices (i.e., slice 0 and slice 1). In FIG. 1 In the example shown, slice 0 includes one tile, tile 0, and slice 1 includes two tiles, tile 1 and tile 2. It should be noted that in some cases, slice 0 and slice 1 can meet the requirements of a tile and / or tile group and be classified as a tile and / or tile group.
[0026] A video sampling format (which can also be referred to as a chroma format) can define a number of chroma samples included in a CU relative to a number of luma samples included in the CU. For example, for a 4:2:0 sampling format, the sampling rate of the luma component is twice that of the chroma components in both the horizontal and vertical directions. Thus, for a CU formatted according to the 4:2:0 format, the width and height of the sample array for the luma component is twice that of each of the sample arrays for the chroma components. FIG. 3 is a conceptual diagram illustrating an example of a coding unit formatted according to a 4:2:0 sample format. FIG. 3 The relative positions of the chroma samples relative to the luma samples within the CU are illustrated. As noted above, a CU is typically defined according to the number of horizontal and vertical luma samples. Thus, as illustrated in FIG. 3 a 16x16 CU formatted according to the 4:2:0 sample format includes 16x16 samples of the luma component and 8x8 samples for each of the chroma components. Further, in the example illustrated in FIG. 3 the relative positions of the chroma samples relative to the luma samples of neighboring video blocks of the 16x16 CU are illustrated. For a CU formatted according to the 4:2:2 format, the width of the sample array of the luma component is twice that of the sample array of each of the chroma components, but the height of the sample array of the luma component is equal to the height of the sample array of each of the chroma components. Further, for a CU formatted according to the 4:4:4 format, the sample array of the luma component has the same width and height as the sample array of each of the chroma components.
[0027] For intra prediction coding, an intra prediction mode can specify the location of reference samples within the picture. In ITU-T H.265, the possible intra prediction modes that have been defined include a planar (i.e., surface fitting) prediction mode, a DC (i.e., flat overall average) prediction mode, and 33 angular prediction modes (predMode: 2-34). In JEM, the possible intra prediction modes that have been defined include a planar prediction mode, a DC prediction mode, and 65 angular prediction modes. It should be noted that the planar prediction mode and the DC prediction mode can be referred to as non-directional prediction modes, and the angular prediction modes can be referred to as directional prediction modes. It should be noted that the techniques described herein can be universally applicable regardless of the number of defined possible prediction modes.
[0028] For inter prediction coding, reference pictures are determined and motion vectors (MVs) identify samples in the reference pictures that are used to generate a prediction for a current video block. For example, a current video block can be predicted using reference sample values located in one or more previously coded pictures, and a motion vector is used to indicate the location of the reference block relative to the current video block. A motion vector can describe, for example, a horizontal displacement component of the motion vector (i.e., MVx), a vertical displacement component of the motion vector (i.e., MVy), and a resolution of the motion vector (e.g., quarter-pel precision, half-pel precision, one-pel precision, two-pel precision, four-pel precision). Previously decoded pictures, which can include pictures output before or after the current picture, can be organized into one or more reference picture lists, and identified using a reference picture index value. Further, in inter prediction coding, single prediction refers to generating a prediction using sample values from a single reference picture, and bi-prediction refers to generating a prediction using corresponding sample values from two reference pictures. That is, in single prediction, a single reference picture and corresponding motion vector are used to generate a prediction for a current video block, while in bi-prediction, a first reference picture and corresponding first motion vector, and a second reference picture and corresponding second motion vector are used to generate a prediction for a current video block. In bi-prediction, the corresponding sample values are combined (e.g., added, rounded and clipped, or averaged according to weights) to generate the prediction. Pictures and regions thereof can be classified based on which types of prediction modes can be used to code video blocks thereof. That is, for regions having a B type (e.g., B slices), bi-prediction, single prediction, and intra prediction modes can be utilized, for regions having a P type (e.g., P slices), single prediction and intra prediction modes can be utilized, and for regions having an I type (e.g., I slices), only intra prediction modes can be utilized. As noted above, reference pictures are identified by reference index. For example, for P slices, there can be a single reference picture list, RefPicListO, and for B slices, in addition to RefPicListO, there can be a second independent reference picture list, RefPicListl. It should be noted that for single prediction in B slices, one of RefPicListO or RefPicListl can be used to generate a prediction. Further, it should be noted that during the decoding process, when starting to decode a picture, the reference picture lists are generated from previously decoded pictures stored in a decoded picture buffer (DPB).
[0029] Furthermore, coding standards can support various motion vector prediction modes. Motion vector prediction enables derivation of a value for a motion vector of a current video block based on another motion vector. For example, a set of candidate blocks with associated motion information can be derived from spatially and temporally neighboring blocks of the current video block. Furthermore, the generated (or default) motion information can be used for motion vector prediction. Examples of motion vector prediction include advanced motion vector prediction (AMVP), temporal motion vector prediction (TMVP), so-called "merge" mode, and "skip" and "direct" motion inference. Furthermore, other examples of motion vector prediction include advanced temporal motion vector prediction (ATMVP) and spatial-temporal motion vector prediction (STMVP). For motion vector prediction, both the video encoder and the video decoder perform the same process to derive a set of candidates. Thus, for a current video block, the same set of candidates is generated during encoding and decoding.
[0030] As noted above, for inter prediction coding, reference samples in previously coded pictures are used to code a video block in a current picture. Previously coded pictures that are available as references when coding the current picture are referred to as reference pictures. It should be noted that the decoding order does not necessarily correspond to the picture output order, i.e., the temporal order of pictures in a video sequence. In ITU-T H.265, when a picture is decoded, it is stored to a decoded picture buffer (DPB) (which can be referred to as a frame buffer, reference buffer, reference picture buffer, etc.). In ITU-T H.265, pictures stored to the DPB are removed from the DPB when they are output and are no longer needed for coding subsequent pictures. In ITU-T H.265, a determination of whether a picture should be removed from the DPB is invoked once per picture after decoding the slice header, i.e., at the beginning of decoding a picture. For example, a reference FIG. 1 Pic3 is shown to reference Pic2. Similarly, Pic4 is shown to reference Pic1. With respect to FIG. 1, assuming the number of pictures corresponds to the decoding order, the DPB would be populated as follows: after decoding Pic1, the DPB would include {Pic1}; at the start of decoding Pic2, the DPB would include {Pic1}; after decoding Pic2, the DPB would include {Pic1, Pic2}; at the start of decoding Pic3, the DPB would include {Pic1, Pic2}. Pic3 would then be decoded with reference to Pic2, and after decoding Pic3, the DPB would include {Pic1, Pic2, Pic3}. At the start of decoding Pic4, pictures Pic2 and Pic3 would be marked for removal from the DPB because they are not needed for decoding Pic4 (or any subsequent pictures, not shown), and assuming Pic2 and Pic3 have been output, the DPB would be updated to include {Pic1}. Pic4 would then be decoded with reference to Pic1. The process of marking pictures for removal from the DPB can be referred to as reference picture set (RPS) management.
[0031] As noted above, intra prediction data or inter prediction data is used to produce reference sample values for a block of sample values. The difference between sample values included in a current PB or another type of picture region structure and associated reference samples (e.g., those generated using prediction) can be referred to as residual data. Residual data can include a respective array of difference values corresponding to each component of the video data. Residual data can be in the pixel domain. A transform such as a discrete cosine transform (DCT), a discrete sine transform (DST), an integer transform, a wavelet transform, or a conceptually similar transform can be applied to the array of difference values to produce transform coefficients. It should be noted that in ITU-T H.265 and JVET-N1001, a CU is associated with a transform unit (TU) structure having its roots at the CU level. That is, to generate transform coefficients, the array of difference values can be partitioned (e.g., four 8x8 transforms can be applied to a 16x16 array of residual values). Such sub-division of difference values can be referred to as a transform block (TB) for each component of the video data. It should be noted that in some cases, a core transform and a subsequent secondary transform can be applied (in a video encoder) to generate transform coefficients. For a video decoder, the order of the transforms is reversed.
[0032] The quantization process can be performed directly on transform coefficient or residual sample values (e.g., for palette coding quantization). Quantization approximates transform coefficients by limiting their amplitudes to a specified set of values. Quantization essentially scales transform coefficients in order to vary the amount of data needed to represent a set of transform coefficients. Quantization can include dividing transform coefficients (or values resulting from adding an offset value to transform coefficients) by a quantization scaling factor and any associated rounding function (e.g., rounding to the nearest integer). Quantized transform coefficients can be referred to as coefficient level values. Dequantization (or “dequantization”) can include multiplying coefficient level values by a quantization scaling factor, and any inverse rounding or offset addition operations. It should be noted that, as used herein, the term quantization process can refer to dividing by a scaling factor to generate level values in some cases, and multiplying by a scaling factor to recover transform coefficients in some cases. That is, the quantization process can refer to quantization in some cases, and dequantization in some cases. Further, it should be noted that while the quantization process is described in some of the examples below with respect to arithmetic operations related to decimal notation, such descriptions are for illustrative purposes and should not be interpreted as limiting. For example, the techniques described herein can be implemented in devices that use binary operations, etc. For example, the multiplication and division operations described herein can be implemented using shift operations, etc.
[0033] Quantized transform coefficients and syntax elements (e.g., syntax elements indicative of a coding structure of a video block) can be entropy encoded according to an entropy encoding technique. The entropy encoding process includes encoding the values of the syntax elements using lossless data compression algorithms. Examples of entropy encoding techniques include content adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), probability interval partitioning entropy coding (PIPE), and the like. The entropy encoded quantized transform coefficients and corresponding entropy encoded syntax elements can form a compliant bitstream that can be used to reproduce the video data at a video decoder. The entropy encoding process, e.g., CABAC, can include binarization of the syntax elements. Binarization refers to the process of converting the value of a syntax element into a sequence of one or more bits. These bits can be referred to as “bins.” Binarization can include one or a combination of the following encoding techniques: fixed length encoding, unary encoding, truncated unary encoding, truncated Rice encoding, Golomb encoding, k-th order exponential Golomb encoding, and Golomb-Rice encoding. For example, binarization can include representing the integer value 5 of a syntax element as 00000101 using an 8-bit fixed length binarization technique, or as 11110 using a unary encoding binarization technique. As used herein, each of the terms fixed length encoding, unary encoding, truncated unary encoding, truncated Rice encoding, Golomb encoding, k-th order exponential Golomb encoding, and Golomb-Rice encoding can refer to general implementations of these techniques and / or more specific implementations of these encoding techniques. For example, a Golomb-Rice encoding implementation can be specifically defined according to a video coding standard. In the example of CABAC, for a particular bin, a context provides a most probable state (MPS) value for the bin (i.e., the MPS for the bin is one of 0 or 1), and a probability value for the bin being the MPS or a least probable state (LPS). For example, a context can indicate that the MPS for a bin is 0, and the probability of the bin being 1 is 0.3. It should be noted that the context can be determined based on values of previously encoded bins, including the current syntax element and previously coded syntax elements. For example, values of syntax elements associated with neighboring video blocks can be used to determine the context for a current bin.
[0034] With respect to the equations used herein, the following arithmetic operators can be used:
[0035] + addition
[0036] - subtraction
[0037] * multiplication, including matrix multiplication
[0038] x y power. x is designated as the power of y. In other contexts, such notation is used for superscripts and is not intended to be interpreted as a power.
[0039] / Integer division that truncates the result toward zero. For example, 7 / 4 and -7 / -4 are truncated to 1, and -7 / 4 and 7 / -4 are truncated to -1.
[0040] ÷ Used in mathematical formulas to denote division without implying truncation or rounding.
[0041] Used in mathematical formulas to denote division without implying truncation or rounding.
[0042] x % y Modulus. The remainder of x divided by y, defined only for integer x and y where x >= 0 and y > 0.
[0043] In addition, the following logical operators can be used:
[0044] x && y Boolean logical "and" of x and y
[0045] x || y Boolean logical "or" of x and y
[0046] ! Boolean logical "not"
[0047] x? y : z Evaluates to y if x is TRUE or not equal to 0; otherwise, evaluates to z.
[0048] In addition, the following relational operators can be used:
[0049] > Greater than
[0050] >= Greater than or equal to
[0051] < Less than
[0052] <= Less than or equal to
[0053] == Equal to
[0054] != Not equal to
[0055] In addition, the following bitwise operators can be used:
[0056] & Bitwise "and". When operating on integral type variables, the binary complement representation of the integer values is operated on. When operating on binary variables that contain fewer bits than the other variable, the shorter variable is extended by adding more significant bits equal to 0.
[0057] | Bitwise "or". When operating on integral type variables, the binary complement representation of the integer values is operated on. When operating on binary variables that contain fewer bits than the other variable, the shorter variable is extended by adding more significant bits equal to 0.
[0058] Bitwise exclusive OR. When operating on integral variables, the binary two's complement representations of the integer values are operated on. When operating on binary variables containing fewer bits than another variable, the shorter variable is extended by adding more significant bits equal to zero.
[0059] x » y Arithmetic right shift of the binary two's complement integer representation of x by y binary digits. The function is only defined for non-negative integer values of y.
[0060] The bits shifted into the most significant bits (MSB) as a result of the right shift have values equal to the MSB of x before the shift operation.
[0061] x « y Arithmetic left shift of the binary two's complement integer representation of x by y binary digits. The function is only defined for non-negative integer values of y.
[0062] The bits shifted into the least significant bits (LSB) as a result of the left shift have values equal to zero.
[0063] In addition, the following assignment operators can be used:
[0064] = assignment operator
[0065] ++ increment, i.e., x++ is equivalent to x = x + 1; when used in an array index, the value of the variable is evaluated before the increment operation.
[0066] -- decrement, i.e., x-- is equivalent to x = x - 1; when used in an array index, the value of the variable is evaluated before the decrement operation.
[0067] + = increment by a specified amount, i.e., x += 3 is equivalent to x = x + 3, and x += (-3) is equivalent to x = x + (-3).
[0068] - = decrement by a specified amount, i.e., x -= 3 is equivalent to x = x - 3, and x -= (-3) is equivalent to x = x - (-3).
[0069] In addition, the following defined mathematical functions can be used:
[0070]
[0071] Floor(x), the largest integer less than or equal to x.
[0072] Log2(x), the logarithm of x to the base 2.
[0073]
[0074]
[0075] Round(x) = Sign(x) * Floor(Abs(x) + 0.5)
[0076]
[0077] Furthermore, it should be noted that in the syntax descriptors used herein, the following descriptors can apply:
[0078] -b(8): Byte (8 bits) with any bit string pattern. The parsing process for this descriptor is specified by the return value of the function read_bit(8).
[0079] -f(n): Fixed pattern bit string written using n bits (from left to right) from the leftmost bit. The parsing process for this descriptor is specified by the return value of the function read_bit(n).
[0080] -se(v): Syntax element of signed integer 0th order Exp-Golomb coding from the leftmost bit.
[0081] -tb(v): Truncated binary code using at most maxVal bits, where maxVal is defined in the semantics of the syntax element.
[0082] -tu(v): Truncated unary code using at most maxVal bits, where maxVal is defined in the semantics of the syntax element.
[0083] -u(n): Unsigned integer using n bits. When n is "v" in the syntax table, the number of bits varies in a way that depends on the value of other syntax elements. The parsing process for this descriptor is specified by the return value of the function read_bits(n), which is interpreted as the binary representation of an unsigned integer written first with the most significant bits.
[0084] -ue(v): Syntax element of unsigned integer 0th order Exp-Golomb coding from the leftmost bit.
[0085] FIG. 2A to FIG. 2B is a conceptual diagram illustrating an example of encoding a block of video data. As shown in FIG. 2A , a current block of video data (e.g., a CB corresponding to a video component) is encoded by generating a residual from a set of prediction values from the current block of video data, performing a transform on the residual, and quantizing transform coefficients to generate bitplane values. The bitplane values are encoded into a bitstream. As shown in FIG. 2B , a current block of video data is decoded by performing inverse quantization on the bitplane values, performing an inverse transform, and adding a set of prediction values to the resulting residual. It should be noted that in FIG. 2A to FIG. 2BIn the example of FIG. 1, the sample values of the reconstructed block are different from the sample values of the current video block being encoded. As such, the encoding can be considered lossy. However, the difference in sample values can be considered acceptable or imperceptible to a viewer of the reconstructed video.
[0086] Additionally, as shown in FIG. 2A to FIG. 2B The scaling factor array is generated using a scaling factor array, as shown. In ITU-T H.265, the scaling factor array is generated by selecting a scaling matrix and multiplying each entry in the scaling matrix by a quantization scaling factor. The scaling matrix can be selected based in part on the prediction mode and the color component. It should be noted that in some examples, the scaling matrix can provide the same value for each entry (i.e., scale all coefficients according to a single value). The value of the quantization scaling factor can be determined by a quantization parameter, QP. Further, the QP value for a set of transform coefficients can be derived using a predicted quantization parameter value (which can be referred to as a predicted QP value or QP predicted value) and optionally signaled quantization parameter delta value (which can be referred to as a QP delta value or delta QP value). The quantization parameter can be updated for each CU, and a respective quantization parameter can be derived for each of the luma and chroma channels.
[0087] Referring to the example shown in FIG. 1 In JVET-N1001, each of a video sequence, a GOP, a picture, a slice, and a CTU can be associated with metadata describing video coding properties. JVET-N1001 defines parameter sets that can be used to describe video data and / or video coding properties. Specifically, JVET-N1001 includes the following five types of parameter sets: a decoding parameter set (DPS), a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), and an adaptation parameter set (APS). In JVET-N1001, parameter sets can be encapsulated as special types of NAL units, or can be signaled as messages. NAL units that include encoded video data (e.g., slices) can be referred to as VCL (video coding layer) NAL units, and NAL units that include metadata (e.g., parameter sets) can be referred to as non-VCL NAL units. Further, JVET-N1001 enables supplemental enhancement information (SEI) messages to be signaled. In JVET-N1001, SEI messages assist processes related to decoding, display, or other purposes, however, SEI messages can not be required to construct luma or chroma samples through the decoding process. In JVET-N1001, SEI messages can be signaled in the bitstream using non-VCL NAL units. Further, SEI messages can be conveyed in some manner other than being present in the bitstream (i.e., signaled out-of-band). FIG. 4An example of a bitstream comprising a plurality of CVSs is shown, where a CVS is represented by NAL units included in a respective access unit. In FIG. 4 In the example shown, the non-VCL NAL units include respective parameter set NAL units (i.e., sequence parameter set (SPS) and picture parameter set (PPS) NAL units), SEI message NAL units, and access unit delimiter NAL units. It is noted that in FIG. 4 In the example shown, the non-VCL NAL units include respective parameter set NAL units (i.e., sequence parameter set (SPS) and picture parameter set (PPS) NAL units), SEI message NAL units, and access unit delimiter NAL units. It is noted that in
[0088] As noted above, the intra prediction data can indicate how to generate a prediction for the current video block. That is, the intra prediction data indicates how to generate an array of predicted sample values, e.g., predSamples[x][y]. It is noted that the generation of the array of predicted samples can include one or more of padding (i.e., copying sample values), projection (i.e., mapping an angular direction to a particular sample, and / or interpolating sample values from angular prediction), and smoothing and / or filtering the predicted sample values. In JVET-N1001, the defined possible intra prediction modes for luma include the planar prediction mode (predMode: 0), the DC prediction mode (predMode: 1), and 93 directional prediction modes (predMode: -14 to -1 and 2 to 80), including 28 wide-angle modes that only apply to non-square blocks. JVET-N1001 specifies the following operations for deriving the array of predicted samples, predSamples[x][y], from a directional prediction mode:
[0089] Directional intra prediction mode process
[0090] The inputs to this process are:
[0091] - the intra prediction mode predModeIntra,
[0092] - the variable refIdx, which specifies the intra prediction reference line index,
[0093] - the variable nTbW, which specifies the transform block width,
[0094] - the variable nTbH, which specifies the transform block height,
[0095] - the variable refW, which specifies the reference sample width,
[0096] - the variable refH, which specifies the reference sample height,
[0097] - the variable nCbW, which specifies the coding block width,
[0098] - the variable nCbH, which specifies the coding block height,
[0099] - a variable refFilterFlag specifying the value of the reference filter flag,
[0100] - a variable cldx specifying the color component of the current block,
[0101] - neighboring samples p[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx.
[0102] The output of the process is the predicted samples predSamples[x][y] with x = 0... nTbW - 1, y = 0... nTbH - 1.
[0103] The variable nTbS is set equal to (Log2(nTbW) + Log2(nTbH)) » 1.
[0104] The variable filterFlag is derived as follows:
[0105] - filterFlag is set equal to 0 if one or more of the following conditions are true.
[0106] - refFilterFlag is equal to 1
[0107] - refldx is not equal to 0
[0108] - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and predModeIntra is greater than or equal to INTRA_ANGULAR34 and nTbW is less than or equal to 8
[0109] - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and predModeIntra is less than INTRA_ANGULAR34 and nTbH is less than or equal to 8.
[0110] - Otherwise, the following applies:
[0111] - The variable minDistVerHor is set equal to Min(Abs(predModeIntra - 50), Abs(predModeIntra - 18)).
[0112] - The variable intraHorVerDistThres[nTbS] is specified in Table 1
[0113] - The variable filterFlag is derived as follows:
[0114] - If one or more of the following conditions are true, filterFlag is set equal to 1:
[0115] - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT
[0116] - minDistVerHor is greater than intraHorVerDistThres[ nTbS ] and refFilterFlag is equal to 0
[0117] - Otherwise, filterFlag is set equal to 0.
[0118] nTbS = 2 nTbS = 3 nTbS = 4 nTbS = 5 nTbS = 6 nTbS = 7 intraHorVerDistThres[nTbS] 16 14 2 0 0 0
[0119] Table 1
[0120] Table 2 specifies a mapping table between predModeIntra and the angle parameter intraPredAngle.
[0121]
[0122]
[0123] Table 2
[0124] The inverse angle parameter invAngle is derived based on intraPredAngle as follows:
[0125]
[0126] The interpolation filter coefficients fC[ pos ][ j ] and fG[ pos ][ j ], with pos = 0...31 and j = 0...3, are specified in Table 3.
[0127]
[0128]
[0129] Table 3
[0130] The value of the predicted sample predSamples[ x ][ y ], with x = 0...nTbW-1 and y = 0...nTbH-1, is derived as follows:
[0131] - If predModeIntra is greater than or equal to 34, the following ordered steps are applied:
[0132] 1. The reference sample array ref[ x ] is specified as follows:
[0133] - The following applies:
[0134] ref[x] = p[-1 - refIdx + x][-1 - refIdx], where x = 0...nTbW + refIdx
[0135] - If intraPredAngle is less than 0, the primary reference sample array is extended as follows:
[0136] - When (nTbH * intraPredAngle) » 5 is less than -1,
[0137] ref[x] = p[-1 - refIdx][-1 - refIdx + ((x * invAngle + 128) » 8)],
[0138] where x = -1... (nTbH * intraPredAngle) » 5
[0139] ref[((nTbH * intraPredAngle) » 5) - 1] = ref[(nTbH * intraPredAngle) » 5]
[0140] ref[nTbW + 1 + refIdx] = ref[nTbW + refIdx]
[0141] - Otherwise,
[0142] ref[x] = p[-1 - refIdx + x][-1 - refIdx], where x = nTbW + 1 + refIdx... refW + refIdx
[0143] ref[-1] = ref[0]
[0144] - Additional samples ref[refW + refIdx + x], where x = 1... (Max(1, nTbW / nTbH) * refIdx + 1), are derived as follows:
[0145] ref[refW + refIdx + x] = p[-1 + refW][-1 - refIdx]
[0146] 2. The value of the prediction sample predSamples[x][y] (where x = 0... nTbW - 1, y = 0... nTbH - 1) is derived as follows:
[0147] - The index variable iIdx and the multiplication factor iFact are derived as follows:
[0148] iIdx = ((y + 1 + refIdx) * intraPredAngle) » 5 + refIdx
[0149] iFact = ((y + 1 + refldx) * intraPredAngle) & 31
[0150] - If cldx is equal to 0, the following applies:
[0151] - The interpolation filter coefficients fT[j] (with j = 0..3) are derived as follows:
[0152] fT[j] = filterFlag? fG[iFact][j] : fC[iFact][j]
[0153] - The value of the predicted sample predSamples[x][y] is derived as follows:
[0154]
[0155] - Otherwise (cldx is not equal to 0), depending on the value of iFact, the following applies:
[0156] - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows:
[0157] predSamples[x][y] = ((32 - iFact) * ref[x + iIdx + 1] + iFact * ref[x + iIdx + 2] + 16) » 5
[0158] - Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows:
[0159] predSamples[x][y] = ref[x + iIdx + 1]
[0160] - Otherwise (predModeIntra is less than 34), the following ordered steps are applied:
[0161] 1. The reference sample array ref[x] is specified as follows:
[0162] - The following applies:
[0163] ref[x] = p[-1 - refldx][-1 - refldx + x] with x = 0..nTbH + refldx
[0164] - If intraPredAngle is less than 0, the primary reference sample array is extended as follows:
[0165] - When (nTbW * intraPredAngle) » 5 is less than -1,
[0166] ref[ x ] = p[ -1 - refldx + ( ( x * invAngle + 128 ) » 8 ) ][ -1 - refldx ]
[0167] where x = -1... ( nTbW * intraPredAngle ) » 5
[0168] ref[ ( ( nTbW * intraPredAngle ) » 5 ) - 1 ] = ref[ ( nTbW * intraPredAngle ) » 5 ]
[0169] ref[ nTbG + 1 + refldx ] = ref[ nTbH + refldx ]
[0170] - else,
[0171] ref[ x ] = p[ -1 - refldx ][ -1 - refldx + x ], where x = nTbH + 1 + refldx... refH + refldx
[0172] ref[ -1 ] = ref[ 0 ]
[0173] - additional samples ref[ refH + refldx + x ], where
[0174] x = 1... ( Max( 1, nTbW / nTbH ) * refldx + 1 ), derived as follows:
[0175] ref[ refH + refldx + x ] = p[ -1 + refH ][ -1 - refldx ]
[0176] 2. The value of the prediction sample predSamples[ x ][ y ] (where x = 0... nTbW - 1, y = 0... nTbH - 1) is derived as follows:
[0177] - the index variable iIdx and the multiplication factor iFact are derived as follows:
[0178] iIdx = ( ( x + 1 + refldx ) * intraPredAngle ) » 5
[0179] iFact = ( ( x + 1 + refldx ) * intraPredAngle ) & 31
[0180] - if cldx is equal to 0, the following applies:
[0181] - the interpolation filter coefficients fT[ j ] (where j = 0... 3) are derived as follows:
[0182] fT[j] = filterFlag? fG[iFact][j] : fC[iFact][j]
[0183] - The value of the prediction sample predSamples[x][y] is derived as follows:
[0184]
[0185] - Otherwise (cldx is not equal to 0), the following applies depending on the value of iFact:
[0186] - If iFact is not equal to 0, the value of the prediction sample predSamples[x][y] is derived as follows:
[0187] predSamples[x][y] = ((32 - iFact) * ref[y + iIdx + 1] + iFact * refy + iIdx + 2) » 5
[0188] - Otherwise, the value of the prediction sample predSamples[x][y] is derived as follows:
[0189] predSamples[x][y] = ref[y + iIdx + 1]
[0190] It should be noted that, according to the process for deriving the prediction sample array provided in JVET-N1001, the padding of the reference sample array is defined as follows (assuming “vertical” prediction using “above” samples):
[0191] If the angle is positive, the first sample is copied to the left and the last sample is copied to the right;
[0192] If the angle is negative, the sample aligned with the rightmost column of the current PU is copied to the right and samples from the left reference array are projected to extend the reference array to the left.
[0193] When the angle is positive, the padding to the left looks unnecessary, as the padded samples are never referenced. When the angle is negative, the padding to the right is undesirable, as valid samples are usually available. In a video encoder, if the same reference array is used to test the various angles, it is unnecessary to change that sample between modes. Therefore, the padding provided in JVET-N1001 is less than ideal. Furthermore, the projection process provided in JVET-N1001 is less than ideal.
[0194] It should be noted that JVET-N1001 provides a cross-component prediction mode for chroma. In addition, there can be various methods that can derive the intra prediction mode for chroma components based on the intra prediction mode for luma components. In one example, the intra prediction mode for a current video block can be signaled by using a so-called most probable mode (MPM). Typically, in MPM signaling, the intra prediction mode is signaled as follows: an MPM list is created (e.g., by inheriting the intra prediction modes of neighboring video blocks); an indication (e.g., a flag) is provided as to whether the intra prediction for the current video block is a mode in the MPM list; and if the current intra mode is in the MPM list, an index indicating the position of the corresponding entry in the MPM list can be signaled; or if the current intra mode is not in the MPM list, a syntax element indicating the intra mode prediction mode (which is a mode not in the MPM list) is signaled.
[0195] In addition, in JVET-N1001, a so-called intra sub-partition (ISP) coding mode can be used for intra prediction. For the ISP coding mode in JVET-N1001, according to the block size dimension, some luma intra prediction blocks (i.e., luma CBs) are further divided vertically or horizontally into two or four sub-partitions. In JVET-N1001, each sub-partition in a luma intra prediction block shares the same intra prediction mode. Table 3 shows a relevant portion of the coding unit syntax for intra prediction in JVET-N1001, and includes syntax elements corresponding to the ISP coding mode.
[0196]
[0197]
[0198]
[0199] Table 3
[0200] Regarding the syntax elements included in Table 3, JVET-N1001 provides the following semantics:
[0201] cu_skip_flag[ x0 ][ y0 ] equal to 1 specifies that for the current coding unit, when decoding P or B slices, no syntax elements other than one or more of the following are parsed after cu_skip_flag[ x0 ][ y0 ]: IBC mode flag pred_mode, ibc_flag[ x0 ][ y0 ], and merge_data( ) syntax structure; when decoding I slices, no syntax elements other than merge_idx[ x0 ][ y0 ] are parsed after cu_skip_flag[ x0 ][ y0 ]. cu_skip_flag[ x0 ][ y0 ] equal to 0 specifies that the coding unit is not skipped. Array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0202] When cu_skip_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
[0203] pred_mode_flag equal to 0 specifies that the current coding unit is coded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current coding unit is coded in intra prediction mode.
[0204] When pred_mode_flag is not present, it is inferred as follows:
[0205] - When cbWidth is equal to 4 and cbHeight is equal to 4, pred_mode_flag is inferred to be equal to 1.
[0206] - Otherwise, pred_mode_flag is inferred to be equal to 1 when decoding I slices and equal to 0 when decoding P or B slices.
[0207] For x = x0...x0+cbWidth-1 and y = y0...y0+cbHeight-1, the variable CuPredMode[ x ][ y ] is derived as follows:
[0208] - If pred_mode_flag is equal to 0, CuPredMode[ x ][ y ] is set equal to MODE INTER.
[0209] - Otherwise (pred_mode_flag is equal to 1), CuPredMode[ x ][ y ] is set equal to MODE INTRA.
[0210] pred_mode_ibc_flag equal to 1 specifies that the current coding unit is coded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current coding unit is not coded in IBC prediction mode.
[0211] When pred_mode_ibc_flag is not present, infer as follows:
[0212] - If cu_skip_flag[ x0 ][ y0 ] is equal to 1 and cbWidth is equal to 4 and cbHeight is equal to 4, infer pred_mode_ibc_flag to be equal to 1.
[0213] - Otherwise, if cbWidth and cbHeight are both equal to 128, infer pred_mode_ibc_flag to be equal to 0.
[0214] - Otherwise, infer pred_mode_ibc_flag to be equal to the value of sps ibc enabled flag when decoding an I slice, and equal to 0 when decoding a P or B slice.
[0215] When pred_mode_ibc_flag is equal to 1, for x = x0...x0+cbWidth-1 and y = y0...y0+cbHeight-1, set the variable CuPredMode[ x ][ y ] to be equal to MODE IB C.
[0216] intra bdpcm flag[ x0 ][ y0 ] equal to 1 specifies that BDPCM is applied to the current luma coding block at position (x0, y0), i.e., the transform is skipped, the intra luma prediction mode is specified by intra bdpcm dir flag[ x0 ][ y0 ]. intra bdpcm dir flag[ x0 ][ y0 ] equal to 0 specifies that BDPCM is not applied to the current luma coding block at position (x0, y0).
[0217] When intra bdpcm flag[ x0 ][ y0 ] is not present, infer it to be equal to 0.
[0218] Set the variable BdpcmFlag[ x ][ y ] to be equal to intra bdpcm flag[ x0 ][ y0 ], where x = x0...x0+cbWidth-1 and y = y0...y0+cbHeight-1.
[0219] intra bdpcm dir flag[ x0 ][ y0 ] equal to 0 specifies that the BDPCM prediction direction is horizontal. intra bdpcm dir flag[ x0 ][ y0 ] equal to 1 specifies that the BDPCM prediction direction is vertical.
[0220] The variable BdpcmDir[ x ][ y ] is set equal to intra bdpcm dir flag[ x0 ][ y0 ], where x = x0...x0 + cbWidth - 1 and y = y0...y0 + cbHeight - 1.
[0221] intra_mip_flag[ x0 ][ y0 ] equal to 1 specifies that the intra prediction type for luma samples is matrix-based intra prediction. intra_mip_flag[ x0 ][ y0 ] equal to 0 specifies that the intra prediction type for luma samples is not matrix-based intra prediction.
[0222] When intra_mip_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
[0223] The syntax elements intra_mip_mpm_flag[ x0 ][ y0 ], intra_mip_mpm_idx[ x0 ][ y0 ] and intra_mip_mpm_remainder[ x0 ][ y0 ] specify the matrix-based intra prediction mode for luma samples. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. When intra_mip_mpm_flag[ x0 ][ y0 ] is equal to 1, the matrix-based intra prediction mode is inferred from a neighboring intra prediction coding unit.
[0224] When intra_mip_mpm_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 1.
[0225] intra_luma_ref_idx[ x0 ][ y0 ] specifies the intra prediction reference line index IntraLumaRefLineIdx[ x ][ y ] for x = x0...x0 + cbWidth - 1 and y = y0...y0 + cbHeight - 1 as specified in Table 4.
[0226] When intra_luma_ref_idx[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
[0227]
[0228] Table 4
[0229] intra_subpartitions_mode_flag[ x0 ][ y0 ] equal to 1 specifies that the current intra coded unit is partitioned into NumIntraSubPartitions[ x0 ][ y0 ] rectangular transform block sub-partitions. intra_subpartitions_mode_flag[ x0 ][ y0 ] equal to 0 specifies that the current intra coded unit is not partitioned into rectangular transform block sub-partitions. When intra_subpartitions_mode_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
[0230] intra_subpartitions_split_flag[ x0 ][ y0 ] specifies whether the intra sub-partition split type is horizontal or vertical. When intra_subpartitions_split_flag[ x0 ][ y0 ] is not present, it is inferred as follows:
[0231] - If cbHeight is greater than MaxTbSizeY, infer intra_subpartitions_split_flag[ x0 ][ y0 ] equal to 0.
[0232] - Else (cbWidth is greater than MaxTbSizeY), infer intra_subpartitions_split_flag[ x0 ][ y0 ] equal to 1.
[0233] The variable IntraSubPartitionsSplitType specifies the type of split used for the current luma coding block, as specified in Table 5, IntraSubPartitionsSplitType is derived as follows:
[0234] - If intra_subpartitions_mode_flag[ x0 ][ y0 ] is equal to 0, set IntraSubPartitionsSplitType equal to 0.
[0235] - Else, set IntraSubPartitionsSplitType equal to 1 + intra_subpartitions_split_flag[ x0 ][ y0 ].
[0236]
[0237]
[0238] Table 5
[0239] The variable NumIntraSubPartitions specifies the number of transform block sub-partitions into which an intra luma coding block is split. NumIntraSubPartitions is derived as follows:
[0240] - If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, NumIntraSubPartitions is set equal to 1.
[0241] - Otherwise, if one of the following conditions is true, NumIntraSubPartitions is set equal to 2:
[0242] - cbWidth is equal to 4 and cbHeight is equal to 8,
[0243] - cbWidth is equal to 8 and cbHeight is equal to 4.
[0244] - Otherwise, NumIntraSubPartitions is set equal to 4.
[0245] The syntax elements intra_luma_mpm_flag[ x0 ][ y0 ], intra_luma_not_planar_flag[ x0 ][ y0 ], intra_luma_mpm_idx[ x0 ][ y0 ] and intra_luma_mpm_remainder[ x0 ][ y0 ] specify the intra prediction mode for luma samples. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. When intra_luma_mpm_flag[ x0 ][ y0 ] is equal to 1, the intra prediction mode is inferred from neighboring intra prediction coded units.
[0246] When intra_luma_mpm_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 1.
[0247] When intra_luma_not_planar_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 1.
[0248] intra_chroma_pred_mode[ x0 ][ y0 ] specifies the intra prediction mode for chroma samples. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0249] Furthermore, JVET-N1001 provides the following decoding process for intra blocks, which specifies how to further divide a luma intra prediction block vertically or horizontally into two or four sub-partitions according to the ISP coding mode:
[0250] Decoding process for intra blocks
[0251] The inputs of the process are:
[0252] - a sample position (xTb0, yTb0) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0253] - a variable nTbW specifying the width of the current transform block,
[0254] - a variable nTbH specifying the height of the current transform block,
[0255] - a variable predModeIntra specifying the intra prediction mode,
[0256] - a variable cldx specifying the color component of the current block.
[0257] The output of the process is the modified reconstructed picture before filtering in the loop.
[0258] The maximum transform block size maxTbSize is derived as follows:
[0259] maxTbSize = (cldx == 0)? MaxTbSizeY : MaxTbSizeY / 2
[0260] The luma sample position is derived as follows:
[0261] (xTbY, yTbY) = (cldx == 0)? (xTb0, yTb0) : (xTb0 * 2, yTb0 * 2)
[0262] According to maxTbSize, the following applies:
[0263] - If IntraSubPartitionsSplitType is equal to NO_ISP_SPLIT and nTbW is greater than maxTbSize or nTbH is greater than maxTbSize, the following ordered steps are applied.
[0264] 1. The variables newTbW and newTbH are derived as follows:
[0265] newTbW = (nTbW > maxTbSize)? (nTbW / 2) : nTbW
[0266] newTbH = (nTbH > maxTbSize)? (nTbH / 2) : nTbH
[0267] 2. Call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0268] 3. If nTbW is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO + newTbW, yTbO), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0269] 4. If nTbH is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO, yTbO + newTbH), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0270] 5. If nTbW is greater than maxTbSize and nTbH is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO + newTbW, yTbO + newTbH), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0271] - Otherwise, apply the following ordered steps:
[0272] - The variables nW, nH, numPartsX and numPartsY are derived as follows:
[0273] nW = IntraSubPartitionsSplitType == ISP_VER_SPLIT?
[0274] nTbW / NumIntraSubPartitions: nTbW
[0275] nH = IntraSubPartitionsSplitType == ISP_HOR_SPLIT?
[0276] nTbH / NumIntraSubPartitions: nTbH
[0277] numPartsX = IntraSubPartitionsSplitType == ISP_VER_SPLIT?
[0278] NumIntraSubPartitions: 1
[0279] numPartsY = IntraSubPartitionsSplitType == ISP_HOR_SPLIT?
[0280] NumIntraSubPartitions: 1
[0281] - For xPartIdx = 0... numPartsX - 1 and yPartIdx = 0... numPartsY - 1, the following applies:
[0282] 1. The intra sample prediction process as specified below is invoked with the position (xTbCmp, yTbCmp) set equal to (xTb0 + nW * xPartIdx, yTb0 + nH * yPartIdx), the intra prediction mode predModeIntra, the transform block width nTbW and height nTbH set equal to nW and nH, the coding block width nCbW and height nCbH set equal to nTbW and nTbH, and the variable cIdx as input, and the output is a (nTbW) x (nTbH) array predSamples.
[0283] Intra sample prediction process
[0284] The input to this process is:
[0285] - The sample position (xTbCmp, yTbCmp) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0286] - The variable predModeIntra specifying the intra prediction mode,
[0287] - variable nTbW, which specifies the transform block width,
[0288] - variable nTbH, which specifies the transform block height,
[0289] - variable nCbW, which specifies the coding block width,
[0290] - variable nCbH, which specifies the coding block height,
[0291] - variable cldx, which specifies the color component of the current block.
[0292] The output of the process is the predicted samples predSamples[x][y] for x = 0...nTbW - 1, y = 0...nTbH - 1.
[0293] The predicted samples predSamples[x][y] are derived as follows:
[0294] - if intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cldx is equal to 0, the matrix-based intra sample prediction process is invoked with position (xTbCmp, yTbCmp), intra prediction mode predModeIntra, transform block width nTbW and height nTbH as inputs, and the output is predSamples.
[0295] - else the general (non-mip) intra sample prediction process as specified in the following is invoked with position (xTbCmp, yTbCmp), intra prediction mode predModeIntra, transform block width nTbW and height nTbH, coding block width nCbW and height nCbH, and variable cldx as inputs, and the output is predSamples.
[0296] General (non-mip) intra sample prediction process
[0297] The input to the process is:
[0298] - sample position (xTbCmp, yTbCmp), which specifies the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0299] - variable predModeIntra, which specifies the intra prediction mode,
[0300] - variable nTbW, which specifies the transform block width,
[0301] - variable nTbH, which specifies the transform block height,
[0302] - variable nCbW, which specifies the coding block width,
[0303] - variable nCbH, which specifies the coding block height,
[0304] - variable cldx, which specifies the color component of the current block.
[0305] The output of the process is the predicted samples predSamples[x][y] for x = 0...nTbW-1, y = 0...nTbH-1.
[0306] The variables refW and refH are derived as follows:
[0307] - If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cldx is not equal to 0, the following applies:
[0308] refW = nTbW * 2
[0309] refH = nTbH * 2
[0310] - Otherwise (IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and cldx is equal to 0), the following applies:
[0311] refW = nCbW * 2
[0312] refH = nCbH * 2
[0313] refldx = (cldx == 0)? IntraLumaRefLineIdx[xTbCmp][yTbCmp] : 0
[0314] The Wide-angle Intra prediction mode mapping process is invoked with predModeIntra, nTbW, nTbH and cldx as inputs and with modifiedPredModeIntra as output.
[0315] The variable refFilterFlag is derived as follows:
[0316] - If predModeIntra is equal to one of the following values: 0, -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, 80, refFilterFlag is set equal to 1.
[0317] - Otherwise, refFilterFlag is set equal to 0.
[0318] For the generation of reference samples p[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx, the following ordered steps are applied:
[0319] 1. Call the reference sample availability flagging process with sample position (xTbCmp, yTbCmp), intra prediction reference line index refldx, reference sample width refW, reference sample height refH, color component index cldx as input and with reference samples refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx as output.
[0320] 2. When at least one sample refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx is flagged as "not available for intra prediction", call the reference sample replacement process with intra prediction reference line index refldx, reference sample width refW, reference sample height refH, reference samples refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx and color component index cldx as input and with modified reference samples refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx as output.
[0321] 3. Call the reference sample filtering process as specified in the following with intra prediction reference line index refldx, transform block width nTbW and height nTbH, reference sample width refW, reference sample height refH, reference filter flag refFilterFlag, unfiltered samples refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx and color component index cldx as input and with reference samples p[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx as output.
[0322] The intra sample prediction process according to predModeIntra is applied as follows:
[0323] - If predModeIntra is equal to INTRA_PLANAR, the corresponding intra prediction mode process as specified in the following is invoked, with the transform block width nTbW and the transform block height nTbH and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0324] - Otherwise, if predModeIntra is equal to INTRA_DC, the corresponding intra prediction mode process as specified in the following is invoked, with the transform block width nTbW and the transform block height nTbH, the intra prediction reference line index refldx, and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0325] - Otherwise, if predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, the corresponding intra prediction mode process is invoked, with the intra prediction mode predModeIntra, the sample position (xTbCmp, yTbCmp) set equal to (xTbC, yTbC), the transform block width nTbW and height nTbH, and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0326] - Otherwise, the corresponding intra prediction mode process is invoked, with the intra prediction mode predModeIntra, the intra prediction reference line index refldx, the transform block width nTbW and the transform block height nTbH, the reference sample width refW and the reference sample height refH, the coding block width nCbW and the coding block height nCbH, the reference filter flag refFilterFlag, the color component index cldx, and the reference sample array p as inputs, and with the predicted sample array predSamples as output.
[0327] When all of the following conditions are true, invoke the position dependent prediction sample filtering process specified below with Intra prediction mode predModeIntra, transform block width nTbW, transform block height nTbH, prediction samples predSamples[x][y] (where x = 0...nTbW-1, y = 0...nTbH-1), reference sample width refW, reference sample height refH, reference samples p[x][y] (where x = -1, y = -1...refH-1 and x = 0...refW-1, y = -1) and color component index cldx as inputs and the output is a modified array of predicted samples predSamples:
[0328] - IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cldx is not equal to 0
[0329] - refldx is equal to 0 or cldx is not equal to 0
[0330] - BdpcmFlag[xTbCmp][xTbCmp] is equal to 0
[0331] - one of the following conditions is true:
[0332] - predModeIntra is equal to INTRA_PLANAR
[0333] - predModeIntra is equal to INTRA_DC
[0334] - predModeIntra is equal to INTRA_ANGULAR18
[0335] - predModeIntra is equal to INTRA_ANGULAR50
[0336] - predModeIntra is less than or equal to INTRA_ANGULAR10
[0337] - predModeIntra is greater than or equal to INTRA_ANGULAR58
[0338] It should be noted that, according to the decoding process for intra blocks, the intra sample prediction process and the general (non-mip) intra sample prediction process provided above, in JVET-N1001 the reference samples that can be retrieved from a previously coded CU for intra prediction change based on whether ISP is used for the given CU. That is, for CUs coded in ISP mode, samples outside the range of reference samples provided for other CUs can be retrieved. Having an increased range of samples that can be retrieved for CUs coded in ISP mode is less than ideal.
[0339] As mentioned above, the generation of the array of prediction samples can comprise filtering the prediction sample values. It should be noted that according to the directional intra prediction mode process, a variable filterFlag determines whether angular prediction is smoothed or not. According to the derivation of filterFlag provided in JVET-N1001, different rules apply for determining the variable filterFlag when ISP is used, which is not desirable.
[0340] Furthermore, JVET-N1001 specifies the following reference sample filtering process:
[0341] Reference sample filtering process
[0342] Reference sample filtering process
[0343] The input to the process are:
[0344] - a variable refldx specifying the intra prediction reference line index,
[0345] - a variable nTbW specifying the transform block width,
[0346] - a variable nTbH specifying the transform block height,
[0347] - a variable refW specifying the reference sample width,
[0348] - a variable refH specifying the reference sample height,
[0349] - a variable refFilterFlag specifying the value of the reference filter flag,
[0350] - the (unfiltered) neighboring samples refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx,
[0351] - a variable cldx specifying the color component of the current block.
[0352] The output of the process is the reference samples p[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx.
[0353] The variable filterFlag is derived as follows:
[0354] - filterFlag is set equal to 1 if all of the following conditions are true:
[0355] - refldx is equal to 0
[0356] - nTbW * nTbH is greater than 32
[0357] - cldx is equal to 0
[0358] - IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT
[0359] - refFilterFlag is equal to 1
[0360] - Otherwise, set filterFlag equal to 0.
[0361] For the derivation of reference samples p[x][y], the following applies:
[0362] - If filterFlag is equal to 1, the filtered sample values p[x][y] (with x = -1, y = -1...refH-1 and x = 0...refW-1, y = -1) are derived as follows:
[0363] P[-1][-1] = ( refUnfilt[-1][0 ] + 2 * refUnfilt[-1][-1 ] + refUnfilt[0][-1 ] + 2 ) » 2
[0364] p[-1][y] = ( refUnfilt[-1][y+1 ] + 2 * refUnfilt[-1][y ] + refUnfilt[-1][y-1 ] + 2 ) » 2
[0365] for y = 0...refH-2
[0366] p[-1][refH-1] = refUnfilt[-1][refH-1]
[0367] p[x][-1] = ( refUnfilt[x-1][-1 ] + 2 * refUnfilt[x][-1 ] + refUnfilt[x+1][-1 ] + 2 ) » 2
[0368] for x = 0...refW-2
[0369] p[refW-1][-1] = refUnfilt[refW-1][-1]
[0370] - Otherwise, set the reference sample value p[x][y] equal to the unfiltered sample value refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx.
[0371] It should be noted that according to the directional intra prediction mode process, the general (non-mip) intra sample prediction process and the reference sample filtering process provided above, in JVET-N1001, when the slope is an integer slope, the reference samples are smoothed for angular prediction and when the reference samples are smoothed, a cubic interpolation filter is used instead of a Gaussian filter. Having a special rule for angles with integer slopes is less than ideal as it is complex and not necessary and can apply smoothing to a relatively large number of samples.
[0372] As mentioned above, in the general (non-mip) intra sample prediction process, JVET-N1001 further specifies a position dependent intra prediction combination (PDPC) that can be applied to the intra predicted samples. PDPC applies a filter to the intra predicted samples using reference samples with weights. In particular, the following position dependent intra prediction sample filtering process is provided in JVET-N1001:
[0373] Position dependent intra prediction sample filtering process
[0374] The inputs of this process are:
[0375] - the intra prediction mode predModeIntra,
[0376] - the variable nTbW specifying the transform block width,
[0377] - the variable nTbH specifying the transform block height,
[0378] - the variable refW specifying the reference sample width,
[0379] - the variable refH specifying the reference sample height,
[0380] - the predicted samples predSamples[x][y] with x = 0... nTbW - 1, y = 0... nTbH - 1,
[0381] - the neighboring samples p[x][y] with
[0382] x = -1, y = -1... refH - 1 and x = 0... refW - 1, y = -1,
[0383] - the variable cldx specifying the color component of the current block.
[0384] The output of this process is the modified predicted sample predSamples[ x ][ y ], with x = 0...nTbW - 1, y = 0...nTbH - 1.
[0385] Depending on the value of cldx, the function clip1Cmp is set as follows:
[0386] - If cldx is equal to 0, then clip1Cmp is set equal to Clip1Y.
[0387] - Otherwise, clip1Cmp is set equal to Clip1c.
[0388] The variable nScale is set to ((Log2(nTbW) + Log2(nTbH) - 2) » 2).
[0389] The reference sample arrays mainRef[ x ] and sideRef[ y ], with x = 0...refW - 1 and y = 0...refH - 1, are derived as follows:
[0390] mainRef[ x ] = p[ x ][ -1 ]
[0391] sideRef[ y ] = p[ -1 ][ y ]
[0392] The variables refL[ x ][ y ], refT[ x ][ y ], wT[ y ], wL[ x ] and wTL[ x ][ y ], with x = 0...nTbW - 1, y = 0...nTbH - 1, are derived as follows:
[0393] - If predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the following applies:
[0394] refL[ x ][ y ] = p[ -1 ][ y ]
[0395] refT[ x ][ y ] = p[ x ][ -1 ]
[0396] wT[ y ] = 32 » ( ( y « 1 ) » nScale )
[0397] wL[ x ] = 32 » ( ( x « 1 ) » nScale )
[0398] wTL[ x ][ y ] = ( predModeIntra == INTRA_DC )?
[0399] ( wL[ x ] » 4 + wT[ y ] » 4 ) : 0
[0400] - Otherwise, if predModeIntra is equal to INTRA_ANGULAR 18 or INTRA_ANGULAR 50, the following applies:
[0401] refL[x][y] = p[-1][y]
[0402] refT[x][y] = p[x][-1]
[0403] wT[y] = (predModeIntra == INTRA_ANGULAR 18)? (32 >>
[0404] 32) >> ((y « 1) >> nScale) : 0
[0405] wL[x] = (predModeIntra == INTRA_ANGULAR 50)? (32 >>
[0406] 32) >> ((x « 1) >> nScale) : 0
[0407] wTL[x][y] = (predModeIntra == INTRA_ANGULAR 18)? wT[y] : wL[x]
[0408] - Otherwise, if predModeIntra is equal to INTRA_ANGULAR 2 or INTRA_ANGULAR 66, the following applies:
[0409] refL[x][y] = p[-1][x + y + 1]
[0410] refT[x][y] = p[x + y + 1][-1]
[0411] wT[y] = (32 >> 1) >> ((y « 1) >> nScale)
[0412] wL[x] = (32 >> 1) >> ((x « 1) >> nScale)
[0413] wTL[x][y] = 0
[0414] - Otherwise, if predModeIntra is less than or equal to INTRA_ANGULAR 10, the following ordered steps apply:
[0415] 1. The variables dXPos[y], dXFrac[y], dXInt[y] and dX[x][y] are derived from intraPredMode using invAngle as specified above as follows:
[0416] dXPos[y] = ((y + 1) * invAngle + 2) » 2
[0417] dXFrac[y] = dXPos[y] & 63
[0418] dXInt[y] = dXPos[y] » 6
[0419] dX[x][y] = x + dXInt[y]
[0420] 2. The variables refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are derived as follows:
[0421] refL[x][y] = 0
[0422] refT[x][y] = (dX[x][y] < refW - 1)? mainRef[dX[x][y] + (dXFrac[y] » 5)] : 0
[0423] wT[y] = (dX[x][y] < refW - 1)? 32 » ((y « 1) » nScale) : 0
[0424] wL[x] = 0
[0425] wTL[x][y] = 0
[0426] - Otherwise, if predModeIntra is greater than or equal to INTRA_ANGULAR58, the following ordered steps are applied:
[0427] 1. The variables dYPos[x], dYFrac[x], dYInt[x] and dY[x][y] are derived as follows using the invAngle as specified above depending on intraPredMode:
[0428] dYPos[x] = ((x + 1) * invAngle + 2) » 2
[0429] dYFrac[x] = dYPos[x] & 63
[0430] dYInt[x] = dYPos[x] » 6
[0431] dY[x][y] = y + dYInt[x]
[0432] 2. The variables refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are derived as follows:
[0433] refL[x][y] = (dY[x][y] < refH - 1)? sideRef[dY[x][y] + (dYFrac[x] » 5)] : 0
[0434] refT[x][y] = 0
[0435] wT[y] = 0
[0436] wL[x] = (dY[x][y] < refH - 1)? 32 » ((x « 1) » nScale) : 0
[0437] wTL[x][y] = 0
[0438] - Otherwise, refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are all set equal to 0.
[0439] The value of the modified predicted sample predSamples[x][y] (with x = 0...nTbW - 1, y = 0...nTbH - 1) is derived as follows:
[0440] predSamples[x][y] = clip1Cmp((refL[x][y] * wL[x] + refT[x][y] * wT[y] - p[-1][-1] * wTL[x][y] + (64 - wL[x] - wT[y] + wTL[x][y]) * predSamples[x][y] + 32) » 6)
[0441] The position-dependent intra prediction sample filtering process in JVET-N1001 can not be ideal. Specifically, there are two PDPC operation modes for angular modes (in addition to HOR / VER). That is, special rules apply to modes 2 and 66, which can be complex and not necessary. In addition, for angular modes, a sample-by-sample check is needed to determine whether the reference sample is in range. If it is not in range, the PDPC weight is set to 0 for the current sample. Furthermore, for DC and planar modes, the PDPC process is the same except for the use of the top-left reference, which can provide a less than ideal design.
[0442] FIG. 5 is a block diagram illustrating an example of a system that can be configured to encode (e.g., encode and / or decode) video data according to one or more techniques of this disclosure. System 100 represents an example of a system that can perform video encoding using the partitioning techniques according to one or more techniques of this disclosure. As shown, system 100 includes source device 102, communication medium 110, and destination device 120. In FIG. 5 the example of FIG. 1, source device 102 can include video source 104, video encoder 106, and output interface 108. Destination device 120 can include input interface 122, video decoder 130, and display device 132.FIG. 5 In the illustrated example, source device 102 can include any device configured to encode video data and transmit the encoded video data to communication medium 110. Destination device 120 can include any device configured to receive encoded video data via communication medium 110 and decode the encoded video data. Source device 102 and / or destination device 120 can include computing devices equipped for wired and / or wireless communication, and can include set top boxes, digital video recorders, televisions, desktop computers, laptop computers or tablet computers, game consoles, mobile devices including, e.g., “smart” phones, cellular telephones, personal gaming devices, and medical imaging devices.
[0443] Communication medium 110 can include any combination of wireless and wired communication media and / or storage devices. Communication medium 110 can include coaxial cables, fiber optic cables, twisted pair cables, wireless transmitters and receivers, routers, switches, repeaters, base stations, or any other equipment that can be useful to facilitate communications between various devices and stations. Communication medium 110 can include one or more networks. For example, communication medium 110 can include a network configured to enable access to the World Wide Web, for example, the Internet. The network can operate according to one or more combinations of telecommunications protocols. The telecommunications protocols can include proprietary aspects and / or can include standard telecommunications protocols. Examples of standard telecommunications protocols include digital video broadcasting (DVB) standards, advanced television systems committee (ATSC) standards, integrated services digital broadcasting (ISDB) standards, data over cable service interface specification (DOCSIS) standards, global system for mobile communication (GSM) standards, code division multiple access (CDMA) standards, 3rd Generation Partnership Project (3GPP) standards, European Telecommunications Standards Institute (ETSI) standards, Internet Protocol (IP) standards, wireless application protocol (WAP) standards, and Institute of Electrical and Electronics Engineers (IEEE) standards.
[0444] A storage device can include any type of device or storage medium capable of storing data. A storage medium can include a tangible or non-transitory computer-readable medium. A computer readable medium can include an optical disk, a flash memory, a magnetic memory, or any other suitable digital storage medium. In some examples, a memory device or portions thereof can be described as non-volatile storage, and in other examples, portions of memory devices can be described as volatile storage. Examples of volatile storage can include random access memory (RAM), dynamic random access memory (DRAM), and static random access memory (SRAM). Examples of non-volatile storage can include magnetic hard disks, optical disks, floppy disks, flash memories, or forms of electrically programmable memory (EPROM) or electrically erasable and programmable (EEPROM) memory. Storage devices can include memory cards (e.g., Secure Digital (SD) memory cards), internal / external hard disk drives, and / or internal / external solid state drives. Data can be stored on a storage device according to a defined file format.
[0445] Referring again to FIG. 5 , the source device 102 includes a video source 104, a video encoder 106, and an interface 108. The video source 104 can include any device configured to capture and / or store video data. For example, the video source 104 can include a video camera and a storage device operably coupled thereto. The video encoder 106 can include any device configured to receive video data and generate a compliant bitstream representing the video data. A compliant bitstream can refer to a bitstream from which a video decoder can receive and reproduce video data. Aspects of a compliant bitstream can be defined according to a video coding standard. When generating a compliant bitstream, the video encoder 106 can compress the video data. The compression can be lossy (perceptible or non-perceptible) or lossless. The interface 108 can include any device configured to receive a compliant video bitstream and transmit and / or store the compliant video bitstream to a communication medium. The interface 108 can include a network interface card, such as an Ethernet card, and can include an optical transceiver, a radio frequency transceiver, or any other type of device capable of transmitting and / or receiving information. Further, the interface 108 can include a computer system interface that can allow the compliant video bitstream to be stored on a storage device. For example, the interface 108 can include a chipset or any other logic and physical structure capable of interconnecting a peer device according to a Peripheral Component Interconnect (PCI) and Peripheral Component Interconnect Express (PCIe) bus protocols, a proprietary bus protocol, a Universal Serial Bus (USB) protocol, I2C, or any other logical and physical structure(s) that can be used to interconnect peer devices.
[0446] Referring again to FIG. 5Target device 120 includes interface 122, video decoder 124, and display 126. Interface 122 can include any device configured to receive a compliant video bitstream from a communication medium. Interface 108 can include a network interface card, such as an Ethernet card, and can include an optical transceiver, a radio frequency transceiver, or any other type of device that can receive and / or transmit information. Further, interface 122 can include a computer system interface allowing a compliant video bitstream to be retrieved from a storage device. For example, interface 122 can include a chipset supporting PCI and PCIe bus protocols, a proprietary bus protocol, a USB protocol, I2C, or any other logical and physical structure(s) that can be used to interconnect peer devices. Video decoder 124 can include any device configured to receive a compliant bitstream and / or acceptable variations thereof, and to reproduce video data therefrom. Display 126 can include any device configured to display video data. Display 126 can include one of various display devices such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display. Display 126 can include a high definition display or an ultra-high definition display. It should be noted that although video decoder 124 is described as outputting data to display 126 in the example shown, video decoder 124 can be configured to output video data to various types of devices and / or subcomponents thereof. For example, video decoder 124 can be configured to output video data to any communication medium, as described herein. FIG. 3
[0447] FIG. 6 is a block diagram illustrating an example of a video encoder 200 that can implement the techniques described herein for encoding video data. It should be noted that although exemplary video encoder 200 is illustrated as having distinct functional blocks, such an illustration is for descriptive purposes and does not limit video encoder 200 and / or its sub-components to a particular hardware or software architecture. The functionality of video encoder 200 can be implemented using any combination of hardware, firmware, and / or software implementations. In one example, video encoder 200 can be configured to encode video data according to the techniques described herein. Video encoder 200 can perform intra-predictive encoding and inter-predictive encoding of picture regions, and thus can be referred to as a hybrid video encoder. In FIG. 6 In the example shown, video encoder 200 receives a source video block. In some examples, the source video block can include a picture region that has been partitioned according to an encoding structure. For example, the source video data can include macroblocks, CTUs, CBs, sub-partitions thereof, and / or another equivalent encoding unit. In some examples, video encoder 200 can be configured to perform additional partitioning of the source video block. It should be noted that regardless of how the source video data is partitioned prior to and / or during encoding, some of the techniques described herein can be generally applicable to video encoding.FIG. 6 In the example shown, the video encoder 200 includes a summer 202, a transform coefficient generator 204, a coefficient quantization unit 206, an inverse quantization / transformation processing unit 208, a summer 210, an intra-frame prediction processing unit 212, an inter-frame prediction processing unit 214, a filter unit 216, and an entropy coding unit 218.
[0448] like FIG. 6 As shown, video encoder 200 receives source video blocks and outputs a bitstream. Video encoder 200 generates residual data by subtracting a predicted video block from the source video block. Summer 202 represents the component configured to perform this subtraction operation. In one example, the subtraction of the video block occurs in the pixel domain. Transform coefficient generator 204 applies a transform, such as a Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or a conceptually similar transform, to its residual block or sub-partition (e.g., four 8×8 transforms can be applied to a 16×16 residual value array) to generate a set of residual transform coefficients. Transform coefficient generator 204 can be configured to perform any and all combinations of transforms included in the discrete trigonometric transform series. As mentioned above, in ITU-T H.265, TB is limited to the following sizes: 4×4, 8×8, 16×16, and 32×32. In one example, the transform coefficient generator 204 can be configured to perform transforms based on arrays of sizes 4×4, 8×8, 16×16, and 32×32. In another example, the transform coefficient generator 204 can be further configured to perform transforms based on arrays of other sizes. Specifically, in some cases, performing transforms on rectangular arrays composed of different values may be useful. In one example, the transform coefficient generator 204 can be configured to perform transforms based on array sizes of 2×2, 2×4N, 4M×2, and / or 4M×4N. In one example, a two-dimensional (2D) M×N inverse transform can be implemented as a one-dimensional (1D) M-point inverse transform followed by a 1D N-point inverse transform. In one example, a 2D inverse transform can be implemented as a 1D N-point vertical transform followed by a 1D N-point horizontal transform. In another example, a 2D inverse transform can be implemented as a 1D N-point horizontal transform followed by a 1D N-point vertical transform. The transform coefficient generator 204 can output transform coefficients to the coefficient quantization unit 206.
[0449] The transform coefficient quantization unit 206 can be configured to perform quantization of transform coefficients. As described above, the degree of quantization can be modified by adjusting a quantization parameter. The transform coefficient quantization unit 206 can be further configured to determine a quantization parameter and output QP data (e.g., data used to determine quantization group sizes and / or delta QP values) that a video decoder can use to reconstruct the quantization parameter to perform inverse quantization during video decoding. It should be noted that in other examples, one or more additional or alternative parameters can be used to determine a quantization bit- shift (e.g., a scaling factor). The techniques described herein can generally be applied to determining a quantization bit-shift for transform coefficients corresponding to one component of video data based on a quantization bit-shift for transform coefficients corresponding to another component of the video data.
[0450] Referring again to FIG. 6 , the quantized transform coefficients are output to the inverse quantization / transform processing unit 208. The inverse quantization / transform processing unit 208 can be configured to apply inverse quantization and inverse transform to generate reconstructed residual data. As shown in FIG. 6 , at the summer 210, the reconstructed residual data can be added to a predicted video block. In this way, an encoded video block can be reconstructed and the resulting reconstructed video block can be used to evaluate the quality of encoding for a given prediction, transform, and / or quantization. The video encoder 200 can be configured to perform multiple encoding passes (e.g., perform encoding while varying one or more of the prediction, transform parameters, and quantization parameters). Rate-distortion or other system parameters of the bitstream can be optimized based on the evaluation of the reconstructed video blocks. Moreover, the reconstructed video blocks can be stored and used as a reference to predict subsequent blocks.
[0451] As described above, a video block can be encoded using intra prediction. The intra prediction processing unit 212 can be configured to select an intra prediction mode for a video block to be encoded. The intra prediction processing unit 212 can be configured to evaluate a frame and / or regions thereof and determine an intra prediction mode to use to encode a current block. As shown in FIG. 6 , the intra prediction processing unit 212 outputs intra prediction data (e.g., syntax elements) to the entropy encoding unit 218 and the transform coefficient generator 204. As described above, the transform performed on residual data can depend on the mode. As described above, possible intra prediction modes can include a planar prediction mode, a DC prediction mode, and an angular prediction mode. Moreover, in some examples, a prediction for a chroma component can be inferred from the intra prediction for a luma prediction mode.
[0452] As noted above, in JVET-N1001, the retrievable samples for the reference samples of a CU coded in ISP mode have a less than ideal range of increase. That is, for consistency purposes, it is desirable that the reference samples taken from previously coded CUs for intra prediction are the same regardless of whether ISP is used for a given CU. In one example, according to the techniques herein, it is proposed to reduce the amount of reference samples retrieved for a given partition within a CU in ISP mode equal to the amount of offset of the partition within the CU. In particular, according to the techniques herein, in one example, when ISP partitioning occurs, the reference sample width refW and the reference sample height refH can be derived as follows:
[0453] refW = nCbW * 2 + xTb0 - xTbCmpt;
[0454] refH = nCbH * 2 + yTb0 - yTbCmp;
[0455] where,
[0456] - the sample position (xTbCmp, yTbCmp) specifies the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0457] - the sample position (xTb0, yTb0) specifies the top-left sample of the first transform block in the current coding unit relative to the top-left sample of the current picture, and
[0458] It should be noted that when the amount of reference samples retrieved for a given partition within a CU in ISP mode is reduced equal to the amount of offset of the partition within the CU, the benefit is that the prediction obtained with and without ISP is the same before applying the PDPC process when the prediction angle is positive.
[0459] As further noted above, in JVET-N1001, when the slope is an integer slope and the special rule for angles with integer slopes is less than ideal, the reference samples are smoothed for angular prediction. According to the techniques herein, in one example, the intra sample prediction process can not smooth the samples for angular prediction regardless of whether the slope is an integer slope.
[0460] As noted above, the position-dependent intra prediction sample filtering process in JVET-N1001 can be less than ideal because there are two PDPC operation modes for angular modes, and and for DC and planar modes, the PDPC process is identical except for the use of the top-left reference, which can provide a less than ideal design. In one example, according to the techniques herein, there can be a single PDPC operation mode for angular modes. Further, according to the techniques herein, the derivation of the PDPC scaling is specified such that the reference samples are always in range. In one example, according to the techniques herein, the PDPC method can be identical for DC and planar modes.
[0461] As noted above, according to the derivation of filterFlag provided in JVET-N1001, different rules apply for determining the variable filterFlag when ISP is used, which is undesirable. In one example, according to the techniques herein, a uniform derivation method independent of ISP can be used.
[0462] As noted above, the padding and projection process provided in JVET-N1001 is less than ideal. Table 6 provides an analysis of the bounds in the sample projection process. The value x is set to (nTbH * intraPredAngle) » 5, and represents the minimum value it can take according to the following equation in JVET-N1001:
[0463] ref[x] = p[-1-refIdx][-1-refIdx + Min((x * invAngle + 256) » 9, nTbH)], where x = -nTbH... -1
[0464] In Table 6, the value y represents the corresponding index used to address the p array in the same equation. The bold and underlined values are values that exceed nTbH. Such values are undesirable. For example, given nTbH = 8, it is not possible to load 8 consecutive samples from p[][0... 7] and shuffle them according to the value of intraPredAngle to obtain the projected value of ref[]. Even if an offset is introduced and p[][o+0... o+7] is loaded, such shuffling will not be possible.
[0465]
[0466]
[0467] Table 6
[0468] In one example, according to the techniques herein, a projection process is provided, such as to not include reference samples further away. Thus, the indices into the reference array are limited to not exceed nTbH-1. Additionally, it is desirable to have the property that for x in 0...intraPredAngle-1, 32+((x*invAngle+128)>>8) is equal to (((x+intraPredAngle)*invAngle+128)>>8), so that when projecting an edge of size 64, the process can be split into 2 identical projections of size 32. In JVET-N1001, this property is not satisfied when intraPredAngle is equal to 29. Adding 1-bit precision to the inverse angle derivation fixes this issue. Below is exemplary C code using SIMD that implements the proposed projection process, where the number of operations per group of 8 samples is 2 vector loads, 1 vector shuffle, and 1 vector store:
[0469] const int sizeDiv8 = (1 << log2Size) >> 3;
[0470] int64_t offset = offsets[angleIdx];
[0471] for (int i = 0; i < sizeDiv8; i++)
[0472] {
[0473] const_m128i x = _mm_loadu_si128((const_m128i*)&side[1+8*i]);
[0474] const_m128i y = _mm_loadu_si128((const_m128i*)shuffle[angleIdx][i&3]); _mm_storeu_si128((_m128i*)&main[offset>>56], _mm_shuffle_epi8(x, y))
[0475] offset <<= 8
[0476] }
[0477] In particular, according to the techniques herein, in one example, the inverse angle parameter invAngle can be derived based on intraPredAngle as follows:
[0478]
[0479] That is, for example, in accordance with the techniques herein, in one example, an intra sample prediction process can be performed in accordance with one or more of the following processes:
[0480] Directional intra prediction mode process
[0481] Inputs to the process are:
[0482] - an intra prediction mode predModeIntra,
[0483] - a variable refldx specifying an intra prediction reference line index,
[0484] - a variable nTbW specifying a transform block width,
[0485] - a variable nTbH specifying a transform block height,
[0486] - a variable refW specifying a reference sample width,
[0487] - a variable refH specifying a reference sample height,
[0488] - a variable nCbW specifying a coding block width,
[0489] - a variable nCbH specifying a coding block height,
[0490] - a variable cldx specifying a color component of the current block,
[0491] - neighboring samples p[x][y] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx.
[0492] The output of the process is the predicted samples predSamples[x][y] with x = 0... nTbW - 1, y = 0... nTbH - 1.
[0493] Set the variable nTbS equal to (Log2(nTbW) + Log2(nTbH)) » 1.
[0494] The variable filterFlag is derived as follows:
[0495] - Set the variable minDistVerHor equal to Min(Abs(predModeIntra - 50), Abs(predModeIntra - 18)).
[0496] - The variable intraHorVerDistThres[nTbS] is specified in Table 1
[0497] - If minDistVerHor is greater than intraHorVerDistThres[ nTbS ], set filterFlag equal to 1.
[0498] - Otherwise, set filterFlag equal to 0.
[0499] Alternatively, the variable filterFlag is derived as follows:
[0500] - Set the variable minDistVerHor equal to Min( Abs( predModeIntra - 50 ), Abs( predModeIntra - 18 ) ).
[0501] - The variable intraHorVerDistThres[ nTbS ] is specified in Table 1
[0502] - If refldx is equal to 0, IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, and minDistVerHor is greater than intraHorVerDistThres[ nTbS ], set filterFlag equal to 1.
[0503] - Otherwise, set filterFlag equal to 0.
[0504] Table 2 specifies a mapping table between predModeIntra and the angular parameter intraPredAngle.
[0505] The inverse angular parameter invAngle is derived based on intraPredAngle as follows:
[0506]
[0507] The interpolation filter coefficients fC[ pos ][ j ] and fG[ pos ][ j ], with pos = 0...31 and j = 0...3, are specified in Table 3.
[0508] The value of the predicted sample predSamples[ x ][ y ], with x = 0...nTbW - 1 and y = 0...nTbH - 1, is derived as follows:
[0509] - If predModeIntra is greater than or equal to 34, the following ordered steps are applied:
[0510] 1. The reference sample array ref[ x ] is specified as follows:
[0511] - The following applies:
[0512] ref[ x ] = p[ -1 - refldx + x ][ -1 - refldx ], where x = 0...nTbW + refldx + 1
[0513] - If intraPredAngle is less than 0, the primary reference sample array is extended as follows:
[0514] ref[ x ] = p[ -1 - refldx ][ -1 - refldx + ( ( x * invAngle + 256 ) » 9, nTbH ) ], where x = -nTbH...-1
[0515] - Otherwise,
[0516] ref[ x ] = p[ -1 - refldx + x ][ -1 - refldx ], where x = nTbW + 2 + refldx...refW + refldx
[0517] - Additional samples ref[ refW + refldx + x ], where x = 1...( Max( 1, nTbW / nTbH ) * refldx + 2 ), are derived as follows:
[0518] ref[ refW + refldx + x ] = p[ -1 + refW ][ -1 - refldx ]
[0519] 2. The value of the prediction sample predSamples[ x ][ y ], where x = 0...nTbW - 1, y = 0...nTbH - 1, is derived as follows:
[0520] - The index variable iIdx and the multiplication factor iFact are derived as follows:
[0521] iIdx = ( ( ( y + 1 + refldx ) * intraPredAngle ) » 5 ) + refldx
[0522] iFact = ( ( y + 1 + refldx ) * intraPredAngle ) & 31
[0523] - If cldx is equal to 0, the following applies:
[0524] - The interpolation filter coefficients fT[ j ], where j = 0...3, are derived as follows:
[0525] fT[ j ] = filterFlag? fG[ iFact ][ j ] : fC[ iFact ][ j ]
[0526] - The value of the prediction sample predSamples[ x ][ y ] is derived as follows:
[0527]
[0528] - Otherwise (cldx is not equal to 0), depending on the value of iFact, the following applies:
[0529] - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows:
[0530] predSamples[x][y] = ((32 - iFact) * ref[x + iIdx + 1] + iFact * ref[x + iIdx + 2] + 16) » 5
[0531] - Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows:
[0532] predSamples[x][y] = ref[x + iIdx + 1]
[0533] - Otherwise (predModeIntra is less than 34), the following ordered steps are applied:
[0534] 1. The reference sample array ref[x] is specified as follows:
[0535] - The following applies:
[0536] ref[x] = p[-1 - refldx][-1 - refldx + x], with x = 0...nTbH + refldx + 1
[0537] - If intraPredAngle is less than 0, the main reference sample array is extended as follows:
[0538] ref[x] = p[-1 - refldx + ((x * invAngle + 256) » 9, nTbW)][-1 - refldx], with x = -nTbW...-1
[0539] - Otherwise,
[0540] ref[x] = p[-1 - refldx][-1 - refldx + x], with
[0541] x = nTbH + 2 + refldx...refH + refldx
[0542] - The additional samples ref[refH + refldx + x], with x = 1...(Max(1, nTbW / nTbH) * refldx + 2), are derived as follows:
[0543] ref[ refH + refldx + x ] = p[ -1 + refH ][ -1 - refldx ]
[0544] 2. The value of the predicted sample predSamples[ x ][ y ] (with x = 0...nTbW-1, y = 0...nTbH-1) is derived as follows:
[0545] - The index variable iIdx and the multiplication factor iFact are derived as follows:
[0546] iIdx = ((( x + 1 + refldx ) * intraPredAngle ) » 5) + refldx
[0547] iFact = (( x + 1 + refldx ) * intraPredAngle ) & 31
[0548] - If cldx is equal to 0, the following applies:
[0549] - The interpolation filter coefficients fT[ j ] (with j = 0...3) are derived as follows:
[0550] fT[ j ] = filterFlag? fG[ iFact ][ j ] : fC[ iFact ][ j ]
[0551] - The value of the predicted sample predSamples[ x ][ y ] is derived as follows:
[0552]
[0553] - Otherwise (cldx is not equal to 0), depending on the value of iFact, the following applies:
[0554] - If iFact is not equal to 0, the value of the predicted sample predSamples[ x ][ y ] is derived as follows:
[0555] predSamples[ x ][ y ] = ( ( 32 - iFact ) * ref[ y + iIdx + 1 ] + iFact * ref[ y + iIdx + 2 ] + 16 ) » 5
[0556] - Otherwise, the value of the predicted sample predSamples[ x ][ y ] is derived as follows:
[0557] predSamples[ x ][ y ] = ref[ y + iIdx + 1 ]
[0558] Decoding process for intra blocks
[0559] The input to this process is:
[0560] - a sample position (xTb0, yTb0) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0561] - a variable nTbW specifying the width of the current transform block,
[0562] - a variable nTbH specifying the height of the current transform block,
[0563] - a variable predModeIntra specifying the intra prediction mode,
[0564] - a variable cldx specifying the color component of the current block.
[0565] The output of the process is the modified reconstructed picture before filtering in the loop.
[0566] The maximum transform block size maxTbSize is derived as follows:
[0567] maxTbSize = (cldx == 0)? MaxTbSizeY : MaxTbSizeY / 2
[0568] The luma sample position is derived as follows:
[0569] (xTbY, yTbY) = (cldx == 0)? (xTb0, yTb0) : (xTb0 * 2, yTb0 * 2)
[0570] According to maxTbSize, the following applies:
[0571] - If IntraSubPartitionsSplitType is equal to NO_ISP_SPLIT and nTbW is greater than maxTbSize or nTbH is greater than maxTbSize, the following ordered steps are applied.
[0572] 1. The variables newTbW and newTbH are derived as follows:
[0573] newTbW = (nTbW > maxTbSize)? (nTbW / 2) : nTbW
[0574] newTbH = (nTbH > maxTbSize)? (nTbH / 2) : nTbH
[0575] 2. Call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0576] 3. If nTbW is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO + newTbW, yTbO), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0577] 4. If nTbH is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO, yTbO + newTbH), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0578] 5. If nTbW is greater than maxTbSize and nTbH is greater than maxTbSize, call the general decoding process for intra blocks as specified in this clause with the position (xTbO, yTbO) set equal to (xTbO + newTbW, yTbO + newTbH), the transform block width nTbW set equal to newTbW and the height nTbH set equal to newTbH, the intra prediction mode predModeIntra and the variable cldx as input and the output is the modified reconstructed picture before filtering in the loop.
[0579] - Otherwise, apply the following ordered steps:
[0580] - The variables nW, nH, numPartsX and numPartsY are derived as follows:
[0581] nW = IntraSubPartitionsSplitType == ISP_VER_SPLIT?
[0582] nTbW / NumIntraSubPartitions: nTbW
[0583] nH = IntraSubPartitionsSplitType == ISP_HOR_SPLIT?
[0584] nTbH / NumIntraSubPartitions: nTbH
[0585] numPartsX = IntraSubPartitionsSplitType == ISP_VER_SPLIT?
[0586] NumIntraSubPartitions: 1
[0587] numPartsY = IntraSubPartitionsSplitType == ISP_HOR_SPLIT?
[0588] NumIntraSubPartitions: 1
[0589] - For xPartIdx = 0... numPartsX - 1 and yPartIdx = 0... numPartsY - 1, the following applies:
[0590] 1. The intra sample prediction process as specified below is invoked with the position (xTbCmp, yTbCmp) set equal to (xTb0 + nW * xPartIdx, yTb0 + nH * yPartIdx), the position (xTb0, yTb0), the intra prediction mode predModeIntra, the transform block width nTbW and height nTbH set equal to nW and nH, the coded block width nCbW and height nCbH set equal to nTbW and nTbH, and the variable cldx as input, and the output is a (nTbW) x (nTbH) array predSamples.
[0591] Intra sample prediction process
[0592] The inputs to this process are:
[0593] - the sample position (xTbCmp, yTbCmp) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0594] - the sample position (xTb0, yTb0) specifying the top-left sample of the first transform block in the current coding unit relative to the top-left sample of the current picture,
[0595] - a variable predModeIntra specifying the intra prediction mode,
[0596] - a variable nTbW specifying the transform block width,
[0597] - a variable nTbH specifying the transform block height,
[0598] - a variable nCbW specifying the coding block width,
[0599] - a variable nCbH specifying the coding block height,
[0600] - a variable cldx specifying the color component of the current block.
[0601] The output of the process is the predicted samples predSamples[x][y] for x = 0...nTbW-1, y = 0...nTbH-1.
[0602] The predicted samples predSamples[x][y] are derived as follows:
[0603] - If intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cldx is equal to 0, the matrix-based intra sample prediction process is invoked with position(xTbCmp,yTbCmp), position(xTb0,yTb0), intra prediction mode predModeIntra, transform block width nTbW and height nTbH as inputs and the output is predSamples.
[0604] - Otherwise the general (non-mip) intra sample prediction process as specified in the following is invoked with position(xTbCmp,yTbCmp), intra prediction mode predModeIntra, transform block width nTbW and height nTbH, coding block width nCbW and height nCbH and variable cldx as inputs and the output is predSamples.
[0605] General (non-mip) intra sample prediction process
[0606] The input to the process is:
[0607] - a sample position (xTbCmp, yTbCmp) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture,
[0608] - a sample position (xTb0, yTb0) specifying the top-left sample of the first transform block in the current coding unit relative to the top-left sample of the current picture,
[0609] - a variable predModeIntra specifying the intra prediction mode,
[0610] - variable nTbW specifying the transform block width,
[0611] - variable nTbH specifying the transform block height,
[0612] - variable nCbW specifying the coding block width,
[0613] - variable nCbH specifying the coding block height,
[0614] - variable cldx specifying the color component of the current block.
[0615] The output of this process are the predicted samples predSamples[x][y] with x = 0...nTbW-1, y = 0...nTbH-1.
[0616] The variables refW and refH are derived as follows:
[0617] - if IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cldx is not equal to 0, the following applies:
[0618] refW = nTbW * 2
[0619] refH = nTbH * 2
[0620] - else (IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and cldx is equal to 0), the following applies:
[0621] refW = nCbW * 2 + xTb0 - xTbCmp
[0622] refH = nCbH * 2 + yTb0 - yTbCmp
[0623] refldx = (cldx == 0)? IntraLumaRefLineIdx[xTbCmp][yTbCmp] : 0
[0624] Invoke the wide-angle intra prediction mode mapping process with predModeIntra, nTbW, nTbH and cldx as input and with modifiedPredModeIntra as output.
[0625] For the generation of reference samples p[x][y] with x = -1-refldx, y = -1-refldx...refH-1 and x = -refldx...refW-1, y = -1-refldx, the following ordered steps apply:
[0626] 1. Call the reference sample availability flagging process with sample position (xTbCmp, yTbCmp), intra prediction reference line index refldx, reference sample width refW, reference sample height refH, color component index cldx as input and with reference samples refUnfilt[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) as output.
[0627] 2. When at least one sample refUnfilt[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) is flagged as "not available for intra prediction", call the reference sample replacement process with intra prediction reference line index refldx, reference sample width refW, reference sample height refH, reference samples refUnfilt[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) and color component index cldx as input and with modified reference samples refUnfilt[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) as output.
[0628] 3. Call the reference sample filtering process as specified below with intra prediction reference line index refldx, transform block width nTbW and height nTbH, reference sample width refW, reference sample height refH, unfiltered samples refUnfilt[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) and color component index cldx as input and with reference samples p[x][y] (where x = -1-refldx, y = -1-refldx... refH-1 and x = -refldx... refW-1, y = -1-refldx) as output.
[0629] The intra sample prediction process according to predModeIntra is applied as follows:
[0630] - If predModeIntra is equal to INTRA_PLANAR, the corresponding intra prediction mode process as specified in the following is invoked, with the transform block width nTbW and the transform block height nTbH and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0631] - Otherwise, if predModeIntra is equal to INTRA_DC, the corresponding intra prediction mode process as specified in the following is invoked, with the transform block width nTbW, the transform block height nTbH, the intra prediction reference line index refIdx, and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0632] - Otherwise, if predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, the corresponding intra prediction mode process is invoked, with the intra prediction mode predModeIntra, the sample position (xTbCmp, yTbCmp) set equal to (xTbC, yTbC), the transform block width nTbW and height nTbH, and the reference sample array p as inputs, and the output is the predicted sample array predSamples.
[0633] - Otherwise, the corresponding intra prediction mode process is invoked, with the intra prediction mode predModeIntra, the intra prediction reference line index refIdx, the transform block width nTbW, the transform block height nTbH, the reference sample width refW, the reference sample height refH, the coding block width nCbW and height nCbH, the color component index cIdx, and the reference sample array p as inputs, and the predicted sample array predSamples as output.
[0634] The position dependent prediction sample filtering process as specified in the following is invoked when all of the following conditions are true, with the intra prediction mode predModeIntra, the transform block width nTbW, the transform block height nTbH, the predicted samples predSamples[x][y] for x = 0...nTbW-1, y = 0...nTbH-1, the reference sample width refW, the reference sample height refH, the reference samples p[x][y] for x = -1, y = -1...refH-1 and x = 0...refW-1, y = -1, and the color component index cIdx as inputs, and the output is the modified predicted sample array predSamples:
[0635] - IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cldx is not equal to 0
[0636] - refldx is equal to 0 or cldx is not equal to 0
[0637] - BdpcmFlag[ xTbCmp ][ xTbCmp ] is equal to 0
[0638] - predModeIntra is less than or equal to INTRA_ANGULAR 18 or greater than or equal to INTRA_ANGULAR 50
[0639] Reference sample filtering process
[0640] Reference sample filtering process
[0641] The input to the process is:
[0642] - a variable refldx specifying the intra prediction reference line index,
[0643] - a variable nTbW specifying the transform block width,
[0644] - a variable nTbH specifying the transform block height,
[0645] - a variable refW specifying the reference sample width,
[0646] - a variable refH specifying the reference sample height,
[0647] - (unfiltered) neighboring samples refUnfilt[ x ][ y ] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx,
[0648] - a variable cldx specifying the color component of the current block.
[0649] The output of the process is the reference samples p[ x ][ y ] with x = -1 - refldx, y = -1 - refldx... refH - 1 and x = -refldx... refW - 1, y = -1 - refldx.
[0650] The variable filterFlag is derived as follows:
[0651] - filterFlag is set equal to 1 if all of the following conditions are true:
[0652] - nTbW * nTbH is greater than 32
[0653] - cldx is equal to 0
[0654] - IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT
[0655] - predModeIntra is equal to INTRA_PLANAR
[0656] - Otherwise, set filterFlag equal to 0.
[0657] For the derivation of reference samples p[x][y], the following applies:
[0658] - If filterFlag is equal to 1, the filtered sample values p[x][y] with x = -1, y = -1...refH - 1 and x = 0...refW - 1, y = -1 are derived as follows:
[0659] p[-1][-1] = refUnfilt[-1][-1]
[0660] p[-1][y] = (refUnfilt[-1][y + 1] + 2 * refUnfilt[-1][y] + refUnfilt[-1][y - 1] + 2) » 2 for y = 0...nTbH
[0661] p[-1][y] = refUnfilt[-1][y] for y = nTbH + 1...refH - 1
[0662] p[x][-1] = (refUnfilt[x - 1][-1] + 2 * refUnfilt[x][-1] + refUnfilt[x + 1][-1] + 2) » 2 for x = 0...nTbW
[0663] p[x][-1] = refUnfilt[x][-1] for y = nTbW + 1...refH - 1
[0664] - Otherwise, set the reference sample values p[x][y] equal to the unfiltered sample values refUnfilt[x][y] with x = -1 - refldx, y = -1 - refldx...refH - 1 and x = -refldx...refW - 1, y = -1 - refldx.
[0665] Position dependent intra prediction sample filtering process
[0666] The input to the process is:
[0667] - the intra prediction mode predModeIntra,
[0668] - variable nTbW specifying the transform block width,
[0669] - variable nTbH specifying the transform block height,
[0670] - variable refW specifying the reference sample width,
[0671] - variable refH specifying the reference sample height,
[0672] - predicted samples predSamples[x][y] with x = 0...nTbW-1, y = 0...nTbH-1,
[0673] - neighboring samples p[x][y] with
[0674] x = -1, y = -1...refH-1 and x = 0...refW-1, y = -1,
[0675] - variable cldx specifying the color component of the current block.
[0676] The output of the process is the modified predicted samples predSamples[x][y] with x = 0...nTbW-1, y = 0...nTbH-1.
[0677] Depending on the value of cldx, the function clip1Cmp is set as follows:
[0678] - if cldx is equal to 0, then clip1Cmp is set equal to Cliply.
[0679] - else, clip1Cmp is set equal to Cliplc.
[0680] The variable nScale is set to ((Log2(nTbW) + Log2(nTbH) - 2) » 2).
[0681] If predModeIntra is greater than INTRA_ANGULAR50, then the variable nScale is further set to Min(2, Log2(nTbH) - Floor(Log2(3*invAngle - 2)) + 7) using invAngle as specified above.
[0682] If predModeIntra is less than INTRA_ANGULAR18 and not equal to any of INTRA_PLANAR or INTRA__DC, then the variable nScale is further set to Min(2, Log2(nTbW) - Floor(Log2(3*invAngle - 2)) + 7) using invAngle as specified above.
[0683] It should be noted that in one example, if the precision of the inverse angle increases, then variable nScale is further set to Min(2, Log2(nTbH) - Floor(Log2(3*invAngle - 2)) + 8), and variable nScale is further set to Min(2, Log2(nTbW) - Floor(Log2(3*invAngle - 2)) + 8).
[0684] The reference sample arrays mainRef[x] and sideRef[y] (with x = 0...refW - 1 and y = 0...refH - 1) are derived as follows:
[0685] mainRef[x] = p[x][-1]
[0686] sideRef[y] = p[-1][y]
[0687] The variables refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] (with x = 0...nTbW - 1, y = 0...nTbH - 1) are derived as follows:
[0688] - If predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the following applies:
[0689] refL[x][y] = p[-1][y]
[0690] refT[x][y] = p[x][-1]
[0691] wT[y] = 32 >> ((y << 1) >> nScale)
[0692] wL[x] = 32 >> ((x << 1) >> nScale)
[0693] wTL[x][y] = 0
[0694] - Otherwise, if predModeIntra is equal to INTRA_ANGULAR 18 or INTRA_ANGULAR 50, the following applies:
[0695] refL[x][y] = p[-1][y]
[0696] refT[x][y] = p[x][-1]
[0697] wT[y] = (predModeIntra == INTRA_ANGULAR 18)?
[0698] 32 >> ((y << 1) >> nScale) : 0
[0699] wL[x] = (predModeIntra == INTRA_ANGULAR50)? 32 >> ((x << 1) >> nScale) : 0
[0700] 32 >> ((y << 1) >> nScale) : 0
[0701] wTL[x][y] = (predModeIntra == INTRA_ANGULAR18)? wT[y] : wL[x]
[0702] - Otherwise, if predModeIntra is less than INTRA_ANGULAR18 and nScale is equal to or greater than 0, the following ordered steps are applied:
[0703] 1. The variables dXInt[y] and dX[x][y] are derived from intraPredMode using invAngle as specified above as follows:
[0704] dXPos[y] = ((y + 1) * invAngle + 128) » 8
[0705] or
[0706] ((y + 1) * invAngle + 256) » 9 if the precision of the inverse angle is increased.
[0707] dX[x][y] = x + dXInt[y]
[0708] 2. The variables refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are derived as follows:
[0709] refL[x][y] = 0
[0710] refT[x][y] = (y < (3 « nScale))? mainRef[dX[x][y]] : 0
[0711] wT[y] = 32 >> ((y « 1) » nScale)
[0712] wL[x] = 0
[0713] wTL[x][y] = 0
[0714] - Otherwise, if predModeIntra is greater than INTRA_ANGULAR50 and nScale is equal to or greater than 0, the following ordered steps are applied:
[0715] 1. The variables dYPos[x], dYFrac[x], dYInt[x] and dY[x][y] are derived from the intraPredMode using the invAngle as specified above as follows:
[0716] dylnt[x] - ((x + 1) * invAngle + 128) » 8
[0717] or
[0718] ((x + 1) * invAngle + 256) » 9 if the precision of the inverse angle is increased.
[0719] dY[x][y] = y + dYInt[x]
[0720] 2. The variables refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are derived as follows:
[0721] refL[x][y] = (x < (3 « nScale))? sideRef[dY[x][y]] : 0
[0722] refT[x][y] = 0
[0723] wT[y] = 0
[0724] wL[x] = 32 » ((x « 1) » nScale)
[0725] wTL[x][y] = 0
[0726] - Otherwise, refL[x][y], refT[x][y], wT[y], wL[x] and wTL[x][y] are all set equal to 0.
[0727] The value of the modified predicted sample predSamples[x][y] (with x = 0...nTbW-1, y = 0...nTbH-1) is derived as follows:
[0728] predSamples[x][y] = clip1Cmp((refL[x][y] * wL[x] + refT[x][y] * wT[y] - p[-1][-1] * wTL[x][y] + (64 - wL[x] - wT[y] + wTL[x][y]) * predSamples[x][y] + 32) » 6)
[0729] Thus, the video encoder 200 represents an example of a device configured to: set the value of a scaling variable based on the inversion angle provided by the intra-prediction mode, and perform a position-dependent intra-prediction sample filtering process based on the value of the scaling variable.
[0730] Inter-frame prediction processing unit 214 can be configured to perform inter-frame prediction coding for the current video block. Inter-frame prediction processing unit 214 can be configured to receive a source video block and calculate the motion vector of the PU (Power Unit) of the video block. The motion vector can indicate the displacement of the PU (or similar coding structure) of the video block within the current video frame relative to the prediction block within a reference frame. Inter-frame prediction coding can use one or more reference images. Furthermore, motion prediction can be unidirectional prediction (using one motion vector) or bidirectional prediction (using two motion vectors). Inter-frame prediction processing unit 214 can be configured to select a prediction block by calculating pixel differences determined by, for example, sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics. As described above, motion vectors can be determined and specified based on motion vector prediction. As described above, inter-frame prediction processing unit 214 can be configured to perform motion vector prediction. Inter-frame prediction processing unit 214 can be configured to generate a prediction block using motion prediction data. For example, inter-frame prediction processing unit 214 can locate the prediction video block within the frame buffer (…). FIG. 6 (Not shown in the image). It should be noted that the inter-frame prediction processing unit 214 can be further configured to apply one or more interpolation filters to the reconstructed residual block to compute sub-integer pixel values for motion estimation. The inter-frame prediction processing unit 214 can output the motion prediction data of the computed motion vectors to the entropy coding unit 218. FIG. 6 As shown, the inter-frame prediction processing unit 214 can receive reconstructed video blocks via the filter unit 216.
[0731] like FIG. 6 As shown, filter unit 216 receives reconstructed video blocks and coding parameters, and outputs modified reconstructed video data. Filter unit 216 can be configured to perform deblocking, Sample Adaptive Offset (SAO) filtering, Adaptive Loop Filtering (ALF), etc. SAO filtering is a nonlinear amplitude mapping that can be used to improve reconstruction by adding an offset to the reconstructed video data. It should be noted that, as... FIG. 5 As shown, the intra-frame prediction processing unit 212 and the inter-frame prediction processing unit 214 can receive modified reconstructed video blocks via the filter unit 216. The entropy coding unit 218 receives quantized transform coefficients and prediction syntax data (i.e., intra-frame prediction data and motion prediction data). The entropy coding unit 218 can be configured to perform entropy coding according to one or more of the techniques described herein.
[0732] FIG. 7is a block diagram illustrating an example of a video decoder that can be configured to decode video data in accordance with one or more techniques of this disclosure. In one example, video decoder 300 can be configured to reconstruct video data based on one or more of the techniques described above. That is, video decoder 300 can operate in a reciprocal manner to video encoder 200 described above. Video decoder 300 can be configured to perform intra prediction decoding and inter prediction decoding, and thus can be referred to as a hybrid decoder. In FIG. 7 In the example shown, video decoder 300 includes an entropy decoding unit 302, an inverse quantization unit 304, an inverse transform processing unit 306, an intra prediction processing unit 308, an inter prediction processing unit 310, a summer 312, a filter unit 314, and a reference buffer 316. Video decoder 300 can be configured to decode video data in a manner consistent with a video coding system that can implement one or more aspects of a video coding standard. It should be noted that although the example video decoder 300 is shown with distinct functional blocks or units, such an illustration is for descriptive purposes only and does not limit video decoder 300 and / or its sub-components to a particular hardware or software architecture. The functionality of video decoder 300 can be implemented using any combination of hardware, firmware, and / or software implementations.
[0733] As FIG. 7 shown, entropy decoding unit 302 receives an entropy encoded bitstream. Entropy decoding unit 302 can be configured to decode quantized syntax elements and quantized coefficients from the bitstream according to a process reciprocal to the entropy encoding process. Entropy decoding unit 302 can be configured to perform entropy decoding according to any of the entropy encoding techniques described above. Entropy decoding unit 302 can parse the encoded bitstream in a manner consistent with a video coding standard. Video decoder 300 can be configured to parse an encoded bitstream, where the encoded bitstream is generated based on the techniques described above.
[0734] Referring again to FIG. 7, the inverse quantization unit 304 receives quantized transform coefficients (i.e., bit- shifted values) and quantization parameter data from the entropy decoding unit 302. The quantization parameter data can include any and all combinations of the delta QP values and / or quantization group size values described above. The video decoder 300 and / or the inverse quantization unit 304 can be configured to determine QP values for inverse quantization based on values signaled by the video encoder and / or by video properties and / or coding parameters. That is, the inverse quantization unit 304 can operate in a reciprocal manner to the coefficient quantization unit 206 described above. For example, the inverse quantization unit 304 can be configured to infer predetermined values), allowed quantization group sizes, derive quantization parameters, etc. according to the techniques described above. The inverse quantization unit 304 can be configured to apply inverse quantization. The inverse transform processing unit 306 can be configured to perform inverse transforms to generate reconstructed residual data. The techniques performed by the inverse quantization unit 304 and the inverse transform processing unit 306 can be similar to the techniques performed by the inverse quantization / transform processing unit 208 described above. The inverse transform processing unit 306 can be configured to apply inverse DCTs, inverse DSTs, inverse integer transforms, inverse non-separable secondary transforms (NSSTs), or conceptually similar inverse transform processes to transform the coefficients in order to produce a residual block in the pixel domain. Moreover, as described above, whether a particular transform is performed (or the type of particular transform) can depend on the intra prediction mode. As shown in FIG. 3, the reconstructed residual data can be provided to a summer 312. The summer 312 can add the reconstructed residual data to a predicted video block and generate reconstructed video data. The predicted video block can be determined according to the prediction video techniques (i.e., intra prediction and inter prediction). FIG. 7
[0735] Intra prediction processing unit 308 can be configured to receive intra prediction syntax elements and retrieve a predicted video block from reference buffer 316. Reference buffer 316 can comprise a memory device configured to store one or more frames of video data. The intra prediction syntax elements can identify an intra prediction mode, such as the intra prediction modes described above. In one example, intra prediction processing unit 308 can reconstruct the video block using one or more of the intra prediction coding techniques described herein. Inter prediction processing unit 310 can receive inter prediction syntax elements and generate motion vectors to identify a predicted block in one or more reference frames stored in reference buffer 316. Inter prediction processing unit 310 can generate a motion compensated block, possibly performing interpolation based on an interpolation filter. Identifiers for interpolation filters used for motion estimation with sub-pixel accuracy can be included in the syntax elements. Inter prediction processing unit 310 can use the interpolation filters to calculate interpolated values for sub-integer pixels of the reference block. Filter unit 314 can be configured to perform filtering on the reconstructed video data. For example, filter unit 314 can be configured to perform deblocking and / or SAO filtering, as described above with respect to filter unit 216. In addition, it should be noted that, in some examples, filter unit 314 can be configured to perform specialized arbitrary filtering (e.g., visual enhancement). As shown, video decoder 300 can output the reconstructed video block. As such, video decoder 300 represents an example of a device configured to set a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and perform a position-dependent intra prediction sample filtering process based on the value of the scaling variable. FIG. 7
[0736] In one or more examples, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer- readable media generally can correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product can include a computer-readable medium.
[0737] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other storage medium that can be used to store desired program code means in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are instead directed to non-transient, tangible storage media. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0738] Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor," as used herein can refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could be fully implemented in one or more circuits or logic elements.
[0739] The techniques of this disclosure can be implemented in a variety of devices or apparatuses including a wireless handset, an integrated circuit (IC) or IC package (for example, a chip set), among others. Various components, modules, or units are described herein as being configured to perform a particular function or task. However, such components, modules, or units can be configured to perform a variety of tasks that are not explicitly described or that can be related to the tasks described in the context of a component, module, or unit. For example, a component, module, or unit can facilitate or perform not only the tasks specifically identified as being performed by that component, module, or unit, but also other tasks that are not necessarily related to the tasks specifically identified as being performed by that component, module, or unit.
[0740] Furthermore, each functional block or various features of the base station device and the terminal device used in each of the aforementioned embodiments can be implemented or executed by circuitsry, either singly or in combination with one another. That is, they can be implemented more by hardware or specific LSI which performs part or all of the aforementioned functions. The LSI can be implemented in a single chip, or in a combination of some units. The LSI may, of course, be implemented as a part of on-chip system. Furthermore, by the way of modification, practical implementation can be completed not by LSI, but by using dedicated circuitry or a general purpose computer which is programmed to realize each of the functions or a combination of them, or the like.
[0741] Various examples have been described. These and other examples are within the scope of the following claims.
[0742] <SUMMARY>
[0743] In one example, a method of encoding video data includes setting a value of a scaling variable based on an inverse angle provided by an intra prediction mode, and performing a position dependent intra prediction sample filtering process based on the value of the scaling variable.
[0744] In one example, the method is provided in which setting the value of the scaling variable based on the inverse angle provided by the intra prediction mode includes setting the value of the scaling variable based on whether the intra prediction mode is greater than a specified mode.
[0745] In one example, the method is provided in which the inverse angle provided by the intra prediction mode is determined according to one or more techniques described herein.
[0746] In one example, an apparatus for encoding video data includes one or more processors configured to perform any and all combinations of the steps.
[0747] In one example, the apparatus is provided in which the apparatus includes a video encoder.
[0748] In one example, the apparatus is provided in which the apparatus includes a video decoder.
[0749] In one example, a system includes an apparatus including a video encoder; and the apparatus includes a video decoder.
[0750] In one example, an apparatus for encoding video data includes means for performing any and all combinations of the steps.
[0751] In one example, a non-transitory computer-readable storage medium including instructions stored thereon that, when executed, cause one or more processors of a device for encoding video data to perform any and all combinations of the steps.
[0752] In one example, a method of encoding video data includes deriving an intra prediction angle parameter, deriving an inverse angle parameter based on the intra prediction angle parameter, setting a value of a scaling variable based on the derived inverse angle for a prediction mode included in a defined set of prediction modes, and performing a position dependent intra prediction sample filtering process using the value of the scaling variable.
[0753] In one example, the method is provided in which the defined set of prediction modes includes prediction modes in a range of 2 to 17 and prediction modes in a range of 51 to 80.
[0754] In one example, the method is provided in which deriving the inverse angle parameter based on the intra prediction angle parameter includes dividing 16,384 by the intra prediction angle parameter.
[0755] In one example, the method is provided in which setting the value of the scaling variable based on the derived inverse angle includes setting the value of the scaling variable to 2 unless the derived inverse angle is greater than a threshold value corresponding to a transform block size.
[0756] In one example, the method is provided in which determining whether the derived inverse angle is greater than a threshold value includes performing the following calculation: Floor(Log2(3*invAngle-2)), where invAngle is the derived inverse angle.
[0757] In one example, the method is provided and further including setting the value of the scaling variable based on a transform block height size and a width size for a prediction mode not included in the defined set of prediction modes.
[0758] In one example, a device including one or more processors configured to derive an intra prediction angle parameter, derive an inverse angle parameter based on the intra prediction angle parameter, set a value of a scaling variable based on the derived inverse angle for a defined set of prediction modes, and perform a position dependent intra prediction sample filtering process using the value of the scaling variable.
[0759] In one example, the apparatus is provided, wherein the defined set of prediction modes includes prediction modes in the range of 2 to 17 and prediction modes in the range of 51 to 80.
[0760] In one example, the apparatus is provided, wherein deriving the inverse angle parameter based on the intra prediction angle parameter includes dividing 16,384 by the intra prediction angle parameter.
[0761] In one example, the apparatus is provided, wherein setting the value of the scaling variable based on the derived inverse angle includes setting the value of the scaling variable to 2 unless the derived inverse angle is greater than a threshold value corresponding to a transform block size.
[0762] In one example, the apparatus is provided, wherein determining whether the derived inverse angle is greater than a threshold value includes performing the following calculation: Floor(Log2(3*invAngle-2)), where invAngle is the derived inverse angle.
[0763] In one example, the apparatus is provided, further comprising setting the value of the scaling variable based on a transform block height size and a width size for a prediction mode not included in the defined set of prediction modes.
[0764] In one example, the apparatus is provided, wherein the apparatus is a video decoder.
[0765] <INCORPORATION BY REFERENCE>
[0766] This non-provisional patent application claims priority under 35 U.S.C. § 119 to provisional application 62 / 865,661, filed June 24, 2019, and provisional application 62 / 868,276, filed June 28, 2019, the entire contents of both of which are hereby incorporated by reference.
Claims
1. A method of encoding video data, the method comprising: deriving an intra prediction angle parameter specified by an intra prediction mode based on a mapping table; deriving an inverse angle parameter by dividing 16,384 by the intra prediction angle parameter; for a prediction mode included in a defined set of prediction modes ranging from 2 to 17, setting a value of a scaling variable to: Min( 2, Log2( nTbW ) - Floor( Log2( 3 * invAngle - 2 ) ) + 8 ); and for a prediction mode included in a defined set of prediction modes ranging from 51 to 80, setting a value of the scaling variable to: Min( 2, Log2( nTbH ) - Floor( Log2( 3 * invAngle - 2 ) ) + 8 ), where invAngle is the derived inverse angle; nTbW is a transform block width; and nTbH is a transform block height; and based on the value of the scaling variable, performing a position dependent intra prediction sample filtering process modified prediction sample by using reference samples and a width.
2. The method of claim 1, further comprising for a prediction mode not included in the defined set of prediction modes, setting the value of the scaling variable to: ( ( Log2( nTbW ) + Log2( nTbH ) - 2 ) » 2 ).
3. An apparatus comprising one or more processors configured to: derive an intra prediction angle parameter specified by an intra prediction mode based on a mapping table; derive an inverse angle parameter by dividing 16,384 by the intra prediction angle parameter; for a prediction mode included in a defined set of prediction modes ranging from 2 to 17, set a value of a scaling variable to: Min( 2, Log2( nTbW ) - Floor( Log2( 3 * invAngle - 2 ) ) + 8 ); and for a prediction mode included in a defined set of prediction modes ranging from 51 to 80, set a value of the scaling variable to: Min( 2, Log2( nTbH ) - Floor( Log2( 3 * invAngle - 2 ) ) + 8 ), where, invAngle is the derived inverse angle; nTbW is a transform block width; and nTbH is a transform block height; and based on the value of the scaling variable, perform a position dependent intra prediction sample filtering process modified prediction sample by using reference samples and a width.
4. The apparatus of claim 3, further comprising for a prediction mode not included in the defined set of prediction modes, set the value of the scaling variable to: ( ( Log2( nTbW ) + Log2( nTbH ) - 2 ) » 2 ).
5. The apparatus of claim 3, wherein the apparatus is a video decoder.
Citation Information
Patent Citations
SEED VALVE AND PLANTING METHOD FOR MULTIPLE TYPES OF SEEDS
AR100337A1