CN113812159B - Scaling method in video encoding and decoding - Google Patents

Scaling method in video encoding and decoding Download PDF

Info

Publication number
CN113812159B
CN113812159B CN202080034839.0A CN202080034839A CN113812159B CN 113812159 B CN113812159 B CN 113812159B CN 202080034839 A CN202080034839 A CN 202080034839A CN 113812159 B CN113812159 B CN 113812159B
Authority
CN
China
Prior art keywords
idx
value
integer
shift
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202080034839.0A
Other languages
Chinese (zh)
Other versions
CN113812159A (en
Inventor
张凯
张莉
刘鸿彬
王悦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
ByteDance Inc
Original Assignee
Beijing ByteDance Network Technology Co Ltd
ByteDance Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd, ByteDance Inc filed Critical Beijing ByteDance Network Technology Co Ltd
Publication of CN113812159A publication Critical patent/CN113812159A/en
Application granted granted Critical
Publication of CN113812159B publication Critical patent/CN113812159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Devices, systems, and methods for digital video encoding and decoding are described, including scaling and division operations in video encoding and decoding. An exemplary method for video processing includes performing a conversion between a current video block of video and a codec representation of the video, and the conversion includes: the result of the division operation N/D to be used in the particular mode for processing the current video block is approximated with one or more operations, N and D representing the numerator and denominator, respectively, in the division operation, and each of the one or more operations is different from the division operation, instead of the division operation.

Description

Scaling method in video encoding and decoding
Cross Reference to Related Applications
Under applicable patent laws and/or in accordance with rules of the paris convention, the present application is directed to claiming in time the priority and equity of international patent application number PCT/CN2019/086789 filed on 14 th 5 th 2019 and international patent application number PCT/CN2019/091910 filed on 19 th 6 th 2019. The entire disclosure of the above-mentioned patent application is incorporated herein by reference as part of the disclosure of the present application.
Technical Field
This patent document relates to video encoding and decoding techniques, devices, and systems.
Background
Despite advances in video compression, digital television frequent occupies the largest bandwidth usage on the internet and other digital communication networks. As the number of interconnected user devices capable of receiving and displaying video increases, the bandwidth requirements for digital video usage are expected to continue to increase.
Disclosure of Invention
To digital video codec devices, systems and methods, and more particularly to scaling and division operations in video codec. The described methods may be applied to existing video codec standards (e.g., high Efficiency Video Codec (HEVC)) and future video codec standards or video codecs.
In one representative aspect, a method for video processing is disclosed, comprising: performing a conversion between a current video block of the video and a codec representation (coded representation) of the video, wherein the conversion comprises: the result of the division operation N/D to be used in the particular mode for processing the current video block is approximated with one or more operations, N and D representing the numerator and denominator, respectively, in the division operation, wherein each of the one or more operations is different from the division operation.
In another representative aspect, a method for video processing is disclosed that includes: performing a conversion between a current video block of the video and a codec representation of the video, wherein the conversion comprises: the result of the division operation N/D to be used in the particular mode for processing the current video block is approximated with a division operation associated with a Motion Vector (MV) scaling scheme or is derived from a lookup table associated with a MV scaling scheme to replace the division operation N/D.
In yet another representative aspect, the above-described method is embodied in the form of processor-executable code and stored in a computer-readable program medium.
In yet another representative aspect, an apparatus configured or operable to perform the above-described method is disclosed. The apparatus may include a processor programmed to implement the method.
In yet another representative aspect, a video decoder device may implement a method as described herein.
The above and other aspects and features of the disclosed technology are described in more detail in the accompanying drawings, description and claims.
Drawings
Fig. 1 shows a flow chart of an example of a decoding flow with shaping.
Fig. 2 shows an example of sample locations for deriving parameters in a cross-component linear model (CCLM) prediction mode.
Fig. 3 shows an example of neighboring samples for deriving Illumination Compensation (IC) parameters.
Fig. 4 shows a flow chart of an example method for video processing.
Fig. 5 shows a flow chart of another example method for video processing.
Fig. 6 is a block diagram of an example of a hardware platform for implementing the visual media decoding or visual media encoding techniques described in this document.
Detailed Description
Embodiments of the disclosed technology may be applied to existing video codec standards (e.g., HEVC, h.265) and future standards to improve compression performance. Chapter titles are used in this document to enhance the readability of the description and in no way limit the discussion or embodiments (and/or implementations) to only the corresponding chapters.
2 Video codec introduction
Video codec methods and techniques are ubiquitous in modern technology due to the increasing demand for higher resolution video. Video codecs often include electronic circuitry or software that compresses or decompresses digital video and are continually improved to provide higher coding efficiency. The video codec converts uncompressed video into a compressed format and vice versa. Video quality, the amount of data used to represent video (determined by the bit rate), the complexity of the encoding and decoding algorithms, the sensitivity to data loss and errors, the ease of editing, random access and end-to-end delay (latency) have complex relationships. The compression format typically conforms to standard video compression specifications, such as the High Efficiency Video Codec (HEVC) standard (also known as h.265 or MPEG-H part 2), a generic video codec standard to be finalized, or other current and/or future video codec standards.
Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. ITU-T specifies h.261 and h.263, ISO/IEC specifies MPEG-1 and MPEG-4 video, and these two organizations jointly specify h.262/MPEG-2 video and h.264/MPEG-4 Advanced Video Codec (AVC) and h.265/HEVC standards. Since h.262, the video codec standard is based on a hybrid video codec structure in which temporal prediction plus transform coding is utilized. To explore future video codec technologies beyond HEVC, VCEG and MPEG were combined to establish a joint video exploration team in 2015 (JVET). Since then, a number of new methods have been adopted by JVET and placed in reference software known as Joint Exploration Model (JEM). In month 4 of 2018, a joint video exploration group (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created for studying the VVC standard with the goal of reducing the bit rate by 50% compared to HEVC.
2.1 Loop shaping (ILR) in JVET-M0427
The basic idea of loop shaping (ILR) is to convert the original (in the first domain) signal (the predicted/reconstructed signal) to the second domain (the shaping domain (reshaped domain)).
The in-loop luminance shaper is implemented as a pair of look-up tables (LUTs), but only one of the two LUTs needs to be signaled, as the other can be calculated from the signaled LUT. Each LUT is a one-dimensional, 10-bit, 1024-entry mapping table (1D-LUT). One LUT is a forward LUT (fwdllut) that maps the input luminance code value Y i to the changed value Y r:Yr=FwdLUT[Yi. Another LUT is an inverse LUT (InvLUT) that maps the changed code value Y r to (/>Representing the reconstructed value of Y i).
ILR is also referred to as luminance map with chroma scaling (LMCS) in VVC.
2.1.1 PWL model
Conceptually, piecewise-linearity (PWL) is achieved by:
Let x1, x2 be the two input axis points (pivot points) and y1, y2 be the respective output axis points of one of their segments. The output value y of any input value x between x1 and x2 can be interpolated by the following equation:
y=((y2-y1)/(x2-x1))*(x-x1)+y1。
in a fixed point implementation, the equation may be rewritten as:
y=((m*x+2FP_PREC-1)>>FP_PREC)+c。
Here, m is a scalar, c is an offset, and fp_prec is a constant value specifying precision.
Note that in CE-12 software, the PWL model is used to pre-calculate the FwdLUT and InvLUT mapping tables for 1024 entries; the PWL model also allows for implementations that calculate the same mapping values in real time without pre-calculating the LUT.
2.1.2 Test of CE12-2
2.1.2.1 Brightness shaping
Test 2 of loop luminance shaping (i.e., CE12-2 in the proposal) provides a lower complexity pipeline (pipeline) that also eliminates the decoding latency of block-wise intra prediction in inter-stripe reconstruction. For both inter and intra slices, intra prediction is performed in the shaping domain.
Regardless of the slice type, intra prediction is always performed in the shaping domain. With such an arrangement, intra prediction may begin immediately after the previous TU reconstruction is completed. This arrangement may also provide a unified procedure for intra modes instead of stripe-based. Fig. 1 shows a block diagram of a pattern-based CE12-2 decoding process.
CE12-2 also tested a 16-segment piecewise linear (PWL) model for luminance and chrominance residual scaling, instead of testing a 32-segment PWL model for CE 12-1.
Inter-band reconstruction with loop luminance shaper in CE12-2 (lighter shaded blocks represent signal in the shaping domain: luminance residual, predicted intra-luminance, and reconstructed inter-luminance).
2.1.2.2 Luminance-based chroma residual scaling
Luminance-based chroma residual scaling is a multiplication process implemented with fixed-point integer operations. The chroma residual scaling compensates for the interaction of the luma signal with the chroma signal. Chroma residual scaling is applied to the TU level. More specifically, the average value of the corresponding luminance prediction block is utilized.
The average is used to identify the index in the PWL model. The index identifies a scaling factor CSCALEINV. The chrominance residual is multiplied by this number.
Note that the chroma scaling factor is calculated from the forward mapped predicted luminance values rather than from the reconstructed luminance values.
2.1.2.3 Use of ILR
On the encoder side, each image (or tile) group is first converted to a shaping domain. And all codec procedures are performed in the shaping domain. For intra prediction, neighboring blocks are in the shaping domain; for inter prediction, the reference block (generated from the original domain of the decoded image buffer) is first converted into the shaping domain. The residual is then generated and encoded into a bitstream.
After the entire image (or slice group) has been encoded/decoded, the samples in the shaping domain are converted to the original domain, and then deblocking and other filters are applied.
Forward shaping of the predicted signal is prohibited for the following cases:
The current block is intra coded.
The current block is encoded as CPR (current picture reference, also called intra block copy, IBC).
The current block is encoded as a combined intra mode (CIIP), and forward shaping is disabled for the intra-predicted block.
2.1.2.4 Grammar and semantics in VVC working draft 5
7.3.2.3 Sequence parameter set RBSP syntax
7.3.2.5 Adaptive parameter set grammar
7.3.5 Striped header syntax
7.3.5.1 General stripe header syntax
7.3.5.4 Luma map with chroma scaling data syntax
LMCS APS: aps_params_type is equal to the APS of LMCS _aps.
The sps lmcs enabled flag equal to 1 specifies that luma map with chroma scaling is used in the CVS. The sps lmcs enabled flag being equal to 0 specifies that no luma map with chroma scaling is used in the CVS.
7.4.3.5 Adaptive parameter set semantics
The adaptation_parameter_set_id provides an identifier for the APS for reference by other syntax elements.
Note that-APS may be shared across images, and may be different within different slices of an image.
The aps_parameters_type specifies the type of APS parameters carried in the APS, as shown in table 7-2.
TABLE 7-2-APS parameter type code and type of APS parameter
aps_params_type Names of aps_params_type Types of APS parameters
0 ALF_APS ALF parameters
1 LMCS_APS LMCS parameters
2.7 Reservation Reservation
Slice_ lmcs _enabled_flag equal to 1 specifies that luma mapping with chroma scaling is enabled for the current slice. slice_ lmcs _enabled_flag equal to 0 specifies that luma mapping with chroma scaling is not enabled for the current slice. When the slice_ lmcs _enabled_flag does not exist, it is inferred to be equal to 0.
Slice_ lmcs _aps_id specifies the adaptation_parameter_set_id of LMCS APS to which the slice refers. The temporalld of LMCS APS NAL unit having an adaptation_parameter_set_id equal to slice_ lmcs _aps_id should be less than or equal to the temporalld of the encoded slice NAL unit.
When two or more slices of the same image refer to a plurality LMCS APS having the same adaptation_parameter_set_id value, a plurality LMCSAPS having the same adaptation_parameter_set_id value should have the same content.
7.4.6.4 Luma map with chroma scaling data semantics
Lmcs min bin idx specifies the minimum bin (binary bit) index used in the luma map and chroma scale construction process. The value of lmcs min bin idx should be in the range of 0 to 15 (including 0 and 15).
Lmcs _delta_max_bin_idx specifies a delta value between 15 and the maximum bin index LmcsMaxBinIdx used in the luma map and chroma scaling construction process. The value lmcs _delta_max_bin_idx should be in the range of 0 to 15 (including 0 and 15). LmcsMaxBinIdx is set to a value of 15-lmcs _delta_max_bin_idx. LmcsMaxBinIdx should have a value greater than or equal to lmcs _min_bin_idx.
Lmcs _delta_cw_ prec _minus1 plus 1 specifies the number of bits used to represent syntax lmcs _delta_abs_cw [ i ]. The value of lmcs _delta_cw_ prec _minus1 should be in the range of 0 to BitDepthY-2 (including 0 and BitDepthY-2).
Lmcs _delta_abs_cw [ i ] specifies the absolute delta codeword value for the ith bin.
Lmcs _delta_sign_cw_flag [ i ] specifies the sign of variable LMCSDELTACW [ i ] as follows:
-LMCSDELTACW [ i ] is positive if lmcs _delta_sign_cw_flag [ i ] is equal to 0.
-Otherwise (lmcs _delta_sign_cw_flag [ i ] is not equal to 0), LMCSDELTACW [ i ] is negative.
When lmcs _delta_sign_cw_flag [ i ] is not present, it is inferred to be equal to 0.
Variable OrgCW is derived based on:
OrgCW=(1<<BitDepthY)/16 (7-77)
The variable LMCSDELTACW [ i ], i= lmcs _min_bin_idx … LmcsMaxBinIdx, is derived based on:
lmcsDeltaCW[i]=(1-2*lmcs_delta_sign_cw_flag[i])*lmcs_delta_abs_cw[i]
(7-78)
The variable lmcsCW [ i ] is derived based on:
-lmcscw [ i ] is set equal to 0 for i=0 … lmcs _min_bin_idx-1.
For i= lmcs _min_bin_idx … LmcsMaxBinIdx, the following equation applies:
lmcsCW[i]=OrgCW+lmcsDeltaCW[i] (7-79)
The value of lmcsCW [ i ] should be in the range of (OrgCW > > 3) to (OrgCW < < 3-1) (inclusive of (OrgCW > > 3) to (OrgCW < < 3-1)).
For i= LmcsMaxBinIdx +1 …, lmcscw [ i ] is set equal to 0.
The following condition is met is the requirement of bitstream compliance (conformance):
The variable InputPivot [ i ], i=0 …, is derived based on:
InputPivot[i]=i*OrgCW (7-81)
variables LmcsPivot [ i ], i=0 …, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0 … 15, based on the following derivation:
The variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on:
Variables CLIPRANGE, LMCSMINVAL and LmcsMaxVal are derived based on:
ClipRange=((lmcs_min_bin_idx>0)&&(LmcsMaxBinIdx<15) (7-84)
LmcsMinVal=16<<(BitDepthY-8) (7-85)
LmcsMaxVal=235<<(BitDepthY-8) (7-86)
Note that only when slice_ lmcs _model_present_flag is equal to 1, the arrays InputPivot [ i ] and LmcsPivot [ i ], scaleCoeff [ i ] and InvScaleCoeff [ i ], scaleCoeff [ i ], CLIPRANGE, LMCSMINVAL, and LmcsMaxVal are updated. Thus, for example, lmcs models may be sent with an IRAP image, but lmcs is disabled for that IRAP image.
2.1.3 JVET-N0220
JVET-N0220 proposes four aspects:
1. a reduction in pipeline delay for calculating an average luminance of the chrominance residual scaling;
2. A reduction in the size of the local buffer required to store the chroma residual samples;
3. unification of the fixed point precision used in luminance mapping and chrominance residual scaling;
4. unification of the method of computing chroma residual scaling and the method of computing luma inverse scaling, and removal of pre-computed LUTs.
Items 2-4 have been adopted by VTM-5.
According to the employed parts, the working draft is revised as follows.
7.4.5.4 Luma map with chroma scaling data semantics
Lmcs _delta_sign_cw_flag [ i ] specifies the sign of variable LMCSDELTACW [ i ] as follows:
-LMCSDELTACW [ i ] is positive if lmcs _delta_sign_cw_flag [ i ] is equal to 0.
-Otherwise (lmcs _delta_sign_cw_flag [ i ] is not equal to 0), LMCSDELTACW [ i ] is negative.
When lmcs _delta_sign_cw_flag [ i ] is not present, it is inferred to be equal to 0.
Variable OrgCW is derived based on:
OrgCW=(1<<BitDepthy)/16 (7-70)
The variable LMCSDELTACW [ i ], i= lmcs _min_bin_idx … LmcsMaxBinIdx, is derived based on:
lmcsDeltaCW[i]=(1-2*lmcs_delta_sign_cw_flag[i])*lmcs_delta_abs_cw[i]
(7-71)
The variable lmcsCW [ i ] is derived based on:
-lmcscw [ i ] is set equal to 0 for i=0 … lmcs _min_bin_idx1.
For i= lmcs _min_bin_idx … LmcsMaxBinIdx, the following equation applies:
lmcsCW[i]=OrgCW+lmcsDeltaCW[i] (7-72)
The value of lmcsCW [ i ] should be in the range of (OrgCW > > 3) to (OrgCw < < 3-1) (inclusive of (OrgCW > > 3) and (OrgCw < < 3-1)).
For i= LmcsMaxBinIdx +1 …, lmcscw [ i ] is set equal to 0.
The following conditions are met as a requirement for bitstream compliance:
variables InputPivot [ i ], i=0..16, are derived based on the following formula:
InputPivot[i]=i*OrgCW (7-74)
Variables LmcsPivot [ i ], i=0..16, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0..15, derived based on the following formula:
LmcsPivot[0]=0;
for(i=0;i<=15;i++){
LmcsPivot[i+1]=LmcsPivot[i]+lmcsCW[i]
ScaleCoeff[i]=(lmcsCW[i]*(1<<11)+(1<<(Log2(OrgCW)-1)))>>
(Log2(OrgCW))
(7-75)
if(lmcsCW[i]==0)
InvScaleCoeff[i]=0
else
InvScaleCoeff[i]=OrgCW*(1<<11)/lmcsCW[i]
}
the variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on the following formula:
if(lmcsCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else{
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
Variables CLIPRANGE, LMCSMINVAL and LmcsMaxVal are derived based on the following formula:
ClipRange=((lmcs_min_bin_idx>0)&&(LmcsMaxBinIdx<15) (7-77)
LmcsMinVal=16<<(BitDepthY-8) (7-78)
LmcsMaxVal=235<<(BitDepthY-8)
8.5.7.6 weighted sample prediction procedure for combined merging and intra prediction
idxY=predSamplesInter[x][y]>>Log2(OrgCW)
predSamplesInter[x][y]=Clip1Y(LmcsPivot[idxY]+ (8-888)
(ScaleCoeff[idxY]*(predSamplesInter[x][y]-InputPivot[idxY])+(1<<10))>>11)
8.7.4.2 Image reconstruction using a mapping process of luminance samples
idxY=predSamples[i][j]>>Log2(OrgCW)
PredMapSamples[i][j]=LmcsPivot[idxY]
+(ScaleCoeff[idxY]*(predSamples[i][j]-InputPivot[idxY])+(1<<10))>>11 (8-1058)
i=0...nCurrSw-1,j=0…nCurrSh–1
Image inverse mapping process of 8.7.4.3.1 brightness sampling points
Variable INVSAMPLE is derived based on the following formula:
invSample=InputPivot[idxYInv]+(InvScaleCoeff[idxYInv]*
(8-1060)
(lumaSample[xP][yP]-LmcsPivot[idxYInv])+(1<<10))>>11
8.7.4.4 image reconstruction using luma-based chroma residual scaling procedure of chroma samples
Variables idxYInv are derived by calling the identity of the piecewise function index (with invAvgLuma as input and idxYInv as output) as specified in clause 8.7.5.3.2.
1. Variable varScale is derived based on the following formula:
varScale=ChromaScaleCoeff[idxYInv] (8-1065)
-RECSAMPLES is derived based on the following formula:
if tu_cbf_cidx [ xCurr ] [ yCurr ] is equal to 1, then the following equation applies:
resSamples[i][j]=Clip3(-(1<<BitDepthC),1<<BitDepthC-1,
resSamples[i][j])
recSamples[xCurr+i][yCurr+j]=ClipCidx1(predSamples[i][j]+
(8-1066)
Sign(resSamples[i][j])*((Abs(resSamples[i][j])*varScale+(1<<10))>>11))
(8-1067)
otherwise (tu_cbf_cidx [ xCurr ] [ yCurr ] equals 0), the following equation applies:
recSamples[xCurr+i][yCurr+j]=ClipCidx1(predSamples[i][j])
(8-1067)
2.2 Adaptive Parameter Set (APS)
VVC employs an Adaptive Parameter Set (APS) to carry ALF parameters. The slice group header contains an aps_id that exists conditionally when ALF is enabled. APS contains the aps_id and ALF parameters. APS (from JVET-M0132) are assigned new NUT (NAL unit types, such as AVC and HEVC). For the common test condition in (upcoming) VTM-4.0, it is recommended to use only aps_id=0 and send APS with each image. Currently, APS ID values will range from 0 to 31, and APS may be shared across images (and may be different in different slices within the same image). When present, the ID value should be encoded with a fixed length. Different content within the same image cannot reuse the ID value.
7.3.5.3 Adaptive Loop Filter data syntax
/>
7.3.7.2 Codec tree unit syntax
The slice_alf_enabled_flag equal to 1 specifies that the adaptive loop filter is enabled and can be applied to Y, cb or Cr color components in the slice. A slice_alf_enabled_flag equal to 0 specifies that the adaptive loop filter is disabled for all color components in the slice.
Num_alf_aps_ids_minus1 plus 1 specifies the number of ALFs APS referenced by the stripe. The value of num_alf_aps_ids_minus1 should be in the range of 0 to 7 (inclusive of 0 and 7).
Slice_alf_aps_id [ i ] specifies the adaptation_parameter_set_id of the ith ALF APS referenced by the slice. The TemporalId for ALF APS NAL units of adaptation_parameter_set_id equal to slice_alf_aps_id [ i ] should be less than or equal to the TemporalId of the encoded slice NAL unit.
When two or more slices of the same image refer to a plurality of ALF APs having the same adaption _parameter_set_id value, a plurality LMCS APS having the same adaptation_parameter_set_id value should have the same contents.
Alf_ctb_flag [ cIdx ] [ xCtb > > Log2CtbSize ] [ yCtb > > Log2CtbSize ] equals 1 specifies that the adaptive loop filter is applied to the coding tree block of the color component indicated by cIdx of the coding tree unit at luma position (xCtb, yCtb). alf_ctb_flag [ cIdx ] [ xCtb > > Log2CtbSize ] [ yCtb > > Log2CtbSize ] equal to 0 specifies that the adaptive loop filter is not applied to the coding tree block of the color component indicated by cIdx of the coding tree unit at the luma position (xCtb, yCtb).
When alf_ctb_flag [ cIdx ] [ xCtb > > Log2CtbSize ] [ yCtb > > Log2CtbSize ] is not present, it is inferred to be equal to 0.
2.3 Cross-component Linear model (CCLM) intra prediction in VVC
In order to reduce cross-component redundancy, a cross-component linear model (CCLM) prediction mode is used in VTM4 for which chroma samples are predicted based on reconstructed luma samples of the same CU by using the following linear model:
predC(i,j)=α·recL′(i,j)+β (3-1)
Here pred C (i, j) represents the predicted chroma samples in the CU, and rec L (i, j) represents the downsampled reconstructed luma samples of the same CU. The linear model parameters α and β are derived from the relationship between luminance and chrominance values of two samples, the luminance samples having the smallest and largest sample values, and their corresponding chrominance samples, within the downsampled set of adjacent luminance samples. The linear model parameters α and β are obtained according to the following equation.
β=Yb-á·Xb (3-3)
Here, Y a and X a represent a luminance value and a chromaticity value of a luminance sample having a maximum luminance sample value. And X b and Y b represent a luminance value and a chrominance value, respectively, of a luminance sample having the smallest luminance sample. Fig. 2 shows an example of the locations of left and upper samples and the samples of the current block involved in the CCLM mode.
The division operation for calculating the parameter α is implemented using a look-up table. To reduce the memory required to store the table, the diff value (the difference between the maximum and minimum values) and the parameter α are represented by an exponential representation. For example, diff is approximated by a 4-bit significant portion and an exponent. Thus, for 16 values of the significand (significand), the 1/diff table is reduced to 16 elements as follows:
DivTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}。
this would be advantageous in reducing the complexity of the computation and the amount of memory required to store the required tables.
In addition to the upper and left templates being used together to calculate the linear model coefficients, they can also be used alternately in the other 2 LM modes (called lm_a and lm_l modes).
In lm_a mode, linear model coefficients are calculated using only the upper template. To get more spots, the upper template is expanded to (w+h). In lm_l mode, only the left template is used to calculate the linear model coefficients. To get more samples, the left template is expanded to (H+W).
For non-square blocks, the upper template is extended to W+W and the left template is extended to H+H.
To match chroma samples of a 4:2:0 video sequence, two types of downsampling filters are applied to luma samples to achieve 2 in both the horizontal and vertical directions: downsampling ratio of 1. The selection of the downsampling filter is specified by the SPS level flag. The two downsampling filters correspond to the "type-0" and "type-2" content, respectively, as shown below.
Note that when the upper reference line is located at the CTU boundary, only one luminance line (a common line buffer in intra prediction) is used to obtain the downsampled luminance samples.
The parameter calculation is performed as part of the decoding process and not just as an encoder search operation. Therefore, syntax is not used to convey the alpha and beta values to the decoder.
For intra chroma mode coding, intra chroma mode coding allows a total of 8 intra modes. These modes include five traditional intra modes and three cross-component linear model modes (CCLM, lm_a, and lm_l). The chroma mode signaling and derivation procedure is shown in the following table. Chroma mode coding is directly dependent on the intra prediction mode of the corresponding luma block. Since the separate block partition (partition) structure of luminance and chrominance components is enabled in I slices, one chrominance block may correspond to a plurality of luminance blocks. Thus, for the chroma DM mode, the intra prediction mode of the corresponding luma block covering the center position of the current chroma block is directly inherited (inheret).
The decoding process specified in JVET-N1001-v 2 is shown below.
8.4.4.2.8 Specification of INTRA prediction modes of intra_lt_cclm, intra_l_cclm and intra_t_cclm
8. The variables a, b and k are derived based on the following formula:
if numSampL is equal to 0 and numSampT is equal to 0, then the following equation applies:
k=0 (8-208)
a=0 (8-209)
b=1<<(BitDepthC-1) (8-210)
otherwise, the following equation applies:
diff=maxY-minY (8-211)
if diff is not equal to 0, the following equation applies:
diffC=maxC–minC (8-212)
x=Floor(Log2(diff)) (8-213)
normDiff=((diff<<4)>>x)&15 (8-214)
x+=(normDiff!=0)?1:0 (8-215)
y=Floor(Log2(Abs(diffC)))+1 (8-216)
a=(diffC*(divSigTable[normDiff]|8)+2y-1)>>y (8-217)
k=((3+x-y)<1)?1:3+x-y (8-218)
a=((3+x-y)<1)?Sign(a)*15:a (8-219)
b=minC-((a*minY)>>k) (8-220)
wherein divSigTable [ ] is specified as follows:
divSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}(8-221)
Otherwise (diff equals 0), the following equation applies:
k=0 (8-222)
a=0 (8-223)
b=minC (8-224)
9. Predicted samples predSamples [ x ] [ y ], x=0.. nTbW-1, y=0.. nTbH-1 were derived based on the following formula:
predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b)(8-225)
2.4 MV scaling in VVC
MV scaling is applied to Temporal Motion Vector Prediction (TMVP) and AMVP.
In JVET-N1001, MV scaling is described as follows:
8.5.2.12 derivation of collocated motion vectors
Otherwise, mvLXCol derives as a scaled version of the motion vector mvCol based on the following formula:
tx=(16384+(Abs(td)>>1))/td (8-421)
distScaleFactor=Clip3(-4096,4095,(tb*tx+32)>>6) (8-422)
mvLXCol=Clip3(-131072,131071,Sign(distScaleFactor*mvCol)*((Abs(distScaleFactor*mvCol)+127)>>8))
(8-423)
wherein td and tb are derived based on the following formula:
td=Clip3(-128,127,colPocDiff) (8-424)
td=Clip3(-128,127,currPocDiff) (8-425)
The division operator for deriving tx may be implemented by a look-up table. The size of the lookup table mv_scale_t [ poc_diff_idx ] may be 128, and mv_scale_t [ poc_diff_idx ] = (16384+ (Abs (poc_diff_idx) > > 1))/poc_diff_idx, poc_diff_idx ranges from 1 to 128.
2.5 Local illumination Compensation
Local Illumination Compensation (LIC) uses scaling factor a and offset b based on a linear model of illumination variation. And adaptively enables or disables Local Illumination Compensation (LIC) for each inter-mode Codec Unit (CU).
When LIC is applied to a CU, a least squares error method is used to derive parameters a and b by using neighboring samples of the current CU and their corresponding reference samples (also referred to as reference neighboring samples). More specifically, as shown in FIG. 3, neighboring samples of the CU that are sub-sampled (2:1 sub-sampled) and corresponding samples in the reference image (identified by the motion information of the current CU or sub-CU) are used. IC parameters are derived and applied separately for each prediction direction.
When a CU is encoded in a merge mode, the LIC flag is copied from neighboring blocks in a similar manner to the motion information copy in the merge mode; otherwise, the LIC flag is signaled to the CU to indicate whether LIC is applicable.
When LIC is enabled for images, an additional CD level RD is needed to determine if LIC is suitable for CU. When LIC is enabled for CU, for integer-pixel (pel) motion search and fractional-pixel motion search, sum of absolute differences after removing the mean (MR-SAD) and sum of absolute Hadamard transform differences after removing the mean (MR-SATD) are used, respectively, instead of SAD and SATD.
In order to reduce the coding complexity, the following coding scheme is applied in JEM.
When there is no significant illumination change between the current image and its reference image, the LIC is disabled for the entire image. To identify this, a histogram of the current image and each reference image of the current image are calculated at the codec. Disabling the LIC for the current image if the histogram difference between the current image and each reference image of the current image is less than a given threshold; otherwise, LIC is enabled for the current image.
3 Disadvantages of the prior art implementations
Current designs for IRL (also known as LMCS) and CCLM may have the following problems:
(1) There is a division operation in the process LMCS, which is undesirable in hardware design.
(2) In CCLM mode, the chroma samples are located in the original domain, but the luma samples are located in the reshaped domain of LMCS, which may be inefficient.
(3) The signaling method of the LMCS model may be inefficient.
Example method of lossless coding for 4-visual media coding
Embodiments of the presently disclosed technology overcome the shortcomings of existing implementations, thereby providing video codecs with higher codec efficiency. Methods for scaling and division operations in video codecs based on the disclosed techniques may enhance existing and future video codec standards and are set forth in examples described below for various implementations. The examples of the disclosed technology provided below illustrate general concepts and are not intended to be construed as limiting. In the examples, various features described in these examples may be combined unless explicitly indicated to the contrary.
In the following discussion SatShift (x, n) is defined as
In one example, offset0 and/or offset1 is set to (1 < < n) > >1 or (1 < < (n-1)). In another example, offset0 and/or offset1 is set to 0.
In another example, offset0 = offset1 = ((1 < < n) > > 1) -1or ((1 < < (n-1))) -1.
Clip3 (min, max, x) is defined as
Floor (x) is defined as the largest integer less than or equal to x.
Ceil (x) is the smallest integer greater than or equal to x.
Log2 (x) is defined as the base 2 logarithm of x.
Division substitution in LMCS
1. It is proposed that division operations in video/image encoding/decoding processes, such as InvScaleCoeff [ i ] = OrgCW (1 < < 11)/lmcsCW [ i ]) in LMCS methods, may be replaced or approximated by an operation or a process of operations.
A. In one example, the operation or the process of operations may include operations that index entries of a lookup table.
I. in an alternative example, it may include an operation to query multiple entries of one or more tables with an index.
B. in one example, the operation or the process of operations may include an operation that is not a division operation.
I. In one example, it may include a multiplication operation.
In one example, it may include an addition operation.
In one example, it may include SatShift (x, n) operations.
In one example, it may include a Shift (x, n) operation.
V. in one example, it may include a left shift operation.
In one example, it may include an operation of Floor (x).
In one example, it may include Log2 (x) operations.
In one example, it may include an operation of "logical OR" (OR), (I in the C language).
In one example, it may include a logical AND operation (AND) (&inthe C language).
2. In one example, the division operation in item 1 may be replaced or approximated using a table denoted as T [ idx ].
A. In one example, the table size may be equal to 2 M, and idx may be in the range of [0,2 M -1], including 0 and 2 M -1.
B. In one example, T [ idx ] = Rounding (2 P/(idx+offset0)) -offset1, where offset0 and offset1 are integers. P is an integer. For example, p=8 or p=9 or p=10 or p=11 or p=12 or p=13 or p=14.
I. In one example Rounding (x/y) =floor ((x+y/2)/y);
in one example Rounding (x/y) is set equal to the integer Q such that for any integer Q 'in the set, |q-x| < = |q' |y-x|. For example, the set may be { Floor (x/y) -1, floor (x/y) +1}.
In one example, offset0 may be equal to 2 W, e.g., w=0 or w=1 or w=4, or w=5, or w=6, or w=7.
1) Alternatively, offset0 may be 0.
In one example, offset1 may be equal to 2 Z, e.g., z=3, or z=4, or z=5, or z=6, or z=7.
1) Alternatively, offset1 may be 0.
C. in one example, M defined in item 2.A may be equal to W defined in item 2. B.
D. In one example, Z may be equal to P-W-1, where Z, P and W are defined in item 2. B.
E. In one example, T [ idx ] should be less than 2 Z.
I. In one example, if T [ idx ] is equal to 2 Z, it may be set equal to 0.
For example, T [ idx ] = (Rounding (2 P/(idx+offset 0)) -offset 1)% offset1.
3. Some examples of tables are shown below.
a.W=M=7,P=15,
T={0,126,124,122,120,118,117,115,113,111,109,108,106,104,103,101,100,98,96,95,93,92,90,89,88,86,85,83,82,81,79,78,77,76,74,73,72,71,69,68,67,66,65,64,63,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,44,43,42,41,40,39,38,37,37,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,21,20,20,19,18,18,17,16,16,15,14,14,13,13,12,11,11,10,10,9,9,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1}.
b.W=M=7,P=14,
T={0,63,62,61,60,59,58,57,56,56,55,54,53,52,51,51,50,49,48,47,47,46,45,45,44,43,42,42,41,40,40,39,38,38,37,37,36,35,35,34,34,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,20,19,19,18,18,18,17,17,16,16,16,15,15,14,14,14,13,13,13,12,12,12,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,6,6,6,5,5,5,5,4,4,4,3,3,3,3,2,2,2,2,1,1,1,1,0}.
c.W=M=6,P=13,
T={0,0,31,31,30,30,29,29,28,28,27,27,27,26,26,25,25,24,24,24,23,23,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,16,15,15,15,15,14,14,14,14,13,13,13,13,12,12,12,12,11,11,11,11,10,10,10,10,10,9,9,9,9,9,8,8,8,8,8,7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,0,0,0}.
d.W=M=6,P=14,
T={0,124,120,117,113,109,106,103,100,96,93,90,88,85,82,79,77,74,72,69,67,65,63,60,58,56,54,52,50,48,46,44,43,41,39,37,36,34,33,31,30,28,27,25,24,22,21,20,18,17,16,14,13,12,11,10,9,7,6,5,4,3,2,1}.
e.W=M=6,P=13,
T={0,62,60,58,56,55,53,51,50,48,47,45,44,42,41,40,38,37,36,35,34,32,31,30,29,28,27,26,25,24,23,22,21,20,20,19,18,17,16,16,15,14,13,13,12,11,10,10,9,8,8,7,7,6,5,5,4,4,3,3,2,2,1,1}.
f.W=M=6,P=12,
T={0,31,30,29,28,27,27,26,25,24,23,23,22,21,21,20,19,19,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,9,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2,2,1,1,1,1,0}.
g.W=M=6,P=11,
T={0,0,15,15,14,14,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}.
h.W=M=6,P=10,
T={0,0,0,7,7,7,7,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0}.
i.W=M=5,P=13,
T={0,120,113,106,100,93,88,82,77,72,67,63,58,54,50,46,43,39,36,33,30,27,24,21,18,16,13,11,9,6,4,2}。
j.W=M=5,P=12,
T={0,60,56,53,50,47,44,41,38,36,34,31,29,27,25,23,21,20,18,16,15,13,12,10,9,8,7,5,4,3,2,1}。
k.W=M=5,P=11,
T={0,30,28,27,25,23,22,21,19,18,17,16,15,14,13,12,11,10,9,8,7,7,6,5,5,4,3,3,2,2,1,1}。
l.W=M=5,P=10,
T={0,15,14,13,12,12,11,10,10,9,8,8,7,7,6,6,5,5,4,4,4,3,3,3,2,2,2,1,1,1,1,0}。
m.W=M=5,P=9,
T={0,0,7,7,6,6,5,5,5,4,4,4,4,3,3,3,3,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}。
n.W=M=4,P=10,
T={0,28,25,22,19,17,15,13,11,9,7,6,5,3,2,1}。
o.W=M=4,P=9,
T={0,14,12,11,10,8,7,6,5,4,4,3,2,2,1,1}。
p.offset0=0,M=8,P=14
T [ k ] = (2 14 +k/2)/k, k being from 1 to 256;
q.offset0=0,M=8,P=11
t [ k ] = (2 11 +k/2)/k, k being from 1 to 256;
r.offset0=0,M=9,P=14
T [ k ] = (2 14 +k/2)/k, k being from 1 to 512;
s.offset0=0,M=9,P=11
T [ k ] = (2 11 +k/2)/k, k being from 1 to 512;
t.offset0=0,M=10,P=14
t [ k ] = (2 14 +k/2)/k, k is from 1 to 1024;
u.offset0=0,M=10,P=11
t [ k ] = (2 11 +k/2)/k, k is from 1 to 1024;
v.T={0,248,240,233,226,219,212,206,199,193,187,181,175,170,164,159,154,149,144,139,134,130,125,121,116,112,108,104,100,96,93,89,85,82,78,75,72,68,65,62,59,56,53,50,47,45,42,39,37,34,31,29,26,24,22,19,17,15,13,10,8,6,4,2}
4. When Tidx is used in the course of multiple operations to replace or approximate the division operation in clause 2, idx may be derived in the course of multiple operations.
A. In one example, the process of the plurality of operations may include addition, log2 (x), floor (x), left Shift, shift (x, n) or SatShift (x, n), "logical or" and "logical and".
B. in one example, the course of the multiple operations may depend on M or W as defined in item 2.
C. In one example, idx may be set equal to Shift (D < < M, floor (Log 2 (D)))/(2 M -1), where D is a denominator such as lmcsCW [ i ] in LMCS.
Idx can be further modified by adding the offset idx= ((Shift (D < < M, floor (Log 2 (D)))))/((2 M -1)) + Off).
1) The modified idx may be clipped to a range of [0,2 M -1], including 0 and 2 M -1.
2) For example, idx=min (2 M -1, idx0+off), where idx0= (Shift (D < < M, floor (Log 2 (D)))/(2 M -1)) and off= (Shift (D < < < (m+1), floor (Log 2 (D))))) &1.
D. In one example, the variable M in item 4.C may be replaced with W as defined in item 2.
E. alternatively, in addition, clipping may be further applied to the result value.
5. It is proposed to modify T idx to an intermediate value V that will be used during a number of operations to replace or approximate the division operation in clause 2.
A. in one example, v=t [ idx ].
B. In one example, v=t [ idx ] < < m, where m is an integer.
C. in one example, v=t [ idx ] ×m, where m is an integer.
D. in one example, v=t [ idx ] +m, where m is an integer.
E. In one example, v=shift (T [ idx ], n) or v= SatShift (T [ idx ], n), where m is an integer such as 1 or 2.
1) In one example, the value n may depend on the value of D defined in item 4.
A) For example, if D < = 2 M, n=0, where M is defined in item 2.
B) For example, if D >2 M, n=ceil (Log 2 (D)) -M.
C) For example, if D >2 M, n=floor (Log 2 (D)) -m+1.
F. In one example, the modification method may depend on the value of T [ idx ] and/or the value of idx.
I. In one example, the modification method may depend on whether the value of T [ idx ] is equal to a fixed value such as 0.
In one example, the modification method may depend on whether the value of idx is less than the value TT, e.g., tt=1 or 2 M-1. In another example, the modification method may depend on whether the value of idx is equal to a fixed value such as 0.
In one example, the modification method may depend on whether the value of T [ idx ] is equal to 0 and whether the value of idx is less than the value TT, e.g., tt=1 or 2 M-1. In another example, the modification method may depend on whether the value of T [ idx ] is equal to a fixed value such as 0, and whether the value of idx is equal to a fixed value such as 0.
G. In one example, v=t [ idx ] |2 Z, where Z is defined in item 2.
I. Alternatively, if the value of T [ idx ] is equal to 0 and the value of idx is less than the threshold TT, e.g., tt=1 or 2 M -1, then v=2 Z+1; otherwise, v=t [ idx ] |2 Z.
Alternatively, if the value of T [ idx ] is equal to 0 and the value of idx is equal to 0, then v=2 Z+1; otherwise, v=t [ idx ] |2 Z.
H. In one example, v=t [ idx ] +2 Z, where Z is defined in item 2.
I. Alternatively, if the value of T [ idx ] is equal to 0 and the value of idx is less than the threshold TT, e.g., tt=1 or 2 M -1, then v=2 Z+1; otherwise, v=t [ idx ] +2 Z.
Alternatively, if the value of idx is equal to 0, v=2 Z+1; otherwise, v=t [ idx ] +2 Z.
6. It is proposed that a multiplication of a numerator to be replaced or approximated in a division operation (such as OrgC in the LMCS method, denoted as N) with the intermediate value V defined in item 5 may be used as a replacement or approximation of the division result. In the manner of formulation, r=n×v may be used as an alternative or approximation to the division result.
A. alternatively, the modified R, denoted R', may be used as an alternative or approximation to the division result.
I. in one example, R' =r < < m, where m is an integer such as 11.
1) Alternatively, R '=shift (R, m) or R' = SatShift (R, m), where m is an integer.
2) In one example, m may depend on the value n defined in item 5.e.
A) For example, m=offset-n, where offset is an integer such as 11.
In one example, the modification method may depend on P as defined in item 2 and/or W (or M) as defined in item 2, and/or D as defined in item 4, and/or T and/or idx.
1) In one example, the modification method may depend on a fixed number S and P,
Relation between W (or M), T, idx and function f of D.
A) For example, f (P, W, D, T, idx) =p-W-1+log2 (D), or f (P, M, D, T, idx) =p-M-1+log2 (D).
B) For example f (P, W, D, T, idx) =p-W-1+log2 (D) +off, or f (P, M, D, T, idx) =p-M-1+log2 (D) +off.
I. In one example, if the value of T [ idx ] is equal to 0 and the value of idx is less than a threshold TT, e.g., tt=1 or 2 M-1, then off is equal to 0; otherwise, off=1.
In one example, if the value of idx is equal to 0, off is equal to 0; otherwise, off=1.
C) For example f (P, W, D, T, idx) =p-w+log 2 (D), or f (P, M, D, T, idx) =p-m+log 2 (D).
D) For example f (P, W, D, T, idx) =p-w+1+log2 (D), or f (P, M, D, T, idx) =p-m+1+log2 (D).
E) For example, s=11 or 14.
F) For example, if f (P, W, D, T, idx) <=s, R' =r < < (S-f (P, W, D, T, idx)); otherwise, R' =shift (R, f (P, W, D, T, idx) -S).
G) For example f (P, M, D, T, idx) <=s, R' =r < < > (S-f (P, M, D, T, idx)); otherwise, R' =shift (R, f (P, M, D, T, idx) -S).
B. alternatively, modified N (denoted N ') may be used to derive R, as r=n' ×v.
I. In one example, N' =n < < m, where m is an integer such as 11.
1) Alternatively, N '=shift (N, m) or N' = SatShift (N, m), where m is an integer.
2) In one example, m may depend on the value n defined in item 5.e.
A) For example, m=offset-n, where offset is an integer such as 11.
In one example, the modification method may depend on P and +.2 as defined in item 2
Or W (or M) as defined in item 2, and/or D as defined in item 4, and
Or T and/or idx.
1) In one example, the modification method may depend on a fixed number S and P,
Relation between W (or M), T, idx and function f of D.
A) The function f may be defined as in item 6.a.
B) For example, s=11.
C) For example f (P, W, D) <=s, N' =n < < (S-f (P, W, D)); otherwise, N' =shift (N, f (P, W, D) -S).
D) For example f (P, M, D) <=s, N' =n < < (S-f (P, M, D)); otherwise, N' =shift (N, f (P, M, D) -S).
7. The result of the procedure of the operation or operations that proposes the replacement or approximation division operator (denoted R) may be associated with a precision value (denoted Q). When R is used to calculate variable B, B may be calculated as b=shift (g (R), Q) or b= SatShift (g (R), Q), where g (R) is any function about R.
A. In one example of the LMCS method, R may be InvScaleCoeff [ idxYInv ], and the samples reconstructed from the inverse luminance may be derived as follows:
invSample=InputPivot[idxYInv]+difference,
Wherein,
Difference=shift (g (InvScaleCoeff [ idxYInv ]), Q), and
g(InvScaleCoeff[idxYInv])=InvScaleCoeff[idxYInv]*
(lumaSample[xP][yP]-LmcsPivot[idxYInv]),
Q=11。
B. In one example of the LMCS method, R may be ChromaScaleCoeff [ idxYInv ], and the inverse chroma residual samples may be derived as follows:
invResSample[i][j]=
Sign (RESSAMPLES [ i ] [ j ]) Shift (ChromaScaleCoeff [ idxYInv ], Q)), wherein,
g(ChromaScaleCoeff[idxYInv])=Abs(resSamples[i][j])*
ChromaScaleCoeff[idxYInv],
Q=11。
C. In one example, Q may be a fixed number, such as 11 or 14.
D. In one example, Q may depend on P as defined in item 2 and/or W (or M) as defined in item 2, and/or D and/or table T as defined in item 4, and/or idx.
I. In one example, q=p-W-1+log2 (D), or q=p-M-1+log2 (D).
For example, q=p-W-1+log2 (D) +off, or q=p-M-1+log2 (D) +off.
1) In one example, if the value of T [ idx ] is equal to 0 and the value of idx is less than a threshold TT, e.g., tt=1 or 2 M-1, then off is equal to 0; otherwise, off=1.
For example, q=p-w+log 2 (D), or q=p-m+log 2 (D).
For example, q=p-w+1+log2 (D), or q=p-m+1+log2 (D).
E. In one example, Q may depend on n as defined in item 5.e.
I. For example, q=offset-n, where offset is an integer such as 11 or 14.
8. It is proposed that D or the absolute value of D is always larger than the value G (such as 8), then the table size may depend on G.
A. in one example, G may depend on the sample bit depth.
B. In one example, the table size may depend on the sample bit depth.
Unification of division substitution
9. In one example, the division operation used in MV scaling may be used in the course of multiple operations to replace or approximate the division operation in item 1.
A. in one example, D may be converted to an intermediate variable D' within the range [ minD, maxD ] (e.g., [ -128, 127 ]), where D is the denominator (e.g., lmcsCW [ i ] in item 1).
I. In one example, the conversion from D to D' may be a linear or non-linear quantization process.
In one example, D' =clip 3 (D, minD, maxD);
in one example, D' =clip 3 (D, 0, maxd);
in one example, D '= SatShift (D, n) or D' =shift (D, n), where n
Is an integer such as 1 or 2.
1) Alternatively, D '=clip 3 (Shift (D, n), minD, maxD) or D' =clip 3 (SatShift (D, n), -128, 127), where n is an integer such as 1 or 2.
2) Alternatively, D '=clip 3 (Shift (D, n), 0, maxd) or D' =clip 3 (SatShift (D, n), 0, maxd), where n is an integer such as 1 or 2.
3) In one example, the value of n may depend on the value of D.
A) For example, if D < = maxD, n=0.
B) For example, if D > maxD, then n=ceil (Log 2 (D)) -Log2 (maxD).
C) For example, if D > maxD, then n=floor (Log 2 (D)) - (Log 2 (maxD) -1).
B. In one example, the intermediate variable R, derived as r= (16384+ (Abs (D ') > 1))/D', may be used in the course of multiple operations to replace or approximate the division operation in item 1.
I. Alternatively, the table mv_scale_t may be used to derive R.
C. in one example, R in item 8.B may be associated with a precision value (denoted Q). When R is used to calculate variable B, B may be calculated as b=shift (g (R), Q) or b= SatShift (g (R), Q), where g (R) is any function about R.
I. In one example, Q may depend on n in item 8. A.
1) Alternatively, Q may be equal to Offset-n, where Offset is an integer such as 14.
D. the disclosed MV scaling method may be used for MV scaling of Temporal Motion Vector Prediction (TMVP) combining inter mode or Advanced Motion Vector Prediction (AMVP) mode.
E. The disclosed MV scaling method can be used for MV scaling of affine prediction modes.
F. the disclosed MV scaling method may be used for MV scaling based on a temporal merging mode of sub-blocks.
10. In one example, the same table may be used to replace or approximate division operations of CCLM and LMCS during multiple operations.
A. for example, the table may be any of the tables shown in item 3, such as item 3.e.
11. In one example, the same table may be used in the process to replace or approximate the division operations in MV scaling and LMCS.
A. for example, the table may be any of the tables shown in item 3, such as item 3.e.
12. In one example, a method of replacing or approximating a division operation in a CCLM may be used in the process to replace or approximate a division operation in Local Illumination Compensation (LIC).
A. Alternatively, a method of replacing or approximating the division operation in LMCS may be used in the process to replace or approximate the division operation in LIC.
B. alternatively, a method of replacing or approximating the division operation in MV scaling may be used in the process to replace or approximate the division operation in LIC.
CCLM, LIC and LMCS
13. Even though the luma block is coded with LMCS, the chroma samples are predicted from the reconstructed luma samples in the original domain.
A. In one example, for CCLM mode, adjacent (adjacent or non-adjacent) reconstructed luma samples in the shaping domain may first be converted to the original domain, and then the converted luma samples may be used to derive linear model parameters, such as a and b.
B. in one example, for the CCLM mode, collocated luma samples in the shaping domain may first be converted to the original domain, and then the converted luma samples are used with the linear model to generate the predicted chroma samples.
Signaling of LMCS model
14. An indication of the scaling factor used at LMCS (e.g., scaleCoeff [ i ] in VVC) and/or the inverse scaling factor (e.g., invScaleCoeff [ i ] in VVC) may be signaled.
A. In one example, the scaling factor may be directly encoded. Alternatively, the quantized value of the scaling factor may be signaled.
B. it may signal in a predictive manner.
C. It may be signaled in a fixed length code, a unary code, a truncated unary code, or an exponential Golomb (Golomb) code.
D. which may be signaled in video units such as VPS/SPSS/PPS/APS/image header/slice group header, etc.
15. An indication of the chroma scaling factor in LMCS, such as ChromaScaleCoeff i, may be signaled.
A. In one example, the chroma scaling factor may be encoded directly. Alternatively, the quantized value of the scaling factor may be signaled.
B. it may signal in a predictive manner.
C. it may be signaled with a fixed length code, a unary code, a truncated unary code, or an exponential golomb code.
D. which may be signaled in video units such as VPS/SPSS/PPS/APS/image header/slice group header, etc.
I. alternatively, in addition, if chroma scaling is applied to video blocks, all video blocks in a video unit may use the same signaled scaling factor.
16. It is proposed that the chroma scaling in LMCS may be indicated by signaling information or not.
A. Which may be signaled in video units such as VPS/SPSS/PPS/APS/image header/slice group header, etc.
I. In one example, when luma and chroma samples are encoded with a dual tree codec structure and the current slice or group of slices is an intra-coded slice or group of slices, signaling may be performed in a slice or group header.
The above examples may be incorporated in the context of a method, such as method 400, which may be implemented at a video decoder or video codec.
Fig. 4 shows a flow chart of an exemplary method for video processing. The method 400 includes, at step 402, performing a transition between a current video block of the video and a codec representation of the video, wherein the transition includes: the result of the division operation to be used in the particular mode for processing the current video block is approximated with one or more operations, each of which is different from the division operation, to replace the division operation N/D, N and D to represent the numerator and denominator, respectively, in the division operation.
Fig. 5 shows a flow chart of another exemplary method for video processing. The method 500 includes, at step 502, performing a transition between a current video block of the video and a codec representation of the video, wherein the transition includes: the result of the division operation N/D to be used in the particular mode for processing the current block is approximated with a division operation associated with a Motion Vector (MV) scaling scheme or is derived from a lookup table associated with a MV scaling scheme to replace the division operation N/D.
In one aspect, a method for video processing is disclosed, comprising: performing a conversion between a current video block of the video and a codec representation of the video, wherein the conversion comprises: the result of a division operation N/D to be used in a particular mode for processing a current video block is approximated with one or more operations, N and D representing the numerator and denominator, respectively, in the division operation, wherein each of the one or more operations is different from the division operation.
In one example, the one or more operations include at least one of a multiplication operation, an addition operation, a SatShift (x, n) operation, a Shift (x, n) operation, a left Shift operation, a floor operation, a log2 operation, and a logic operation,
Wherein,
Shift (x, n) = (x+offset 0) > n.
In one example, the logical operations include at least one of a logical OR operation AND a logical AND operation.
In one example, at least one of offset0 and offset1 is set to zero.
In one example, at least one of offset0 and offset1 is set to one of:
(1<<n)>>1;
1<<(n-1);
((1<<n)>>1)-1;
(1<<(n-1))-1。
In one example, offset0 = offset1.
In one example, the one or more operations include querying at least one entry in at least one table based on the index.
In one example, at least one table has a size of 2 M and each of the one or more entries in the at least one table is denoted T [ idx ], and wherein idx represents an index and is in the range of 0 to 2 M-1 (inclusive of 0 and 2 M-1), M is an integer.
In one example, T [ idx ] = Rounding (2 P/(idx+offset 0)) -offset1, where P, offset0 and offset1 are integers and Rounding (. -%) is a rounding function.
In one example, P is in the range of 8 to 14 (inclusive of 8 and 14).
In one example Rounding (x/y) =floor ((x+y/2)/y), and wherein Floor () is a Floor (rounding down) operation.
In one example Rounding (x/y) is set to an integer Q such that |q x y-x| is less than |q '. Times.y-x|, and wherein Q' is selected from the set of integers.
In one example, the integer set is { Floor (x/y) -1, floor (x/y) and Floor (x/y) +1}.
In one example, offset0 = 2 W, and W = 0, 1, 4,5, 6, or 7.
In one example, offset0 = 0.
In one example, offset1 = 2 Z, and Z = 3, 4,5, 6, or 7.
In one example, offset1 = 0.
In one example, m=w.
In one example, z=p-W-1.
In one example, T [ idx ] is set to one of:
T[idx]<2Z
if T [ idx ] = 2 Z, then T [ idx ] is set to 0; or alternatively
T[idx]=(Rounding(2P/(idx+offset0))-offset1)%offset1。
In one example, w=m=7, p=15, and at least one table is as follows:
{0,126,124,122,120,118,117,115,113,111,109,108,106,104,103,101,100,98,96,95,93,92,90,89,88,86,85,83,82,81,79,78,77,76,74,73,72,71,69,68,67,66,65,64,63,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,44,43,42,41,40,39,38,37,37,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,21,20,20,19,18,18,17,16,16,15,14,14,13,13,12,11,11,10,10,9,9,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1}.
in one example, w=m=7, p=14, and at least one table is as follows:
{0,63,62,61,60,59,58,57,56,56,55,54,53,52,51,51,50,49,48,47,47,46,45,45,44,43,42,42,41,40,40,39,38,38,37,37,36,35,35,34,34,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,20,19,19,18,18,18,17,17,16,16,16,15,15,14,14,14,13,13,13,12,12,12,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,6,6,6,5,5,5,5,4,4,4,3,3,3,3,2,2,2,2,1,1,1,1,0}.
in one example, w=m=6, p=13, and at least one table is as follows:
{0,0,31,31,30,30,29,29,28,28,27,27,27,26,26,25,25,24,24,24,23,23,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,16,15,15,15,15,14,14,14,14,13,13,13,13,12,12,12,12,11,11,11,11,10,10,10,10,10,9,9,9,9,9,8,8,8,8,8,7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,0,0,0}.
in one example, w=m=6, p=14, and at least one table is as follows:
{0,124,120,117,113,109,106,103,100,96,93,90,88,85,82,79,77,74,72,69,67,65,63,60,58,56,54,52,50,48,46,44,43,41,39,37,36,34,33,31,30,28,27,25,24,22,21,20,18,17,16,14,13,12,11,10,9,7,6,5,4,3,2,1}.
in one example, w=m=6, p=13, and at least one table is as follows:
{0,62,60,58,56,55,53,51,50,48,47,45,44,42,41,40,38,37,36,35,34,32,31,30,29,28,27,26,25,24,23,22,21,20,20,19,18,17,16,16,15,14,13,13,12,11,10,10,9,8,8,7,7,6,5,5,4,4,3,3,2,2,1,1}.
in one example, w=m=6, p=12, and at least one table is as follows:
{0,31,30,29,28,27,27,26,25,24,23,23,22,21,21,20,19,19,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,9,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2,2,1,1,1,1,0}.
in one example, w=m=6, p=11, and at least one table is as follows:
{0,0,15,15,14,14,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}.
in one example, w=m=6, p=10, and at least one table is as follows:
{0,0,0,7,7,7,7,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0}.
in one example, w=m=5, p=13, and at least one table is as follows:
{0,120,113,106,100,93,88,82,77,72,67,63,58,54,50,46,43,39,36,33,30,27,24,21,18,16,13,11,9,6,4,2}。
in one example, w=m=5, p=12, and at least one table is as follows:
{0,60,56,53,50,47,44,41,38,36,34,31,29,27,25,23,21,20,18,16,15,13,12,10,9,8,7,5,4,3,2,1}。
in one example, w=m=5, p=11, and at least one table is as follows:
{0,30,28,27,25,23,22,21,19,18,17,16,15,14,13,12,11,10,9,8,7,7,6,5,5,4,3,3,2,2,1,1}。
in one example, w=m=5, p=10, and at least one table is as follows:
{0,15,14,13,12,12,11,10,10,9,8,8,7,7,6,6,5,5,4,4,4,3,3,3,2,2,2,1,1,1,1,0}。
in one example, w=m=5, p=9, and at least one table is as follows:
{0,0,7,7,6,6,5,5,5,4,4,4,4,3,3,3,3,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}。
In one example, w=m=4, p=10, and at least one table is as follows:
{0,28,25,22,19,17,15,13,11,9,7,6,5,3,2,1}。
in one example, w=m=4, p=9, and at least one table is as follows:
{0,14,12,11,10,8,7,6,5,4,4,3,2,2,1,1}。
In one example, T [ idx ] = (2 P +k/2)/k, k is from 1 to 2M; .
In one example of this, in one implementation,
M=8,P=14;
M=8,P=11;
M=9,P=14;
M=9,P=11;
M=10, p=14; or alternatively
M=10,P=11。
In one example, at least one table is as follows:
{0,248,240,233,226,219,212,206,199,193,187,181,175,170,164,159,154,149,144,139,134,130,125,121,116,112,108,104,100,96,93,89,85,82,78,75,72,68,65,62,59,56,53,50,47,45,42,39,37,34,31,29,26,24,22,19,17,15,13,10,8,6,4,2}.
in one example, the index idx is derived based on one or more operations.
In one example, the one OR more operations include at least one of an addition operation, a log2 operation, a floor operation, a left Shift operation, satShift (x, n) operation, a Shift (x, n) operation, a logical OR operation, AND a logical AND operation.
In one example, the index idx is derived based on the following formula:
idx=shift (D < < K, floor (Log 2 (D)))/(2 K -1), where D represents the denominator in the division operation.
In one example, the modified index is derived from the index idx based on the following formula:
idx '=idx+off, where idx' represents the modified index.
In one example, the modified index idx' is clipped to the range of [0,2 K-1 ] (inclusive of 0 and 2 K-1).
In one example, the modified index idx' is cropped as follows:
Min(2K-1,idx’),
Wherein,
In one example, off= (Shift (D < < (k+1), floor (Log 2 (D)))))) 1.
In one example, k=m or k=w.
In one example, the intermediate value V is derived from the entry T [ idx ] based on one of:
V=T[idx]<<m;
V=T[idx]*m;
V=T[idx]+m;
V=Shift(T[idx],n);
V=SatShift(T[idx],n);
V=t [ idx ] +2 Z; or alternatively
V=T[idx]|2Z
In one example, m=1 or 2.
In one example of this, in one implementation,
If D < = 2 M, n=0; and
If D >2 M, n=ceil (Log 2 (D)) -M.
In one example of this, in one implementation,
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
In one example, the derivation of the intermediate value V depends on at least one of the value of the entry T [ idx ] and the value of the index idx associated with the entry T [ idx ].
In one example, the derivation depends on whether the value of T [ idx ] is equal to the first value.
In one example, the derivation depends on whether the value of idx is less than a second value.
In one example, the derivation depends on whether the value of idx is equal to a third value.
In one example, at least one of the first value and the third value is equal to 0.
In one example, the second value is equal to one of {1,2, or 2 M-1 }.
In one example, the intermediate value V is derived based on the following formula:
if the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, then v=2 Z+1;
otherwise, v=t [ idx ] |2 Z, where "|" represents a logical OR operation;
Wherein z=3, 4, 5, 6 or 7.
In one example, the intermediate value V is derived based on the following formula:
If the value of T [ idx ] is equal to the first value and the value of idx is equal to the third value, then v=2 Z+1;
otherwise, v=t [ idx ] |2 Z, where "|" represents a logical OR operation;
Wherein z=3, 4, 5, 6 or 7.
In one example, the intermediate value V is derived as follows:
if the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, then v=2 Z+1;
Otherwise, v=t [ idx ] +2 Z;
Wherein z=3, 4, 5, 6 or 7.
In one example, the intermediate value V is derived based on the following formula:
if the value of idx is equal to the third value, v=2 Z+1;
Otherwise, v=t [ idx ] +2 Z;
Wherein z=3, 4, 5, 6 or 7.
In one example, the result of the division operation is approximated based on R, where r=f 1 (x), where x represents N x V, and N represents a numerator in the division operation, and V represents a derived intermediate value.
In one example, the result of the division operation is approximated based on R, where r=f 1 (x) V, where x represents N, and N represents a numerator in the division operation, and V represents a derived intermediate value.
In one example, f 1 (x) is derived as one of:
f1(x)=x;
f1(x)=x<<m;
f1(x)=Shift(x,m);
f 1 (x) = SatShift (x, m); wherein m represents an integer.
In one example, m=11.
In one example, m=offset-n, where offset represents an integer.
In one example, offset=11, and
If D < = 2 M, n=0; or alternatively
D>2M,n=Ceil(Log2(D))-M。
In one example, offset=11, and
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
In one example of this, in one implementation,
If f 2(P,K,D,T,idx)<=S,f1(x)=x<<(S-f2 (P, K, D, T, idx)),
Otherwise, f 1(x)=Shift(x,f2 (P, K, D, T, idx) -S);
where P is an integer and is in the range of 8 to 14 (inclusive of 8 and 14).
In one example of this, in one implementation,
If f 2(P,K,D)<=S,f1(x)=x<<(S-f2 (P, K, D)),
Otherwise, f 1(x)=Shift(x,f2 (P, K, D) -S);
where P is an integer and is in the range of 8 to 14 (inclusive of 8 and 14).
In one example, f 2 (P, K, D, T, idx) is set to one of:
f2(P,K,D,T,idx)=P-K+Log2(D);
f 2 (P, K, D, T, idx) =p-k+1+log2 (D); or alternatively
f2(P,K,D,T,idx)=P-K-1+Log2(D)+off。
In one example, f 2 (P, K, D) is set to one of:
f 2 (P, K, D) =p-k+log 2 (D); or alternatively
f2(P,K,D)=P-K+1+Log2(D)。
In one example, k=m or k=w.
In one example, s=11 or s=14.
In one example, s=11.
In one example, if the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, off=0;
otherwise, off=1.
In one example, if the value of idx is equal to the third value, off=0;
otherwise, off=1.
In one example, R is associated with an accuracy value Q, and the variable B is calculated from R as follows:
B=shift (g (R), Q); or alternatively
B=SatShift(g(R),Q);
Where g (R) is a function of R and Q is an integer.
In one example, q=11 or 14.
In one example, the method is used for Luminance Mapping (LMCS) mode with chroma scaling, and R represents InvScaleCoeff [ idxYInv ], and the samples after inverse luminance reconstruction are derived based on the following formula:
invSample=InputPivot[idxYInv]+difference,
Wherein difference=shift (g (InvScaleCoeff [ idxYInv ]), Q), and
g(InvScaleCoeff[idxYInv])=InvScaleCoeff[idxYInv]*
(lumaSample[xP][yP]-LmcsPivot[idxYInv])。
In one example, the method is used for a Luma Map (LMCS) mode with chroma scaling, R represents ChromaScaleCoeff [ idxYInv ], and the inverse chroma residual samples are derived based on the following formula:
invResSample[i][j]=
Sign(resSamples[i][j])*(Shift(ChromaScaleCoeff[idxYInv],Q)),
wherein g (ChromaScaleCoeff [ idxYInv ])=abs (RESSAMPLES [ i ] [ j ])
ChromaScaleCoeff[idxYInv]。
In one example, q=11.
In one example, Q is derived based on the following formula:
Q=P-K+Log2(D);
q=p-k+1+log2 (D); or alternatively
Q=P-K-1+Log2(D)+off。
In one example, k=m or k=w.
In one example, if the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, off=0;
otherwise, off=1.
In one example, q=offset-n, where offset represents an integer.
In one example, offset=11 or 14, and
If D < = 2 M, n=0; or alternatively
If D >2 M, n=ceil (Log 2 (D)) -M.
In one example, offset=11 or 14, and
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
In one example, the value of the denominator D or the absolute value of D is greater than the first threshold.
In one example, the first threshold is equal to 8.
In one example, the current video block includes at least one color component, and the first threshold is dependent on a sampling bit depth of the at least one color component.
In one example, the size of the at least one table depends on the first threshold.
In another aspect, a method for video processing is disclosed, comprising: performing a conversion between a current video block of the video and a codec representation of the video, wherein the conversion comprises: the result of the division operation N/D to be used in the particular mode for processing the current video block is approximated with or derived from a lookup table associated with a Motion Vector (MV) scaling scheme to replace the division operation N/D.
In one example, the particular mode includes at least one of a Motion Vector (MV) scaling mode, a luma map with chroma scaling (LMCS) mode, a cross-component linear model (CCLM) prediction mode, and a Local Illumination Compensation (LIC) mode.
In one example, the MV scaling scheme is used to merge at least one of inter-mode Temporal Motion Vector Prediction (TMVP), advanced Motion Vector Prediction (AMVP) mode, affine prediction mode, sub-block based temporal merge mode.
In one example, denominator D is converted to an intermediate variable D' in the range [ minD, maxD ] to approximate the result of the division operation N/D, where minD and maxD represent the minimum and maximum values of the denominator.
In one example, mind= -128 and maxd=127.
In one example, denominator D is converted to D' in a linear or nonlinear quantization process.
In one example, the denominator D is converted to D', such as one of:
D’=Clip3(D,minD,maxD);
D’=Clip3(D,0,maxD);
D’=SatShift(D,n);
D’=Shift(D,n);
D’=Clip3(Shift(D,n),minD,maxD);
D’=Clip3(SatShift(D,n),minD,maxD);
D’=Clip3(Shift(D,n),0,maxD);
D’=Clip3(SatShift(D,n),0,maxD);
Where n is an integer.
In one example, n=1 or n=2.
In one example, the value of n depends on the value of D.
In one example, if D < = maxD, n = 0;
If D > maxD, n=ceil (Log 2 (D)) -Log2 (maxD).
In one example, if D < = maxD, n = 0;
If D > maxD, n=floor (Log 2 (D)) - (Log 2 (maxD) -1).
In one example, the result of the division operation N/D is approximated as
(16384+(Abs(D’)>>1))/D’。
In one example, the result of the division operation N/D is derived from a look-up table MV_SCALE_T used in MV scaling schemes.
In one example, a current video block includes a luma component and at least one chroma component, wherein at least one table is used to approximate a function of division operations in a Luma Map (LMCS) mode with chroma scaling and a cross-component linear model (CCLM) prediction mode.
In one example, a current video block includes a luma component and at least one chroma component, wherein at least one table is used to approximate a function of a division operation in a motion vector scaling mode of operation and a luma map with chroma scaling (LMCS) mode.
In one example, the particular mode includes at least one of a Luma Map (LMCS) mode with chroma scaling, a cross-component linear model (CCLM) prediction mode, and a motion vector scaling mode of operation.
In one example, the current video block is encoded with a Local Illumination Compensation (LIC) mode, and the method is used to approximate the result of the division operation of the current video block in the LIC mode.
In one example, performing the conversion includes generating a codec representation from the current video block.
In one example, performing the conversion includes generating a current video block from the codec representation.
In yet another aspect, an apparatus in a video system is disclosed that includes a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the above-described method.
In yet another aspect, a computer program product stored on a non-transitory computer readable medium is disclosed, the computer program product comprising program code for performing the above-described method.
5 Example implementation of the disclosed technology
5.1 Example #1
Variables LmcsPivot [ i ], i=0..16, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0..15, derived based on the following formula:
the variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on the following formula:
if(lmcsCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else{
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
divTable [ ] is specified as follows:
divTable[]={0,62,60,58,56,55,53,51,50,48,47,45,44,42,41,40,38,37,36,35,34,32,31,30,29,28,27,26,25,24,23,22,21,20,20,19,18,17,16,16,15,14,13,13,12,11,10,10,9,8,8,7,7,6,5,5,4,4,3,3,2,2,1,1}.
5.2 example #2
Variables LmcsPivot [ i ], i=0..16, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0..15, derived based on the following formula:
the variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on the following formula:
if(lmcsCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else{
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
divTable [ ] is specified as follows:
divTable[]={0,62,60,58,56,55,53,51,50,48,47,45,44,42,41,40,38,37,36,35,34,32,31,30,29,28,27,26,25,24,23,22,21,20,20,19,18,17,16,16,15,14,13,13,12,11,10,10,9,8,8,7,7,6,5,5,4,4,3,3,2,2,1,1}.
5.3 example #3
Variables LmcsPivot [ i ], i=0..16, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0..15, derived based on the following formula:
the variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on the following formula:
if(lmcsCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else{
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
divTable [ ] is specified as follows:
divTable[]={0,124,120,117,113,109,106,103,100,96,93,90,88,85,82,79,77,74,72,69,67,65,63,60,58,56,54,52,50,48,46,44,43,41,39,37,36,34,33,31,30,28,27,25,24,22,21,20,18,17,16,14,13,12,11,10,9,7,6,5,4,3,2,1}.
5.4 example #4
Variables LmcsPivot [ i ], i=0..16, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0 …, derived based on the following formula:
the variable ChromaScaleCoeff [ i ], i=0 … 15, is derived based on the following formula:
if(lmcsCW[i]==0)
ChromaScaleCoeff[i]=(1<<11)
else{
ChromaScaleCoeff[i]=InvScaleCoeff[i]
}
divTable [ ] is specified as follows:
divTable[]={0,124,120,117,113,109,106,103,100,96,93,90,88,85,82,79,77,74,72,69,67,65,63,60,58,56,54,52,50,48,46,44,43,41,39,37,36,34,33,31,30,28,27,25,24,22,21,20,18,17,16,14,13,12,11,10,9,7,6,5,4,3,2,1}.
Example #5
Based on JVET-1001-v8, the text may be changed to:
7.4.6.4 luma map with chroma scaling data semantics
Variables LmcsPivot [ i ], i=0 …, variables ScaleCoeff [ i ] and InvScaleCoeff [ i ], i=0 … 15, are derived based on the following formula:
divTable [ ] is specified as follows:
divTable[]={0,248,240,233,226,219,212,206,199,193,187,181,175,170,164,159,154,149,144,139,134,130,125,121,116,112,108,104,100,96,93,89,85,82,78,75,72,68,65,62,59,56,53,50,47,45,42,39,37,34,31,29,26,24,22,19,17,15,13,10,8,6,4,2}.
Fig. 6 is a block diagram of a video processing apparatus 600. The apparatus 600 may be used to implement one or more of the methods described herein. The apparatus 600 may be implemented in a smart phone, tablet, computer, internet of things (IoT) receiver, or the like. The apparatus 600 may include one or more processors 602, one or more memories 604, and video processing hardware 606. Processor(s) 602 may be configured to implement one or more methods described in this document (including but not limited to methods 400 or 500). Memory(s) 604 may be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 606 may be used to implement some of the techniques described in this document in hardware circuitry.
In some embodiments, the video codec method may be implemented using an apparatus implemented on a hardware platform as described with reference to fig. 6.
From the foregoing, it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the invention. Accordingly, the presently disclosed technology is not limited except as by the appended claims.
Implementations of the subject matter and the functional operations described in this patent document can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Implementations of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on tangible and non-transitory computer readable media for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of materials affecting a machine-readable propagated signal, or a combination of one or more of them. The term "data processing unit" or "data processing apparatus" encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. In addition to hardware, an apparatus may include code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
A computer program (also known as a program, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. The computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network.
The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer does not require such a device. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
The specification and drawings are to be regarded in an illustrative rather than a restrictive sense, and the examples are intended to be illustrative only. As used herein, the use of "or" is intended to include "and/or" unless the context clearly indicates otherwise.
Although this patent document contains many specifics, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Furthermore, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
Only a few implementations and examples are described, and other implementations, enhancements, and variations may be made based on what is described and shown in this patent document.

Claims (109)

1. A method for video processing, comprising:
Performs a conversion between a current video block of a video and a bitstream of the video,
Wherein the converting comprises:
Approximating the result of a division operation N/D to be used in a particular mode for processing the current video block with one or more operations, N and D representing numerator and denominator respectively in the division operation, in place of the division operation, wherein each of the one or more operations is different from the division operation;
Wherein the one or more operations include querying at least one entry in at least one table based on an index, the at least one table having a size of 2 M, and each of the one or more entries in the at least one table is denoted as T [ idx ], and wherein idx represents an index and is in the range of 0 to 2 M-1, inclusive of 0 and 2 M-1, M is an integer, and the index idx is derived based on one or more operations; and
Wherein T [ idx ] = Rounding (2 P/(idx+offset 0)) -offset1, wherein P, offset0 and offset1 are integers and Rounding ()'s are rounding functions; or alternatively
Wherein T [ idx ] is set to one of: t [ idx ] <2 Z; if T [ idx ] = 2 Z, then T [ idx ] is set to 0; or T [ idx ] = (Rounding (2 P/(idx+offset 0)) -offset 1)% offset1, where P and Z are integers; or alternatively
Wherein T [ idx ] = (P +k/2)/k, k is from 1 to 2 M, where P is an integer and k is an integer.
2. The method of claim 1, wherein the one or more operations further comprise at least one of a multiplication operation, an addition operation, satShift (x, n) operation, a Shift (x, n) operation, a left Shift operation, a floor operation, a log2 operation, and a logic operation,
Wherein,
Shift (x, n) = (x+offset 0) > n.
3. The method of claim 2, wherein the logical operation comprises at least one of a logical OR operation AND a logical AND operation.
4. The method of claim 2, wherein at least one of offset0 and offset1 is set to zero.
5. The method of claim 2, wherein at least one of offset0 and offset1 is set to one of:
(1<<n)>>1;
1<<(n-1);
((1<<n)>>1)-1;
(1<<(n-1))-1。
6. The method of claim 4 or 5, wherein offset0 = offset1.
7. The method of claim 1, wherein P is in the range of 8 to 14, inclusive of 8 and 14.
8. The method of claim 1, wherein Rounding (x/y) =floor ((x+y/2)/y), and wherein Floor (·) is a rounding down operation.
9. The method of claim 1, wherein Rounding (x/y) is set to an integer Q such that |q x y-x|q '. Ltoreq.y-x|, and wherein Q' is selected from the set of integers.
10. The method of claim 9, wherein the integer set is { Floor (x/y) -1, floor (x/y), and Floor (x/y) +1}.
11. The method of claim 1, wherein offset0 = 2 W and W = 0, 1, 4, 5, 6 or 7.
12. The method of claim 1, wherein offset0 = 0.
13. The method of claim 11 or 12, wherein offset1 = 2 Z and Z = 3, 4, 5, 6 or 7.
14. A method according to claim 11 or 3, wherein offset1 = 0.
15. The method of claim 11, wherein M = W.
16. The method of claim 13, wherein Z = P-W-1.
17. The method of claim 15, wherein w=m=7, p=15, and the at least one table is as follows:
{0,126,124,122,120,118,117,115,113,111,109,108,106,104,103,101,100,98,96,95,93,92,90,89,88,86,85,83,82,81,79,78,77,76,74,73,72,71,69,68,67,66,65,64,63,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,44,43,42,41,40,39,38,37,37,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,21,20,20,19,18,18,17,16,16,15,14,14,13,13,12,11,11,10,10,9,9,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1}.
18. The method of claim 15, wherein w=m=7, p=14, and the at least one table is as follows:
{0,63,62,61,60,59,58,57,56,56,55,54,53,52,51,51,50,49,48,47,47,46,45,45,44,43,42,42,41,40,40,39,38,38,37,37,36,35,35,34,34,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,20,19,19,18,18,18,17,17,16,16,16,15,15,14,14,14,13,13,13,12,12,12,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,6,6,6,5,5,5,5,4,4,4,3,3,3,3,2,2,2,2,1,1,1,1,0}.
19. the method of claim 15, wherein w=m=6, p=13, and the at least one table is as follows:
{0,0,31,31,30,30,29,29,28,28,27,27,27,26,26,25,25,24,24,24,23,23,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,16,15,15,15,15,14,14,14,14,13,13,13,13,12,12,12,12,11,11,11,11,10,10,10,10,10,9,9,9,9,9,8,8,8,8,8,7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,0,0,0}.
20. the method of claim 15, wherein w=m=6, p=14, and the at least one table is as follows:
{0,124,120,117,113,109,106,103,100,96,93,90,88,85,82,79,77,74,72,69,67,65,63,60,58,56,54,52,50,48,46,44,43,41,39,37,36,34,33,31,30,28,27,25,24,22,21,20,18,17,16,14,13,12,11,10,9,7,6,5,4,3,2,1}.
21. The method of claim 15, wherein w=m=6, p=13, and the at least one table is as follows:
{0,62,60,58,56,55,53,51,50,48,47,45,44,42,41,40,38,37,36,35,34,32,31,30,29,28,27,26,25,24,23,22,21,20,20,19,18,17,16,16,15,14,13,13,12,11,10,10,9,8,8,7,7,6,5,5,4,4,3,3,2,2,1,1}.
22. The method of claim 15, wherein w=m=6, p=12, and the at least one table is as follows:
{0,31,30,29,28,27,27,26,25,24,23,23,22,21,21,20,19,19,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,9,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2,2,1,1,1,1,0}.
23. The method of claim 15, wherein w=m=6, p=11, and the at least one table is as follows:
{0,0,15,15,14,14,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}.
24. the method of claim 15, wherein w=m=6, p=10, and the at least one table is as follows:
{0,0,0,7,7,7,7,6,6,6,6,6,5,5,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0}.
25. the method of claim 15, wherein w=m=5, p=13, and the at least one table is as follows:
{0,120,113,106,100,93,88,82,77,72,67,63,58,54,50,46,43,39,36,33,30,27,24,21,18,16,13,11,9,6,4,2}。
26. the method of claim 15, wherein w=m=5, p=12, and the at least one table is as follows:
{0,60,56,53,50,47,44,41,38,36,34,31,29,27,25,23,21,20,18,16,15,13,12,10,9,8,7,5,4,3,2,1}。
27. the method of claim 15, wherein w=m=5, p=11, and the at least one table is as follows:
{0,30,28,27,25,23,22,21,19,18,17,16,15,14,13,12,11,10,9,8,7,7,6,5,5,4,3,3,2,2,1,1}。
28. the method of claim 15, wherein w=m=5, p=10, and the at least one table is as follows:
{0,15,14,13,12,12,11,10,10,9,8,8,7,7,6,6,5,5,4,4,4,3,3,3,2,2,2,1,1,1,1,0}。
29. the method of claim 15, wherein w=m=5, p=9, and the at least one table is as follows:
{0,0,7,7,6,6,5,5,5,4,4,4,4,3,3,3,3,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0}。
30. The method of claim 15, wherein w=m=4, p=10, and the at least one table is as follows:
{0,28,25,22,19,17,15,13,11,9,7,6,5,3,2,1}。
31. the method of claim 15, wherein w=m=4, p=9, and the at least one table is as follows:
{0,14,12,11,10,8,7,6,5,4,4,3,2,2,1,1}。
32. The method of claim 31, wherein
M=8,P=14;
M=8,P=11;
M=9,P=14;
M=9,P=11;
M=10, p=14; or alternatively
M=10,P=11。
33. The method of claim 1, wherein the at least one table is as follows:
{0,248,240,233,226,219,212,206,199,193,187,181,175,170,164,159,154,149,144,139,134,130,125,121,116,112,108,104,100,96,93,89,85,82,78,75,72,68,65,62,59,56,53,50,47,45,42,39,37,34,31,29,26,24,22,19,17,15,13,10,8,6,4,2}.
34. The method of claim 1, wherein the one OR more operations further comprise at least one of an addition operation, a log2 operation, a floor operation, a left Shift operation, satShift (x, n) operations, a Shift (x, n) operation, a logical OR operation, AND a logical AND operation,
Wherein,
Shift (x, n) = (x+offset 0) > n;
wherein the index idx is derived based on the following formula:
idx=shift (D < < K, floor (Log 2 (D)))/(2 K -1), where D represents the denominator in the division operation, where K is an integer.
35. The method of claim 34, wherein the modified index is derived from the index idx based on the following formula:
idx '=idx+off, where idx' represents the modified index, where Off is an integer.
36. The method of claim 35, wherein the modified index idx' is clipped to [0,2 K-1 ], inclusive of the range of 0 and 2 K-1.
37. The method of claim 36, wherein the modified index idx' is clipped as follows:
Min(2K-1,idx’),
Wherein,
38. The method of claim 35, wherein,
Off=(Shift(D<<(K+1),Floor(Log2(D))))&1。
39. The method of any one of claims 34-38, wherein k=m or k=w, W being an integer.
40. The method of claim 1, wherein the intermediate value V is derived from the entry T [ idx ] based on one of:
V=T[idx]<<m;
V=T[idx]*m;
V=T[idx]+m;
V=Shift(T[idx],n);
V=SatShift(T[idx],n);
V=t [ idx ] +2 Z; or alternatively
V=T[idx]|2Z
Wherein Z is an integer, the intermediate value V is an intermediate value of the one or more operations, and wherein,
Shift (T [ idx ], n) = (T [ idx ] +offset 0) > n.
41. The method of claim 40, wherein m = 1 or 2.
42. The method of claim 40, wherein,
If D < = 2 M, n=0; and
If D >2 M, n=ceil (Log 2 (D)) -M.
43. The method of claim 40, wherein,
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
44. The method of claim 40, wherein the derivation of the intermediate value V is dependent upon at least one of a value of an entry T [ idx ] and a value of an index idx associated with the entry T [ idx ].
45. A method as defined in claim 44, wherein the deriving is dependent on whether the value of T [ idx ] is equal to a first value.
46. The method of claim 45, wherein the deriving is dependent on whether the value of idx is less than a second value.
47. The method of claim 45, wherein the deriving is dependent on whether the value of idx is equal to a third value.
48. The method of claim 47, wherein at least one of the first value and the third value is equal to 0.
49. A method as defined in claim 46, wherein the second value is equal to one of {1,2, or 2 M-1 }.
50. The method of claim 46, wherein the intermediate value V is derived based on the following description:
If the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, then v=2 Z+1;
otherwise, v=t [ idx ] |2 Z, where "|" denotes a logical OR operation;
wherein z=3, 4, 5, 6 or 7.
51. The method of claim 47, wherein the intermediate value V is derived based on the following description:
If the value of T [ idx ] is equal to the first value and the value of idx is equal to the third value, then v=2 Z+1;
otherwise, v=t [ idx ] |2 Z, where "|" denotes a logical OR operation;
wherein z=3, 4, 5, 6 or 7.
52. The method of claim 46, wherein the intermediate value V is derived based on the following description:
If the value of T [ idx ] is equal to the first value and the value of idx is less than the second value, then v=2 Z+1;
Otherwise, v=t [ idx ] +2 Z;
wherein z=3, 4, 5, 6 or 7.
53. The method of claim 47, wherein the intermediate value V is derived based on the following description:
if the value of idx is equal to the third value, v=2 Z+1;
Otherwise, v=t [ idx ] +2 Z;
wherein z=3, 4, 5, 6 or 7.
54. The method of claim 40, wherein the result of the division operation is approximated based on R, wherein R = f 1 (x), where x represents N x V, and N represents a numerator in the division operation, and V represents a derived intermediate value.
55. The method of claim 40, wherein the result of the division operation is approximated based on R, wherein R = f 1 (x) x V, where x represents N and N represents a numerator in the division operation, and V represents a derived intermediate value.
56. The method of claim 54 or 55, wherein f 1 (x) is derived as one of:
f1(x)=x;
f1(x)=x<<m;
f1(x)=Shift(x,m);
f 1 (x) = SatShift (x, m); wherein m represents an integer;
Wherein,
Shift (x, m) = (x+offset 0) > m.
57. The method of claim 56, wherein m = 11.
58. The method of claim 56, wherein m = offset-n, where offset represents an integer.
59. The method of claim 58, wherein offset = 11, and
If D < = 2 M, n=0; or alternatively
If D >2 M, n=ceil (Log 2 (D)) -M.
60. The method of claim 58, wherein offset = 11, and
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
61. The method of claim 54, wherein,
If f 2(P,K,D,T,idx)<=S,f1(x)=x<<(S-f2 (P, K, D, T, idx)),
Otherwise, f 1(x)=Shift(x,f2 (P, K, D, T, idx) -S);
where P is an integer, and in the range of 8 to 14 inclusive, T is a table whose entries are denoted as T [ idx ], K is an integer, and S is a preset value.
62. The method of claim 55, wherein,
If f 2(P,K,D)<=S,f1(x)=x<<(S-f2 (P, K, D)),
Otherwise, f 1(x)=Shift(x,f2 (P, K, D) -S);
Where P is an integer and in the range of 8 to 14, inclusive of 8 and 14, K is an integer and S is a preset value.
63. The method of claim 61, wherein f 2 (P, K, D, T, idx) is set to one of:
f2(P,K,D,T,idx)=P-K+Log2(D);
f 2 (P, K, D, T, idx) =p-k+1+log2 (D); or alternatively
F 2 (P, K, D, T, idx) =p-K-1+log 2 (D) +off, where off is an integer.
64. The method of claim 61, wherein f 2 (P, K, D) is set to one of:
f 2 (P, K, D) =p-k+log 2 (D); or alternatively
f2(P,K,D)=P-K+1+Log2(D)。
65. The method of claim 63 or 64, wherein k=m or k=w.
66. The method of claim 61, wherein s=11 or s=14.
67. The method of claim 62, wherein S = 11.
68. The method of claim 63, wherein,
If the value of T [ idx ] is equal to a first value and the value of idx is less than a second value, off=0, wherein the first value is equal to 0 and the second value is equal to {1,2, or 2 M-1 };
otherwise, off=1.
69. The method of claim 63, wherein,
If the value of idx is equal to a third value, off=0, wherein the third value is equal to 0;
otherwise, off=1.
70. The method of claim 54 or 55, wherein R is associated with an accuracy value Q, and variable B is calculated from R as follows:
B=shift (g (R), Q); or alternatively
B=SatShift(g(R),Q);
Where g (R) is a function on R and Q is an integer.
71. The method of claim 70, wherein Q = 11 or 14.
72. The method of claim 70, wherein the method is used in a luminance mapping LMCS mode with chroma scaling and R represents InvScaleCoeff [ idxYInv ], and samples after inverse luminance reconstruction are derived based on the following formula:
invSample=InputPivot[idxYInv]+difference,
wherein difference=shift (g (InvScaleCoeff [ idxYInv ]), Q), and
g(InvScaleCoeff[idxYInv])=InvScaleCoeff[idxYInv]*
(lumaSample[xP][yP]-LmcsPivot[idxYInv])。
73. The method of claim 70, wherein the method is used in a luma map LMCS mode with chroma scaling, R represents ChromaScaleCoeff [ idxYInv ], and the inverse chroma residual samples are derived based on the following formula:
invResSample[i][j]=
Sign(resSamples[i][j])*(Shift(ChromaScaleCoeff[idxYInv],Q)),
wherein g (ChromaScaleCoeff [ idxYInv ])=abs (RESSAMPLES [ i ] [ j ]) ChromaScaleCoeff [ idxYInv ].
74. The method of claim 72 or 73, wherein Q = 11.
75. The method of claim 70, wherein Q is derived based on the formula:
Q=P-K+Log2(D);
q=p-k+1+log2 (D); or alternatively
Q=P-K-1+Log2(D)+off。
76. The method of claim 75, wherein k=m or k=w.
77. The method of claim 75, wherein,
If the value of T [ idx ] is equal to a first value and the value of idx is less than a second value, off=0, wherein the first value is equal to 0 and the second value is equal to {1,2, or 2 M-1 };
otherwise, off=1.
78. The method of claim 70, wherein Q = offset-n, wherein offset represents an integer.
79. The method of claim 78, wherein offset = 11 or 14, and
If D < = 2 M, n=0; or alternatively
If D >2 M, n=ceil (Log 2 (D)) -M.
80. The method of claim 78, wherein offset = 11 or 14, and
If D < = 2 M, n=0; and
If D >2 M, n=floor (Log 2 (D)) -m+1.
81. The method of claim 1, wherein the value or absolute value of the denominator D is greater than a first threshold.
82. The method of claim 81, wherein the first threshold is equal to 8.
83. The method of claim 81, wherein the current video block comprises at least one color component and the first threshold is dependent on a sampling bit depth of the at least one color component.
84. The method of claim 83, wherein a size of the at least one table depends on the first threshold.
85. The method of claim 1, wherein the current video block comprises a luma component and at least one chroma component, wherein the at least one table is used to approximate a function of division operations in luma map LMCS mode with chroma scaling and cross-component linear model CCLM prediction mode.
86. The method of claim 1, wherein the current video block comprises a luma component and at least one chroma component, wherein the at least one table is used to approximate a function of a division operation in a motion vector scaling mode of operation and a luma map LMCS mode with chroma scaling.
87. The method of claim 1, wherein the particular mode comprises at least one of a luma map LMCS mode with chroma scaling, a cross-component linear model CCLM prediction mode, and a motion vector scaling mode of operation.
88. The method of claim 1, wherein performing the conversion comprises generating the bitstream from the current video block.
89. The method of claim 1, wherein performing the conversion comprises generating the current video block from the bitstream.
90. A method for video processing, comprising:
Performs a conversion between a current video block of a video and a bitstream of the video,
Wherein the converting comprises:
approximating the result of the division operation N/D to be used in the particular mode for processing the current video block with a division operation associated with a motion vector MV scaling scheme, or deriving the result of the division operation N/D from a look-up table associated with a MV scaling scheme to replace the division operation N/D;
Wherein the size of the lookup table associated with the MV scaling scheme is 2 M and each of the one or more entries in the lookup table associated with the MV scaling scheme is denoted as T [ idx ], and wherein idx represents an index and is in the range of 0 to 2 M-1, inclusive of 0 and 2 M-1, M is an integer, and the index idx is derived based on one or more operations; and
Wherein T [ idx ] = Rounding (2 P/(idx+offset 0)) -offset1, wherein P, offset0 and offset1 are integers and Rounding ()'s are rounding functions; or alternatively
Wherein T [ idx ] is set to one of: t [ idx ] <2 Z; if T [ idx ] = 2 Z, then T [ idx ] is set to 0; or T [ idx ] = (Rounding (2 P/(idx+offset 0)) -offset 1)% offset1, where P and Z are integers; or alternatively
Wherein T [ idx ] = (P +k/2)/k, k is from 1 to 2 M, where P is an integer and k is an integer.
91. The method of claim 90, wherein the particular mode includes at least one of a motion vector MV scaling mode, a luma map LMCS with chroma scaling mode, a cross-component linear model CCLM prediction mode, and a local illumination compensation LIC mode.
92. The method of claim 91, wherein the MV scaling scheme is used to merge at least one of inter-mode temporal motion vector prediction TMVP, advanced motion vector prediction AMVP mode, affine prediction mode, sub-block based temporal merge mode.
93. The method of claim 90, wherein a denominator D is converted to an intermediate variable D' within a range [ minD, maxD ] to approximate the result of the division operation N/D, wherein minD and maxD represent minimum and maximum values of the denominator.
94. The method of claim 93, wherein mind= -128 and maxD = 127.
95. The method of claim 93 or 94, wherein the denominator D is converted to D' in a linear or non-linear quantization process.
96. The method of claim 93 or 94, wherein the denominator D is converted to D', as one of:
D’=Clip3(D,minD,maxD);
D’=Clip3(D,0,maxD);
D’=SatShift(D,n);
D’=Shift(D,n);
D’=Clip3(Shift(D,n),minD,maxD);
D’=Clip3(SatShift(D,n),minD,maxD);
D’=Clip3(Shift(D,n),0,maxD);
D’=Clip3(SatShift(D,n),0,maxD);
wherein n is an integer;
Wherein,
Shift (D, n) = (d+offset 0) > n.
97. The method of claim 96, wherein n = 1 or n = 2.
98. The method of claim 96, wherein the value of n depends on the value of D.
99. The method of claim 98, wherein,
If D < = maxD, n = 0;
If D > maxD, n=ceil (Log 2 (D)) -Log2 (maxD).
100. The method of claim 98, wherein,
If D < = maxD, n = 0;
If D > maxD, n=floor (Log 2 (D)) - (Log 2 (maxD) -1).
101. The method of claim 93, wherein a result of the division operation N/D is approximated as (16384+ (Abs (D ') > 1))/D'.
102. The method of claim 93, wherein the result of the division operation N/D is derived from a lookup table used in the MV scaling scheme.
103. The method of claim 90, wherein the current video block includes a luma component and at least one chroma component, wherein the at least one table is used to approximate a function of division operations in luma map LMCS mode with chroma scaling and cross-component linear model CCLM prediction mode.
104. The method of claim 90, wherein the current video block includes a luma component and at least one chroma component, wherein the at least one table is used to approximate a function of a division operation in a motion vector scaling mode of operation and a luma map LMCS with chroma scaling mode.
105. The method of claim 91, wherein the current video block is encoded with a local illumination compensation LIC mode, and the method is used to approximate the result of a division operation of the current video block in the LIC mode.
106. The method of claim 90, wherein performing the conversion comprises generating the bitstream from the current video block.
107. The method of claim 90, wherein performing the conversion comprises generating the current video block from the bitstream.
108. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of claims 1-107.
109. A non-transitory computer readable medium having stored thereon program code which, when executed by a processor, implements the method of any of claims 1 to 107.
CN202080034839.0A 2019-05-14 2020-05-14 Scaling method in video encoding and decoding Active CN113812159B (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
CN2019086789 2019-05-14
CNPCT/CN2019/086789 2019-05-14
CN2019091910 2019-06-19
CNPCT/CN2019/091910 2019-06-19
PCT/CN2020/090195 WO2020228763A1 (en) 2019-05-14 2020-05-14 Methods on scaling in video coding

Publications (2)

Publication Number Publication Date
CN113812159A CN113812159A (en) 2021-12-17
CN113812159B true CN113812159B (en) 2024-06-21

Family

ID=73289824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080034839.0A Active CN113812159B (en) 2019-05-14 2020-05-14 Scaling method in video encoding and decoding

Country Status (2)

Country Link
CN (1) CN113812159B (en)
WO (1) WO2020228763A1 (en)

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7113646B2 (en) * 2001-06-29 2006-09-26 Equator Technologies, Inc. Decoding of predicted AC coefficient without division
US7065546B2 (en) * 2002-04-09 2006-06-20 Sony Electronics Inc. Method of performing quantization within a multimedia bitstream utilizing division-free instructions
US6728315B2 (en) * 2002-07-24 2004-04-27 Apple Computer, Inc. Method and apparatus for variable accuracy inter-picture timing specification for digital video encoding with reduced requirements for division operations
CN1326397C (en) * 2003-06-02 2007-07-11 杭州高特信息技术有限公司 DCT rapid changing structure
JP4757807B2 (en) * 2007-01-09 2011-08-24 三菱電機株式会社 Arithmetic circuit and wireless communication apparatus using the same
AU2011308105A1 (en) * 2010-10-01 2013-05-02 Samsung Electronics Co., Ltd. Image intra prediction method and apparatus
JP5821542B2 (en) * 2011-11-07 2015-11-24 富士通株式会社 Video encoding device and video decoding device
WO2015089693A1 (en) * 2013-12-16 2015-06-25 Mediatek Singapore Pte. Ltd. Approximation method for division operation
EP3364658A4 (en) * 2015-10-15 2019-07-03 LG Electronics Inc. Method and apparatus for encoding and decoding video signal
US10432952B2 (en) * 2015-11-19 2019-10-01 Qualcomm Incorporated System and methods for fixed-point approximations in display stream compression (DSC)
CN108293128A (en) * 2015-11-20 2018-07-17 联发科技股份有限公司 The method and device of global motion compensation in video coding and decoding system
US10834419B2 (en) * 2016-04-13 2020-11-10 Qualcomm Incorporated Conformance constraint for collocated reference index in video coding
CN110476424B (en) * 2017-03-16 2022-03-04 联发科技股份有限公司 Video coding and decoding method and device
US10887622B2 (en) * 2017-07-05 2021-01-05 Qualcomm Incorporated Division-free bilateral filter
CN108363887A (en) * 2018-03-09 2018-08-03 西安交通大学 A kind of multi-level serial optimization method of fluid machinery simulated program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CE3-related: Alternative techniques for DC mode without division;Alexey Filippov;《Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 11th Meeting: Ljubljana, SI, 10–18 July 2018》;第1-7页 *

Also Published As

Publication number Publication date
WO2020228763A1 (en) 2020-11-19
CN113812159A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN113711612A (en) Signaling of chroma syntax elements in video coding and decoding
US20220408108A1 (en) Motion information storage for video coding and signaling
CN113785574B (en) Adaptive loop filtering of chrominance components
US11490086B2 (en) Block dimension settings of transform skip mode
US11539981B2 (en) Adaptive in-loop color-space transform for video coding
US11671591B2 (en) Quantization properties of adaptive in-loop color-space transform for video coding
US20240064315A1 (en) Use of offsets with adaptive colour transform coding tool
US11546595B2 (en) Sub-block based use of transform skip mode
CN113826398B (en) Interaction between transform skip mode and other codec tools
CN113812161B (en) Scaling method in video encoding and decoding
CN113853798A (en) Signaling syntax elements according to chroma format
CN113812159B (en) Scaling method in video encoding and decoding
CN115176460A (en) Palette mode for local dual trees

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant