WO2017075810A1 - 反量化变换系数的方法、装置及解码设备 - Google Patents

反量化变换系数的方法、装置及解码设备 Download PDF

Info

Publication number
WO2017075810A1
WO2017075810A1 PCT/CN2015/094008 CN2015094008W WO2017075810A1 WO 2017075810 A1 WO2017075810 A1 WO 2017075810A1 CN 2015094008 W CN2015094008 W CN 2015094008W WO 2017075810 A1 WO2017075810 A1 WO 2017075810A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
size
transform
transform coefficient
adjustment factor
Prior art date
Application number
PCT/CN2015/094008
Other languages
English (en)
French (fr)
Inventor
赵寅
杨海涛
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/094008 priority Critical patent/WO2017075810A1/zh
Priority to KR1020187008492A priority patent/KR102139159B1/ko
Priority to EP15907652.0A priority patent/EP3334160A4/en
Priority to BR112018007925-1A priority patent/BR112018007925A2/zh
Priority to CN201580073663.9A priority patent/CN107211133B/zh
Publication of WO2017075810A1 publication Critical patent/WO2017075810A1/zh
Priority to US15/970,638 priority patent/US10630983B2/en

Links

Images

Classifications

    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/18Methods 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 set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the invention belongs to the technical field of video codec, and in particular relates to a method, a device and a decoding device for inversely quantizing transform coefficients.
  • H.265/HEVC High Efficiency Video Coding
  • HEVC uses a hybrid Discrete Cosine Transformation (DCT) coding architecture based on block-based motion compensation.
  • DCT Discrete Cosine Transformation
  • the coding process of HEVC mainly includes prediction, transformation, quantization and entropy coding.
  • the decoding process mainly includes entropy decoding, prediction, inverse quantization and inverse transformation.
  • the reconstructed pixels of the coded region are used in the prediction process to generate predicted pixels of the original pixel corresponding to the current coded block, and the prediction mode mainly includes intra prediction and inter prediction; Residual (residual, the pixel value difference between the original pixel and the predicted pixel) is transformed, and converted into transform coefficient (transform coefficeent); in the quantization step, the transform coefficient is quantized; in the entropy coding step, The quantized transform coefficients and the coding mode information are converted into a code stream by an entropy coding process.
  • the decoding process in the entropy decoding step, the code stream is parsed by the entropy decoding process to decode the coding mode information and the quantized transform coefficients; in the prediction step, the prediction mode is obtained by using the coding mode information and the reconstructed pixels that have been decoded; In the link, the quantized transform coefficients are inversely quantized to obtain reconstructed transform coefficients; in the inverse transform link, the reconstructed transform coefficients are inversely transformed to obtain reconstructed residual information; and then, the reconstructed residual information and the predicted pixel are compared. Plus, the reconstructed pixels are obtained, thereby recovering the video image.
  • the reconstructed pixel and the original pixel may be different, the value between the two The difference is called distortion.
  • the visual entropy masking effect indicates that the human eye is less sensitive to complex areas than to simple areas, and signal distortions occurring in complex areas are less likely to be observed or weaker than flat areas. Visual intensity.
  • an encoding device analyzes a video sequence, determines quantization parameters of each coding block (including quantization step adjustment information of each coding block), and writes the quantization parameter into the code stream, and the decoding device according to The quantization parameter obtained by parsing the code stream determines the quantization step size of each coding block, and performs inverse quantization processing of the transform coefficients.
  • the solution has a defect: the code stream sent by the encoding device must carry the quantization step adjustment information of each coding block, and the decoding device can determine the quantization step size of each coding block based on the quantization step adjustment information in the code stream, thereby performing the quantization step size of each coding block.
  • the inverse quantization of the transform coefficients reduces the coding efficiency because the code stream carries the quantization step adjustment information of each coding block.
  • an object of the present invention is to provide a method, an apparatus, and a decoding apparatus for inversely quantizing transform coefficients.
  • the decoding apparatus can adaptively determine a quantization adjustment factor, thereby completing an inverse quantization process of the transform coefficients, and the encoding apparatus does not need to be in the code stream. Carrying quantization step size adjustment information to improve coding efficiency.
  • a method for inversely quantizing transform coefficients including:
  • the to-be-processed unit is a first transform unit
  • the determining, by using the split information, a unit size of a to-be-processed unit corresponding to the first set of transform coefficients specifically: utilizing The dividing information determines a size of the first transform unit, and determines that a size of the first transform unit is a unit size of the to-be-processed unit.
  • the to-be-processed unit is a first transform unit and a first coding unit
  • the first coding unit is a minimum coding unit that includes the first transform unit
  • the size of the first coding unit is determined as a unit size of the to-be-processed unit; and in a case where the size of the first coding unit is less than or equal to the first threshold, determining a size of the first transformation unit as The unit size of the processing unit is described.
  • the to-be-processed unit is a first transform unit and a first prediction unit, where the first prediction unit is: a coincident region with the first transform unit a prediction unit that has the largest overlap region in the prediction unit; the determining, by using the split information, a unit size of the to-be-processed unit corresponding to the first transform coefficient set, specifically:
  • the to-be-processed unit is a first change a unit, a first coding unit, and a first prediction unit, where the first coding unit is a minimum coding unit that includes the first transformation unit, and the first prediction unit is a coincidence region with the first transformation unit a maximum prediction unit; the determining, by using the division information, a unit size of the to-be-processed unit corresponding to the first transform coefficient set, specifically:
  • the division information determines a size of the first transformation unit, and determines a size of the first transformation unit as a unit size of the to-be-processed unit.
  • the to-be-processed unit is a first transform unit, a first coding unit, and a first prediction unit, where the first coding unit is configured to include the first transform unit a minimum coding unit, the first prediction unit is a maximum prediction unit that overlaps with the first transformation unit; and the determining, by using the division information, a unit size of the to-be-processed unit corresponding to the first transform coefficient set, specifically:
  • Determining a size of the first transform unit by using the split information determining a size of the first coding unit by using the split information; determining a size of the first prediction unit by using the split information; calculating the first A weighted average of a size of the transform unit, a size of the first coding unit, and a size of the first prediction unit, the weighted average value being determined as a unit size of the to-be-processed unit.
  • the to-be-processed unit corresponding to the first set of transform coefficients is a first coding unit, and the determining, by using the split information, a unit size of the to-be-processed unit corresponding to the first set of transform coefficients Specifically, the size of the first coding unit is determined by using the division information, and the size of the first coding unit is determined to be the unit size of the unit to be processed.
  • the to-be-processed unit corresponding to the first set of transform coefficients is a first prediction unit, and the determining, by using the split information, a unit size of the to-be-processed unit corresponding to the first set of transform coefficients Specifically, the size of the first prediction unit is determined by using the division information, and the size of the first prediction unit is determined to be the unit size of the unit to be processed.
  • the to-be-processed unit corresponding to the first set of transform coefficients is a first coding unit and a first prediction unit; and determining, by using the split information, a corresponding one of the first transform coefficient set
  • the unit size of the processing unit is specifically: determining the size of the first coding unit by using the division information; determining the size of the first prediction unit by using the division information; and if the size of the first coding unit is greater than the fourth threshold, the first coding
  • the size of the unit is determined as the size of the unit to be processed; in the case where the size of the first coding unit is less than or equal to the fourth threshold, the size of the first prediction unit is determined as the size of the unit to be processed.
  • the unit size according to the to-be-processed unit is in accordance with the first pre- And an algorithm determines a quantization adjustment factor of the first transform coefficient set, specifically:
  • the unit size according to the to-be-processed unit is in accordance with the first pre- And an algorithm determines a quantization adjustment factor of the first transform coefficient set, specifically:
  • the determining, by the first preset algorithm, the first transform coefficient set according to the unit size of the to-be-processed unit Quantitative adjustment factor specifically:
  • the quantization adjustment factor difference information dQC t is all or part greater than 0;
  • the determining, by the first preset algorithm, the first transform coefficient set according to the unit size of the to-be-processed unit Quantitative adjustment factor specifically:
  • the size of the coding unit having a small level value is larger than the size of the other coding unit, and the quantization adjustment factor difference information dQC p is all or part greater than 0;
  • Determining, in the P coding unit, a coding unit having the same size as the first coding unit is a target coding unit, and determining a quantization adjustment factor corresponding to the target coding unit as a quantization adjustment factor of the to-be-processed unit.
  • the determining, by the first preset algorithm, the first transform coefficient set according to the unit size of the to-be-processed unit Quantitative adjustment factor specifically:
  • Determining, in the Z prediction units, the prediction unit having the same size as the first prediction unit is a target prediction unit, and determining a quantization adjustment factor corresponding to the target prediction unit as a quantization adjustment factor of the unit to be processed.
  • the using the quantization adjustment factor according to the second preset algorithm The transform coefficients in the first transform coefficient set are inverse quantized, including:
  • R(i) sign ⁇ A(i) ⁇ round ⁇ A(i) ⁇ Qs(i) ⁇ QC+o2(i) ⁇
  • i 1, 2, ... N
  • N the number of transform coefficients included in the first set of transform coefficients
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i a first quantization step size corresponding to the i-th transform coefficient in the first transform coefficient set
  • QC is the quantization adjustment factor
  • o2(i) is a rounding corresponding to the i-th transform coefficient in the first transform coefficient set Offset
  • R(i) is the i-th transform coefficient in the second set of transform coefficients.
  • the using the quantization adjustment factor according to the second preset algorithm The transform coefficients in the first transform coefficient set are inverse quantized, including:
  • N N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the number An i-th transform coefficient in a set of transform coefficients
  • Qs ' (i) is a result obtained by integer processing of the original quantization step corresponding to the i-th transform coefficient in the first transform coefficient set
  • QC' is integerized
  • the quantized adjustment factor after processing bdshift is the shift number
  • delta is the extra shift number
  • is the left shift operator
  • >> is the right shift operator
  • R(i) is the second transform coefficient set.
  • the using the quantization adjustment factor according to the second preset algorithm The transform coefficients in the first transform coefficient set are inverse quantized, including:
  • N is the number of transform coefficients included in the first set of transform coefficients
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) The original quantization step size corresponding to the i-th transform coefficient in the first transform coefficient set
  • o4(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • B(i) is The i-th transform coefficient in the third transform coefficient set
  • QC is the quantization adjustment factor
  • o5(i) is a rounding offset corresponding to the i-th transform coefficient in the third transform coefficient set
  • R(i) is The i-th transform coefficient in the second transform coefficient set.
  • the using the quantization adjustment factor according to the second preset algorithm Performing inverse quantization processing on the transform coefficients in the first transform coefficient set, comprising: acquiring a level scale table corresponding to the quantization adjustment factor; determining, by using the level scale table, the first transform coefficient according to a third preset algorithm Collecting a quantization step size for performing an inverse quantization process; performing inverse quantization processing on the first transform coefficient set according to a fourth preset algorithm by using the quantization step size.
  • the obtaining a level scale table corresponding to the quantization adjustment factor includes: setting a preset level scale The M level scale values in the table are respectively multiplied by the quantization adjustment factor; the M products are respectively subjected to integer processing to obtain a level scale table for performing inverse quantization processing on the first transform coefficient set.
  • selecting an integer in a set of integers according to a preset rule includes:
  • a minimum value C k of the third intermediate value C j is determined, and an integer corresponding to the minimum value C k is selected in the integer set.
  • the acquiring a level scale table corresponding to the quantization adjustment factor includes: determining the quantization adjustment factor The value range corresponding to the preset value interval, wherein each value interval corresponds to a level scale table; and the level scale table corresponding to the value range to which the quantization adjustment factor belongs is obtained.
  • an apparatus for inversely quantizing transform coefficients including:
  • a unit size determining unit configured to determine, by using the splitting information, a unit size of the to-be-processed unit corresponding to the first transform coefficient set, where the first transform coefficient set and the split information are generated by entropy decoding the code stream;
  • a quantization adjustment factor determining unit configured to determine, according to a first preset algorithm, a quantization adjustment factor of the first transform coefficient set according to a unit size of the to-be-processed unit determined by the unit size determining unit, where the first pre- Setting an algorithm such that the quantization adjustment factor is in a decreasing relationship with a size of a unit size of the unit to be processed;
  • the inverse quantization unit is configured to perform inverse quantization processing on the transform coefficients in the first transform coefficient set according to the second preset algorithm by using the quantization adjustment factor determined by the quantization adjustment factor determining unit to obtain a second transform coefficient set.
  • the to-be-processed unit is a first transform unit
  • the unit size determining unit includes: a first size determining module, where the first information is determined by using the split information a size of the transform unit; a first processing module, configured to determine that a size of the first transform unit determined by the first size determining module is a unit size of the to-be-processed unit.
  • the to-be-processed unit is a first transform unit and a first coding unit, where the first coding unit is a minimum coding unit that includes the first transform unit;
  • the unit size determining unit includes: a first size determining module, configured to determine a size of the first transform unit by using the split information; and a second size determining module, configured to determine the first code by using the split information a size of the unit, the second processing module, configured to determine, according to a size of the first coding unit that the size of the first coding unit is greater than a first threshold, a size of the first coding unit determined by the second size determining module a unit size of the unit to be processed, where the size of the first coding unit is less than or equal to the first threshold, determining a size of the first transformation unit determined by the first size determination module as The unit size of the unit to be processed.
  • the to-be-processed unit is a first transform unit and a first prediction unit, where the first prediction unit is: a coincident region with the first transform unit a prediction unit that has the largest overlap region in the prediction unit;
  • the unit size determination unit includes: a first size determination module, configured to determine a size of the first transformation unit by using the division information; and a third size determination module, configured to utilize The dividing information determines a size of the first prediction unit, and a third processing module, configured to: if the size of the first prediction unit determined by the third size determining module is greater than a second threshold, The size of the first prediction unit is determined as a unit size of the to-be-processed unit, and if the size of the first prediction unit determined by the third size determination module is less than or equal to the second threshold, The size of the first transform unit is determined as the unit size of the unit to be processed.
  • the to-be-processed unit is a first transform unit, a first coding unit, and a first prediction unit
  • the first coding unit is configured to include the first transform unit a minimum coding unit, the first prediction unit being a maximum prediction unit having a coincidence region with the first transformation unit
  • the unit size determination unit comprising: a first size determination module, configured to determine, by using the partition information The size of the first transform unit; the second size determining module, Determining, by using the splitting information, a size of the first coding unit; a third size determining module, configured to determine a size of the first prediction unit by using the split information; and an average value calculation module, configured to calculate the An average of a size of the first prediction unit and a size of the first coding unit; a fourth processing module, configured to determine the average value as the to-be-processed unit if the average value is greater than a third threshold a unit size, where the average value calculated by the first size determining module is
  • the to-be-processed unit is a first transform unit, a first coding unit, and a first prediction unit
  • the first coding unit is configured to include the first transform unit a minimum coding unit, the first prediction unit being a maximum prediction unit overlapping the first transformation unit
  • the unit size determination unit comprising: a first size determination module, configured to determine the first a size of a transform unit, a second size determining module, configured to determine a size of the first coding unit by using the split information, and a third size determining module, configured to determine, by using the split information, the first prediction unit a fifth processing module, configured to calculate a size of the first transform unit, a size of the first coding unit, and a weighted average of sizes of the first prediction unit, and determine the weighted average value as
  • the unit size of the processing unit is described.
  • the to-be-processed unit is a first coding unit
  • the unit size determining unit includes: a second size determining module, configured to determine, by using the split information, the first coding unit
  • the sixth processing module is configured to determine that the size of the first coding unit determined by the second size determining module is the size of the unit to be processed.
  • the to-be-processed unit corresponding to the first set of transform coefficients is a first prediction unit
  • the unit size determining unit includes: a third size determining module, configured to utilize The dividing information determines a size of the first prediction unit; and the seventh processing module is configured to determine that the size of the first prediction unit determined by the third size determining module is the size of the unit to be processed.
  • the to-be-processed unit corresponding to the first set of transform coefficients is a first coding unit and a first prediction unit; and the unit size determining unit includes: second size determining a module, configured to determine a size of the first coding unit by using the division information; a third size determination module, configured to determine a size of the first prediction unit by using the division information; and an eighth processing unit, In a case that the size of the first coding unit determined by the second size determining module is greater than the fourth threshold, determining the size of the first coding unit as the size of the unit to be processed, and the first coding unit determined by the second size determining module In the case where the size is less than or equal to the fourth threshold, the size of the first prediction unit is determined as the size of the unit to be processed.
  • the quantization adjustment factor determining unit includes a first quantization adjustment factor determining module
  • the first quantization adjustment factor determining module utilizes a formula Calculating a quantization adjustment factor of the first transform coefficient set, where QC is a quantization adjustment factor of the first transform coefficient set, Size is a unit size of the to-be-processed unit, and N 1 and M 1 are not less than 1 Positive numbers, K 1 and A 1 are positive numbers.
  • the quantization adjustment factor determining unit includes a second quantization adjustment factor determining module
  • the second quantization adjustment factor determining module utilizes a formula Calculating a quantization adjustment factor of the first transform coefficient set; wherein, QC is a quantization adjustment factor of the first transform coefficient set, Size is a unit size of the to-be-processed unit, and N 1 is a positive number not less than 1, a 1 and b 1 are positive numbers.
  • the quantization adjustment factor determining unit includes:
  • a first parsing module configured to parse the code stream, obtain a size of the T transform unit that is allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the maximum transform unit, and a t-th transform unit relative to the t-th
  • a first calculating module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum transform unit, and a quantization adjustment factor difference information dQC t of the t-th transform unit with respect to the t-1th-level transform unit a quantization adjustment factor corresponding to the transformation unit;
  • a third quantization adjustment factor determining module configured to determine that a transform unit of the T transform unit that is the same size as the first transform unit is a target transform unit, and determine that a quantization adjustment factor corresponding to the target transform unit is the The quantization adjustment factor of the unit to be processed.
  • the quantization adjustment factor determining unit includes:
  • a second parsing module configured to parse the code stream, obtain a size of P coding units allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the maximum coding unit, and a p-th coding unit relative to the p-1 level
  • the size of the coding unit having a small level value is larger than the size of the other coding unit, and the quantization adjustment factor difference information dQC p is all or part greater than 0;
  • a second calculating module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum coding unit, and a quantization adjustment factor difference information dQC p of the p- th coding unit with respect to the p-1th coding unit, to determine corresponding to the P coding unit Quantitative adjustment factor;
  • a fourth quantization adjustment factor determining module configured to determine, as a target coding unit, a coding unit that is the same size as the first coding unit in the P coding unit, and determines a quantization adjustment factor corresponding to the target coding unit as a quantization adjustment factor of the to-be-processed unit .
  • the quantization adjustment factor determining unit includes:
  • a third parsing module configured to parse the code stream, obtain a size of Z prediction units allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the largest prediction unit, and a z-th prediction unit relative to the z-1 level
  • the size of the prediction unit with a small level value is larger than the size of another prediction unit, and the quantization adjustment factor difference information dQC z is all or part greater than 0.
  • a third calculating module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum prediction unit, and a quantization adjustment factor difference information dQC z of the z- th prediction unit relative to the z-1th-level prediction unit, to determine corresponding to the Z prediction units Quantitative adjustment factor;
  • a fifth quantization adjustment factor determining module configured to determine one of the Z prediction units and the first prediction unit
  • the prediction unit with the same size is the target prediction unit, and the quantization adjustment factor corresponding to the target prediction unit is determined as the quantization adjustment factor of the unit to be processed.
  • the inverse quantization unit includes a first inverse quantization module
  • N is the number of transform coefficients included in the first set of transform coefficients
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) The original quantization step size corresponding to the i-th transform coefficient in the first transform coefficient set
  • QC is the quantization adjustment factor
  • o2(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • R(i) be the i-th transform coefficient in the second set of transform coefficients.
  • the inverse quantization unit includes:
  • a first integer processing module configured to perform integer processing on the quantization adjustment factor
  • a second integer processing module configured to perform integer processing on the original quantization step size corresponding to each transform coefficient in the first transform coefficient set
  • Second inverse quantization module for utilizing formulas
  • N is the number of transform coefficients included in the first set of transform coefficients
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs ' i a result obtained by integer processing of the original quantization step corresponding to the i-th transform coefficient in the first transform coefficient set
  • QC' is an integer-adjusted quantization adjustment factor
  • bdshift is a shift number
  • delta is The extra shift number
  • is the left shift operator
  • >> is the right shift operator
  • R(i) is the ith transform coefficient in the second transform coefficient set.
  • the inverse quantization unit includes:
  • N is the number of transform coefficients included in the first set of transform coefficients
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) The original quantization step size corresponding to the i-th transform coefficient in the first transform coefficient set
  • o4(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • B(i) is The i-th transform coefficient in the third transform coefficient set
  • QC is the quantization adjustment factor
  • o5(i) is a rounding offset corresponding to the i-th transform coefficient in the third transform coefficient set
  • R(i) is The i-th transform coefficient in the second transform coefficient set.
  • the inverse quantization unit includes: a level scale table obtaining module, configured to acquire a level scale table corresponding to the quantization adjustment factor; a quantization step size determining module, configured to acquire a level scale table acquired by the module by using the level scale table, and determine the first transform according to a third preset algorithm a quantization step size of the inverse quantization process of the coefficient set; a fourth inverse quantization module, configured to perform inverse quantization on the first transform coefficient set according to the fourth preset algorithm by using the quantization step size determined by the quantization step size determining module deal with.
  • the level scale table obtaining module includes: a calculating submodule, configured to use a preset level scale table The M level scale values are respectively multiplied by the quantization adjustment factor; the first integerization processing submodule is configured to perform integerization processing on the M products obtained by the calculation submodule respectively, to obtain the first A level scale table in which the transform coefficient set is subjected to inverse quantization processing.
  • the processing submodule is specifically configured to:
  • the level scale table obtaining module includes: an interval determining submodule, configured to determine that the quantization adjustment factor is a value interval corresponding to the preset plurality of value intervals, wherein each value interval corresponds to a level scale table; the level scale table obtaining submodule is configured to obtain the location determined by the interval determining submodule The level scale table corresponding to the value interval to which the quantization adjustment factor belongs is described.
  • a third aspect of the embodiments of the present invention provides a decoding device, including a processor, a memory, and a communication bus; the memory is configured to store a program; and the processor is configured to execute by using a program stored in the memory.
  • the dividing information determines a unit size of the to-be-processed unit corresponding to the first transform coefficient set, wherein the first transform coefficient set and the split information are generated by entropy decoding the code stream; according to the unit size of the to-be-processed unit Determining, by the first preset algorithm, a quantization adjustment factor of the first transform coefficient set, the first preset algorithm causing the quantization adjustment factor to be in a decreasing relationship with a size of a unit size of the to-be-processed unit; The adjustment factor performs inverse quantization processing on the transform coefficients in the first transform coefficient set according to a second preset algorithm to obtain a second transform coefficient set.
  • the method for inversely transforming transform coefficients disclosed by the present invention determines the unit size of a unit to be processed corresponding to the first transform coefficient set by using the split information, and based on the unit size of the unit to be processed and the strong correlation of the image complexity, according to the unit to be processed
  • the unit size adaptively determines a quantization adjustment factor of the first transform coefficient set, and uses the quantization adjustment factor to inverse the transform coefficient in the first transform coefficient set Processing.
  • a decoding apparatus adaptively determines a quantization adjustment factor of a first transform coefficient set according to a unit size of a unit to be processed, and then concentrates the first transform coefficient by using the determined quantization adjustment factor.
  • the transform coefficients are subjected to inverse quantization processing. Since the code stream transmitted by the encoding device does not need to carry the quantization step size adjustment information, the coding efficiency can be improved.
  • FIG. 1 is a flow chart of a method for inverse quantizing a transform coefficient according to the present disclosure
  • FIG. 2 is a schematic diagram of a division manner of a coding unit
  • FIG. 3 is a flowchart of a method for determining a quantization adjustment factor of a first transform coefficient set according to the present disclosure
  • FIG. 4 is a flowchart of a method for performing inverse quantization processing on transform coefficients in a first transform coefficient set according to a second preset algorithm by using a quantization adjustment factor according to the present disclosure
  • FIG. 5 is a schematic structural diagram of an apparatus for inverse quantizing a transform coefficient according to the present disclosure
  • FIG. 6 is a hardware structural diagram of a decoding device according to the present disclosure.
  • a block structure includes a coding unit (CU), a prediction unit (PU), and a transform unit (TU).
  • the coding unit is A block of 2N*2N, and each coding unit can be recursively divided into four smaller coding units until a predetermined minimum size (e.g., 8 pixels * 8 pixels) is reached.
  • Each coding unit includes one or more variable size prediction units, and the division of the prediction unit can be divided into symmetric division and asymmetric division.
  • Each coding unit includes one or more transform units, each of which may be recursively divided into four smaller transform units until a predetermined minimum size (e.g., 4 pixels * 4 pixels) is reached.
  • the decoding device can adaptively determine the quantization adjustment factor, thereby completing the inverse quantization process of the transform coefficients, and the code stream sent by the encoding device does not need to carry the quantization step size adjustment information, thereby improving Coding efficiency.
  • the coding efficiency refers to the ratio of the number of information symbols to the code length, which is also called the code rate.
  • FIG. 1 is a flowchart of a method for inverse quantizing a transform coefficient according to the present disclosure. The method includes:
  • Step S11 determining, by using the split information, a unit size of the to-be-processed unit corresponding to the first transform coefficient set.
  • the first set of transform coefficients is generated by entropy decoding the code stream.
  • the split information is generated by entropy decoding the code stream.
  • the transform coefficients in the first transform coefficient set are the transform coefficients of the residual generated by the intra prediction encoding, and may be the transform coefficients of the residual generated by the inter prediction encoding.
  • the transform coefficient in the first transform coefficient set is a transform coefficient of any signal component in the video signal, for example, a transform coefficient of a luma component, a transform coefficient of a chroma component, a transform coefficient of an R component, a transform coefficient of a G component, or The transform coefficient of the B component.
  • the first transform coefficient set may include all transform coefficients of one transform block, and may also include a part of transform coefficients of one transform block, for example, a DC coefficient in one transform block, or a group of low frequencies in one transform block.
  • Step S12 Determine, according to the unit size of the unit to be processed, a quantization adjustment factor of the first transform coefficient set according to a first preset algorithm, the first preset algorithm causing the quantization adjustment factor to be in a decreasing relationship with the size of the unit to be processed.
  • the quantization adjustment factor of the first transform coefficient set may be determined according to the unit size of the unit to be processed, wherein the quantization adjustment factor of the first transform coefficient set is degressively related to the unit size of the unit to be processed. . That is to say, the quantization adjustment factor of the first transform coefficient set decreases as the cell size of the unit to be processed increases.
  • Step S13 Perform inverse quantization processing on the transform coefficients in the first transform coefficient set according to the second preset algorithm by using the quantization adjustment factor to obtain a second transform coefficient set.
  • the decoding device adaptively derives a quantization adjustment factor of the first transform coefficient set based on a strong correlation between a unit size of the to-be-processed unit and an image complexity, and performs inverse quantization processing on the transform coefficients in the first transform coefficient set by using the quantization adjustment factor, A second set of transform coefficients is obtained.
  • the method for inversely transforming transform coefficients disclosed by the present invention determines the unit size of a unit to be processed corresponding to the first transform coefficient set by using the split information, and based on the unit size of the unit to be processed and the strong correlation of the image complexity, according to the unit to be processed
  • the unit size adaptively determines a quantization adjustment factor of the first transform coefficient set, and performs inverse quantization processing on the transform coefficients in the first transform coefficient set by using the quantization adjustment factor.
  • a decoding apparatus adaptively determines a quantization adjustment factor of a first transform coefficient set according to a unit size of a unit to be processed, and then concentrates the first transform coefficient by using the determined quantization adjustment factor.
  • the transform coefficients are subjected to inverse quantization processing. Since the code stream transmitted by the encoding device does not need to carry the quantization step size adjustment information, the coding efficiency can be improved.
  • the to-be-processed unit corresponding to the first transform coefficient set has multiple forms, which are separately described below.
  • the to-be-processed unit corresponding to the first transform coefficient set is the first transform unit.
  • the transform coefficient of the first transform unit includes transform coefficients in the first transform coefficient set.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first transform unit by using the split information, and determining that the size of the first transform unit is the unit to be processed Unit size.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first transform unit and a first coding unit.
  • the first coding unit is a minimum coding unit including a first transform unit.
  • the coding unit of 32 pixels*32 pixels is divided into four coding units of 16 pixels*16 pixels, and one coding unit of 16 pixels*16 pixels is divided into four transform units of 8 pixels*8 pixels, if the first A transform unit is a transform unit of 8 pixels*8 pixels, and then the first coding unit is a 16-pixel*16-pixel coding unit in which the transform unit of the 8-pixel*8-pixel is located.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first transform unit by using the split information; determining the size of the first coding unit by using the split information; If the size of the first coding unit is greater than the first threshold, the size of the first coding unit is determined as the unit size of the unit to be processed; and in the case where the size of the first coding unit is less than or equal to the first threshold, the first The size of the transform unit is determined as the unit size of the unit to be processed.
  • the first threshold is, for example, 8, 12, 16, or 32.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first transform unit and a first prediction unit.
  • the first prediction unit is: a prediction unit having the largest overlap region among the prediction units in which the first transform unit has a coincidence region.
  • the prediction unit is the first prediction unit; if the first transform unit is simultaneously The prediction unit has a coincidence region, and the prediction unit with the largest overlap region of the plurality of prediction units is the first prediction unit; if the first transformation unit has coincidence regions with the plurality of prediction units at the same time, and there are two The prediction unit and the overlap region of the first transform unit have the same area and are the maximum value, and any one of the two prediction units is used as the first prediction unit.
  • a coding unit CU1 of 16 pixels*16 pixels is divided into a transform unit of 16 pixels*16 pixels, which is a first transform unit, denoted by TU1, and the coding unit CU1 is additionally used.
  • the prediction unit in which the coincidence region exists is the prediction unit PU1 and the prediction unit PU2, and the area of the coincidence region of the prediction unit PU2 and the first transformation unit TU1 is the largest, and the prediction unit PU2 is the first prediction unit.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first transform unit by using the split information; Determining a size of the first prediction unit by using the split information; determining, if the size of the first prediction unit is greater than the second threshold, a size of the first prediction unit as a unit size of the unit to be processed; and a size of the first prediction unit is smaller than Or equal to the second threshold, the size of the first transform unit is determined as the unit size of the unit to be processed.
  • the second threshold is, for example, 8, 16, Or 32.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first transform unit, a first coding unit, and a first prediction unit.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first prediction unit by using the split information; determining the size of the first coding unit by using the split information; An average of the size of the first prediction unit and the size of the first coding unit; where the average value is greater than the third threshold, the average value is determined as the unit size of the unit to be processed; and the average value is less than or equal to the third threshold
  • the size of the first transform unit is determined using the split information, and the size of the first transform unit is determined as the unit size of the unit to be processed.
  • the third threshold is, for example, 8, 12, 16, or 32.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information.
  • Determining a size of the first transform unit by using the split information determining a size of the first coding unit by using the split information; determining a size of the first prediction unit by using the split information; calculating a size of the first transform unit, a size of the first coding unit, and the first A weighted average of the dimensions of the prediction unit, the weighted average is determined as the unit size of the unit to be processed.
  • the size of the first coding unit may be set to be greater than the first transformation unit and the first pre- The weight of the dimensions of the unit.
  • the weight of the size of the first prediction unit is set to 0.25
  • the weight of the size of the first transformation unit is 0.25
  • the weight of the size of the first coding unit is 0.5
  • the weight of the size of the first prediction unit is set to 0.1
  • the weight of the size of the first transform unit is 0.3, the weight of the size of the first coding unit is 0.6; or the weight of the size of the first prediction unit is set to 0.3, and the weight of the size of the first transform unit is 0.2
  • the size of the unit has a weight of 0.5.
  • the to-be-processed unit corresponding to the first transform coefficient set is the first coding unit.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first coding unit by using the split information, and determining that the size of the first coding unit is the unit to be processed Unit size.
  • the to-be-processed unit corresponding to the first transform coefficient set is the first prediction unit.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first prediction unit by using the split information, and determining that the size of the first prediction unit is the unit to be processed Unit size.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first coding unit and a first prediction unit.
  • the unit size of the to-be-processed unit corresponding to the first transform coefficient set is determined by using the split information, specifically: determining the size of the first coding unit by using the split information; determining the size of the first prediction unit by using the split information; Where the size of the first coding unit is greater than the fourth threshold, the size of the first coding unit is determined as the size of the unit to be processed; and in the case where the size of the first coding unit is less than or equal to the fourth threshold, the first prediction is to be performed The size of the unit is determined as the size of the unit to be processed.
  • the fourth threshold is, for example, 8, 12, 16, or 32.
  • the size of the first transform unit is the square root of the total number of pixels covered by the first transform unit; the size of the first coding unit is the pixel covered by the first coding unit.
  • the square root of the total; the size of the first prediction unit is the square root of the total number of pixels covered by the first prediction unit.
  • the first transform unit is a rectangle
  • the width and height of the first transform unit are obtained, and the square root of the product of the width and the height is taken as the size of the first transform unit.
  • the first transform unit is a square, it is only necessary to acquire the width or height of the first transform unit as the size of the first transform unit. If the first transform unit is non-rectangular, it is necessary to count the total number of pixels covered by the first transform unit, and the square root of the total number of pixels is used as the size of the first transform unit.
  • the first coding unit is a rectangle, the width and height of the first coding unit are obtained, and the square root of the product of width and height is taken as the size of the first coding unit. If the first coding unit is a square, it is only necessary to acquire the width or height of the first coding unit as the size of the coding unit.
  • the first prediction unit is a rectangle, the width and height of the first prediction unit are obtained, and the square root of the product of width and height is taken as the size of the prediction unit. If the first prediction unit is a square, it is only necessary to acquire the width or height of the first prediction unit as the size of the first prediction unit.
  • the quantization adjustment factor of the first transform coefficient set is determined according to the unit size of the unit to be processed according to the first preset algorithm, and various manners may be adopted. The following description will be respectively made.
  • a quantization adjustment factor of the first set of transform coefficients is calculated.
  • QC is a quantization adjustment factor of the first transform coefficient set
  • Size is a unit size of the unit to be processed
  • N 1 and M 1 are positive numbers not less than 1
  • K 1 and A 1 are positive numbers.
  • a quantization adjustment factor of the first set of transform coefficients is calculated.
  • QC is a quantization adjustment factor of the first transform coefficient set
  • Size is a unit size of the unit to be processed
  • N 1 is a positive number not less than 1
  • a 1 and b 1 are positive numbers.
  • the quantization adjustment factor of the first transform coefficient set is determined according to the unit size of the unit to be processed according to the first preset algorithm, and the manner shown in FIG. 3 may also be adopted.
  • Step S31 Parsing the code stream, obtaining the size of the T-type transform unit that is allowed to be carried in the code stream, the quantization adjustment factor QC 1 corresponding to the maximum transform unit, and the quantization of the t-th transform unit with respect to the t-1th-level transform unit.
  • the adjustment factor difference information dQC t The adjustment factor difference information dQC t .
  • T is an integer greater than 3.
  • the size of the transform unit having a small level value is larger than the size of the other transform unit, and the quantization adjustment factor difference information dQC t is all or partially greater than zero.
  • Step S32 determining, by the quantization adjustment factor QC 1 corresponding to the maximum transform unit, and the quantization adjustment factor difference information dQC t of the t-th transform unit with respect to the t-1th transform unit, the quantization adjustment factor corresponding to the T transform unit.
  • Step S33 Determine a transform unit that is the same size as the first transform unit in the T transform unit as a target transform unit, and determine that the quantization adjustment factor corresponding to the target transform unit is a quantization adjustment factor of the unit to be processed.
  • the quantization adjustment factor corresponding to the five transform units is determined by the quantization adjustment factor QC 1 corresponding to the maximum transform unit and the quantization adjustment factor difference information dQC t of the t-th transform unit with respect to the t-1th transform unit.
  • the quantization adjustment factor QC 2 QC 1 + dQC 2 corresponding to the second-order transform unit
  • the quantization adjustment factor QC 3 QC 2 + dQC 3 corresponding to the third-order transform unit
  • the quantization adjustment factor QC 4 QC 3 + dQC 4 corresponding to the fourth-order transform unit
  • the quantization adjustment factor QC 5 corresponding to the fifth-order transform unit is QC 4 +dQC 5 ; wherein QC 1 , dQC 2 , dQC 3 , dQC 4 and dQC 5 are known quantities, thereby determining five transform units Corresponding quantization adjustment factor.
  • the size of the first transform unit and the size of the above five transform units are compared, and if the size of the first transform unit is the same as the size of the third transform unit, it is determined that the quantization adjustment factor of the unit to be processed is QC 3 .
  • the quantization adjustment factor of the first transform coefficient set is determined according to the unit size of the to-be-processed unit according to the first preset algorithm, and the method may also be adopted:
  • Parsing the code stream obtaining a size of P coding units allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the maximum coding unit, and a quantization adjustment factor difference of the p-th coding unit relative to the p-1th coding unit Information dQC p .
  • p 2, 3, ... P
  • P is an integer greater than 3.
  • the size of the coding unit having a small level value is larger than the size of the other coding unit, and the quantization adjustment factor difference information dQC p is all or partially greater than zero.
  • the quantization adjustment factor corresponding to the P coding units is determined by the quantization adjustment factor QC 1 corresponding to the maximum coding unit and the quantization adjustment factor difference information dQC p of the p- th coding unit with respect to the p-1th coding unit.
  • Determining, in the P coding unit, a coding unit having the same size as the first coding unit is a target coding unit, and determining a quantization adjustment factor corresponding to the target coding unit as a quantization adjustment factor of the to-be-processed unit.
  • the quantization adjustment factor of the first transform coefficient set is determined according to the unit size of the to-be-processed unit according to the first preset algorithm, and the method may also be adopted:
  • Parsing the code stream obtaining the size of the Z prediction units allowed to be used carried by the code stream, the quantization adjustment factor QC 1 corresponding to the largest prediction unit, and the quantization adjustment factor difference of the z-th prediction unit relative to the z-1th prediction unit Information dQC z .
  • z 2, 3, ... Z
  • Z is an integer greater than 3.
  • the size of the prediction unit having a small level value is larger than the size of another prediction unit, and the quantization adjustment factor difference information dQC z is all or partially greater than zero.
  • the quantization adjustment factor corresponding to the Z prediction units is determined by the quantization adjustment factor QC 1 corresponding to the maximum prediction unit and the quantization adjustment factor difference information dQC z of the z- th prediction unit with respect to the z-1th prediction unit.
  • the transform coefficients of the first transform coefficient set are inverse quantized according to the second preset algorithm by using the quantization adjustment factor, and various forms may be adopted, which are respectively described below. .
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) is the first transform.
  • QC is a quantization adjustment factor
  • o2(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • R(i) is a second transform The i-th transform coefficient in the set of coefficients.
  • sign ⁇ X ⁇ represents the symbol of X, that is, Round ⁇ X ⁇ is a rounding operation.
  • the value of o2(i) determines whether it is rounded down, rounded or rounded up. For example, when o2(i) is 0.5, round ⁇ X ⁇ is specifically rounded off. When o2(i) is 1, round ⁇ X ⁇ is specifically rounded up. When o2(i) is 0, round ⁇ X ⁇ is rounded down.
  • the original quantization step size corresponding to the transform coefficient in the first transform coefficient set is: a quantization step size corresponding to a quantization parameter (QP) of the first transform unit or the first coding unit corresponding to the first transform coefficient set, for example, a quantization parameter
  • the corresponding quantization step size is 1 at 4 o'clock.
  • the quantization parameter of the coding unit may be obtained by parsing the code stream; the quantization parameter of the transformation unit may inherit the quantization parameter of the coding unit where the transformation unit is located, or may be modified according to the quantization parameter information in the code stream on the quantization parameter of the coding unit.
  • the original quantization step size corresponding to each transform coefficient in the first transform coefficient set may be the same or different.
  • each transform coefficient in the first transform coefficient set is quantized by a quantization adjustment factor
  • the corresponding original quantization step size is scaled, and then the corresponding transform coefficients in the first transform coefficient set are inverse quantized by using the scaled quantization step size.
  • Equation 1 is:
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs′(i) is the first
  • QC ′ is the quantized adjustment factor after integer processing
  • bdshift is the shift number
  • delta is the extra shift number.
  • is the left shift operator
  • >> is the right shift operator
  • R(i) is the ith transform coefficient in the second transform coefficient set.
  • the integer quantization process for the quantization adjustment factor and the original quantization step size corresponding to each transform coefficient in the first transform coefficient set may be rounded up, rounded down, or rounded off.
  • the original quantization step size corresponding to each of the quantization adjustment factors and the first transform coefficient set is integerized, and then the integer adjustment processing factor is used to integerize each transform coefficient.
  • the quantization step size is scaled, and the transform coefficients corresponding to the first transform coefficient set are inverse quantized by the scaled quantization step size.
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) is the first transform.
  • o4(i) is the rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • B(i) is the i-th in the third transform coefficient set Transform coefficient
  • QC is the quantization adjustment factor
  • o5(i) is the third
  • R(i) is the i-th transform coefficient in the second transform coefficient set.
  • the values of o4(i) and o5(i) determine whether the rounding operation is rounded down, rounded or rounded up.
  • the transform coefficients are inverse quantized by using the original quantization step size of each transform coefficient in the first transform coefficient set, and then the transform coefficients obtained by the inverse quantization process are scaled by the quantization adjustment factor.
  • FIG. 4 is a flowchart of a method for performing inverse quantization processing on transform coefficients in a first transform coefficient set according to a second preset algorithm by using a quantization adjustment factor.
  • Step S41 Acquire a level scale table corresponding to the quantization adjustment factor.
  • the level scale table corresponding to the quantization adjustment factor can be obtained in various ways. A detailed description will be given below.
  • the level scale table includes a plurality of level scale values, such as including 6 level scale values ⁇ 40, 45, 51, 57, 64, 72 ⁇ or includes 8 level scale values ⁇ 108, 118, 128, 140, 152, 166, 181, 197 ⁇ .
  • Step S42 Determine, by using the level scale table, a quantization step size for performing inverse quantization processing on the first transform coefficient set according to a third preset algorithm.
  • m(i) is a scaling factor, which can be obtained by parsing the code stream
  • l(i) is a function of the level scale value and the quantization parameter.
  • levelScale[K] represents the Kth level scale value in the level scale table. Indicates that Q is divided by N and rounded down, % is the remainder operation, ⁇ is the left shift operator, and N is the number of level scale values in the level scale table. In the case where the level scale includes 6 level scale values, In the case where the level scale includes 8 level scale values,
  • Step S43 Perform inverse quantization processing on the first transform coefficient set according to the fourth preset algorithm by using the quantization step size.
  • any existing method may be used.
  • the first set of transform coefficients is subjected to inverse quantization processing to obtain a first set of transform coefficients.
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs”(i) is the first a quantization step size corresponding to the i-th transform coefficient in the transform coefficient set
  • o6(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • R(i) is the i-th in the second transform coefficient set Transform coefficient.
  • the level scale table corresponding to the quantization adjustment factor is obtained, and the following manner can be employed.
  • the M level scale values in the preset level scale table are respectively multiplied by the quantization adjustment factor; the M products are respectively subjected to integer processing to obtain a level scale table for performing inverse quantization processing on the first transform coefficient set.
  • each level scale value in the preset level scale table is multiplied by the quantization adjustment factor QC and rounded to obtain a new level scale table for the first transform coefficient set.
  • the M products are respectively integerized, and may be rounded up, rounded down, or rounded off.
  • the range of the quantization adjustment factor is divided into H1 value intervals, and each value interval corresponds to a preset level scale table. Searching the calculated value interval to which the calculated quantization adjustment factor belongs, and selecting a level scale table corresponding to the value interval, the level scale table as a level scale table for performing inverse quantization processing on the first transform coefficient set.
  • Tables 1 and 2 show a mapping relationship between the quantization adjustment factor and the level scale table, respectively.
  • Level scale QC ⁇ 1.5 ⁇ 60,68,77,86,96,108 ⁇ 1.2 ⁇ QC ⁇ 1.5 ⁇ 54,61,69,77,86,97 ⁇ 0.8 ⁇ QC ⁇ 1.2 ⁇ 40,45,51,57,64,72 ⁇ 0.6 ⁇ QC ⁇ 0.8 ⁇ 28,32,36,40,45,50 ⁇ QC ⁇ 0.6 ⁇ 24,27,31,34,38,43 ⁇
  • Multiplying the M level scale values in the preset level scale table by the quantization adjustment factor respectively; performing integer processing on the M products to obtain M intermediate values; determining M integer sets, wherein the mth The integer set is centered on the mth intermediate value, m 1, 2, . . . , M; an integer is selected in each of the M integer sets according to a preset rule to form a level for performing inverse quantization processing on the first transform coefficient set. Scale table.
  • the M products are respectively integerized, and may be rounded up, rounded down, or rounded off.
  • selecting an integer in a set of integers according to a preset rule can be as follows:
  • a minimum value C k in the third intermediate value C j is determined, and an integer corresponding to the minimum value C k is selected in the integer set.
  • the present invention also discloses an apparatus for inversely quantizing transform coefficients, and the apparatus for inverse quantizing transform coefficients described below may be referred to in correspondence with the method of inversely quantizing transform coefficients above.
  • FIG. 5 is a schematic structural diagram of an apparatus for inverse quantizing transform coefficients according to the present disclosure.
  • the apparatus includes a unit size determining unit 1, a quantization adjustment factor determining unit 2, and an inverse quantization unit 3.
  • the unit size determining unit 1 is configured to determine a unit size of the to-be-processed unit corresponding to the first transform coefficient set by using the split information, wherein the first transform coefficient set and the split information are generated by entropy decoding the code stream.
  • a quantization adjustment factor determining unit 2 configured to determine, according to a first preset algorithm, a quantization adjustment factor of the first transform coefficient set according to a unit size of the to-be-processed unit determined by the unit size determining unit, where the first preset algorithm causes the quantization adjustment factor to The size of the unit size of the unit to be processed is in a decreasing relationship.
  • the inverse quantization unit 3 is configured to perform inverse quantization processing on the transform coefficients in the first transform coefficient set according to the second preset algorithm by using the quantization adjustment factor determined by the quantization adjustment factor determining unit to obtain a second transform coefficient set.
  • the unit size determining unit determines the unit size of the to-be-processed unit corresponding to the first transform coefficient set by using the split information
  • the quantization adjustment factor determining unit is based on the unit size and image complexity of the unit to be processed. Strong correlation, the quantization adjustment factor of the first transform coefficient set is adaptively determined according to the unit size of the unit to be processed, and the inverse quantization unit performs inverse quantization processing on the transform coefficients in the first transform coefficient set by using the quantization adjustment factor.
  • the decoding apparatus adaptively determines the quantization adjustment factor of the first transform coefficient set according to the unit size of the unit to be processed, and then performs the transform coefficient of the first transform coefficient set by using the determined quantization adjustment factor
  • the inverse quantization process can improve the coding efficiency because the code stream sent by the encoding device does not need to carry the quantization step adjustment information.
  • the to-be-processed unit corresponding to the first set of transform coefficients has various forms, and correspondingly, the unit size determining unit 1 has various structures.
  • the to-be-processed unit corresponding to the first transform coefficient set is the first transform unit.
  • the unit size determining unit 1 includes: a first size determining module, the size of the first transform unit is determined by using the splitting information; and the first processing module is configured to determine that the size of the first transform unit determined by the first size determining module is The unit size of the processing unit.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first transform unit and a first coding unit.
  • the unit size determining unit 1 includes: a first size determining module, configured to determine a size of the first transform unit by using the split information; a second size determining module, configured to determine a size of the first coding unit by using the split information; a processing module, configured to determine, according to a size of the first coding unit that the size of the first coding unit is greater than the first threshold, a size of the first coding unit determined by the second size determination module as a unit size of the to-be-processed unit, and a size of the first coding unit In the case of less than or equal to the first threshold, the size of the first transform unit determined by the first size determining module is determined as the unit size of the unit to be processed.
  • the first threshold is, for example, 8, 12, 16, or 32.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first transform unit and a first prediction unit.
  • the unit size determining unit 1 includes: a first size determining module, configured to determine a size of the first transform unit by using the split information; a third size determining module, configured to determine a size of the first prediction unit by using the split information; a processing module, configured to determine, when the size of the first prediction unit determined by the third size determining module is greater than a second threshold, a size of the first prediction unit as a unit size of the unit to be processed, where the first size determining module determines In the case where the size of the first prediction unit is less than or equal to the second threshold, the size of the first transformation unit is determined as the unit size of the unit to be processed.
  • the second threshold is, for example, 8, 16, Or 32.
  • the to-be-processed unit is a first transform unit, a first coding unit, and a first A prediction unit.
  • the unit size determining unit 1 includes: a first size determining module, configured to determine a size of the first transform unit by using the split information; a second size determining module, configured to determine a size of the first coding unit by using the split information; a size determining module, configured to determine a size of the first prediction unit by using the division information; an average calculation module, configured to calculate an average of a size of the first prediction unit and a size of the first coding unit; and a fourth processing module, configured to When the average value calculated by the average value calculation module is greater than the third threshold value, the average value is determined as the unit size of the unit to be processed, and if the average value calculated by the average value calculation module is less than or equal to the third threshold value, The size of the first transform unit determined by the first size determining module is determined as the unit size of the unit to be processed.
  • the third threshold is
  • the unit size determining unit 1 may also adopt the following structure, including: a first size determining module, configured to determine the first by using the splitting information. a size of the transform unit; a second size determining module, configured to determine a size of the first coding unit by using the split information; a third size determining module, configured to determine a size of the first prediction unit by using the split information; and a fifth processing module, configured to: A weighted average of the size of the first transform unit, the size of the first coding unit, and the size of the first prediction unit is calculated, and the weighted average is determined as the unit size of the unit to be processed.
  • the to-be-processed unit is a first coding unit.
  • the unit size determining unit 1 includes: a second size determining module, configured to determine a size of the first coding unit by using the split information; and a sixth processing module, configured to determine a size of the first coding unit determined by the second size determining module Is the size of the unit to be processed.
  • the to-be-processed unit corresponding to the first transform coefficient set is the first prediction unit.
  • the unit size determining unit 1 includes: a third size determining module, configured to determine a size of the first prediction unit by using the split information; and a seventh processing module, configured to determine a size of the first prediction unit determined by the third size determining module Is the size of the unit to be processed.
  • the to-be-processed unit corresponding to the first transform coefficient set is a first coding unit and a first prediction unit.
  • the unit size determining unit 1 includes: a second size determining module, configured to determine a size of the first coding unit by using the split information; a third size determining module, configured to determine a size of the first prediction unit by using the split information; Processing unit for determining the modulus in the second size In a case where the size of the first coding unit determined by the block is greater than the fourth threshold, the size of the first coding unit is determined as the size of the unit to be processed, and the size of the first coding unit determined by the second size determination module is less than or equal to the size In the case of a four threshold, the size of the first prediction unit is determined as the size of the unit to be processed.
  • the fourth threshold is, for example, 8, 12, 16, or 32.
  • the quantization adjustment factor determining unit 2 determines the quantization adjustment factor of the first transform coefficient set according to the unit size of the unit to be processed according to the unit size of the unit to be processed, and may adopt various types. the way. Accordingly, the quantization adjustment factor determining unit 2 has various structures.
  • the quantization adjustment factor determination unit 2 includes a first quantization adjustment factor determination module.
  • the first quantization adjustment factor determining module utilizes a formula A quantization adjustment factor of the first set of transform coefficients is calculated.
  • QC is a quantization adjustment factor of the first transform coefficient set
  • Size is a unit size of the unit to be processed
  • N 1 and M 1 are positive numbers not less than 1
  • K 1 and A 1 are positive numbers.
  • the quantization adjustment factor determining unit 2 includes a second quantization adjustment factor determining module.
  • the second quantization adjustment factor determination module utilizes a formula A quantization adjustment factor of the first set of transform coefficients is calculated.
  • QC is a quantization adjustment factor of the first transform coefficient set
  • Size is a unit size of the unit to be processed
  • N 1 is a positive number not less than 1
  • a 1 and b 1 are positive numbers.
  • the quantization adjustment factor determining unit 2 may also adopt the following structure, including the first parsing module, the first calculating module, and the third quantizing adjusting factor determining module. among them:
  • a first parsing module configured to parse the code stream, obtain a size of the T transform unit that is allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the maximum transform unit, and a t-th transform unit relative to the t-1 level
  • the size of the unit, the quantization adjustment factor difference information dQC t is all or part greater than 0;
  • a first calculation module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum transformation unit, and a quantization adjustment factor difference information dQC t of the t-th transformation unit relative to the t-1th-level transformation unit, to determine the T-type transformation unit Quantitative adjustment factor;
  • a third quantization adjustment factor determining module configured to determine that the transform unit with the same size as the first transform unit in the T transform unit is the target transform unit, and determine that the quantization adjustment factor corresponding to the target transform unit is a quantization adjustment factor of the unit to be processed.
  • the quantization adjustment factor determination unit 2 may further adopt the following structure, including the second analysis module, the second calculation module, and the fourth quantization adjustment factor determination module. among them:
  • a second parsing module configured to parse the code stream, obtain a size of P coding units allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the maximum coding unit, and a p-th coding unit relative to the p-1 level
  • the size of the coding unit having a small level value is larger than the size of the other coding unit, and the quantization adjustment factor difference information dQC p is all or part greater than 0;
  • a second calculating module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum coding unit, and a quantization adjustment factor difference information dQC p of the p- th coding unit with respect to the p-1th coding unit, to determine corresponding to the P coding unit Quantitative adjustment factor;
  • a fourth quantization adjustment factor determining module configured to determine, as a target coding unit, a coding unit that is the same size as the first coding unit in the P coding unit, and determines a quantization adjustment factor corresponding to the target coding unit as a quantization adjustment factor of the to-be-processed unit .
  • the quantization adjustment factor determining unit 2 may further adopt the following structures, including a third analysis module, a third calculation module, and a fifth quantization adjustment factor determination module. among them:
  • a third parsing module configured to parse the code stream, obtain a size of Z prediction units allowed to be used in the code stream, a quantization adjustment factor QC 1 corresponding to the largest prediction unit, and a z-th prediction unit relative to the z-1 level
  • the size of the prediction unit with a small level value is larger than the size of another prediction unit, and the quantization adjustment factor difference information dQC z is all or part greater than 0.
  • a third calculating module configured to determine, by using a quantization adjustment factor QC 1 corresponding to the maximum prediction unit, and a quantization adjustment factor difference information dQC z of the z- th prediction unit relative to the z-1th-level prediction unit, to determine corresponding to the Z prediction units Quantitative adjustment factor;
  • a fifth quantization adjustment factor determining module configured to determine that a prediction unit of the Z prediction unit having the same size as the first prediction unit is a target prediction unit, and determining a quantization adjustment factor corresponding to the target prediction unit as a quantization adjustment factor of the to-be-processed unit .
  • the inverse quantization unit 3 performs inverse quantization processing on the transform coefficients in the first transform coefficient set according to the second preset algorithm by using the quantization adjustment factor, which can be implemented in various manners. Accordingly, the inverse quantization unit 3 has a variety of structures.
  • the inverse quantization unit 3 comprises a first inverse quantization module.
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) is the first transform.
  • QC is a quantization adjustment factor
  • o2(i) is a rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • R(i) is a second transform The i-th transform coefficient in the set of coefficients.
  • the inverse quantization unit 3 includes a first integerization processing module, a second integerization processing module, and a second inverse quantization module.
  • the first integer processing module is configured to perform integer processing on the quantization adjustment factor
  • the second integerization processing module is configured to perform integerization processing on the original quantization step size corresponding to each transform coefficient in the first transform coefficient set;
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs′(i) is the first
  • QC' is the quantized adjustment factor after the integer processing
  • bdshift is the shift number
  • delta is the extra shift number.
  • is the left shift operator
  • >> is the right shift operator
  • R(i) is the ith transform coefficient in the second transform coefficient set.
  • the inverse quantization unit 3 includes a third inverse quantization module and a transform coefficient Management module. among them:
  • the transform coefficients in the three transform coefficient sets are subjected to scaling processing and integer processing to obtain a second transform coefficient set.
  • N is the number of transform coefficients included in the first transform coefficient set
  • A(i) is the i-th transform coefficient in the first transform coefficient set
  • Qs(i) is the first transform.
  • o4(i) is the rounding offset corresponding to the i-th transform coefficient in the first transform coefficient set
  • B(i) is the i-th in the third transform coefficient set
  • the transform coefficient, QC is a quantization adjustment factor
  • o5(i) is a rounding offset corresponding to the i-th transform coefficient in the third transform coefficient set
  • R(i) is the i-th transform coefficient in the second transform coefficient set.
  • the inverse quantization unit 3 includes a level scale table acquisition module, a quantization step size determination module, and a fourth inverse quantization module.
  • the level scale table obtaining module is configured to obtain a level scale table corresponding to the quantization adjustment factor;
  • the quantization step size determining module is configured to obtain the level scale table acquired by the module by using the level scale table, according to the third preset
  • the algorithm determines a quantization step size for performing inverse quantization processing on the first transform coefficient set; and a fourth inverse quantization module, configured to perform, by using the quantization step size determined by the quantization step size determining module, the first transform coefficient set according to the fourth preset algorithm Anti-quantization processing.
  • the level scale table obtaining module may adopt the following structure, including a calculation submodule and a first integer processing submodule.
  • the calculation sub-module is configured to multiply the M level scale values in the preset level scale table by the quantization adjustment factor respectively; the first integerization processing sub-module is used to obtain the M pieces obtained by the calculation sub-module
  • the product is separately subjected to integer processing to obtain a level scale table for performing inverse quantization processing on the first transform coefficient set.
  • the level scale table obtaining module may also adopt the following structure, including an interval determining submodule and a level scale table obtaining submodule.
  • the interval determining sub-module is configured to determine a value interval in which the quantization adjustment factor belongs in a preset plurality of value intervals, wherein each value interval corresponds to a level scale table; the level scale table acquires The module is configured to obtain a level scale table corresponding to the value interval corresponding to the quantization adjustment factor determined by the interval determining submodule.
  • the level scale table acquisition module may also adopt the following structure, including a calculation submodule, Two integer processing submodules, integer set determining submodules, and processing submodules.
  • the calculation submodule is configured to multiply the M level scale values in the preset level scale table by the quantization adjustment factor respectively; the second integerization processing submodule is used to obtain the M pieces obtained by the calculation submodule The product is separately integerized to obtain M intermediate values; the integer set determining submodule is configured to determine M integer sets by using the M intermediate values obtained by the second integer processing submodule, wherein the mth integer set is m
  • Flat scale table is configured to select an integer in each of the M integer sets according to a preset rule to form an inverse quantization process on the first transform
  • FIG. 6 shows a hardware structure of a decoding device including a processor 100, a memory 200, and a communication bus 300.
  • the processor 100 and the memory 200 complete communication with each other through the communication bus 300.
  • the memory 200 is used to store programs, and the processor 100 is used to execute programs stored in the memory 200.
  • the processor 100 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 200 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the processor 100 is configured to execute, by using a program stored in the memory 200, to determine, by using the split information, a cell size of the to-be-processed unit corresponding to the first transform coefficient set, where the first transform coefficient set and the split information are entropy decoded through the code stream. Generating; determining, according to a unit size of the unit to be processed, a quantization adjustment factor of the first transform coefficient set according to a first preset algorithm, wherein the first preset algorithm causes the quantization adjustment factor to be in a decreasing relationship with a size of a unit size of the unit to be processed; Adjustment factor according to The second preset algorithm performs inverse quantization processing on the transform coefficients in the first transform coefficient set to obtain a second transform coefficient set.
  • the functions described in the method of the present embodiment can be stored in a computing device readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, a portion of the embodiments of the present application that contributes to the prior art or a portion of the technical solution may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a
  • the computing device (which may be a personal computer, server, mobile computing device, or network device, etc.) performs all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

一种反量化变换系数的方法,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,之后根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,该第一预设算法使得量化调节因子与待处理单元的尺寸呈递减关系,利用该量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理。基于该反量化变换系数的方法,解码设备根据待处理单元的单元尺寸自适应地确定第一变换系数集的量化调节因子,之后利用确定出的量化调节因子对第一变换系数集中的变换系数进行反量化处理,由于编码设备发送的码流中无需携带量化步长调节信息,因此能够提升编码效率。同时还公开了相应的装置及解码设备。

Description

反量化变换系数的方法、装置及解码设备 技术领域
本发明属于视频编解码技术领域,尤其涉及反量化变换系数的方法、装置及解码设备。
背景技术
视频压缩技术广泛应用于互联网、电视广播和通信领域。H.265/HEVC(High Efficiency Video Coding,高效率视频编码)是一种新的国际视频编码标准。HEVC采用混合的、基于区块(block-based)的运动补偿的类离散余弦变换(Discrete Cosine Transformation,DCT)编码架构。
HEVC的编码过程主要包括预测、变换、量化和熵编码环节,解码过程主要包括熵解码、预测、反量化和反变换环节。
编码过程中:在预测环节利用已编码区域的重建像素(reconstructed pixel)产生当前编码块对应的原始像素(original pixel)的预测像素,预测方式主要包括帧内预测和帧间预测;在变换环节,对残差(residual,为原始像素和预测像素之间的像素值差异)进行变换,将其转换为变换系数(transform coefficeent);在量化环节,对变换系数进行量化处理;在熵编码环节,将量化后的变换系数以及编码模式信息通过熵编码处理转换成码流。
解码过程中:在熵解码环节,将码流通过熵解码处理解析出编码模式信息和量化后的变换系数;在预测环节,利用编码模式信息和已经解码的重建像素得出预测像素;在反量化环节,将量化后的变换系数通过反量化得到重建的变换系数;在反变换环节,对重建的变换系数进行反变换,得到重建的残差信息;之后,将重建的残差信息和预测像素相加,得到重建像素,从而恢复出视频图像。
对于有损编码,重建像素和原始像素可能是不相同的,两者之间的数值 差异称为失真(distortion)。视觉熵掩蔽效应指示:人眼对复杂区域的敏感度低于对简单区域的敏感度,相比于较为平坦的区域,复杂区域中发生的信号失真更不容易被人观察到或者具有较弱的视觉强度。
基于上述理论,为了提升视频图像整体的编码效率,可以对复杂区域采用更强的量化而对简单区域采用较弱的量化。在编码过程中,复杂区域倾向于划分为尺寸更较小的区块进行编码,而平坦区域倾向于划分为尺寸较大的区块进行编码。对于尺寸较小的区块,在量化过程中适当增大量化步长,对于尺寸较大的区块,在量化过程中适当减小量化步长。也就是说在量化过程中,图像的各区域采用不同的量化步长,相较于统一的量化步长而言,有助于提升编码图像的整体视觉质量。
目前一种已公开的视频编解码方案中,编码设备分析视频序列,决定各个编码块的量化参数(包括各编码块的量化步长调节信息),并将量化参数写入码流,解码设备根据解析码流得到的量化参数确定各个编码块的量化步长,完成变换系数的反量化处理。但是该方案存在缺陷:编码设备发送的码流中必须携带各编码块的量化步长调节信息,解码设备才可以基于码流中的量化步长调节信息确定各编码块的量化步长,从而进行变换系数的反量化,由于码流中携带了各个编码块的量化步长调节信息,降低了编码效率。
发明内容
有鉴于此,本发明的目的在于提供一种反量化变换系数的方法、装置及解码设备,解码设备能够自适应确定量化调节因子,从而完成变换系数的反量化过程,编码设备不需要在码流携带量化步长调节信息,从而提升编码效率。
为了实现上述目的,本申请实施例提供的技术方案如下:
根据本申请实施例的第一方面,提供一种反量化变换系数的方法,包括:
利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;
根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;
利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
结合第一方面,在第一种可能的实现方式中,所述待处理单元为第一变换单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用所述划分信息确定所述第一变换单元的尺寸,确定所述第一变换单元的尺寸为所述待处理单元的单元尺寸。
结合第一方面,在第二种可能的实现方式中,所述待处理单元为第一变换单元和第一编码单元,所述第一编码单元为包含所述第一变换单元的最小编码单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
利用所述划分信息确定所述第一变换单元的尺寸;利用所述划分信息确定所述第一编码单元的尺寸;在所述第一编码单元的尺寸大于第一阈值的情况下,将所述第一编码单元的尺寸确定为所述待处理单元的单元尺寸;在所述第一编码单元的尺寸小于或等于所述第一阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第一方面,在第三种可能的实现方式中,所述待处理单元为第一变换单元和第一预测单元,所述第一预测单元为:与所述第一变换单元存在重合区域的预测单元中重合区域最大的预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
利用所述划分信息确定所述第一变换单元的尺寸;利用所述划分信息确定所述第一预测单元的尺寸;在所述第一预测单元的尺寸大于第二阈值的情况下,将所述第一预测单元的尺寸确定为所述待处理单元的单元尺寸;在所述第一预测单元的尺寸小于或等于所述第二阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第一方面,在第四种可能的实现方式中,所述待处理单元为第一变 换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元存在重合区域的最大预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
利用所述划分信息确定所述第一预测单元的尺寸;利用所述划分信息确定所述第一编码单元的尺寸;计算所述第一预测单元的尺寸和所述第一编码单元的尺寸的平均值;在所述平均值大于第三阈值的情况下,将所述平均值确定为所述待处理单元的单元尺寸;在所述平均值小于或等于所述第三阈值的情况下,利用所述划分信息确定所述第一变换单元的尺寸,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第一方面,在第五种可能的实现方式中,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元重叠的最大预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
利用所述划分信息确定所述第一变换单元的尺寸;利用所述划分信息确定所述第一编码单元的尺寸;利用所述划分信息确定所述第一预测单元的尺寸;计算所述第一变换单元的尺寸、所述第一编码单元的尺寸以及所述第一预测单元的尺寸的加权平均值,将所述加权平均值确定为所述待处理单元的单元尺寸。
结合第一方面,在第六种可能的实现方式中,第一变换系数集对应的待处理单元为第一编码单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一编码单元的尺寸,确定第一编码单元的尺寸为待处理单元的单元尺寸。
结合第一方面,在第七种可能的实现方式中,第一变换系数集对应的待处理单元为第一预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一预测单元的尺寸,确定第一预测单元的尺寸为待处理单元的单元尺寸。
结合第一方面,在第八种可能的实现方式中,第一变换系数集对应的待处理单元为第一编码单元和第一预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一编码单元的尺寸;利用划分信息确定第一预测单元的尺寸;在第一编码单元的尺寸大于第四阈值的情况下,将第一编码单元的尺寸确定为待处理单元的尺寸;在第一编码单元的尺寸小于或等于第四阈值的情况下,将第一预测单元的尺寸确定为待处理单元的尺寸。
结合第一方面或者第一方面的第一种至第八种中任意一种可能的实现方式,在第九种可能的实现方式中,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
利用公式
Figure PCTCN2015094008-appb-000001
计算所述第一变换系数集的量化调节因子;其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
结合第一方面或者第一方面的第一种至第八种中任意一种可能的实现方式,在第十种可能的实现方式中,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
利用公式
Figure PCTCN2015094008-appb-000002
计算所述第一变换系数集的量化调节因子;其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
结合第一方面的第一种可能的实现方式,在第十一种可能的实现方式中,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
解析码流,获取所述码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,…T,T为大于3的整数,任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元 的尺寸,所述量化调节因子差分信息dQCt全部或部分大于0;
利用所述最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定所述T种变换单元对应的量化调节因子;
确定所述T种变换单元中与所述第一变换单元的尺寸相同的变换单元为目标变换单元,确定所述目标变换单元对应的量化调节因子为所述待处理单元的量化调节因子。
结合第一方面的第六种可能的实现方式,在第十二种可能的实现方式中,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
解析码流,获取码流携带的允许使用的P种编码单元的尺寸、最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp;其中,p=2,3,…P,P为大于3的整数。任意相邻两级编码单元中,级别数值小的编码单元的尺寸大于另一编码单元的尺寸,量化调节因子差分信息dQCp全部或部分大于0;
利用最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,确定P种编码单元对应的量化调节因子;
确定P种编码单元中与第一编码单元的尺寸相同的编码单元为目标编码单元,确定该目标编码单元对应的量化调节因子为待处理单元的量化调节因子。
结合第一方面的第七种可能的实现方式,在第十三种可能的实现方式中,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
解析码流,获取码流携带的允许使用的Z种预测单元的尺寸、最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz;其中,z=2,3,…Z,Z为大于3的整数。任意相邻两级预测单元中,级别数值小的预测单元的尺寸大于另一预测单元的尺 寸,量化调节因子差分信息dQCz全部或部分大于0;
利用最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,确定Z种预测单元对应的量化调节因子;
确定Z种预测单元中与第一预测单元的尺寸相同的预测单元为目标预测单元,确定该目标预测单元对应的量化调节因子为待处理单元的量化调节因子。
结合第一方面的第九种至第十三种中任意一种可能的实现方式,在第十四种可能的实现方式中,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对所述第一变换系数集中的各变换系数进行反量化处理;其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,QC为所述量化调节因子,o2(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
结合第一方面的第九种至第十三种中任意一种可能的实现方式,在第十五种可能的实现方式中,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
对所述量化调节因子进行整数化处理;
对所述第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;
利用公式
R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)对所述第一变换系数集中的各变换系数进行反量化处理,其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC‘为经整数化处理后的量化调节因 子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为所述第二变换系数集中的第i个变换系数。
结合第一方面的第九种至第十三种中任意一种可能的实现方式,在第十六种可能的实现方式中,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对所述第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;
利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对所述第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集;
其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为所述第三变换系数集中的第i个变换系数,QC为所述量化调节因子,o5(i)为所述第三变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
结合第一方面的第九种至第十三种中任意一种可能的实现方式,在第十七种可能的实现方式中,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:获取与所述量化调节因子对应的电平尺度表;利用所述电平尺度表按照第三预设算法确定对所述第一变换系数集进行反量化处理的量化步长;利用所述量化步长按照第四预设算法对所述第一变换系数集进行反量化处理。
结合第一方面的第十七种可能的实现方式,在第十八种可能的实现方式中,所述获取与所述量化调节因子对应的电平尺度表,包括:将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;对M个乘积分别进行整数化处理,得到对所述第一变换系数集进行反量化处理的电平尺度表。
结合第一方面的第十七种可能的实现方式,在第十九种可能的实现方式中,所述获取与所述量化调节因子对应的电平尺度表,包括:将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;对M个乘积分别进 行整数化处理,得到M个中间值;确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;按照预设规则在所述M个整数集合中分别选取一个整数,构成对所述第一变换系数集进行反量化处理的电平尺度表。
结合第一方面的第十九种可能的实现方式,在第二十种可能的实现方式中,按照预设规则在一个整数集合中选取一个整数,包括:
利用公式
Figure PCTCN2015094008-appb-000003
Figure PCTCN2015094008-appb-000004
计算所述整数集合中各整数对应的第一中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为所述整数集合中的第j个整数,j=1,2,…,J,J为所述整数集合中包含的整数的数量;
利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算所述整数集合中各整数对应的第三中间值Cj
确定所述第三中间值Cj中的最小值Ck,在所述整数集合中选取与所述最小值Ck对应的整数。
结合第一方面的第十七种可能的实现方式,在第二十一种可能的实现方式中,所述获取与所述量化调节因子对应的电平尺度表,包括:确定所述量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;获取所述量化调节因子所属取值区间对应的电平尺度表。
根据本发明实施例的第二方面,提供一种反量化变换系数的装置,包括:
单元尺寸确定单元,用于利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;
量化调节因子确定单元,用于根据所述单元尺寸确定单元确定的所述待处理单元的单元尺寸,按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;
反量化单元,用于利用所述量化调节因子确定单元确定的量化调节因子,按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
结合第二方面,在第一种可能的实现方式中,所述待处理单元为第一变换单元;所述单元尺寸确定单元包括:第一尺寸确定模块,利用所述划分信息确定所述第一变换单元的尺寸;第一处理模块,用于确定所述第一尺寸确定模块确定的第一变换单元的尺寸为所述待处理单元的单元尺寸。
结合第二方面,在第二种可能的实现方式中,所述待处理单元为第一变换单元和第一编码单元,所述第一编码单元为包含所述第一变换单元的最小编码单元;所述单元尺寸确定单元包括:第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;第二尺寸确定模块,用于利用所述划分信息确定所述第一编码单元的尺寸;第二处理模块,用于在所述第一编码单元的尺寸大于第一阈值的情况下,将所述第二尺寸确定模块确定的所述第一编码单元的尺寸确定为所述待处理单元的单元尺寸,在所述第一编码单元的尺寸小于或等于所述第一阈值的情况下,将所述第一尺寸确定模块确定的所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第二方面,在第三种可能的实现方式中,所述待处理单元为第一变换单元和第一预测单元,所述第一预测单元为:与所述第一变换单元存在重合区域的预测单元中重合区域最大的预测单元;所述单元尺寸确定单元包括:第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;第三处理模块,用于在所述第三尺寸确定模块确定的所述第一预测单元的尺寸大于第二阈值的情况下,将所述第一预测单元的尺寸确定为所述待处理单元的单元尺寸,在所述第三尺寸确定模块确定的所述第一预测单元的尺寸小于或等于所述第二阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第二方面,在第四种可能的实现方式中,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元存在重合区域的最大预测单元;所述单元尺寸确定单元包括:第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;第二尺寸确定模块, 用于利用所述划分信息确定所述第一编码单元的尺寸;第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;平均值计算模块,用于计算所述第一预测单元的尺寸和所述第一编码单元的尺寸的平均值;第四处理模块,用于在平均值大于第三阈值的情况下,将所述平均值确定为所述待处理单元的单元尺寸,在所述平均值计算模块计算得到的平均值小于或等于所述第三阈值的情况下,将所述第一尺寸确定模块确定的所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
结合第二方面,在第五种可能的实现方式中,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元重叠的最大预测单元;所述单元尺寸确定单元包括:第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;第二尺寸确定模块,用于利用所述划分信息确定所述第一编码单元的尺寸;第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;第五处理模块,用于计算所述第一变换单元的尺寸、所述第一编码单元的尺寸以及所述第一预测单元的尺寸的加权平均值,将所述加权平均值确定为所述待处理单元的单元尺寸。
结合第二方面,在第六种可能的实现方式中,所述待处理单元为第一编码单元;所述单元尺寸确定单元包括:第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第六处理模块,用于确定第二尺寸确定模块确定的第一编码单元的尺寸为待处理单元的尺寸。
结合第二方面,在第七种可能的实现方式中,所述第一变换系数集对应的待处理单元为第一预测单元;所述单元尺寸确定单元包括:第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第七处理模块,用于确定第三尺寸确定模块确定的第一预测单元的尺寸为待处理单元的尺寸。
结合第二方面,在第八种可能的实现方式中,所述第一变换系数集对应的待处理单元为第一编码单元和第一预测单元;所述单元尺寸确定单元包括:第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第八处理单元,用 于在第二尺寸确定模块确定的第一编码单元的尺寸大于第四阈值的情况下,将第一编码单元的尺寸确定为待处理单元的尺寸,在第二尺寸确定模块确定的第一编码单元的尺寸小于或等于第四阈值的情况下,将第一预测单元的尺寸确定为待处理单元的尺寸。
结合第二方面或者第二方面的第一种至第八种中任意一种可能的实现方式,在第九种可能的实现方式中,所述量化调节因子确定单元包括第一量化调节因子确定模块;所述第一量化调节因子确定模块利用公式
Figure PCTCN2015094008-appb-000005
计算所述第一变换系数集的量化调节因子,其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
结合第二方面或者第二方面的第一种至第八种中任意一种可能的实现方式,在第十种可能的实现方式中,所述量化调节因子确定单元包括第二量化调节因子确定模块;所述第二量化调节因子确定模块利用公式
Figure PCTCN2015094008-appb-000006
计算所述第一变换系数集的量化调节因子;其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
结合第二方面的第一种可能的实现方式,在第十一种可能的实现方式中,所述量化调节因子确定单元包括:
第一解析模块,用于解析码流,获取所述码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,…T,T为大于3的整数,任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元的尺寸,所述量化调节因子差分信息dQCt全部或部分大于0;
第一计算模块,用于利用所述最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt, 确定所述T种变换单元对应的量化调节因子;
第三量化调节因子确定模块,用于确定所述T种变换单元中与所述第一变换单元的尺寸相同的变换单元为目标变换单元,确定所述目标变换单元对应的量化调节因子为所述待处理单元的量化调节因子。
结合第二方面的第六种可能的实现方式,在第十二种可能的实现方式中,所述量化调节因子确定单元包括:
第二解析模块,用于解析码流,获取码流携带的允许使用的P种编码单元的尺寸、最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,其中,p=2,3,…P,P为大于3的整数。任意相邻两级编码单元中,级别数值小的编码单元的尺寸大于另一编码单元的尺寸,量化调节因子差分信息dQCp全部或部分大于0;
第二计算模块,用于利用最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,确定P种编码单元对应的量化调节因子;
第四量化调节因子确定模块,用于确定P种编码单元中与第一编码单元的尺寸相同的编码单元为目标编码单元,确定该目标编码单元对应的量化调节因子为待处理单元的量化调节因子。
结合第二方面的第七种可能的实现方式,在第十三种可能的实现方式中,所述量化调节因子确定单元包括:
第三解析模块,用于解析码流,获取码流携带的允许使用的Z种预测单元的尺寸、最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,其中,z=2,3,…Z,Z为大于3的整数。任意相邻两级预测单元中,级别数值小的预测单元的尺寸大于另一预测单元的尺寸,量化调节因子差分信息dQCz全部或部分大于0,
第三计算模块,用于利用最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,确定Z种预测单元对应的量化调节因子;
第五量化调节因子确定模块,用于确定Z种预测单元中与第一预测单元的 尺寸相同的预测单元为目标预测单元,确定该目标预测单元对应的量化调节因子为待处理单元的量化调节因子。
结合第二方面的第九种至第十三种中任意一种可能的实现方式,在第十四种可能的实现方式中,所述反量化单元包括第一反量化模块;
所述第一反量化模块利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对所述第一变换系数集中的各变换系数进行反量化处理;
其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,QC为所述量化调节因子,o2(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
结合第二方面的第九种至第十三种中任意一种可能的实现方式,在第十五种可能的实现方式中,所述反量化单元包括:
第一整数化处理模块,用于对所述量化调节因子进行整数化处理;
第二整数化处理模块,用于对所述第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;
第二反量化模块,用于利用公式
R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)对所述第一变换系数集中的各变换系数进行反量化处理;
其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC‘为经整数化处理后的量化调节因子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为所述第二变换系数集中的第i个变换系数。
结合第二方面的第九种至第十三种中任意一种可能的实现方式,在第十六种可能的实现方式中,所述反量化单元包括:
第三反量化模块,用于利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对所述第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;
变换系数处理模块,用于利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对所述第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集;
其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为所述第三变换系数集中的第i个变换系数,QC为所述量化调节因子,o5(i)为所述第三变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
结合第二方面的第九种至第十三种中任意一种可能的实现方式,在第十七种可能的实现方式中,所述反量化单元包括:电平尺度表获取模块,用于获取与所述量化调节因子对应的电平尺度表;量化步长确定模块,用于利用所述电平尺度表获取模块获取的电平尺度表、按照第三预设算法确定对所述第一变换系数集进行反量化处理的量化步长;第四反量化模块,用于利用所述量化步长确定模块确定的量化步长、按照第四预设算法对所述第一变换系数集进行反量化处理。
结合第二方面的第十七种可能的实现方式,在第十八种可能的实现方式中,所述电平尺度表获取模块包括:计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;第一整数化处理子模块,用于对所述计算子模块得到的M个乘积分别进行整数化处理,得到对所述第一变换系数集进行反量化处理的电平尺度表。
结合第二方面的第十七种可能的实现方式,在第十九种可能的实现方式中,所述电平尺度表获取模块包括:计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;第二整数化处理子模块,用于对所述计算子模块得到的M个乘积分别进行整数化处理,得到M个中间值;整数集合确定子模块,用于利用所述第二整数化处理子模块得到的M个中间值确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;处理子模块,用于按照预设规则在所述M个整数集合中分别选取 一个整数,构成对所述第一变换系数集进行反量化处理的电平尺度表。
结合第二方面的第十九种可能的实现方式,在第二十种可能的实现方式中,所述处理子模块具体用于:
利用公式
Figure PCTCN2015094008-appb-000007
Figure PCTCN2015094008-appb-000008
计算所述整数集合中各整数对应的第一中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为所述整数集合中的第j个整数,j=1,2,…,J,J为所述整数集合中包含的整数的数量;利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算所述整数集合中各整数对应的第三中间值Cj;确定所述第三中间值Cj中的最小值Ck,在所述整数集合中选取与所述最小值Ck对应的整数。
结合第二方面的第十七种可能的实现方式,在第二十一种可能的实现方式中,所述电平尺度表获取模块包括:区间确定子模块,用于确定所述量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;电平尺度表获取子模块,用于获取所述区间确定子模块确定的所述量化调节因子所属取值区间所对应的电平尺度表。
本发明实施例的第三方面,提供一种解码设备,包括处理器、存储器和通信总线;所述存储器用于存放程序;所述处理器通过调用所述存储器存放的程序,用于执行:利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
由此可见,本发明的有益效果为:
本发明公开的反量化变换系数的方法,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,基于待处理单元的单元尺寸和图像复杂度的强相关性,根据待处理单元的单元尺寸自适应的确定第一变换系数集的量化调节因子,利用该量化调节因子对第一变换系数集中的变换系数进行反量 化处理。基于本发明公开的反量化变换系数的方法,解码设备根据待处理单元的单元尺寸自适应地确定第一变换系数集的量化调节因子,之后利用确定出的量化调节因子对第一变换系数集中的变换系数进行反量化处理,由于编码设备发送的码流中无需携带量化步长调节信息,因此能够提升编码效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本发明公开的一种反量化变换系数的方法的流程图;
图2为编码单元一种划分方式的示意图;
图3为本发明公开的一种确定第一变换系数集的量化调节因子的方法的流程图;
图4为本发明公开的一种利用量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理的方法的流程图;
图5为本发明公开的一种反量化变换系数的装置的结构示意图;
图6为本发明公开的一种解码设备的硬件结构图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明公开的反量化变换系数的方法和装置应用于采用HEVC标准的解码设备。HEVC标准中,块结构包括编码单元(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。编码单元为 2N*2N的方块,且每个编码单元可递归地划分为四个更小的编码单元,直至达到预定的最小尺寸(如8像素*8像素)。每个编码单元包含一个或多个可变尺寸的预测单元,预测单元的划分可分为对称划分和不对称划分。每个编码单元包括一个或多个变换单元,每个变换单元可递归地划分为四个更小的变换单元,直至达到预定的最小尺寸(如4像素*4像素)。
基于本发明公开的反量化变换系数的方法和装置,解码设备能够自适应确定量化调节因子,从而完成变换系数的反量化过程,编码设备发送的码流中无需携带量化步长调节信息,从而提升编码效率。其中,编码效率是指信息码元数与码长之比,也称为码率。
参见图1,图1为本发明公开的一种反量化变换系数的方法的流程图。该方法包括:
步骤S11:利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸。其中,第一变换系数集经由对码流进行熵解码产生。划分信息经由对码流进行熵解码产生。
第一变换系数集包括N个变换系数A(i),i=1,2,…,N,其中N为正整数,例如N=1、2、4、16、32、50、64、81、128、512或1024。第一变换系数集中的变换系数为帧内预测编码产生的残差的变换系数,也可以为由帧间预测编码产生的残差的变换系数。
具体的,第一变换系数集中的变换系数为视频信号中任一信号分量的变换系数,例如:亮度分量的变换系数、色度分量的变换系数、R分量的变换系数、G分量的变换系数或者B分量的变换系数。需要说明的是,第一变换系数集中可以包含一个变换块的全部变换系数,也可以包含一个变换块的一部分变换系数,例如:一个变换块中的直流系数,或者一个变换块中的一组低频系数,或者一个变换块中的一组高频系数,或者一个变换块中的直流系数和一组高频系数,或者按照某一系数扫描顺序下的前几个系数。
步骤S12:根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,该第一预设算法使得量化调节因子与待处理单元的尺寸呈递减关系。
编码过程中,尤其是帧内编码过程中,复杂区域倾向于划分为尺寸更较小的区块进行编码,而平坦区域倾向于划分为尺寸较大的区块进行编码,也就是说,图像中区块的尺寸与该区块中图像的复杂度存在强相关性。
在确定待处理单元的单元尺寸后,即可根据待处理单元的单元尺寸确定第一变换系数集的量化调节因子,其中第一变换系数集的量化调节因子与待处理单元的单元尺寸呈递减关系。也就是说,第一变换系数集的量化调节因子随着待处理单元的单元尺寸的增大而减小。
步骤S13:利用量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
解码设备基于待处理单元的单元尺寸和图像复杂度的强相关性,自适应导出第一变换系数集的量化调节因子,利用该量化调节因子对第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
本发明公开的反量化变换系数的方法,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,基于待处理单元的单元尺寸和图像复杂度的强相关性,根据待处理单元的单元尺寸自适应的确定第一变换系数集的量化调节因子,利用该量化调节因子对第一变换系数集中的变换系数进行反量化处理。基于本发明公开的反量化变换系数的方法,解码设备根据待处理单元的单元尺寸自适应地确定第一变换系数集的量化调节因子,之后利用确定出的量化调节因子对第一变换系数集中的变换系数进行反量化处理,由于编码设备发送的码流中无需携带量化步长调节信息,因此能够提升编码效率。
在具体实施中,第一变换系数集对应的待处理单元有多种形式,下面分别进行说明。
作为一种实施方式,第一变换系数集对应的待处理单元为第一变换单元。其中,第一变换单元的变换系数包含第一变换系数集中的变换系数。
在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一变换单元的尺寸,确定第一变换单元的尺寸为待处理单元的单元尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一变换单元和第一编码单元。其中,第一编码单元为包含第一变换单元的最小编码单元。例如:将32像素*32像素的编码单元划分为4个16像素*16像素的编码单元,将其中一个16像素*16像素的编码单元划分为4个8像素*8像素的变换单元,如果第一变换单元为一个8像素*8像素的变换单元,那么第一编码单元为该8像素*8像素的变换单元所在的16像素*16像素的编码单元。
在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一变换单元的尺寸;利用划分信息确定第一编码单元的尺寸;在第一编码单元的尺寸大于第一阈值的情况下,将第一编码单元的尺寸确定为待处理单元的单元尺寸;在第一编码单元的尺寸小于或等于第一阈值的情况下,将第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第一阈值例如为8、12、16或32。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一变换单元和第一预测单元。其中,第一预测单元为:与第一变换单元存在重合区域的预测单元中重合区域最大的预测单元。
具体的:如果第一变换单元只被一个预测单元覆盖,那么与该第一变换单元存在重合区域的预测单元仅有一个,该预测单元即为第一预测单元;如果第一变换单元同时与多个预测单元存在重合区域,则多个预测单元中与该第一变换单元的重合区域最大的预测单元为第一预测单元;如果第一变换单元同时与多个预测单元存在重合区域,并且有两个预测单元与该第一变换单元的重合区域的面积相同且为最大值,则将这两个预测单元中任意一个预测单元作为第一预测单元。
这里结合图2进行说明:将16像素*16像素的编码单元CU1划分为1个16像素*16像素的变换单元,该变换单元即为第一变换单元,以TU1标示,另外将该编码单元CU1划分为2个预测单元PU1和PU2,其中预测单元PU1为4像素*16像素,预测单元PU2为12像素*16像素,与第一变换单元TU1 存在重合区域的预测单元为预测单元PU1和预测单元PU2,并且预测单元PU2与第一变换单元TU1的重合区域的面积最大,该预测单元PU2即为第一预测单元。
在待处理单元为第一变换单元和第一预测单元的情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一变换单元的尺寸;利用划分信息确定第一预测单元的尺寸;在第一预测单元的尺寸大于第二阈值的情况下,将第一预测单元的尺寸确定为待处理单元的单元尺寸;在第一预测单元的尺寸小于或等于第二阈值的情况下,将第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第二阈值例如为8、
Figure PCTCN2015094008-appb-000009
16、
Figure PCTCN2015094008-appb-000010
或32。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一变换单元、第一编码单元和第一预测单元。
在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一预测单元的尺寸;利用划分信息确定第一编码单元的尺寸;计算第一预测单元的尺寸和第一编码单元的尺寸的平均值;在平均值大于第三阈值的情况下,将该平均值确定为待处理单元的单元尺寸;在平均值小于或等于第三阈值的情况下,利用划分信息确定第一变换单元的尺寸,将第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第三阈值例如为8、12、16或32。
另外,在第一变换系数集对应的待处理单元为第一变换单元、第一编码单元和第一预测单元的情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,还可以采用如下方式:
利用划分信息确定第一变换单元的尺寸;利用划分信息确定第一编码单元的尺寸;利用划分信息确定第一预测单元的尺寸;计算第一变换单元的尺寸、第一编码单元的尺寸以及第一预测单元的尺寸的加权平均值,将加权平均值确定为待处理单元的单元尺寸。
实施中,可设置第一编码单元的尺寸的权重大于第一变换单元和第一预 测单元的尺寸的权重。例如:第一预测单元的尺寸的权重设置为0.25,第一变换单元的尺寸的权重为0.25,第一编码单元的尺寸的权重为0.5;或者,第一预测单元的尺寸的权重设置为0.1,第一变换单元的尺寸的权重为0.3,第一编码单元的尺寸的权重为0.6;或者,第一预测单元的尺寸的权重设置为0.3,第一变换单元的尺寸的权重为0.2,第一编码单元的尺寸的权重为0.5。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一编码单元。在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一编码单元的尺寸,确定第一编码单元的尺寸为待处理单元的单元尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一预测单元。在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一预测单元的尺寸,确定第一预测单元的尺寸为待处理单元的单元尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一编码单元和第一预测单元。在这种情况下,利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:利用划分信息确定第一编码单元的尺寸;利用划分信息确定第一预测单元的尺寸;在第一编码单元的尺寸大于第四阈值的情况下,将第一编码单元的尺寸确定为待处理单元的尺寸;在第一编码单元的尺寸小于或等于第四阈值的情况下,将第一预测单元的尺寸确定为待处理单元的尺寸。其中,第四阈值例如为8、12、16或32。
在本发明上述公开的确定待处理单元的单元尺寸的实施方式中:第一变换单元的尺寸为第一变换单元覆盖的像素总数的平方根;第一编码单元的尺寸为第一编码单元覆盖的像素总数的平方根;第一预测单元的尺寸为第一预测单元覆盖的像素总数的平方根。
具体实施中,如果第一变换单元为矩形,则获取第一变换单元的宽和高,以宽和高的乘积的平方根作为第一变换单元的尺寸。如果第一变换单元为正方形,则只需获取第一变换单元的宽或高作为第一变换单元的尺寸。如果第一变换单元为非矩形,则需要统计第一变换单元覆盖的像素总数,以像素总数的平方根作为第一变换单元的尺寸。
如果第一编码单元为矩形,则获取第一编码单元的宽和高,以宽和高的乘积的平方根作为第一编码单元的尺寸。如果第一编码单元为正方形,则只需获取第一编码单元的宽或高作为编码单元的尺寸。
如果第一预测单元为矩形,则获取第一预测单元的宽和高,以宽和高的乘积的平方根作为预测单元的尺寸。如果第一预测单元为正方形,则只需获取第一预测单元的宽或高作为第一预测单元的尺寸。
在本发明图1所示的反量化变换系数的方法中,根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,可以采用多种方式。下面分别进行说明。
第一种方式:
利用公式
Figure PCTCN2015094008-appb-000011
计算第一变换系数集的量化调节因子。其中,QC为第一变换系数集的量化调节因子,Size为待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
第二种方式:
利用公式
Figure PCTCN2015094008-appb-000012
计算第一变换系数集的量化调节因子。其中,QC为第一变换系数集的量化调节因子,Size为待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
另外,在待处理单元为第一变换单元的情况下,根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,还可以采用如图3所示的方式,包括:
步骤S31:解析码流,获取码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt
其中,t=2,3,…T,T为大于3的整数。任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元的尺寸,量化调节因子差分信息dQCt全部或部分大于0。
步骤S32:利用最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定T种变换单元对应的量化调节因子。
步骤S33:确定T种变换单元中与第一变换单元的尺寸相同的变换单元为目标变换单元,确定该目标变换单元对应的量化调节因子为待处理单元的量化调节因子。
这里结合实例进行说明:
解析码流,获取码流携带的允许使用的5种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,4,5。
之后利用最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定5种变换单元对应的量化调节因子。具体的:
第2级变换单元对应的量化调节因子QC2=QC1+dQC2
第3级变换单元对应的量化调节因子QC3=QC2+dQC3
第4级变换单元对应的量化调节因子QC4=QC3+dQC4
第5级变换单元对应的量化调节因子QC5=QC4+dQC5;其中,QC1、dQC2、dQC3、dQC4和dQC5均为已知量,由此即可确定5种变换单元对应的量化调节因子。
之后,比较第一变换单元的尺寸和上述的5种变换单元的尺寸,假如第一变换单元的尺寸与第3级变换单元的尺寸相同,则确定待处理单元的量化调节因子为QC3
实施中,在待处理单元为第一编码单元的情况下,根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,还可以采用如方式:
解析码流,获取码流携带的允许使用的P种编码单元的尺寸、最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp。其中,p=2,3,…P,P为大于3的整数。任意相邻两级编码单元中,级别数值小的编码单元的尺寸大于另一编码单元的尺寸,量化调节因子差分信息dQCp全部或部分大于0。
利用最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,确定P种编码单元对应的量化调节因子。
确定P种编码单元中与第一编码单元的尺寸相同的编码单元为目标编码单元,确定该目标编码单元对应的量化调节因子为待处理单元的量化调节因子。
实施中,在待处理单元为第一预测单元的情况下,根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,还可以采用如方式:
解析码流,获取码流携带的允许使用的Z种预测单元的尺寸、最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz。其中,z=2,3,…Z,Z为大于3的整数。任意相邻两级预测单元中,级别数值小的预测单元的尺寸大于另一预测单元的尺寸,量化调节因子差分信息dQCz全部或部分大于0。
利用最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,确定Z种预测单元对应的量化调节因子。
确定Z种预测单元中与第一预测单元的尺寸相同的预测单元为目标预测 单元,确定该目标预测单元对应的量化调节因子为待处理单元的量化调节因子。
在本发明图1所示的反量化变换系数的方法中,利用量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理,可以采用多种形式,下面分别进行说明。
第一种方式:
利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对第一变换系数集中的各变换系数进行反量化处理。
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs(i)为第一变换系数集中第i个变换系数对应的原始量化步长,QC为量化调节因子,o2(i)为第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为第二变换系数集中的第i个变换系数。
另外,上述公式中,sign{X}表示取X的符号,即
Figure PCTCN2015094008-appb-000013
round{X}为取整(rounding)操作,o2(i)的取值决定了具体为向下取整、四舍五入取整还是向上取整,例如,当o2(i)为0.5时,round{X}具体为四舍五入取整,当o2(i)为1时,round{X}具体为向上取整,当o2(i)为0时,round{X}具体为向下取整。
第一变换系数集中的变换系数对应的原始量化步长为:第一变换系数集对应的第一变换单元或第一编码单元的量化参数(Quantization Parameter,QP)对应的量化步长,例如量化参数为4时对应的量化步长为1。通常,编码单元的量化参数可以由解析码流得到;变换单元的量化参数可以继承该变换单元所在编码单元的量化参数,也可以在编码单元的量化参数上根据码流中的量化参数信息修改得到。这里需要说明的是:第一变换系数集中各变换系数对应的原始量化步长可能相同,也可能不同。
上述第一种方式,利用量化调节因子对第一变换系数集中的各变换系数 对应的原始量化步长进行缩放,之后利用缩放后的量化步长对第一变换系数集中相应的变换系数进行反量化。
第二种方式:
对量化调节因子进行整数化处理;对第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;利用公式1对第一变换系数集中的各变换系数进行反量化处理。
公式1为:
R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs‘(i)为第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC为经整数化处理后的量化调节因子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为第二变换系数集中的第i个变换系数。
实施中,对量化调节因子以及第一变换系数集中各变换系数对应的原始量化步长进行整数化处理可以为向上取整、向下取整或者是四舍五入取整。
上述第二种方式,分别对量化调节因子和第一变换系数集中各变换系数对应的原始量化步长进行整数化处理,之后利用整数化处理后的量化调节因子对各变换系数经过整数化处理后的量化步长进行缩放,利用缩放后的量化步长对第一变换系数集中对应的变换系数进行反量化处理。
第三种方式:
利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;
利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集。
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs(i)为第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为第三变换系数集中的第i个变换系数,QC为量化调节因子,o5(i)为第三 变换系数集中第i个变换系数对应的舍入偏置,R(i)为第二变换系数集中的第i个变换系数。o4(i)和o5(i)的取值决定了取整操作具体为向下取整、四舍五入取整还是向上取整。
上述第三种方式,利用第一变换系数集中各变换系数的原始量化步长对各变换系数进行反量化处理,之后利用量化调节因子对反量化处理得到的各个变换系数进行缩放处理。
第四种方式:
参见图4,图4为本发明公开的一种利用量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理的方法的流程图。包括:
步骤S41:获取与量化调节因子对应的电平尺度表。
实施中,可以采用多种方式获取与量化调节因子对应的电平尺度表。下文将进行详细说明。电平尺度表包括多个电平尺度值,如包括6个电平尺度值{40、45、51、57、64、72}或者包括8个电平尺度值{108、118、128、140、152、166、181、197}。
步骤S42:利用电平尺度表按照第三预设算法确定对第一变换系数集进行反量化处理的量化步长。
利用公式Qs”(i)=m(i)·l(i)计算对第一变换系数集进行反量化处理的量化步长Qs”(i),
其中,m(i)为缩放因子、可通过解析码流得到;
l(i)为电平尺度值、为量化参数的函数,
Figure PCTCN2015094008-appb-000014
其中,levelScale[K]表示取电平尺度表中的第K个电平尺度值,
Figure PCTCN2015094008-appb-000015
表示对QP除N并向下取整,%为取余操作,<<为左移运算符,N为电平尺度表中电平尺度值的数量。在电平尺度表包括6个电平尺度值的情况下,
Figure PCTCN2015094008-appb-000016
在电平尺度表包括8个电平尺度值的情况下,
Figure PCTCN2015094008-appb-000017
步骤S43:利用该量化步长按照第四预设算法对第一变换系数集进行反量化处理。
在通过步骤S41和S42确定量化步长后,可以采用现有的任意一种方式对 第一变换系数集进行反量化处理,得到第一变换系数集。
例如:利用公式R(i)=sign{A(i)}·round{A(i)·Qs”(i)+o6(i)}对第一变换系数集中的各变换系数进行反量化处理。其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs”(i)为第一变换系数集中第i个变换系数对应的量化步长,o6(i)为第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为第二变换系数集中的第i个变换系数。
在图4所示的方法中,获取与量化调节因子对应的电平尺度表,可以采用下述方式。
方式一:
将预设电平尺度表中的M个电平尺度值分别与量化调节因子相乘;对M个乘积分别进行整数化处理,得到对第一变换系数集进行反量化处理的电平尺度表。
也就是,将预设电平尺度表中的每个电平尺度值分别乘以量化调节因子QC并取整,得到新的电平尺度表,该电平尺度表用于对第一变换系数集进行反量化处理。实施中,对M个乘积分别进行整数化处理,可以为向上取整、向下取整或者为四舍五入取整。
方式二:
确定量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;获取量化调节因子所属取值区间对应的电平尺度表。
实施中,预先将量化调节因子的取值范围划分为H1个取值区间,每个取值区间对应于一个预设的电平尺度表。检索计算出的量化调节因子所属的取值区间,选取该取值区间对应的电平尺度表,该电平尺度表作为对第一变换系数集进行反量化处理的电平尺度表。
表1和表2分别示出了量化调节因子与电平尺度表的一种映射关系。
表1
  电平尺度表
QC≥1.5 {60,68,77,86,96,108}
1.2<QC<1.5 {54,61,69,77,86,97}
0.8≤QC≤1.2 {40,45,51,57,64,72}
0.6<QC<0.8 {28,32,36,40,45,50}
QC≤0.6 {24,27,31,34,38,43}
表2
  电平尺度表
QC=2-1 {20,23,26,29,32,36}
QC=2-3/4 {24,27,30,34,38,43}
QC=2-1/2 {28,32,36,40,45,51}
QC=2-1/4 {34,38,43,48,54,61}
QC=1 {40,45,51,57,64,72}
QC=21/4 {48,54,61,68,76,86}
QC=21/2 {57,64,72,81,91,102}
方式三:
将预设的电平尺度表中的M个电平尺度值分别与量化调节因子相乘;对M个乘积分别进行整数化处理,得到M个中间值;确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;按照预设规则在M个整数集合中分别选取一个整数,构成对第一变换系数集进行反量化处理的电平尺度表。
实施中,对M个乘积分别进行整数化处理,可以为向上取整、向下取整或者为四舍五入取整。另外,按照预设规则在一个整数集合中选取一个整数可以采用下述方式:
利用公式
Figure PCTCN2015094008-appb-000018
Figure PCTCN2015094008-appb-000019
计算整数集合中各整数对应的第一 中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为所述整数集合中的第j个整数,j=1,2,…,J,J为整数集合中包含的整数的数量;
利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算整数集合中各整数对应的第三中间值Cj
确定第三中间值Cj中的最小值Ck,在整数集合中选取与所述最小值Ck对应的整数。
其中,
Figure PCTCN2015094008-appb-000020
为向下取整,
Figure PCTCN2015094008-appb-000021
为向上取整,min(Y,Z)表示选取Y和Z中较小的数。当然,也可以利用其它规则在整数集合中选取一个整数。
本发明还公开反量化变换系数的装置,下面描述的反量化变换系数的装置可与上文中反量化变换系数的方法相互对应参照。
参见图5,图5为本发明公开的一种反量化变换系数的装置的结构示意图。该装置包括单元尺寸确定单元1、量化调节因子确定单元2和反量化单元3。
其中:
单元尺寸确定单元1,用于利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,第一变换系数集和划分信息经由对码流进行熵解码产生。
量化调节因子确定单元2,用于根据单元尺寸确定单元确定的待处理单元的单元尺寸,按照第一预设算法确定第一变换系数集的量化调节因子,第一预设算法使得量化调节因子与待处理单元的单元尺寸的大小呈递减关系。
反量化单元3,用于利用量化调节因子确定单元确定的量化调节因子,按照第二预设算法对第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
本发明公开的反量化变换系数的装置,单元尺寸确定单元利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,量化调节因子确定单元基于待处理单元的单元尺寸和图像复杂度的强相关性,根据待处理单元的单元尺寸自适应的确定第一变换系数集的量化调节因子,反量化单元利用该量化调节因子对第一变换系数集中的变换系数进行反量化处理。基于本发明公 开的反量化变换系数的装置,解码设备根据待处理单元的单元尺寸自适应地确定第一变换系数集的量化调节因子,之后利用确定出的量化调节因子对第一变换系数集中的变换系数进行反量化处理,由于编码设备发送的码流中无需携带量化步长调节信息,因此能够提升编码效率。
在具体实施中,第一变换系数集对应的待处理单元有多种形式,相应的,单元尺寸确定单元1具有多种结构。
作为一种实施方式,第一变换系数集对应的待处理单元为第一变换单元。相应的,单元尺寸确定单元1包括:第一尺寸确定模块,利用划分信息确定第一变换单元的尺寸;第一处理模块,用于确定第一尺寸确定模块确定的第一变换单元的尺寸为待处理单元的单元尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一变换单元和第一编码单元。相应的,单元尺寸确定单元1包括:第一尺寸确定模块,用于利用划分信息确定第一变换单元的尺寸;第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第二处理模块,用于在第一编码单元的尺寸大于第一阈值的情况下,将第二尺寸确定模块确定的第一编码单元的尺寸确定为待处理单元的单元尺寸,在第一编码单元的尺寸小于或等于第一阈值的情况下,将第一尺寸确定模块确定的第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第一阈值例如为8、12、16或32。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一变换单元和第一预测单元。相应的,单元尺寸确定单元1包括:第一尺寸确定模块,用于利用划分信息确定第一变换单元的尺寸;第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第三处理模块,用于在第三尺寸确定模块确定的第一预测单元的尺寸大于第二阈值的情况下,将第一预测单元的尺寸确定为待处理单元的单元尺寸,在第一尺寸确定模块确定的第一预测单元的尺寸小于或等于第二阈值的情况下,将第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第二阈值例如为8、
Figure PCTCN2015094008-appb-000022
16、
Figure PCTCN2015094008-appb-000023
或32。
作为另一种实施方式,待处理单元为第一变换单元、第一编码单元和第 一预测单元。相应的,单元尺寸确定单元1包括:第一尺寸确定模块,用于利用划分信息确定第一变换单元的尺寸;第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;平均值计算模块,用于计算第一预测单元的尺寸和第一编码单元的尺寸的平均值;第四处理模块,用于在平均值计算模块计算得到的平均值大于第三阈值的情况下,将平均值确定为待处理单元的单元尺寸,在平均值计算模块计算得到的平均值小于或等于第三阈值的情况下,将第一尺寸确定模块确定的第一变换单元的尺寸确定为待处理单元的单元尺寸。其中,第三阈值例如为8、12、16或32。
在待处理单元为第一变换单元、第一编码单元和第一预测单元的情况下,单元尺寸确定单元1也可以采用如下结构,包括:第一尺寸确定模块,用于利用划分信息确定第一变换单元的尺寸;第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第五处理模块,用于计算第一变换单元的尺寸、第一编码单元的尺寸以及第一预测单元的尺寸的加权平均值,将加权平均值确定为待处理单元的单元尺寸。
作为另一种实施方式,待处理单元为第一编码单元。相应的,单元尺寸确定单元1包括:第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第六处理模块,用于确定第二尺寸确定模块确定的第一编码单元的尺寸为待处理单元的尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一预测单元。相应的,单元尺寸确定单元1包括:第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第七处理模块,用于确定第三尺寸确定模块确定的第一预测单元的尺寸为待处理单元的尺寸。
作为另一种实施方式,第一变换系数集对应的待处理单元为第一编码单元和第一预测单元。相应的,单元尺寸确定单元1包括:第二尺寸确定模块,用于利用划分信息确定第一编码单元的尺寸;第三尺寸确定模块,用于利用划分信息确定第一预测单元的尺寸;第八处理单元,用于在第二尺寸确定模 块确定的第一编码单元的尺寸大于第四阈值的情况下,将第一编码单元的尺寸确定为待处理单元的尺寸,在第二尺寸确定模块确定的第一编码单元的尺寸小于或等于第四阈值的情况下,将第一预测单元的尺寸确定为待处理单元的尺寸。其中,第四阈值例如为8、12、16或32。
在本发明图5所示的反量化变换系数的装置中,量化调节因子确定单元2根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,可以采用多种方式。相应的,量化调节因子确定单元2具有多种结构。
作为一种实施方式,量化调节因子确定单元2包括第一量化调节因子确定模块。该第一量化调节因子确定模块利用公式
Figure PCTCN2015094008-appb-000024
计算第一变换系数集的量化调节因子。其中,QC为第一变换系数集的量化调节因子,Size为待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
作为另一种实施方式,量化调节因子确定单元2包括第二量化调节因子确定模块。第二量化调节因子确定模块利用公式
Figure PCTCN2015094008-appb-000025
计算第一变换系数集的量化调节因子。其中,QC为第一变换系数集的量化调节因子,Size为待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
在待处理单元为第一变换单元的情况下,量化调节因子确定单元2还可以采用如下结构,包括第一解析模块、第一计算模块和第三量化调节因子确定模块。其中:
第一解析模块,用于解析码流,获取码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,…T,T为大于3的整数,任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元的尺寸,量化调节因子差分信息dQCt全部或部分大于0;
第一计算模块,用于利用最大变换单元对应的量化调节因子QC1、以及 第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定T种变换单元对应的量化调节因子;
第三量化调节因子确定模块,用于确定T种变换单元中与第一变换单元的尺寸相同的变换单元为目标变换单元,确定目标变换单元对应的量化调节因子为待处理单元的量化调节因子。
另外,在待处理单元为第一编码单元的情况下,量化调节因子确定单元2还可以采用如下结构,包括第二解析模块、第二计算模块和第四量化调节因子确定模块。其中:
第二解析模块,用于解析码流,获取码流携带的允许使用的P种编码单元的尺寸、最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,其中,p=2,3,…P,P为大于3的整数。任意相邻两级编码单元中,级别数值小的编码单元的尺寸大于另一编码单元的尺寸,量化调节因子差分信息dQCp全部或部分大于0;
第二计算模块,用于利用最大编码单元对应的量化调节因子QC1、以及第p级编码单元相对于第p-1级编码单元的量化调节因子差分信息dQCp,确定P种编码单元对应的量化调节因子;
第四量化调节因子确定模块,用于确定P种编码单元中与第一编码单元的尺寸相同的编码单元为目标编码单元,确定该目标编码单元对应的量化调节因子为待处理单元的量化调节因子。
另外,在待处理单元为第一预测单元的情况下,量化调节因子确定单元2还可以采用如下结构,包括第三解析模块、第三计算模块和第五量化调节因子确定模块。其中:
第三解析模块,用于解析码流,获取码流携带的允许使用的Z种预测单元的尺寸、最大预测单元对应的量化调节因子QC1、以及第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,其中,z=2,3,…Z,Z为大于3的整数。任意相邻两级预测单元中,级别数值小的预测单元的尺寸大于另一预测单元的尺寸,量化调节因子差分信息dQCz全部或部分大于0,
第三计算模块,用于利用最大预测单元对应的量化调节因子QC1、以及 第z级预测单元相对于第z-1级预测单元的量化调节因子差分信息dQCz,确定Z种预测单元对应的量化调节因子;
第五量化调节因子确定模块,用于确定Z种预测单元中与第一预测单元的尺寸相同的预测单元为目标预测单元,确定该目标预测单元对应的量化调节因子为待处理单元的量化调节因子。
本发明图5所示的反量化变换系数的装置中,反量化单元3利用量化调节因子按照第二预设算法对第一变换系数集中的变换系数进行反量化处理,可以采用多种方式实现,相应的,反量化单元3具有多种结构。
作为一种实施方式,反量化单元3包括第一反量化模块。第一反量化模块利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对第一变换系数集中的各变换系数进行反量化处理。
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs(i)为第一变换系数集中第i个变换系数对应的原始量化步长,QC为量化调节因子,o2(i)为第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为第二变换系数集中的第i个变换系数。
作为另一种实施方式,反量化单元3包括第一整数化处理模块、第二整数化处理模块和第二反量化模块。其中:第一整数化处理模块,用于对量化调节因子进行整数化处理;第二整数化处理模块,用于对第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;第二反量化模块,用于利用公式R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)对第一变换系数集中的各变换系数进行反量化处理。
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs‘(i)为第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC‘为经整数化处理后的量化调节因子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为第二变换系数集中的第i个变换系数。
作为另一种实施方式,反量化单元3包括第三反量化模块和变换系数处 理模块。其中:
第三反量化模块,用于利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;变换系数处理模块,用于利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集。
其中,i=1,2,…N,N为第一变换系数集包含的变换系数的数量,A(i)为第一变换系数集中的第i个变换系数,Qs(i)为第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为第三变换系数集中的第i个变换系数,QC为量化调节因子,o5(i)为第三变换系数集中第i个变换系数对应的舍入偏置,R(i)为第二变换系数集中的第i个变换系数。
作为另一种实施方式,反量化单元3包括电平尺度表获取模块、量化步长确定模块和第四反量化模块。其中:电平尺度表获取模块,用于获取与量化调节因子对应的电平尺度表;量化步长确定模块,用于利用电平尺度表获取模块获取的电平尺度表、按照第三预设算法确定对第一变换系数集进行反量化处理的量化步长;第四反量化模块,用于利用量化步长确定模块确定的量化步长、按照第四预设算法对第一变换系数集进行反量化处理。
实施中,电平尺度表获取模块可以采用如下结构,包括计算子模块和第一整数化处理子模块。其中:计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与量化调节因子相乘;第一整数化处理子模块,用于对计算子模块得到的M个乘积分别进行整数化处理,得到对第一变换系数集进行反量化处理的电平尺度表。
实施中,电平尺度表获取模块也可以采用如下结构,包括区间确定子模块和电平尺度表获取子模块。其中:区间确定子模块,用于确定量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;电平尺度表获取子模块,用于获取区间确定子模块确定的量化调节因子所属取值区间所对应的电平尺度表。
另外,电平尺度表获取模块也可以采用如下结构,包括计算子模块、第 二整数化处理子模块、整数集合确定子模块和处理子模块。其中:计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与量化调节因子相乘;第二整数化处理子模块,用于对计算子模块得到的M个乘积分别进行整数化处理,得到M个中间值;整数集合确定子模块,用于利用第二整数化处理子模块得到的M个中间值确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;处理子模块,用于按照预设规则在M个整数集合中分别选取一个整数,构成对第一变换系数集进行反量化处理的电平尺度表。
实施中,该处理子模块用于按照预设规则在一个整数集合中选取一个整数,具体为:利用公式
Figure PCTCN2015094008-appb-000026
Figure PCTCN2015094008-appb-000027
计算整数集合中各整数对应的第一中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为整数集合中的第j个整数,j=1,2,…,J,J为整数集合中包含的整数的数量;利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算整数集合中各整数对应的第三中间值Cj;确定第三中间值Cj中的最小值Ck,在整数集合中选取与最小值Ck对应的整数。
本发明还公开一种解码设备。参见图6,图6示出了解码设备的硬件结构,包括处理器100、存储器200和通信总线300。
其中:处理器100和存储器200通过通信总线300完成相互间的通信。存储器200用于存放程序,处理器100用于执行存储器200存放的程序。处理器100可能是一个中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。存储器200可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器100通过调用存储器200存放的程序,用于执行:利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,第一变换系数集和划分信息经由对码流进行熵解码产生;根据待处理单元的单元尺寸按照第一预设算法确定第一变换系数集的量化调节因子,第一预设算法使得量化调节因子与待处理单元的单元尺寸的大小呈递减关系;利用量化调节因子按照 第二预设算法对第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
本实施例方法所述的功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算设备可读取存储介质中。基于这样的理解,本申请实施例对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台计算设备(可以是个人计算机,服务器,移动计算设备或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (35)

  1. 一种反量化变换系数的方法,其特征在于,包括:
    利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;
    根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;
    利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
  2. 根据权利要求1所述的方法,其特征在于,所述待处理单元为第一变换单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
    利用所述划分信息确定所述第一变换单元的尺寸,确定所述第一变换单元的尺寸为所述待处理单元的单元尺寸。
  3. 根据权利要求1所述的方法,其特征在于,所述待处理单元为第一变换单元和第一编码单元,所述第一编码单元为包含所述第一变换单元的最小编码单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
    利用所述划分信息确定所述第一变换单元的尺寸;
    利用所述划分信息确定所述第一编码单元的尺寸;
    在所述第一编码单元的尺寸大于第一阈值的情况下,将所述第一编码单元的尺寸确定为所述待处理单元的单元尺寸;
    在所述第一编码单元的尺寸小于或等于所述第一阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  4. 根据权利要求1所述的方法,其特征在于,所述待处理单元为第一变换单元和第一预测单元,所述第一预测单元为:与所述第一变换单元存在重合区域的预测单元中重合区域最大的预测单元;所述利用划分信息确定第一 变换系数集对应的待处理单元的单元尺寸,具体为:
    利用所述划分信息确定所述第一变换单元的尺寸;
    利用所述划分信息确定所述第一预测单元的尺寸;
    在所述第一预测单元的尺寸大于第二阈值的情况下,将所述第一预测单元的尺寸确定为所述待处理单元的单元尺寸;
    在所述第一预测单元的尺寸小于或等于所述第二阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  5. 根据权利要求1所述的方法,其特征在于,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元存在重合区域的最大预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
    利用所述划分信息确定所述第一预测单元的尺寸;
    利用所述划分信息确定所述第一编码单元的尺寸;
    计算所述第一预测单元的尺寸和所述第一编码单元的尺寸的平均值;
    在所述平均值大于第三阈值的情况下,将所述平均值确定为所述待处理单元的单元尺寸;
    在所述平均值小于或等于所述第三阈值的情况下,利用所述划分信息确定所述第一变换单元的尺寸,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  6. 根据权利要求1所述的方法,其特征在于,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元重叠的最大预测单元;所述利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,具体为:
    利用所述划分信息确定所述第一变换单元的尺寸;
    利用所述划分信息确定所述第一编码单元的尺寸;
    利用所述划分信息确定所述第一预测单元的尺寸;
    计算所述第一变换单元的尺寸、所述第一编码单元的尺寸以及所述第一预测单元的尺寸的加权平均值,将所述加权平均值确定为所述待处理单元的单元尺寸。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
    利用公式
    Figure PCTCN2015094008-appb-100001
    计算所述第一变换系数集的量化调节因子;
    其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
  8. 根据权利要求1-6中任一项所述的方法,其特征在于,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
    利用公式
    Figure PCTCN2015094008-appb-100002
    计算所述第一变换系数集的量化调节因子;
    其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
  9. 根据权利要求2所述的方法,其特征在于,所述根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,具体为:
    解析码流,获取所述码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,…T,T为大于3的整数,任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元的尺寸,所述量化调节因子差分信息dQCt全部或部分大于0;
    利用所述最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定所述T种变换单 元对应的量化调节因子;
    确定所述T种变换单元中与所述第一变换单元的尺寸相同的变换单元为目标变换单元,确定所述目标变换单元对应的量化调节因子为所述待处理单元的量化调节因子。
  10. 根据权利要求7-9中任一项所述的方法,其特征在于,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
    利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对所述第一变换系数集中的各变换系数进行反量化处理;
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,QC为所述量化调节因子,o2(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
  11. 根据权利要求7-9中任一项所述的方法,其特征在于,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
    对所述量化调节因子进行整数化处理;
    对所述第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;
    利用公式
    R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)对所述第一变换系数集中的各变换系数进行反量化处理,
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs‘(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC‘为经整数化处理后的量化调节因子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为所述第二变换系数集中的第i个变换系数。
  12. 根据权利要求7-9中任一项所述的方法,其特征在于,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
    利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对所述第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;
    利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对所述第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集;
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为所述第三变换系数集中的第i个变换系数,QC为所述量化调节因子,o5(i)为所述第三变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
  13. 根据权利要求7-9中任一项所述的方法,其特征在于,所述利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,包括:
    获取与所述量化调节因子对应的电平尺度表;
    利用所述电平尺度表按照第三预设算法确定对所述第一变换系数集进行反量化处理的量化步长;
    利用所述量化步长按照第四预设算法对所述第一变换系数集进行反量化处理。
  14. 根据权利要求13所述的方法,其特征在于,所述获取与所述量化调节因子对应的电平尺度表,包括:
    将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;
    对M个乘积分别进行整数化处理,得到对所述第一变换系数集进行反量化处理的电平尺度表。
  15. 根据权利要求13所述的方法,其特征在于,所述获取与所述量化调节因子对应的电平尺度表,包括:
    将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;
    对M个乘积分别进行整数化处理,得到M个中间值;
    确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;
    按照预设规则在所述M个整数集合中分别选取一个整数,构成对所述第一变换系数集进行反量化处理的电平尺度表。
  16. 根据权利要求15所述的方法,其特征在于,按照预设规则在一个整数集合中选取一个整数,包括:
    利用公式
    Figure PCTCN2015094008-appb-100003
    Figure PCTCN2015094008-appb-100004
    计算所述整数集合中各整数对应的第一中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为所述整数集合中的第j个整数,j=1,2,…,J,J为所述整数集合中包含的整数的数量;
    利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算所述整数集合中各整数对应的第三中间值Cj
    确定所述第三中间值Cj中的最小值Ck,在所述整数集合中选取与所述最小值Ck对应的整数。
  17. 根据权利要求13所述的方法,其特征在于,所述获取与所述量化调节因子对应的电平尺度表,包括:
    确定所述量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;
    获取所述量化调节因子所属取值区间对应的电平尺度表。
  18. 一种反量化变换系数的装置,其特征在于,包括:
    单元尺寸确定单元,用于利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;
    量化调节因子确定单元,用于根据所述单元尺寸确定单元确定的所述待处理单元的单元尺寸,按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;
    反量化单元,用于利用所述量化调节因子确定单元确定的量化调节因子,按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
  19. 根据权利要求18所述的装置,其特征在于,所述待处理单元为第一变换单元;所述单元尺寸确定单元包括:
    第一尺寸确定模块,利用所述划分信息确定所述第一变换单元的尺寸;
    第一处理模块,用于确定所述第一尺寸确定模块确定的第一变换单元的尺寸为所述待处理单元的单元尺寸。
  20. 根据权利要求18所述的装置,其特征在于,所述待处理单元为第一变换单元和第一编码单元,所述第一编码单元为包含所述第一变换单元的最小编码单元;所述单元尺寸确定单元包括:
    第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;
    第二尺寸确定模块,用于利用所述划分信息确定所述第一编码单元的尺寸;
    第二处理模块,用于在所述第一编码单元的尺寸大于第一阈值的情况下,将所述第二尺寸确定模块确定的所述第一编码单元的尺寸确定为所述待处理单元的单元尺寸,在所述第一编码单元的尺寸小于或等于所述第一阈值的情况下,将所述第一尺寸确定模块确定的所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  21. 根据权利要求18所述的装置,其特征在于,所述待处理单元为第一变换单元和第一预测单元,所述第一预测单元为:与所述第一变换单元存在重合区域的预测单元中重合区域最大的预测单元;所述单元尺寸确定单元包括:
    第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;
    第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;
    第三处理模块,用于在所述第三尺寸确定模块确定的所述第一预测单元的尺寸大于第二阈值的情况下,将所述第一预测单元的尺寸确定为所述待处理单元的单元尺寸,在所述第三尺寸确定模块确定的所述第一预测单元的尺寸小于或等于所述第二阈值的情况下,将所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  22. 根据权利要求18所述的装置,其特征在于,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元存在重合区域的最大预测单元;所述单元尺寸确定单元包括:
    第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;
    第二尺寸确定模块,用于利用所述划分信息确定所述第一编码单元的尺寸;
    第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;
    平均值计算模块,用于计算所述第一预测单元的尺寸和所述第一编码单元的尺寸的平均值;
    第四处理模块,用于在平均值大于第三阈值的情况下,将所述平均值确定为所述待处理单元的单元尺寸,在所述平均值计算模块计算得到的平均值小于或等于所述第三阈值的情况下,将所述第一尺寸确定模块确定的所述第一变换单元的尺寸确定为所述待处理单元的单元尺寸。
  23. 根据权利要求18所述的装置,其特征在于,所述待处理单元为第一变换单元、第一编码单元和第一预测单元,所述第一编码单元为包含所述第一变换单元的最小编码单元,所述第一预测单元为与所述第一变换单元重叠的最大预测单元;所述单元尺寸确定单元包括:
    第一尺寸确定模块,用于利用所述划分信息确定所述第一变换单元的尺寸;
    第二尺寸确定模块,用于利用所述划分信息确定所述第一编码单元的尺 寸;
    第三尺寸确定模块,用于利用所述划分信息确定所述第一预测单元的尺寸;
    第五处理模块,用于计算所述第一变换单元的尺寸、所述第一编码单元的尺寸以及所述第一预测单元的尺寸的加权平均值,将所述加权平均值确定为所述待处理单元的单元尺寸。
  24. 根据权利要求18至23中任一项所述的装置,其特征在于,所述量化调节因子确定单元包括第一量化调节因子确定模块;
    所述第一量化调节因子确定模块利用公式
    Figure PCTCN2015094008-appb-100005
    计算所述第一变换系数集的量化调节因子,其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1和M1为不小于1的正数,K1和A1为正数。
  25. 根据权利要求18至23中任一项所述的装置,其特征在于,所述量化调节因子确定单元包括第二量化调节因子确定模块;
    所述第二量化调节因子确定模块利用公式
    Figure PCTCN2015094008-appb-100006
    计算所述第一变换系数集的量化调节因子;其中,QC为所述第一变换系数集的量化调节因子,Size为所述待处理单元的单元尺寸,N1为不小于1的正数,a1和b1为正数。
  26. 根据权利要求19所述的装置,其特征在于,所述量化调节因子确定单元包括:
    第一解析模块,用于解析码流,获取所述码流携带的允许使用的T种变换单元的尺寸、最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,其中,t=2,3,…T,T为大于3的整数,任意相邻两级变换单元中,级别数值小的变换单元的尺寸大于另一变换单元的尺寸,所述量化调节因子差分信息dQCt全部或部分大于0;
    第一计算模块,用于利用所述最大变换单元对应的量化调节因子QC1、以及第t级变换单元相对于第t-1级变换单元的量化调节因子差分信息dQCt,确定所述T种变换单元对应的量化调节因子;
    第三量化调节因子确定模块,用于确定所述T种变换单元中与所述第一变换单元的尺寸相同的变换单元为目标变换单元,确定所述目标变换单元对应的量化调节因子为所述待处理单元的量化调节因子。
  27. 根据权利要求24-26中任一项所述的装置,其特征在于,所述反量化单元包括第一反量化模块;
    所述第一反量化模块利用公式R(i)=sign{A(i)}·round{A(i)·Qs(i)·QC+o2(i)}对所述第一变换系数集中的各变换系数进行反量化处理;
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,QC为所述量化调节因子,o2(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
  28. 根据权利要求24-26中任一项所述的装置,其特征在于,所述反量化单元包括:
    第一整数化处理模块,用于对所述量化调节因子进行整数化处理;
    第二整数化处理模块,用于对所述第一变换系数集中各变换系数对应的原始量化步长进行整数化处理;
    第二反量化模块,用于利用公式
    R(i)=sign{A(i)}·(A(i)·Qs'(i)·QC'+(1<<(bdshift-1+delta)))>>(bdshift+delta)对所述第一变换系数集中的各变换系数进行反量化处理,
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs‘(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长经整数化处理后产生的结果,QC‘为经整数化处理后的量化调节因子,bdshift为移位数,delta为额外的移位数,<<为左移运算符,>>为右移运算符,R(i)为所述第二变换系数集中的第i个变换系数。
  29. 根据权利要求24-26中任一项所述的装置,其特征在于,所述反量化单元包括:
    第三反量化模块,用于利用公式B(i)=sign{A(i)}·round{A(i)·Qs(i)+o4(i)}对所述第一变换系数集中的各变换系数进行反量化处理,得到第三变换系数集;
    变换系数处理模块,用于利用公式R(i)=sign{B(i)}·round{B(i)·QC+o5(i)}对所述第三变换系数集中的各变换系数进行缩放处理和整数化处理,得到第二变换系数集;
    其中,i=1,2,…N,N为所述第一变换系数集包含的变换系数的数量,A(i)为所述第一变换系数集中的第i个变换系数,Qs(i)为所述第一变换系数集中第i个变换系数对应的原始量化步长,o4(i)为所述第一变换系数集中第i个变换系数对应的舍入偏置,B(i)为所述第三变换系数集中的第i个变换系数,QC为所述量化调节因子,o5(i)为所述第三变换系数集中第i个变换系数对应的舍入偏置,R(i)为所述第二变换系数集中的第i个变换系数。
  30. 根据权利要求24-26中任一项所述的装置,其特征在于,所述反量化单元包括:
    电平尺度表获取模块,用于获取与所述量化调节因子对应的电平尺度表;
    量化步长确定模块,用于利用所述电平尺度表获取模块获取的电平尺度表、按照第三预设算法确定对所述第一变换系数集进行反量化处理的量化步长;
    第四反量化模块,用于利用所述量化步长确定模块确定的量化步长、按照第四预设算法对所述第一变换系数集进行反量化处理。
  31. 根据权利要求30所述的装置,其特征在于,所述电平尺度表获取模块包括:
    计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;
    第一整数化处理子模块,用于对所述计算子模块得到的M个乘积分别进行整数化处理,得到对所述第一变换系数集进行反量化处理的电平尺度表。
  32. 根据权利要求30所述的装置,其特征在于,所述电平尺度表获取模 块包括:
    计算子模块,用于将预设的电平尺度表中的M个电平尺度值分别与所述量化调节因子相乘;
    第二整数化处理子模块,用于对所述计算子模块得到的M个乘积分别进行整数化处理,得到M个中间值;
    整数集合确定子模块,用于利用所述第二整数化处理子模块得到的M个中间值确定M个整数集合,其中第m个整数集合以第m个中间值为中心,m=1,2,…,M;
    处理子模块,用于按照预设规则在所述M个整数集合中分别选取一个整数,构成对所述第一变换系数集进行反量化处理的电平尺度表。
  33. 根据权利要求32所述的装置,其特征在于,所述处理子模块具体用于:
    利用公式
    Figure PCTCN2015094008-appb-100007
    Figure PCTCN2015094008-appb-100008
    计算所述整数集合中各整数对应的第一中间值Bj,1和第二中间值Bj,2,其中,P为大于1的整数,Dj为所述整数集合中的第j个整数,j=1,2,…,J,J为所述整数集合中包含的整数的数量;
    利用公式Cj=min(|Dj·Bj,1-2P|,|Dj·Bj,2-2P|)计算所述整数集合中各整数对应的第三中间值Cj
    确定所述第三中间值Cj中的最小值Ck,在所述整数集合中选取与所述最小值Ck对应的整数。
  34. 根据权利要求30所述的装置,其特征在于,所述电平尺度表获取模块包括:
    区间确定子模块,用于确定所述量化调节因子在预设的多个取值区间中所属的取值区间,其中,每个取值区间与一个电平尺度表对应;
    电平尺度表获取子模块,用于获取所述区间确定子模块确定的所述量化调节因子所属取值区间所对应的电平尺度表。
  35. 一种解码设备,其特征在于,包括处理器、存储器和通信总线;
    所述存储器用于存放程序;
    所述处理器通过调用所述存储器存放的程序,用于执行:
    利用划分信息确定第一变换系数集对应的待处理单元的单元尺寸,其中,所述第一变换系数集和所述划分信息经由对码流进行熵解码产生;根据所述待处理单元的单元尺寸按照第一预设算法确定所述第一变换系数集的量化调节因子,所述第一预设算法使得所述量化调节因子与所述待处理单元的单元尺寸的大小呈递减关系;利用所述量化调节因子按照第二预设算法对所述第一变换系数集中的变换系数进行反量化处理,得到第二变换系数集。
PCT/CN2015/094008 2015-11-06 2015-11-06 反量化变换系数的方法、装置及解码设备 WO2017075810A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
PCT/CN2015/094008 WO2017075810A1 (zh) 2015-11-06 2015-11-06 反量化变换系数的方法、装置及解码设备
KR1020187008492A KR102139159B1 (ko) 2015-11-06 2015-11-06 변환 계수의 역양자화 방법 및 장치, 그리고 디코딩 기기
EP15907652.0A EP3334160A4 (en) 2015-11-06 2015-11-06 Method and apparatus for de-quantization of transform coefficients, and decoding device
BR112018007925-1A BR112018007925A2 (zh) 2015-11-06 2015-11-06 A method, a device and a decoding device for inverse quantizing transform coefficients
CN201580073663.9A CN107211133B (zh) 2015-11-06 2015-11-06 反量化变换系数的方法、装置及解码设备
US15/970,638 US10630983B2 (en) 2015-11-06 2018-05-03 Transform coefficient dequantization method and apparatus, and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/094008 WO2017075810A1 (zh) 2015-11-06 2015-11-06 反量化变换系数的方法、装置及解码设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/970,638 Continuation US10630983B2 (en) 2015-11-06 2018-05-03 Transform coefficient dequantization method and apparatus, and decoding device

Publications (1)

Publication Number Publication Date
WO2017075810A1 true WO2017075810A1 (zh) 2017-05-11

Family

ID=58661470

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094008 WO2017075810A1 (zh) 2015-11-06 2015-11-06 反量化变换系数的方法、装置及解码设备

Country Status (6)

Country Link
US (1) US10630983B2 (zh)
EP (1) EP3334160A4 (zh)
KR (1) KR102139159B1 (zh)
CN (1) CN107211133B (zh)
BR (1) BR112018007925A2 (zh)
WO (1) WO2017075810A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405279A (zh) * 2019-01-03 2020-07-10 华为技术有限公司 量化、反量化方法及装置
RU2764258C1 (ru) * 2018-06-29 2022-01-14 Кэнон Кабусики Кайся Способ, устройство и система для кодирования и декодирования преобразованного блока выборок видео

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259913A (zh) * 2016-12-29 2018-07-06 北京大学深圳研究生院 一种用于帧间预测帧中的帧内预测方法
CN109756733B (zh) * 2017-11-06 2022-04-12 华为技术有限公司 视频数据解码方法及装置
KR20190056888A (ko) * 2017-11-17 2019-05-27 삼성전자주식회사 비디오 부호화 장치 및 방법
CN110363279B (zh) * 2018-03-26 2021-09-21 华为技术有限公司 基于卷积神经网络模型的图像处理方法和装置
CN110536133B (zh) * 2018-05-24 2021-11-19 华为技术有限公司 视频数据解码方法及装置
KR102504694B1 (ko) 2018-06-03 2023-02-28 엘지전자 주식회사 축소된 변환을 이용하여 비디오 신호를 처리하는 방법 및 장치

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013064109A1 (zh) * 2011-11-04 2013-05-10 华为技术有限公司 一种图像编码、解码的方法和装置
CN103517069A (zh) * 2013-09-25 2014-01-15 北京航空航天大学 一种基于纹理分析的hevc帧内预测快速模式选择方法
CN103975592A (zh) * 2011-12-15 2014-08-06 联发科技(新加坡)私人有限公司 反量化变换系数的方法及装置
CN104702962A (zh) * 2015-03-03 2015-06-10 华为技术有限公司 帧内编解码方法、编码器和解码器

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975773B1 (en) * 2002-07-30 2005-12-13 Qualcomm, Incorporated Parameter selection in data compression and decompression
JP4901772B2 (ja) 2007-02-09 2012-03-21 パナソニック株式会社 動画像符号化方法及び動画像符号化装置
US8451896B2 (en) 2009-10-19 2013-05-28 Hong Kong Applied Science and Technology Research Institute Company Limited Method and apparatus for adaptive quantization in digital video coding
US10897625B2 (en) * 2009-11-20 2021-01-19 Texas Instruments Incorporated Block artifact suppression in video coding
US20120189052A1 (en) * 2011-01-24 2012-07-26 Qualcomm Incorporated Signaling quantization parameter changes for coded units in high efficiency video coding (hevc)
CN108174213B (zh) * 2011-10-24 2022-07-12 占史克威尔有限公司 图像解码装置
KR102005468B1 (ko) * 2011-10-24 2019-10-01 (주)대가람 복원 블록을 생성하는 방법 및 장치
WO2013086724A1 (en) 2011-12-15 2013-06-20 Mediatek Singapore Pte. Ltd. Method of clippling transformed coefficients before de-quantization
JP2014003587A (ja) * 2012-05-25 2014-01-09 Canon Inc 画像符号化装置及びその方法
US9319684B2 (en) * 2012-08-21 2016-04-19 Qualcomm Incorporated Alternative transform in scalable video coding
KR102088801B1 (ko) * 2013-03-07 2020-03-13 삼성전자주식회사 가변블록 사이즈 코딩 정보를 이용한 관심영역 코딩 방법 및 장치
CN104270641B (zh) * 2014-09-30 2018-12-14 杭州华为数字技术有限公司 变换系数的处理方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013064109A1 (zh) * 2011-11-04 2013-05-10 华为技术有限公司 一种图像编码、解码的方法和装置
CN103975592A (zh) * 2011-12-15 2014-08-06 联发科技(新加坡)私人有限公司 反量化变换系数的方法及装置
CN103517069A (zh) * 2013-09-25 2014-01-15 北京航空航天大学 一种基于纹理分析的hevc帧内预测快速模式选择方法
CN104702962A (zh) * 2015-03-03 2015-06-10 华为技术有限公司 帧内编解码方法、编码器和解码器

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RICHARDSON, I.E.G.;: "Alternate Quantiser", H.264 AND MPEG-4 VIDEO COMPRESSION VIDEO CODING FOR NEXT-GENERATION MULTIMEDIA, 31 December 2003 (2003-12-31), pages 118, XP009504352 *
See also references of EP3334160A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2764258C1 (ru) * 2018-06-29 2022-01-14 Кэнон Кабусики Кайся Способ, устройство и система для кодирования и декодирования преобразованного блока выборок видео
US11445191B2 (en) 2018-06-29 2022-09-13 Canon Kabushiki Kaisha Method, apparatus and system for encoding and decoding a transformed block of video samples
CN111405279A (zh) * 2019-01-03 2020-07-10 华为技术有限公司 量化、反量化方法及装置
CN111405279B (zh) * 2019-01-03 2021-06-29 华为技术有限公司 量化、反量化方法及装置

Also Published As

Publication number Publication date
KR102139159B1 (ko) 2020-07-29
EP3334160A1 (en) 2018-06-13
EP3334160A4 (en) 2018-06-13
US20180255301A1 (en) 2018-09-06
CN107211133B (zh) 2020-04-03
CN107211133A (zh) 2017-09-26
KR20180043822A (ko) 2018-04-30
BR112018007925A2 (zh) 2018-10-30
US10630983B2 (en) 2020-04-21

Similar Documents

Publication Publication Date Title
WO2017075810A1 (zh) 反量化变换系数的方法、装置及解码设备
CN110692243B (zh) 用于在视频压缩中的熵代码化的概率的混合
US10462459B2 (en) Non-local adaptive loop filter
US10257514B2 (en) Adaptive dequantization method and apparatus in video coding
US20190200012A1 (en) Intra prediction-based video signal processing method and apparatus
TWI737137B (zh) 視訊編碼之非線性適應性迴圈濾波方法和裝置
US10469876B2 (en) Non-local adaptive loop filter combining multiple denoising technologies and grouping image patches in parallel
US10419758B2 (en) Non-local adaptive loop filter processing
CN115379241A (zh) 用于对最后有效系数标志进行代码化的方法和设备
EP3993425A1 (en) Loop filtering method and device
EP3198555B1 (en) Frequency-domain denoising
EP3673653B1 (en) Embedding information about token tree traversal
EP3343919A1 (en) Video encoding apparatus, video encoding method, video decoding apparatus, and video decoding method
Xu et al. Eliminating blocking artifacts in halftoning-based block truncation coding
Guleryuz et al. Non-Separable Filtering with Side-Information and Contextually-Designed Filters for Next Generation Video Codecs
CN117957839A (zh) 使用上下文设计的滤波器过滤侧信息
WO2023132765A1 (en) Filtering for image encoding and decoding
Blasi et al. Masking of transformed intra-predicted blocks for high quality image and video coding
Song et al. Modified Quantization Constraint Set for Deblocking Transform Coded Images

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15907652

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20187008492

Country of ref document: KR

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112018007925

Country of ref document: BR

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112018007925

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20180419