WO2019085942A1 - Procédé de prise de décision de mode sao, appareil, dispositif électronique et support de stockage lisible - Google Patents

Procédé de prise de décision de mode sao, appareil, dispositif électronique et support de stockage lisible Download PDF

Info

Publication number
WO2019085942A1
WO2019085942A1 PCT/CN2018/113021 CN2018113021W WO2019085942A1 WO 2019085942 A1 WO2019085942 A1 WO 2019085942A1 CN 2018113021 W CN2018113021 W CN 2018113021W WO 2019085942 A1 WO2019085942 A1 WO 2019085942A1
Authority
WO
WIPO (PCT)
Prior art keywords
ctu
mode
rate distortion
merge mode
sao
Prior art date
Application number
PCT/CN2018/113021
Other languages
English (en)
Chinese (zh)
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 北京金山云网络技术有限公司
Publication of WO2019085942A1 publication Critical patent/WO2019085942A1/fr

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/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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/182Methods 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 pixel
    • 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/96Tree coding, e.g. quad-tree coding

Definitions

  • the present application relates to the field of video coding technologies, and in particular, to an SAO mode decision method, apparatus, electronic device, and computer readable storage medium.
  • SAO Sample Adaptive Offset
  • HEVC High Efficiency Video Coding
  • the SAO parameter selection process is also called the SAO mode decision process.
  • the SAO parameters mainly include: an SAO type, an offset value set, and a merge mode, wherein the SAO type includes a skip mode, an EO (Edge Offset) mode, and a BO (Band Offset) mode.
  • a CTU Coding Tree Unit
  • a degree coding tree block is used for SAO mode decision respectively.
  • J1 is less than the optimal coding cost J0 of the CTU, then J0 is set equal to J1, and the SAO parameter of the CTU is generated.
  • J2 is smaller than J0, J0 is set to be equal to J2, and the SAO parameter of the CTU is updated. .
  • the present application provides an SAO mode decision method, apparatus, electronic device, and computer readable storage medium to improve coding efficiency.
  • the specific technical solutions are as follows:
  • an embodiment of the present application discloses an SAO mode decision method, where the method includes: performing pixel compensation on a coding tree unit CTU in a merge mode, determining an optimal merge mode, and determining the optimal merge mode.
  • the first rate distortion penalty C1 of the CTU in the optimal merge mode if the C1 is less than the preset first threshold, obtaining the sample adaptive compensation SAO parameter of the CTU based on the optimal merge mode; If less than the first threshold, pixel compensation is performed on the CTU in the EO mode to obtain a second rate distortion penalty C2; and the SAO parameters of the CTU are determined according to C2 and C1.
  • the coding tree unit CTU is pixel compensated in the merge mode, and the optimal merge mode and the first rate distortion cost C1 of the CTU in the optimal merge mode are determined, including:
  • the threshold C0 is set to a preset second threshold, wherein the second threshold is a value greater than the first threshold; and the CTU is pixel compensated in a left merge mode to obtain a third rate distortion penalty C3;
  • C3 is not less than C0
  • pixel compensation is performed on the CTU in the up merge mode to obtain a fourth rate distortion cost C4; and in a case where C3 is less than C0, the left merge mode is determined as an optimal merge mode, C0 is updated to C3; if C0 is less than a preset third threshold, determining that the first rate distortion cost C1 of the CTU is equal to C3 in the optimal merge mode, wherein the third threshold is less than a value of the second threshold; if C0 is not less than the third threshold, performing pixel compensation on the CTU in the up merge mode
  • the preset second threshold is: a current optimal coding cost of the CTU.
  • the performing pixel compensation on the CTU in the EO mode includes: a set of offset values obtained according to a preset pixel row interval and/or a preset pixel column interval in the EO mode.
  • the CTU performs pixel compensation.
  • determining an optimal merge mode and the first rate distortion cost C1 of the CTU in the optimal merge mode including Determining whether the CTU is the first CTU in the video frame; if the CTU is the first CTU in the video frame, performing pixel compensation on the CTU in the EO mode, and obtaining the location based on the EO mode Determining the SAO parameter of the CTU; performing pixel compensation on the coding tree unit CTU in the merge mode, determining an optimal merge mode and a first rate distortion cost C1 of the CTU in the optimal merge mode, including: The CTU is not the first CTU in the video frame, and the CTU is pixel compensated in the merge mode to determine the optimal merge mode and the first rate distortion cost C1 of the CTU in the optimal merge mode.
  • the pixel compensation of the CTU in the EO mode includes: selecting some or all EO types from each preset EO type of the EO mode; respectively, the selected EO type
  • the CTU performs pixel compensation to obtain a rate distortion cost of the CTU at each selected EO type selected; and a pixel compensation result corresponding to a rate distortion cost that minimizes the obtained rate distortion cost is determined as described in the EO mode.
  • CTU pixel compensation result is determined as described in the EO mode.
  • the CTU is pixel-compensated in an EO mode
  • the SAO parameter of the CTU is obtained based on an EO mode, including: performing pixel compensation on the CTU in an EO mode to obtain a fifth rate.
  • a distortion cost C5 determining whether C5 is less than a current optimal coding cost of the CTU; if C5 is not less than a current optimal coding cost of the CTU, ending the SAO mode decision of the CTU, and skipping the video frame where the CTU is located
  • the determining, according to C2 and C1, the SAO parameter of the CTU if: C2 is less than C1, obtaining an SAO parameter of the CTU based on an EO mode; and if C2 is not less than C1, based on the optimal The merge mode obtains the SAO parameter of the CTU.
  • an embodiment of the present application further discloses an SAO mode decision apparatus, where the apparatus includes: a mode determining module, configured to perform pixel compensation on a CTU in a merge mode, determine an optimal merge mode, and The first rate-distortion cost C1 of the CTU in the optimal merge mode; the first determining module is configured to determine whether C1 is less than a preset first threshold, and if C1 is less than the first threshold, triggering the first parameter Obtaining a module; if the C1 is not less than the first threshold, the trigger rate distortion cost obtaining module; the first parameter obtaining module is configured to obtain the SAO parameter of the CTU based on the optimal merge mode; the rate distortion cost Obtaining a module, configured to perform pixel compensation on the CTU in the EO mode to obtain a second rate distortion penalty C2; and a second parameter obtaining module configured to determine the SAO parameter of the CTU according to C2 and C1.
  • the mode determining module includes: a threshold determining submodule, a first rate distortion cost obtaining submodule, a first determining submodule, an optimal merge mode determining submodule, a second determining submodule, and a first rate.
  • a distortion cost determination submodule a second rate distortion cost obtaining submodule, a third judging submodule, a second rate distortion cost determining submodule, and a third rate distortion cost determining submodule;
  • the threshold determining submodule being set to target
  • the threshold C0 is set to a preset second threshold, wherein the second threshold is a value greater than the first threshold;
  • the first rate distortion cost obtaining submodule is set to be in the left merge mode
  • the CTU performs pixel compensation to obtain a third rate distortion penalty C3.
  • the first determining submodule is configured to determine whether C3 is less than C0.
  • the optimal merge mode determining submodule is triggered; if C3 is not less than C0 And triggering the second rate distortion cost obtaining submodule; the optimal merge mode determining submodule is configured to determine the left merge mode as the optimal merge mode, and C0 is updated to C3
  • the second determining sub-module is configured to determine whether C0 is less than a preset third threshold, and if C0 is less than the third threshold, triggering the first rate distortion cost determining sub-module; if C0 is not smaller than the third a threshold, the second rate distortion cost obtaining submodule is triggered; the first rate distortion cost determining submodule is configured to determine that the first rate distortion cost C1 of the CTU is equal to C3 in the optimal merge mode, wherein
  • the third threshold is a value smaller than the second threshold; the second rate distortion cost obtaining submodule is configured to perform pixel compensation on the CTU in an up merge mode to obtain a fourth rate distortion cost C4;
  • the third determining submodule is configured to
  • the preset second threshold is: a current optimal coding cost of the CTU.
  • the rate-distortion cost obtaining module is specifically configured to: perform pixel on the CTU according to a preset pixel row interval and/or a preset pixel column interval obtained in an EO mode. make up.
  • the apparatus further includes: a second determining module and a third parameter obtaining module; the second determining module is configured to determine whether the CTU is the first CTU in the video frame, if The CTU is the first CTU in the video frame, triggering the third parameter obtaining module; if the CTU is not the first CTU in the video frame, the mode determining module is triggered; a module configured to perform pixel compensation on the CTU in an EO mode and obtain an SAO parameter of the CTU based on an EO mode.
  • the third parameter obtaining module is specifically configured to select some or all EO types from each preset EO type of the EO mode; respectively, perform pixel compensation on the CTU under the selected EO type, Obtaining a rate-distortion cost of the CTU at each selected EO type selected; determining a pixel compensation result corresponding to a rate-distortion cost that minimizes the obtained rate distortion cost as a pixel compensation result of the CTU in the EO mode .
  • the third parameter obtaining module includes: a third rate distortion cost obtaining sub-module, a fourth determining sub-module, a skip sub-module, and a first parameter obtaining sub-module; a submodule configured to perform pixel compensation on the CTU in an EO mode to obtain a fifth rate distortion penalty C5; the fourth determining submodule is configured to determine whether C5 is less than a current optimal coding cost of the CTU, if C5 is not less than the current optimal coding cost of the CTU, triggering the skip submodule; if C5 is less than the current optimal coding cost of the CTU, triggering the first parameter obtaining submodule; the skip submodule And determining to end the SAO mode decision of the CTU, and skipping the SAO mode decision of other CTUs in the video frame where the CTU is located; the first parameter obtaining submodule is set to obtain the SAO parameter of the CTU based on the EO mode. .
  • the second parameter obtaining module includes: a fifth determining submodule, a second parameter obtaining submodule, and a third parameter obtaining submodule; and the fifth determining submodule is configured to determine whether C2 is smaller than C1 If the C2 is less than C1, triggering the second parameter to obtain a submodule; if C2 is not less than C1, triggering the third parameter to obtain a submodule; the second parameter obtaining a submodule, being set to obtain the CTU based on an EO mode
  • the SAO parameter; the third parameter obtaining submodule configured to obtain the SAO parameter of the CTU based on the optimal merge mode.
  • an electronic device in still another aspect of the implementation of the present application, includes a processor and a memory; a memory configured to store a computer program; and a processor configured to execute a program stored on the memory
  • a computer readable storage medium stores instructions that, when run on a computer, cause the computer to perform any of the SAOs described above Mode decision method.
  • an embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing a computer to perform the SAO mode decision method described in any of the above.
  • an SAO mode decision method, apparatus, electronic device, and computer readable storage medium can perform pixel compensation on a CTU in a merge mode, determine an optimal merge mode, and The first rate distortion cost C1 of the CTU in the optimal merge mode, when C1 is less than the preset first threshold, the AO mode can be directly skipped to determine the SAO parameter of the CTU, when C1 is not less than the first threshold, according to the EO mode
  • the second rate distortion cost C2 and C1 obtained by pixel compensation of the CTU determines the SAO parameter of the CTU.
  • the embodiment of the present application can skip the EO mode when the first rate distortion cost C1 satisfies the condition, which can save coding time and improve coding efficiency.
  • 1 is a general frame diagram of a video codec corresponding to the latest video coding standard HEVC;
  • FIG. 2 is a diagram of an interface frame of the SAO encoding end in the latest video coding standard HEVC;
  • FIG. 3 is a frame diagram of an interface interface of the SAO decoding end in the latest video coding standard HEVC;
  • FIG. 4 is a schematic diagram of four different sets of adjacent pixels of the EO mode in the SAO of the latest video coding standard HEVC;
  • FIG. 5 is a schematic diagram of a merge mode in the SAO in the latest video coding standard HEVC
  • FIG. 6 is a schematic flow chart of a SAO mode decision method
  • FIG. 7 is a schematic diagram of a first process of a method for determining a SAO mode according to an embodiment of the present disclosure
  • FIG. 8 is a schematic flowchart of a second method for determining a SAO mode according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram of a third process of a method for determining a SAO mode according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart of obtaining an SAO parameter of a CTU in an EO mode according to an embodiment of the present disclosure
  • FIG. 11 is a schematic flowchart of determining an SAO parameter of a CTU according to C2 and C1 according to an embodiment of the present disclosure
  • FIG. 12 is a schematic diagram of a first structure of an SAO mode decision apparatus according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic diagram of a second structure of an SAO mode decision apparatus according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic diagram of a third structure of an SAO mode decision apparatus according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a third parameter obtaining module according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram of a second parameter obtaining module according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a general frame diagram of a video codec corresponding to the latest HEVC.
  • the input video signal is processed by a block structure, prediction, transform, quantization, entropy coding, and the like, and finally outputs a bit stream.
  • a video encoder divides a video frame into blocks for encoding.
  • the H.264/AVC (Advanced Video Coding) video coding standard divides a video frame into 16 ⁇ 16 macros that are not covered by each other.
  • Block Micro Block, MB
  • HEVC Enanced Video Coding
  • the size of the CTU can be set in the encoder configuration file, usually 64 ⁇ 64.
  • the quadtree the CTU can be divided into Coding Units (CUs) of different sizes and encoded in units of CU. Then, the CU is divided into different prediction units (PUs), and the prediction is performed in units of PUs to obtain a prediction block.
  • CUs Coding Units
  • PUs prediction units
  • the prediction block is compared with the original PU to obtain a prediction residual block, and the prediction residual block is transformed.
  • a one-dimensional array is formed by a specific scanning method, the array is input to the quantizer for scalar quantization, and the quantized coefficient is input to the entropy encoder for encoding, and the encoded bit stream is output.
  • the encoded video reconstruction block is used as a reference block for subsequent video blocks so that subsequent video blocks can obtain more accurate prediction blocks with inter/intra prediction.
  • Deblocking filtering, SAO, etc. can effectively reduce the distortion of the reconstructed block and improve the subjective/objective quality of the encoded video.
  • FIG. 2 is a frame diagram of the SAO encoding end interface in the latest video coding standard HEVC.
  • the input is video frame block data (ie, original video data) and deblock filtered data, and the output is the final reconstructed block data.
  • video frame block data ie, original video data
  • deblock filtered data ie, deblock filtered data
  • the output is the final reconstructed block data.
  • SAO parameters ie, sample adaptive compensation parameters, offset values, etc., which need to be encoded by an entropy encoder into a code stream input to the decoding end
  • Encoding SAO parameters also requires a certain coded bit.
  • FIG. 3 is a frame diagram of the SAO decoding end interface in the latest video coding standard HEVC, and the input is the deblock filtered data of the reconstructed block data and the SAO information decoded by the entropy decoder. The output is the final reconstructed signal (input to the reference frame list buffer for subsequent video frame reference). Therefore, the SAO needs to weigh the final compressed video quality and compression performance to select the appropriate SAO parameters.
  • the SAO parameter selection process is also called the SAO mode decision process.
  • the SAO parameters mainly include the SAO type, the offset value set, and the merge mode.
  • SAO There are three types of SAO, namely skip mode, EO mode, and BO mode.
  • the offset value set is a set of offset values calculated according to the relationship between the current pixel in the luma coding tree block or the chroma coding tree block and the value of the corresponding pixel in the original image in the EO/BO mode.
  • the calculated offset value is applied to the corresponding pixel to implement pixel compensation of the luma coding tree block or the chroma coding tree block, that is, to reduce the distortion of the reconstructed block.
  • the value of sao_type_idx can be used to identify the SAO type
  • Table 1 is the correspondence between the value of sao_type_idx and the SAO type.
  • the EO mode is a process of calculating an offset value according to a relationship between a current pixel and a neighboring pixel in a luma coding tree block or a chroma coding tree block, and applying the calculated offset value to the current pixel, and the specific operation thereof
  • the method is as follows: According to Table 2, the current pixel can be divided into five different types. In Table 2, the category number of the current pixel is the correspondence between the current pixel and its neighboring pixel relationship.
  • FIG. 4 is a schematic diagram of four different adjacent pixels of the EO mode in the SAO of the latest video coding standard HEVC.
  • a, b represents an adjacent pixel
  • c represents a current pixel. If the "other cases" in Table 2 are satisfied, that is, the pixel belongs to the 0th category, the offset value is not applied to the current pixel c of the category; if the other four cases are satisfied, the current pixel of each category is c assigns an offset value to the current pixel c.
  • the offset value is a positive integer
  • the offset value is a negative integer to avoid encoding bits due to the encoded symbol bits. increase.
  • the specific operation mode of the offset value calculation is as follows: calculating the average value R 1 of all the pixels in each category after the luminance coding tree block or the chroma coding tree block is divided into five categories before the SAO mode decision, and the original image After the pixels of the luma coding tree block or the chroma coding tree block are divided into five categories, the average value S 1 of all the pixels in each category, the offset value of the category is (S 1 - R 1 ).
  • the offset values of each category constitute a set of offset values for the EO mode.
  • the BO mode classifies all pixels according to the value of all the pixels in the luma coding tree block or the chroma coding tree block, and sets an offset value for each type of pixel, and then applies the offset value to the corresponding class.
  • the process on the pixel The specific operation manner is as follows: all pixels are divided into 32 bands that are not inter-interleaved, that is, each band contains pixels corresponding to 8 pixel values, similar to a statistical histogram.
  • the first band contains the value of the pixel, the range belongs to the pixel of [0,7], the second band contains the value of the pixel, the range belongs to the pixel of [8,15], and so on, the 32nd band contains the value of the pixel.
  • the corresponding offset value is determined for the band, and the offset value is applied to the pixels belonging to the band.
  • the offset value is calculated as follows: calculating the average value R 2 of all the pixels in each band after dividing the luminance coding tree block or the chroma coding tree block into 32 bands before the SAO mode decision, and the brightness of the original image
  • the pixel of the coding tree block or the chroma coding tree block is divided into 32 bands, the average value S 2 of all the pixels in each band, and the offset value of the band is (S 2 - R 2 ).
  • the offset value of each band constitutes a set of offset values for the BO mode.
  • FIG. 5 is a schematic diagram of a merge mode in the SAO in the latest video coding standard HEVC.
  • the merge mode (including the up merge mode and the left merge mode) refers to the SAO parameter of the CTU pointed by the current CTU using the arrow.
  • the merge mode is upward, that is, the current CTU uses the SAO parameter of the CTU above the current CTU; the merge mode to the left, that is, the SAO parameter of the current CTU using the CTU of the left CTU
  • a CTU usually includes a luma coding tree block and several chroma coding tree blocks. Therefore, for the SAO mode decision of the CTU, the SAO mode decision needs to be performed separately for the luma coding tree block and the chroma coding tree block.
  • FIG. 6 is a schematic flowchart of a SAO mode decision method.
  • the SAO type decision is made for the CTU.
  • determining the SAO type of the luma coding tree block that is, selecting the one with the lowest rate distortion cost from the three SAO types, to generate the SAO parameter of the luma coding block, and calculating the ratio of the corresponding luma coding block. Distortion cost.
  • the SAO parameters including distortion, offset value, SAO type, etc.
  • the chroma coding tree block may be generated in the same manner, and if the CTU has multiple chroma components, it is required.
  • the rate distortion cost that is, the coding cost, is a measure of the coding performance based on the rate distortion theory in video coding.
  • the rate distortion cost of the CTU after using the SAO i.e., the sum of the rate distortion cost of the luma coding tree block and the rate distortion cost of the chroma coding tree block
  • J1 the rate distortion cost of the CTU after using the SAO
  • the current SAO parameter including the SAO of the luma coding tree block
  • set J0 equal to J1; otherwise, go directly to the next step.
  • the CTU is selected for the SAO merge mode.
  • the rate distortion cost J2 of the CTU in the left merge mode and the rate distortion penalty J3 of the CTU in the up merge mode are sequentially calculated. If the rate distortion cost of the CTU obtained in the current step is less than the current J0, the SAO parameter of the CTU is updated to the corresponding merge mode (ie, the merge mode or the merge mode to the left), and J0 is set equal to the corresponding rate distortion cost (ie, J2 or J3).
  • the rate distortion cost obtained in each step is not less than J0 of the current step, and the SAO mode decision is skipped for the CTU.
  • FIG. 7 is a schematic diagram of a first process of a method for determining an SAO mode according to an embodiment of the present disclosure.
  • the method may be applied to an electronic device, where the electronic device may be used to perform a SAO mode decision on a video image, for example, the electronic device may be a video.
  • An encoder or a device having video encoding capability, the method may include the following steps:
  • S701 Perform pixel compensation on the CTU in the merge mode to determine an optimal merge mode and a first rate distortion cost C1 of the CTU in the optimal merge mode.
  • the merge mode may include a left merge mode and an upward merge mode.
  • the electronic device can perform pixel compensation on the current CTU in the left merge mode and the upward merge mode, respectively, and obtain the rate distortion cost of the current CTU in the left merge mode and the rate distortion cost of the current CTU in the up merge mode, and compare the two different merges.
  • the size of the current CTU rate distortion cost in the mode, the merge mode that determines the rate distortion cost is the merge mode to be selected (ie, the optimal merge mode), and the electronic device can rate the current CTU rate distortion in the optimal merge mode. , as the first rate distortion cost C1.
  • the CTUs mentioned in the following embodiments all represent the luma coding tree block and the chroma coding tree block they contain.
  • the processing of the CTU mentioned refers to corresponding processing of the luma coding tree block included in the CTU, and corresponding processing of the chroma coding tree block included in the CTU.
  • the rate-distortion penalty of the mentioned CTUs represents the sum of the rate-distortion cost of the luma coding tree block included in the CTU and the rate-distortion penalty of the chroma coding tree block included in the CTU.
  • S702 Determine whether C1 is less than a preset first threshold. If C1 is less than the first threshold, perform S703. If C1 is not less than the first threshold, perform S704.
  • the first threshold may be set by a technician according to experience, or may be an optimal coding cost of the current CTU before the SAO mode decision is made.
  • S703 Obtain a SAO parameter of the CTU based on the optimal merge mode.
  • the electronic device may determine the merge mode of the current CTU. (ie, the optimal merge mode), skip the SAO type decision step, and obtain the SAO parameter of the current CTU according to the optimal merge mode (up merge mode or left merge mode) (the SAO parameter of the CTU above the current CTU or the current CTU left) The SAO parameter of the square CTU).
  • the optimal merge mode up merge mode or left merge mode
  • the SAO parameter may include a SAO type and an offset value set of the CTU above the current CTU or an SAO type and an offset value set of the current CTU left CTU.
  • the electronic device may perform pixel compensation on the current CTU by using each EO type of the EO mode, and calculate a current CTU that performs pixel compensation on the current CTU by using each EO type.
  • Each rate distortion cost The electronic device can use the smallest rate distortion cost among the calculated rate distortion costs as the second rate distortion cost.
  • S705 Determine the SAO parameter of the CTU according to C2 and C1.
  • the electronic device may determine the SAO parameter of the current CTU according to C2 and C1. When it is determined that C2 is less than C1, the electronic device may obtain the SAO parameter of the current CTU based on the EO mode; when it is determined that C2 is greater than or equal to C1, the electronic device may obtain the SAO parameter of the current CTU based on the optimal merge mode corresponding to C1.
  • the electronic device may skip the EO mode decision step and directly obtain the SAO parameter of the current CTU based on the optimal merge mode, thereby saving The coding time increases the coding efficiency.
  • FIG. 8 is a schematic flowchart of a second method for determining a SAO mode according to an embodiment of the present application, where pixel compensation is performed on a CTU in a merge mode to determine an optimal merge.
  • the mode and the first rate distortion cost C1 of the CTU in the optimal merge mode (S701) may include the following steps:
  • S7011 Set the target threshold C0 to a preset second threshold.
  • the second threshold is a value greater than the first threshold.
  • the second threshold may be an optimal coding cost before the current CTU does not perform the SAO mode decision.
  • C0 is a numerically variable amount in the merge mode selection process, and the electronic device can set the initial value of C0 to be equal to the preset second threshold.
  • S7012 Perform pixel compensation on the CTU in the left merge mode to obtain a third rate distortion penalty C3.
  • the electronic device may acquire the SAO type (EO mode or BO mode or skip mode) of the current CTU left CTU and the offset value set (the skip mode does not have the offset value set), and according to the obtained
  • the SAO type and the offset value set perform pixel compensation on the current CTU, and then the electronic device can calculate the rate distortion cost C3 of the current CTU under the obtained SAO type and the offset value set according to the compensation result.
  • the method for performing pixel compensation on the current CTU by the electronic device according to the SAO type and the offset value set may refer to the specific operation steps of the above-mentioned electronic device for performing pixel compensation on the current CTU in the EO mode and the BO mode. Narration.
  • S7013 It is judged whether C3 is smaller than C0. If C3 is smaller than C0, S7014 is executed; if C3 is not smaller than C0, S7015 is executed.
  • the electronic device can determine whether the rate distortion cost C3 obtained by the current CTU in the left merge mode is smaller than the optimal coding cost C0 of the current CTU.
  • the electronic device may determine that the current CTU selects the left merge mode (optimal merge mode) and sets the value of C0. Updated to the value of the third rate distortion penalty C3.
  • S7015 Perform pixel compensation on the CTU in the up merge mode to obtain a fourth rate distortion penalty C4.
  • the value of C0 at this time is equal to the second threshold or C3.
  • the electronic device may acquire the SAO type (EO mode or BO mode or skip mode) and the offset value set of the CTU above the current CTU, and perform pixel compensation on the current CTU according to the obtained SAO type and the offset value set. Then, the electronic device can calculate the rate distortion cost C4 of the current CTU under the obtained SAO type and the offset value according to the compensation result.
  • SAO type EO mode or BO mode or skip mode
  • S7016 Determine whether C0 is less than a preset third threshold. If C0 is less than the third threshold, perform S7017; if C0 is not less than the third threshold, execute S7015.
  • the third threshold is a value smaller than the second threshold.
  • the electronic device determines that the third rate distortion cost C3 is less than C0, and the value of C0 at this time is equal to the third rate distortion cost C3.
  • the electronic device determines whether C3 is less than a preset third threshold.
  • S7017 Determine that the first rate distortion cost C1 of the CTU in the optimal merge mode is equal to C3.
  • the value of C0 at this time is equal to the third rate distortion penalty C3, and the electronic device may skip the selection process of the upward merge mode, determine that the optimal merge mode of the current CTU is the left merge mode, and determine the first of the current CTU.
  • the rate distortion penalty C1 is equal to the third rate distortion penalty C3 of the current CTU in the left merge mode.
  • S7018 It is judged whether C4 is smaller than C0. If C4 is smaller than C0, S7019 is executed; if C4 is not smaller than C0, S7020 is executed.
  • S7019 Determine the up merge mode as the optimal merge mode, and the first rate distortion cost C1 of the CTU in the optimal merge mode is equal to the fourth rate distortion cost C4.
  • S7020 Determine that the first rate distortion cost C1 of the CTU in the optimal merge mode is equal to C0.
  • the electronic device may determine whether the rate distortion cost C4 obtained by the current CTU in the up merge mode is smaller than the current C0 (equal to the second threshold or the third rate distortion penalty C3).
  • the electronic device may determine that the current CTU selects the up merge mode (optimal merge mode), and determines the first rate distortion cost C1 of the current CTU, Equal to the rate distortion cost C4 of the current CTU in the up merge mode.
  • the electronic device may determine that the first rate distortion penalty C1 is equal to C0.
  • the optimal merge mode is determined according to the value of the current C0. If C0 is currently the third rate distortion cost C3, the optimal merge mode is the left merge mode. If C0 is currently the second threshold, the electronic device skips the merge for the current CTU. Mode processing.
  • the electronic device may determine that the first rate distortion cost C1 of the current CTU is equal to C3 in the optimal merge mode, that is, Directly skipping the selection process of the up merge mode can save coding time and improve coding efficiency.
  • the second threshold is the current optimal coding cost of the current CTU, that is, the optimal coding cost before the CTU is not subjected to the SAO mode decision.
  • the electronic device may set the second threshold to the current optimal coding cost of the current CTU, as the threshold value initially determined in the merge mode selection process, and the threshold value can be used to accurately merge the mode. The choice to improve coding efficiency.
  • performing pixel compensation on the CTU in the EO mode may include:
  • the CTU is pixel compensated according to a preset set of pixel rows and/or a preset pixel column interval.
  • the electronic device may sample the pixels within the luma coding tree block and/or the chroma coding block in an interlaced manner. Among the sampled pixels, for pixels belonging to the same category, the electronic device can calculate an offset value of the pixel of the category.
  • the electronic device when sampling the pixels in the luma coding tree block and/or the chroma coding block, if the sampling is performed by one line, the electronic device can reduce the calculation amount by half when calculating the offset value; With three rows of sampling, the electronic device can reduce the calculation by three-quarters when calculating the offset value.
  • the present application does not limit the manner in which the sampling is taken, and the specific interval can be determined by balancing the calculation amount and the encoding cost.
  • the method for calculating the offset value by the electronic device may refer to the specific operation steps of obtaining the offset value set in the EO mode by the foregoing electronic device, and details are not described herein again.
  • the electronic device can calculate the offset value set according to the preset pixel row interval and/or the preset pixel column interval, which can reduce the calculation amount and improve the coding efficiency.
  • FIG. 9 is a third schematic flowchart of a method for determining a SAO mode according to an embodiment of the present application, which may include the following steps:
  • S901 Determine whether the CTU is the first CTU in the video frame. If the CTU is the first CTU in the video frame, perform S902. If the CTU is not the first CTU in the video frame, perform S903.
  • the first CTU in the video frame there is no upper CTU, and there is no left CTU. Therefore, the electronic device does not select the merge mode for the first CTU within the video frame.
  • the SAO mode decision process of the electronic device for the CTU includes only the SAO type decision. In the case where both the EO mode and the BO mode exist, the probability that the electronic device selects the EO mode is great and the EO mode can better reflect the direct relationship of adjacent pixels. Therefore, the BO mode can be directly ignored to reduce the steps of the SAO type decision, thereby reducing the computational cost.
  • S902 Perform pixel compensation on the CTU in the EO mode, and obtain the SAO parameter of the CTU based on the EO mode.
  • the electronic device can skip the merge mode decision process, directly in the EO mode, the first CTU in the video frame. Perform pixel compensation to obtain the parameters of the SAO.
  • the method for performing pixel compensation on the first CTU in the video frame by the electronic device in the EO mode may refer to the specific operation steps of the above-mentioned electronic device for performing pixel compensation on the current CTU in the EO mode.
  • S903 Perform pixel compensation on the CTU in the merge mode to determine an optimal merge mode and a first rate distortion cost C1 of the CTU in the optimal merge mode.
  • S904 Determine whether C1 is less than a preset first threshold. If C1 is less than the first threshold, perform S905. If C1 is not less than the first threshold, perform S906.
  • S905 Obtain a SAO parameter of the CTU based on the optimal merge mode.
  • S906 Perform pixel compensation on the CTU in the EO mode to obtain a second rate distortion penalty C2.
  • S907 Determine the SAO parameter of the CTU according to C2 and C1.
  • S903 is the same as S701, S904 is the same as S702, S905 is the same as S703, S906 is the same as S704, and S907 is the same as S705, and details are not described herein.
  • the electronic device can skip the merge mode decision process, directly perform pixel compensation on the EO mode, and obtain the parameters of the SAO, thereby reducing Calculate the cost and improve coding efficiency.
  • the electronic device performs pixel compensation on the CTU in the EO mode, which may include the following steps:
  • the electronic device may select any one or a combination of the four types as the EO type to be selected. Based on the candidate EO types obtained above, pixel compensation is performed on the current CTU under each candidate EO type, and the rate distortion cost of the current CTU under each candidate EO type can be obtained. The electronic device can determine the candidate EO type with the lowest rate distortion cost as the EO type of the current EO mode, and obtain the pixel compensation result of the current CTU under the candidate EO type with the lowest rate distortion cost.
  • the present application recommends using the first EO type and the second EO type in FIG. 4 as the EO type to be selected, but there is no limitation on the type of EO to be selected, which can be determined by balancing the calculation amount and the coding cost.
  • the type of EO to be selected is not limited.
  • the method for performing pixel compensation on the current CTU by the electronic device in each candidate EO type may refer to the specific operation steps of the above-mentioned electronic device for performing pixel compensation on the current CTU in the EO mode.
  • the electronic device can select some or all of the EO types from the preset EO types in the EO mode as the EO type to be selected, which can reduce the calculation amount of the EO type determining step, thereby improving Coding efficiency.
  • FIG. 10 is a schematic flowchart of obtaining an SAO parameter of a CTU in an EO mode according to an embodiment of the present application, where pixel compensation is performed on a CTU in an EO mode, And obtaining the SAO parameter of the CTU based on the EO mode (S902), which may include the following steps:
  • the first CTU in the video frame there is no upper CTU, and there is no left CTU. Therefore, the electronic device does not select the merge mode for the first CTU within the video frame.
  • the SAO mode decision process of the electronic device for the CTU includes only the SAO type decision. In the case where both the EO mode and the BO mode exist, the probability that the electronic device selects the BO mode is smaller and the EO mode can better reflect the direct relationship of adjacent pixels. Therefore, the electronic device can directly ignore the BO mode and perform pixel compensation on the CTU only in the EO mode to obtain a fifth rate distortion penalty C5.
  • S9022 Determine whether C5 is smaller than a current optimal coding cost of the CTU. If C5 is not less than a current optimal coding cost of the CTU, perform S9023. If C5 is less than a current optimal coding cost of the CTU, perform S9024.
  • S9023 End the SAO mode decision of the CTU, and skip the SAO mode decision of other CTUs in the video frame where the CTU is located.
  • S9024 Obtain the SAO parameter of the CTU based on the EO mode.
  • the electronic device can determine whether C5 is less than the current optimal coding cost of the current CTU. When it is determined that C5 is greater than or equal to the current optimal coding cost of the current CTU, the rate distortion penalty after the SAO mode decision is increased on the CTU, and therefore, the electronic device may determine that the CTU skips the SAO mode decision. When it is determined that C5 is less than the current optimal coding cost of the current CTU, the electronic device may obtain the SAO parameter of the current CTU based on the EO mode.
  • the probability of selecting the merge mode in the SAO mode decision process is extremely large. If all CTUs in the current video frame adopt the merge mode, the first CTU will determine the SAO parameters of all CTUs in the video frame in which it is located. Therefore, if the first CTU skips the SAO mode decision, the electronic device can determine that all CTUs in the video frame in which the first CTU is located skip the SAO mode decision.
  • the electronic device may skip the SAO mode decision of all CTUs in the video frame, and reduce the SAO mode. The amount of calculation in the decision process, which in turn increases the coding efficiency.
  • FIG. 11 is a schematic flowchart of determining a SAO parameter of a CTU according to C2 and C1 according to an embodiment of the present application, where the CAO of the CTU is determined according to C2 and C1.
  • the parameter (S705) may include the following steps:
  • S7051 It is judged whether C2 is smaller than C1, if C2 is smaller than C1, S7052 is executed; if C2 is not smaller than C1, S7053 is executed.
  • S7052 Obtain the SAO parameter of the CTU based on the EO mode.
  • C1 may be equal to the second threshold, or may be equal to C3, and may be equal to C4.
  • the electronic device may determine that the SAO parameter of the current CTU is the SAO parameter obtained based on the EO mode.
  • the electronic device may determine that the SAO parameter of the current CTU is the SAO parameter obtained based on the optimal merge mode.
  • the electronic device may determine that the current CTU is a skip SAO mode decision; when C1 is equal to C3, the electronic device may determine that the current CTU SAO parameter is the SAO parameter obtained in the left merge mode; C1 is equal to At C4, the electronic device can determine that the SAO parameter of the current CTU is the SAO parameter obtained in the up merge mode.
  • the electronic device is based on the size relationship of C2 and C1, and according to the value of C1, the SAO parameter of the current CTU can be directly determined.
  • FIG. 12 is a schematic diagram of a first structure of an SAO mode decision apparatus according to an embodiment of the present disclosure, including: a mode determining module 1201, a first determining module 1202, and a first parameter obtaining module. 1203.
  • the mode determining module 1201 is configured to perform pixel compensation on the coding tree unit CTU in the merge mode, determine an optimal merge mode and a first rate distortion cost C1 of the CTU in the optimal merge mode;
  • the first determining module 1202 is configured to determine whether C1 is less than a preset first threshold, if C1 is less than the first threshold, triggering the first parameter obtaining module 1203; if C1 is not less than the first threshold, the triggering rate distortion obtaining module 1204;
  • the first parameter obtaining module 1203 is configured to obtain a sample adaptive compensation SAO parameter of the CTU based on the optimal merge mode
  • the rate-distortion cost obtaining module 1204 is configured to perform pixel compensation on the CTU in the EO mode to obtain a second rate distortion cost C2;
  • the second parameter obtaining module 1205 is configured to determine the SAO parameter of the CTU according to C2 and C1.
  • the EO mode decision step may be skipped, and the current CTU SAO parameter is directly obtained based on the optimal merge mode, which can save coding. Time to improve coding efficiency.
  • FIG. 13 is a schematic diagram of a second structure of an SAO mode determining apparatus according to an embodiment of the present application, where the mode determining module 1201 includes: a threshold determining sub-module 12011, The first rate distortion obtaining submodule 12012, the first determining submodule 12013, the optimal merge mode determining submodule 12014, the second determining submodule 12015, the first rate distortion cost determining submodule 12016, and the second rate distortion cost obtaining submodule 12017, third judgment sub-module 12018, second rate distortion cost determination sub-module 12019 and third rate distortion cost determination sub-module 12020.
  • the mode determining module 1201 includes: a threshold determining sub-module 12011, The first rate distortion obtaining submodule 12012, the first determining submodule 12013, the optimal merge mode determining submodule 12014, the second determining submodule 12015, the first rate distortion cost determining submodule 12016, and the second rate distortion cost obtaining submodule 12017, third judgment sub-
  • the threshold determining sub-module 12011 is configured to set the target threshold C0 to a preset second threshold, wherein the second threshold is a value greater than the first threshold;
  • the first rate distortion penalty obtaining sub-module 12012 is configured to perform pixel compensation on the CTU in the left merge mode to obtain a third rate distortion penalty C3;
  • the first judging sub-module 12013 is configured to determine whether C3 is less than C0, if C3 is less than C0, trigger the optimal merge mode determining sub-module 12014; if C3 is not less than C0, trigger the second rate-distortion cost obtaining sub-module 12017;
  • the optimal merge mode determining sub-module 12014 is configured to determine the left merge mode as the optimal merge mode, and C0 is updated to C3;
  • the second judging sub-module 12015 is configured to determine whether C0 is less than a preset third threshold. If C0 is less than the third threshold, the first rate distortion cost determination sub-module 12016 is triggered; if C0 is not less than the third threshold, the second rate is triggered. Distortion cost obtained sub-module 12017;
  • a first rate distortion penalty determination sub-module 12016 configured to determine that the first rate distortion cost C1 of the CTU is equal to C3 in the optimal merge mode, wherein the third threshold is a value less than the second threshold;
  • the second rate distortion penalty obtaining sub-module 12017 is set to perform pixel compensation on the CTU in the up merge mode to obtain a fourth rate distortion penalty C4;
  • the third determining sub-module 12018 is configured to determine whether C4 is less than C0, if C4 is less than C0, triggering the second rate distortion cost determination sub-module 12019; if C4 is not less than C0, triggering the third rate distortion cost determining sub-module 12020;
  • the second rate distortion cost determination sub-module 12019 is configured to determine the upward merge mode as the optimal merge mode, and the first rate distortion cost C1 of the CTU is equal to C4 in the optimal merge mode;
  • the third rate distortion penalty determination sub-module 12020 is configured to determine that the first rate distortion penalty C1 of the CTU is equal to C0 in the optimal merge mode.
  • the preset second threshold is: the current optimal coding cost of the CTU.
  • the solution provided by the embodiment of the present application sets the second threshold to the current optimal coding cost of the current CTU, and is used as the threshold value initially determined in the merge mode selection process, and the threshold value can be used to accurately select the merge mode. Improve coding efficiency.
  • the rate-distortion cost obtaining module may also be configured to:
  • the CTU is pixel compensated according to a preset set of pixel rows and/or a preset pixel column interval.
  • the solution provided by the embodiment of the present application calculates the offset value set according to the preset pixel row interval and/or the preset pixel column interval, which can reduce the calculation amount and improve the coding efficiency.
  • FIG. 14 is a schematic diagram of a third structure of an SAO mode determining apparatus according to an embodiment of the present disclosure.
  • the apparatus may further include: a second determining module 1206 and a third parameter obtaining module. 1207;
  • the second determining module 1206 is configured to determine whether the CTU is the first CTU in the video frame, and if the CTU is the first CTU in the video frame, triggering the third parameter obtaining module 1207; if the CTU is not in the video frame First CTU, trigger mode determination module 1201;
  • the third parameter obtaining module 1207 is configured to perform pixel compensation on the CTU in the EO mode, and obtain the SAO parameter of the CTU based on the EO mode.
  • the merge mode decision process can be skipped, and the pixel compensation is performed directly in the EO mode to obtain the parameters of the SAO, thereby reducing the computational cost and improving the coding efficiency.
  • the third parameter obtaining module 1207 may be further configured to select some or all of the EO types from each preset EO type of the EO mode;
  • the pixel compensation result corresponding to the rate distortion cost of the obtained rate distortion cost is determined as the pixel compensation result of the CTU in the EO mode.
  • the solution provided by the embodiment of the present application can select some or all of the EO types from the preset EO types of the EO mode as the EO type to be selected, which can reduce the calculation amount of the EO type determining step, thereby improving the coding efficiency. .
  • FIG. 15 is a schematic structural diagram of a third parameter obtaining module according to an embodiment of the present application, where the third parameter obtaining module 1207 includes: a third rate distortion cost.
  • the sub-module 12071, the fourth judging sub-module 12072, the skip sub-module 12073, and the first parameter obtaining sub-module 1274 are obtained.
  • the third rate distortion cost obtaining sub-module 12071 is configured to perform pixel compensation on the CTU in the EO mode to obtain a fifth rate distortion cost C5;
  • the fourth judging sub-module 12072 is configured to determine whether the C5 is less than the current optimal coding cost of the CTU, and if the C5 is not less than the current optimal coding cost of the CTU, the trigger skip module 12073 is triggered; if C5 is less than the current optimal coding cost of the CTU , triggering the first parameter obtaining submodule 1274;
  • Skip sub-module 12073 set to end the CAO SAO mode decision, and skip the SAO mode decision of other CTUs in the video frame where the CTU is located;
  • the first parameter obtaining sub-module 1274 is set to obtain the SAO parameter of the CTU based on the EO mode.
  • the solution provided by the embodiment of the present application skips the SAO mode decision of all CTUs in the video frame when determining the first CTU in the video frame to skip the SAO mode decision, and reduces the calculation of the SAO mode decision process. Quantity, which in turn improves coding efficiency.
  • FIG. 16 is a schematic structural diagram of a second parameter obtaining module according to an embodiment of the present application, where the second parameter obtaining module 1205 includes: a fifth determining submodule 12051, a second parameter obtaining submodule 12052 and a third parameter obtaining submodule 12053;
  • the fifth determining sub-module 12051 is configured to determine whether C2 is less than C1, if C2 is less than C1, triggering the second parameter obtaining sub-module 12052; if C2 is not less than C1, triggering the third parameter obtaining sub-module 12053;
  • a second parameter obtaining submodule 12052 configured to obtain a SAO parameter of the CTU based on the EO mode
  • the third parameter obtaining sub-module 12053 is configured to obtain the SAO parameter of the CTU based on the optimal merge mode.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 17, including a processor 1701 and a memory 1702;
  • a memory 1701 configured to store a computer program
  • the processor 1702 when configured to execute the program stored on the memory 1701, implements the SAO mode decision method provided by the embodiment of the present application.
  • the above SAO mode decision method may include:
  • the SAO parameters of the CTU are determined.
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage.
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP for short), or a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • NP Network Processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the electronic device provided by the embodiment of the present application can skip the EO mode when the first rate distortion cost C1 satisfies the condition in the SAO mode decision process, which can save coding time and improve coding efficiency.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores instructions, and when executed on a computer, causes the computer to execute the SAO mode decision method provided by the embodiment of the present application.
  • the above SAO mode decision method may include:
  • the SAO parameters of the CTU are determined.
  • the EO mode can be skipped when the first rate distortion cost C1 satisfies the condition, which can save coding time and improve coding efficiency.
  • the embodiment of the present application further provides a computer program product including instructions, which when executed on a computer, causes the computer to execute the SAO mode decision method provided by the embodiment of the present application.
  • the above SAO mode decision method may include:
  • the SAO parameters of the CTU are determined.
  • the EO mode can be skipped when the first rate distortion cost C1 satisfies the condition, which can save coding time and improve coding efficiency.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
  • the CTU may be compensated in the merge mode to determine the optimal merge mode and the first rate distortion cost C1 of the CTU in the optimal merge mode, when C1 is less than the preset number
  • the AO mode can be directly skipped to determine the SAO parameter of the CTU.
  • the SAO of the CTU is determined according to the second rate distortion cost C2 and C1 obtained by performing pixel compensation on the CTU in the EO mode. parameter. In this way, the embodiment of the present application can skip the EO mode when the first rate distortion cost C1 satisfies the condition, which can save coding time and improve coding efficiency.

Landscapes

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

Abstract

L'invention concerne un procédé de prise de décision de mode SAO, un appareil, un dispositif électronique et un support de stockage lisible, ledit procédé consistant à : effectuer, dans un mode de fusion, un décalage de pixel sur une unité d'arbre de codage (CTU), déterminer un mode de fusion optimal et un premier coût de distorsion de débit C1 de la CTU dans le mode de fusion optimal ; dans les cas où C1 est inférieur à un premier seuil prédéfini, obtenir le paramètre de décalage adaptatif d'échantillon (SAO) de la CTU sur la base du mode de fusion optimal ; dans les cas où C1 n'est pas inférieur au premier seuil, effectuer un décalage de pixel sur la CTU dans un mode EO, de façon à obtenir un second coût de distorsion de débit C2 ; déterminer le paramètre SAO de la CTU selon C2 et C1, puis achever la prise de décision de mode SAO de la CTU. Le procédé de prise de décision de mode SAO dans les modes de réalisation de la présente invention peut améliorer l'efficacité de codage.
PCT/CN2018/113021 2017-11-01 2018-10-31 Procédé de prise de décision de mode sao, appareil, dispositif électronique et support de stockage lisible WO2019085942A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711058757.6A CN109756736B (zh) 2017-11-01 2017-11-01 Sao模式决策方法、装置、电子设备及可读存储介质
CN201711058757.6 2017-11-01

Publications (1)

Publication Number Publication Date
WO2019085942A1 true WO2019085942A1 (fr) 2019-05-09

Family

ID=66331359

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113021 WO2019085942A1 (fr) 2017-11-01 2018-10-31 Procédé de prise de décision de mode sao, appareil, dispositif électronique et support de stockage lisible

Country Status (2)

Country Link
CN (1) CN109756736B (fr)
WO (1) WO2019085942A1 (fr)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866506A (zh) * 2020-06-07 2020-10-30 咪咕文化科技有限公司 图像编码方法、装置、设备及可读存储介质
CN111866507A (zh) * 2020-06-07 2020-10-30 咪咕文化科技有限公司 图像滤波方法、装置、设备及存储介质
CN111698511B (zh) * 2020-06-07 2022-09-16 咪咕文化科技有限公司 图像滤波方法、装置、设备及可读存储介质
CN113068050B (zh) * 2021-03-17 2022-08-23 上海哔哩哔哩科技有限公司 树形编码块的样点自适应补偿模式确定方法、装置
CN113489984A (zh) * 2021-05-25 2021-10-08 杭州博雅鸿图视频技术有限公司 Avs3的样点自适应补偿方法、装置、电子设备及存储介质
CN114363613B (zh) * 2022-01-10 2023-11-28 北京达佳互联信息技术有限公司 滤波方法和滤波装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100220937A1 (en) * 2009-02-27 2010-09-02 Research In Motion Corporation Optimization of image encoding using perceptual weighting
CN105828084A (zh) * 2016-03-30 2016-08-03 腾讯科技(深圳)有限公司 Hevc帧间编码处理方法和装置
CN105933717A (zh) * 2016-04-25 2016-09-07 北京奇艺世纪科技有限公司 一种编码单元的模式决策方法和装置
CN106131554A (zh) * 2016-07-07 2016-11-16 杭州电子科技大学 基于主要边缘方向的hevc快速样点自适应补偿方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2509707B (en) * 2013-01-04 2016-03-16 Canon Kk A method, device, computer program, and information storage means for encoding or decoding a video sequence
US9628822B2 (en) * 2014-01-30 2017-04-18 Qualcomm Incorporated Low complexity sample adaptive offset encoding
US10666975B2 (en) * 2014-04-23 2020-05-26 Sony Corporation Image processing apparatus and image processing method
CN105979262B (zh) * 2016-05-06 2019-12-03 西安电子科技大学 一种hevc基于时间相关性和帧内预测方向的sao优化方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100220937A1 (en) * 2009-02-27 2010-09-02 Research In Motion Corporation Optimization of image encoding using perceptual weighting
CN105828084A (zh) * 2016-03-30 2016-08-03 腾讯科技(深圳)有限公司 Hevc帧间编码处理方法和装置
CN105933717A (zh) * 2016-04-25 2016-09-07 北京奇艺世纪科技有限公司 一种编码单元的模式决策方法和装置
CN106131554A (zh) * 2016-07-07 2016-11-16 杭州电子科技大学 基于主要边缘方向的hevc快速样点自适应补偿方法

Also Published As

Publication number Publication date
CN109756736A (zh) 2019-05-14
CN109756736B (zh) 2021-02-12

Similar Documents

Publication Publication Date Title
WO2019085942A1 (fr) Procédé de prise de décision de mode sao, appareil, dispositif électronique et support de stockage lisible
WO2020253828A1 (fr) Procédé et dispositif de codage et de décodage et support de stockage
US10382795B2 (en) Method of video coding using binary tree block partitioning
US20160373767A1 (en) Encoding and Decoding Methods and Apparatuses
US20230024834A1 (en) Video decoding method, video encoding method, and related apparatuses
US20210266534A1 (en) Intra-frame prediction coding method and apparatus, electronic device, and computer storage medium
CN109688407B (zh) 编码单元的参考块选择方法、装置、电子设备及存储介质
CN110199522A (zh) 处理用于图像块帧内预测的参考样本
CN113711597A (zh) 上下文建模和多重变换矩阵的选择
US20220116664A1 (en) Loop filtering method and device
WO2021185008A1 (fr) Procédé de codage, procédé de décodage, codeur, décodeur, et dispositif électronique
US20240163470A1 (en) Method for inter prediction method, video picture encoder and decoder
TW202032993A (zh) 用於係數位準之逃逸寫碼
WO2022252567A1 (fr) Procédé et dispositif de détermination d'un ordre de priorité de codage et de décodage vidéo à base de comparaison de corrélations
JP2022521933A (ja) 符号化方法、復号化方法、デコーダ、エンコーダー及び記憶媒体
US8295349B2 (en) Methods and apparatuses for video compression intra prediction mode determination
CN110418138A (zh) 视频处理方法、装置、电子设备及存储介质
WO2022116085A1 (fr) Procédé de codage, procédé de décodage, codeur, décodeur et dispositif électronique
WO2021168817A1 (fr) Procédé et appareil de traitement vidéo
CN108702521B (zh) 编码和解码方法、装置、编码器、解码器及存储介质
CN109951707B (zh) 一种目标运动矢量选择方法、装置、电子设备及介质
WO2020140214A1 (fr) Procédé de décodage de prédiction, dispositif et support de stockage informatique
WO2024145790A1 (fr) Procédé de décodage, procédé de codage, décodeur et codeur
WO2024145791A1 (fr) Procédé de décodage, procédé de codage, décodeurs et codeurs
WO2023193253A1 (fr) Procédé de décodage, procédé de codage, décodeur et codeur

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: 18873508

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18873508

Country of ref document: EP

Kind code of ref document: A1