WO2013000304A1 - Loop filtering encoding and decoding methods and devices - Google Patents

Loop filtering encoding and decoding methods and devices Download PDF

Info

Publication number
WO2013000304A1
WO2013000304A1 PCT/CN2012/073111 CN2012073111W WO2013000304A1 WO 2013000304 A1 WO2013000304 A1 WO 2013000304A1 CN 2012073111 W CN2012073111 W CN 2012073111W WO 2013000304 A1 WO2013000304 A1 WO 2013000304A1
Authority
WO
WIPO (PCT)
Prior art keywords
loop filtering
parameter set
loop
encoding
filter
Prior art date
Application number
PCT/CN2012/073111
Other languages
French (fr)
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 WO2013000304A1 publication Critical patent/WO2013000304A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • 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
    • 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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • 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/117Filters, e.g. for pre-processing or post-processing

Definitions

  • the present invention relates to video compression coding techniques, and in particular, to a loop filtering codec method and apparatus. Background technique
  • ALF adaptive loop filter
  • the encoding method of the ALF related information in the prior art may mainly include the following steps: Step 1: In the sequence parameter set (SPS, Sequence Parameter Set), whether the current video sequence can use the ALF identification information and the necessary parameter information. If the ALF identification information is allowed, go to step 2; otherwise, the ALF related information is encoded. Step 2: In the header information of the slice, encode whether the current fragment uses the identification information of the ALF. If the current fragment uses the identification information of the ALF, step 3 is performed; otherwise, the ALF related information encoding process of the fragment ends. Step 3: further encode other related information of the ALF, such as a filter shape, a filter coefficient, a coding unit (CU, Coding Unit), ALF control information, and the like.
  • SPS Sequence Parameter Set
  • the existing loop filtering method mainly has the following first one, and adopts the method of using the SSPPSS whole body AALLFF mark identification method, and although the tube can be used as the code encoder
  • the optimization of the AALLFF module block provides a greater flexibility for the larger, but it does not provide an efficient and efficient way to provide the decoupling code for complex complexity and cocoa. Stretching and contracting, can not be flexible and flexible control of the complex complexity and the efficiency of coding and coding efficiency. .
  • the codec is often used to close the whole body.
  • the method of closing AALLFF"" is to edit and decode the complex complexity of the decoding code, so as to be able to fully utilize the AALLFF to encode the code efficiency rate. Contribute to contribute. .
  • the picture image in the inter-segment segment makes it necessary to use the code AALLFF in the phase-related information of the other relevant picture image.
  • the identification information of the identification information is such that, in the code stream, the information stored in the code stream is redundant and unnecessary. .
  • the third third, AALLFF's contribution to the coding efficiency efficiency of the coding is mainly reflected in the reduction of the low image image quantized noise noise and the improvement of the high movement movement compensation compensation
  • the pre-predictive reference reference image has two or two aspects of image quality, and the latter often tends to play a leading role.
  • the process of motion compensation compensation is concerned, the current process efficiency rate of the single-element cocoa reflection image image pair is processed. The impact of the sound. .
  • the existing method has adopted the whole sequence label identification with the sequence parameter parameters, and has not been able to fully subdivide the AALLFF used with the use of cocoa and the existing language.
  • the ambiguity between the grammar method and the unit cell includes the method of deriving the guide method, which saves the redundant information of the letter information that is not necessary. . Invent the contents of the invention
  • the main main objective of the present invention is to provide a method for encoding and decoding a code method for a loop loop filter filter and a device arrangement.
  • the existing loop circuit filtering filter wave method can not effectively and effectively between the complex complexity and the code efficiency rate Take a questionable question that has been compromised. .
  • the present invention provides a method for a loop loop filter filtering code encoding code method, and the method includes:
  • the setting is used to indicate that the loop circuit filter filter wave is in the process of coding and code passing process, and the ring loop filter filter mode is used in the process mode;
  • the method is:
  • the loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
  • the two or more loop filtering modes include any two or more of the following loop filtering modes:
  • the method is:
  • the loop filtering mode is any one of the following loop filtering modes: indicating a zeroth loop filtering mode that allows loop filtering for each slice;
  • the determining a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process is: according to one or more of the following factors: specific application requirements, available computing resources of the encoding process And a storage resource, a video source characteristic, a source coding rate, and a receiving end processing capability, and determining a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process.
  • the method further includes: allocating a parameter set for identifying the parameter set to the generated parameter set. Index number.
  • the encoding according to the generated parameter set includes: writing information of the parameter set into a code stream, and writing the parameter set index number into the current coding unit in a slice layer encoding process.
  • the slice header information in the slice, and the filter used for encoding is determined, and the parameters of the filter are written to the slice header information.
  • the determining the filter used for encoding includes:
  • All candidate filters are grouped according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks;
  • a filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
  • the method further includes: determining, by the risk, whether the loop filtering mode determined by the current coding unit is the same as the loop filtering mode determined when the previous coding unit performs coding; if not, adjusting The currently used parameter set; if it is, the currently used parameter set is not adjusted.
  • the adjusting the currently used parameter set includes: verifying the current corresponding Whether the parameter set of the loop filtering mode is determined when the code unit performs coding, and if so, directly adjusts the currently used parameter set to a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding; if not, generates The current coding unit performs a parameter set corresponding to the loop filtering mode determined by the coding unit, and adjusts the currently used parameter set to a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding.
  • the method before the risk filtering mode determined by the current coding unit is encoded, whether the loop filtering mode determined when the previous coding unit performs coding is the same, the method further includes: The current resource information in the current encoding process is obtained, and the available resource information in the current encoding process is obtained. According to the available resource information, the loop filtering mode when the current coding unit performs encoding is determined.
  • the method further includes: determining loop filtering used by each image or each video segment in the current encoding process according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the last encoding process.
  • Mode encoding each image or each video segment according to a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process.
  • the method further includes: reallocating a parameter set index sequence number for a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process;
  • the image or each video segment is: according to the reassignment parameter set index sequence number
  • Each of the obtained parameter sets respectively encodes each of the images or video segments.
  • the parameter set index number is reassigned to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process, including:
  • the parameter sets corresponding to the loop filtering modes are sequentially assigned index numbers of d to large parameter sets.
  • the present invention also provides an encoder, the encoder comprising: a determining module, a generating module, and an encoding module;
  • a determining module configured to set a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process
  • a generating module configured to generate a parameter set according to the loop filtering mode set by the determining module; and an encoding module, configured to perform encoding according to the parameter set generated by the generating module.
  • the determining module is further configured to determine two or more types of the loop filtering modes that can be used in the encoding process
  • a generating module configured to generate, for each loop filtering mode determined by the determining module, one or more parameter sets respectively including loop filtering identification information of the loop filtering mode; and an encoding module, further used for The loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
  • the determining module is further configured to determine a loop filtering mode used by the current encoding process
  • a generating module configured to generate a parameter set including loop filtering identifier information of a loop filtering mode determined by the determining module
  • the encoding module is further configured to perform encoding according to the parameter set generated by the generating module.
  • the determining module is further configured to determine, according to one or more of the following factors, a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process: specific application requirements, an encoding process Available computing resources and storage resources, video source characteristics, source code rate, and receiver processing capabilities.
  • the generating module is further configured to allocate, to the generated parameter set, a parameter set index sequence number for identifying the parameter set;
  • the encoding module is further configured to write the information of the parameter set into the code stream, and write the parameter set index number into the slice layer header information in the current coding unit in the slice layer coding process, and determine the code.
  • a filter is used to write parameters of the filter to the slice header information.
  • the encoding module is further configured to determine a filter used for encoding by using the following method:
  • All candidate filters are grouped according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks;
  • a filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
  • the encoder further includes a risk module and an adjustment module, wherein the adjustment module is configured to adjust a currently used parameter set;
  • a verification module configured to verify whether the loop filtering mode determined when the current coding unit performs coding is the same as the loop filtering mode determined when the previous coding unit performs coding, and starts the adjustment module without being identical.
  • the adjusting module is further configured to: if the risk parameter corresponds to a parameter set of the loop filtering mode determined by the current coding unit, if yes, directly adjust the currently used parameter set to the current coding unit. And a parameter set corresponding to the loop filtering mode determined by the encoding; if not, generating, by the generating module, a parameter set corresponding to the loop filtering mode determined by the current encoding unit, and adjusting the currently used parameter set to the current encoding The parameter set corresponding to the loop filtering mode determined when the unit performs encoding.
  • the determining module is further configured to determine, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a ring used by each image or each video segment in the current encoding process.
  • Road filtering mode is further configured to determine, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a ring used by each image or each video segment in the current encoding process.
  • the encoding module is further configured to determine, according to the determining module, a current encoding process
  • Each image or each video segment is encoded by a parameter set corresponding to a loop filtering mode used by each image or each video segment.
  • the invention also provides a loop filter decoding method, the method comprising:
  • the loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process.
  • the decoding, by the loop filter identification mode, in the loop filter mode of the parameter set related code stream includes: reading bits in the parameter set related code stream, and obtaining the loop filter identification information used to identify the loop filter identification information
  • the values of the syntax units are assigned, and the values of the syntax units are assigned to corresponding variables in the parameter set data structure.
  • the decoding by the loop filtering identifier information of the loop filtering mode in the fragmentation layer, includes: obtaining values of the syntax units used to identify the loop filtering identifier information in the parameter set, and Passing the value of the syntax unit to the corresponding variable of the slice layer data structure.
  • the method further includes: parsing the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
  • the present invention also provides a decoder, the decoder comprising: a first decoding unit and a second decoding unit, wherein
  • a first decoding unit configured to decode loop filter identification information of a loop filtering mode in a parameter set related code stream
  • a second decoding unit configured to decode loop filter identification information of a loop filtering mode in the slice layer
  • the loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process.
  • the first decoding unit is further configured to: read a bit in a parameter set related code stream, and obtain a value of each syntax unit used to identify the loop filter identification information, and The values of the syntax units are assigned to corresponding variables in the parameter set data structure.
  • the second decoding unit is further configured to obtain a value of each syntax unit used to identify the loop filtering identifier information in the parameter set, and transmit the value of the syntax unit to a point.
  • the corresponding variable of the slice data structure is further configured to obtain a value of each syntax unit used to identify the loop filtering identifier information in the parameter set, and transmit the value of the syntax unit to a point.
  • the second decoding unit is further configured to parse the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
  • the present invention also provides an electronic device, the electronic device comprising an encoder and/or a decoder, wherein the encoder comprises a determining module, a generating module and an encoding module, and the determining module is configured to set a loop filtering a loop filtering mode used in the encoding process; the generating module is configured to generate a parameter set according to the loop filtering mode set by the determining module; and the encoding module is configured to perform encoding according to the parameter set generated by the generating module;
  • the decoder includes a first decoding unit and a second decoding unit, where the first decoding unit is configured to decode the loop filtering identification information of the loop filtering mode in the parameter set related code stream; and the second decoding unit is configured to perform the splitting The loop filtering identification information of the loop filtering mode in the slice layer is decoded; wherein the loop filtering mode is used to indicate the manner in which the loop filtering is used in the encoding process.
  • the loop filtering codec method and apparatus generates a parameter set of a loop filtering mode determined by a corresponding encoding process, and performs encoding according to the generated parameter set, so that a preset according to the video application can be
  • One or more loop filtering modes are encoded, which realizes optimal allocation of inter-image complexity in the process of encoding and decoding, and improves the tradeoff between codec complexity and coding efficiency.
  • the present invention also uses the existing semantics to apply the implicit derivation of factors such as image importance and processing complexity to the coding and decoding process of the loop filtering, and reduces the overhead of the loop filtering related header information.
  • the present invention can dynamically adjust the loop filtering mode during the encoding process, so as to facilitate the complexity of loop filtering between different importance images, and improve the competing performance of the codec computational complexity and coding efficiency.
  • FIG. 1 is a flowchart of an implementation of a loop filter encoding method according to the present invention
  • FIG. 2 is a flowchart of parsing ALF identification information added in a PPS according to Embodiment 1 of the present invention
  • FIG. 3 is a flowchart of analyzing ALF identification information in slice layer information according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart showing implementation of coding once in a single ALF mode according to Embodiment 2 of the present invention
  • FIG. 5 is a flowchart of implementing one-time coding in multiple ALF modes according to Embodiment 3 of the present invention
  • FIG. 6 is a flowchart of implementing a filter used in determining an encoding process according to Embodiment 4 of the present invention
  • FIG. 7 is a flowchart of Embodiment 5 of the present invention
  • the "compromise between complexity and coding efficiency" and its similar or related expressions involved in the present invention include the following three aspects: First, the improvement of coding efficiency is obtained at the expense of reasonable complexity increase or even decrease. The reduction in complexity is obtained at the expense of negligible loss of coding efficiency or even increased coding efficiency. Second, the encoder or the decoder allocates resources such as calculation and storage reasonably, and increases the coding efficiency under the premise of increasing or even decreasing the complexity; or reducing the encoder under the premise that the loss of coding efficiency is negligible or even improved. Or the overall complexity of the decoder.
  • the encoder or the decoder uses a processing method with different complexity in encoding or decoding different images, different shards, and different basic coding units, and obtains an increase in coding efficiency at the cost of a reasonable overall complexity increase or even decrease.
  • the overall complexity of the encoder or decoder is reduced at the expense of negligible loss of coding efficiency or even increased coding efficiency.
  • the basic idea of the present invention is: setting a plurality of loop filtering modes for indicating a loop filtering usage manner according to an application of video communication, and generating a plurality of parameter sets corresponding to the loop filtering modes;
  • the parameter set is encoded in a parameter set corresponding to the loop filtering mode of the current encoding process.
  • encoder complexity allocation and optimization can be achieved, and the encoding process is different.
  • the complexity of loop filtering between importance images increases the trade-off performance of codec computational complexity and coding efficiency, and reduces information redundancy in the code stream.
  • the loop filter coding method of the present invention may mainly include the following steps: Step 101: Set a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process;
  • Step 102 Generate a parameter set according to the loop filtering mode.
  • Step 103 Perform coding according to the generated parameter set.
  • the parameter set is a data structure including some image common parameters, and a flag and a parameter set in the parameter set identified by the slice header information in the image decoding process. For example, a sequence parameter set, an image parameter set, or a data structure with similar application properties.
  • the method can be implemented in the following two manners:
  • the loop filtering identifier information of the loop filtering mode includes a parameter for indicating a loop filtering identifier manner, or a parameter for indicating a loop filtering identifier manner and an auxiliary parameter of the parameter.
  • the parameter used to indicate the loop filtering identification mode may include a parameter for identifying whether to allow all fragments in the image to use loop filtering, and a parameter for identifying a manner in which all fragments in the image use loop filtering;
  • the auxiliary parameter is specifically an auxiliary parameter for identifying a parameter of a manner in which all slices in the image use loop filtering, and may include a refresh cycle of loop filtering. Period.
  • the loop filtering mode may be constructed according to other syntax units in a code stream organization such as a slice layer or a coding unit layer. In the encoding process of the slice, loop filtering is allowed only when the construction conditions are true.
  • the loop filtering mode may be one or more of the following loop filtering modes: indicating a zeroth loop filtering mode that allows loop filtering for each slice, indicating that only intra-coded slices are allowed to use the loop.
  • the filtered first loop filtering mode indicating that only the second loop filtering mode of the loop filtering is used for the slice in the image used for the inter prediction reference, indicating the image sequence number (POC, Picture Order Count) in the slice
  • POC Picture Order Count
  • the zero-loop filtering mode loop filtering is allowed for each slice, and the filter parameters and loops are determined using slice layer adaptive techniques according to the constraints in the profile and level.
  • the filtered image area is suitable for high coding efficiency and the codec allows the use of high complexity algorithms. For example, use a PC for non-real-time video downloads or on-demand, home theater, and more.
  • First loop filtering mode Only intra-coded slices allow the use of loop filtering, using slice layer adaptive techniques to determine filter parameters and image regions using loop filtering, depending on the constraints in the grade and level, Applications with low decoding complexity or low coding complexity, such as mobile terminal video playback, camcorders, etc.
  • Second loop filtering mode Fragmentation in an image only for inter prediction reference allows the use of loop filtering, using slice layer adaptive techniques to determine filter parameters and using loop filtering, depending on the constraints in the grade and level Image area. This mode is suitable for medium complexity decoding or coding applications.
  • Third loop filtering mode Periodic loop filter refresh mode, which allows the ring to be used in the encoding and decoding process of the fragment only when the POC value of the fragment is an integer multiple of the loop filtering refresh period.
  • Path filtering and using slice layer adaptive techniques to determine filter parameters and image regions using loop filtering, depending on the constraints in the grade and level.
  • This mode can be applied to low, medium and high complexity decoding and coding applications by further setting the loop filter refresh period.
  • the loop filtering identification information of the mode needs to include an auxiliary parameter, which is a loop filtering refresh period.
  • one or more parameter sets corresponding to the loop filtering mode may be generated.
  • a plurality of parameter sets may be generated according to different loop filtering refresh periods.
  • a corresponding parameter set may be generated corresponding to each loop filtering mode.
  • the path filtering uses a loop filtering mode in the encoding process.
  • a parameter set index number for identifying the parameter set is also allocated to the generated parameter set.
  • performing coding according to the generated parameter set may include: writing information of the parameter set into a code stream, and writing the parameter set index sequence number into a current coding unit in a slice layer coding process.
  • the slice header information, and a filter used for encoding is determined, and parameters of the filter are written to the slice header information.
  • the process of determining a filter used for encoding may include: grouping all candidate filters according to complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks; An image importance parameter of the coding unit; a filter used for encoding the current coding unit is selected based on the calculated image importance parameter and the resulting one or more candidate filter banks.
  • the parameters of the filter are written into the slice header information, which will be used to represent the points. Whether there is identification information of the loop filter parameter, loop filter related filter parameters, and
  • the CU layer ALF controls identification information and the like.
  • the loop filter correlation filter parameter related code stream may also appear in the parameter set (such as PPS or other parameter set containing image/slice common information).
  • the slice layer code stream is taken as an example for description.
  • the loop filter related filter parameters may include a filter adaptation method, a filter coefficient, a filter type information, a filter coefficient predictive coding method, and the like, and the CU layer ALF control identification information may include whether to use the filter CU layer control. Identification information, filter CU layer control method, and identification information of whether or not the relevant CU uses a filter to perform a filtering operation.
  • the method may further include: determining, by the risk, whether the loop filtering mode determined by the current coding unit is the same as the loop filtering mode determined when the previous coding unit performs coding; if not, adjusting the current use The parameter set; if it is, the currently used parameter set is not adjusted.
  • verifying whether a parameter set corresponding to the loop filtering mode determined by the current coding unit is encoded exists and if yes, directly adjusting the currently used parameter set to a parameter corresponding to the loop filtering mode determined by the current coding unit for encoding If not, generating a parameter set corresponding to the loop filtering mode determined by the current coding unit for encoding, and adjusting the currently used parameter set to a parameter set corresponding to the loop filtering mode determined by the current coding unit for encoding.
  • the loop filtering mode determined when the current coding unit performs coding is still dynamically monitored for the change of available resources in the current encoding process before the loop filtering mode determined when the previous coding unit performs encoding is the same.
  • the method may further include: determining, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a loop filtering mode used by each image or each video segment in the current encoding process; According to each image or each video segment in the current encoding process Each of the images or video segments is encoded separately using a parameter set corresponding to the loop filtering mode.
  • the parameter set index number may be re-allocated for the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process; and each parameter set obtained by re-allocating the parameter set index number is respectively Each of the images or video segments is encoded.
  • the loop filtering modes are sorted according to the number of times of use;
  • the sorting order of the loop filtering mode is to sequentially assign a parameter number of d to a large parameter set index number for the parameter set corresponding to each loop filtering mode.
  • the present invention further provides an encoder, where the encoder includes: a determining module, a generating module, and an encoding module; wherein, the determining module is configured to set a ring for indicating a manner in which the loop filtering is used in the encoding process.
  • a filtering module configured to generate a parameter set according to the loop filtering mode set by the determining module
  • an encoding module configured to perform encoding according to the parameter set generated by the generating module.
  • the determining module is further configured to determine two or more types of the loop filtering modes that can be used in the encoding process, and the generating module is further configured to use the loop filtering mode determined by the determining module. Generating, respectively, one or more parameter sets including loop filtering identification information of the loop filtering mode; the encoding module is further configured to determine a loop filtering mode used in the current encoding process and according to the current encoding process The coding is performed using a parameter set corresponding to the loop filtering mode.
  • the determining module is further configured to determine a loop filtering mode used by the current encoding process
  • the generating module is further configured to generate a parameter that includes loop filtering identifier information of the loop filtering mode determined by the determining module.
  • the encoding module is further configured to perform encoding according to the parameter set generated by the generating module.
  • the determining module is further configured to determine according to one or more of the following factors:
  • the loop filtering mode indicating the manner in which the loop filtering is used in the encoding process: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability.
  • the generating module is further configured to allocate a parameter set index number for identifying the parameter set to the generated parameter set; the encoding module is further configured to write the information of the parameter set into the code stream, Writing the parameter set index number into the slice header information in the current coding unit in the slice layer encoding process, and determining a filter used for encoding, and writing parameters of the filter to the slice layer Header information.
  • the coding module is further configured to determine, by using the following method, a filter used for coding: grouping all candidate filters according to complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks. Calculating an image importance parameter of the current coding unit; selecting a filter used for encoding for the current coding unit according to the calculated image importance parameter and the obtained one or more candidate filter banks.
  • the encoder further includes a verification module and an adjustment module, where the adjustment module is configured to adjust a currently used parameter set; and the verification module is configured to verify a loop filtering mode determined when the current coding unit performs coding, and Whether the loop filtering modes determined by one coding unit when encoding are the same, and when they are not the same, the adjustment module is started.
  • the adjusting module is further configured to: if the risk parameter corresponds to a parameter set of the loop filtering mode determined by the current coding unit, if yes, directly adjusting the currently used parameter set to the current coding unit for encoding And determining, by the generating module, a parameter set corresponding to the loop filtering mode determined by the current coding unit, and adjusting the currently used parameter set to the current coding unit The parameter set corresponding to the loop filtering mode determined at the time of encoding.
  • the determining module is further configured to determine, according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the last encoding process, each image or each video segment in the current encoding process a looping filter mode; the encoding module is further configured to: according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process determined by the determining module, respectively Each image or each video segment is encoded.
  • the present invention further provides a loop filter decoding method corresponding to the above coding method, the method comprising: decoding loop filter identification information of a loop filter mode in a parameter set related code stream; and performing a loop filter mode in a slice layer
  • the loop filtering identification information is decoded; wherein the loop filtering mode is used to indicate the manner in which the loop filtering is used in the encoding process.
  • the decoding, in the loop filter mode, the loop filter identification information in the parameter set related code stream includes: reading bits in the parameter set related code stream, and obtaining each of the loop filter identification information used to identify the loop filter identification information
  • the values of the syntax units are assigned, and the values of the syntax units are assigned to corresponding variables in the parameter set data structure.
  • Decoding the loop filter identification information of the loop filtering mode in the slice layer including: obtaining values of the syntax units used to identify the loop filter identification information in the parameter set, and using the syntax unit The value is passed to the corresponding variable of the slice layer data structure.
  • the method further includes: parsing the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
  • the present invention further provides a decoder, the decoder comprising: a first decoding unit and a second decoding unit, where the first decoding unit is configured to loop a loop filtering mode in a parameter set related code stream
  • the second filtering unit is configured to decode the loop filtering identification information of the loop filtering mode in the slice layer, where the loop filtering mode is used to indicate that the loop filtering is in the encoding process. How to use it.
  • the first decoding unit is further configured to: read a bit in a parameter set related code stream, obtain a value of each syntax unit used to identify the loop filter identification information, and use the syntax unit The value is assigned to the corresponding variable in the parameter set data structure.
  • the second decoding unit is further configured to obtain the parameter set for identifying the
  • the loop filter identifies the value of each syntax unit of the information, and passes the value of the syntax unit to the corresponding variable of the slice layer data structure.
  • the second decoding unit is further configured to parse the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
  • the method for identifying and configuring the loop filter mode in the parameter set and the slice header information, and the method for analyzing the loop filter identification information corresponding to the loop filter mode in the code stream by the decoder are described in detail. .
  • the ALF identification information corresponding to the ALF mode is identified by using a method of variable length coding in a picture parameter set (PPS, Picture Parameter Set) as an example to illustrate the organization and identification of the loop filter mode in the parameter set. method.
  • PPS Picture Parameter Set
  • loop filtering modes can be combined and identified in the data structure of other parameter sets.
  • the ALF identification information includes a parameter for indicating an ALF identification mode, or a parameter for indicating an ALF identification mode and an auxiliary parameter of the parameter.
  • the parameters used to indicate the ALF identification mode may include adaptive_loop_filter_enable_flag and adaptive_loop_filter_pattern_idx in Table 1, and the auxiliary parameters of the parameter may be adaptive_loop in Table 1. Filter_period. Only the auxiliary parameters need to be included in the ALF identification information of ALF mode 3 shown in Table 2.
  • Table 1 the added ALF identification information is shown in lines 9-15, and the "Descriptor" column gives a binary representation of the values of each syntax unit.
  • pic_parameter_set_id In Table 1, pic_parameter_set_id, seq_parameter_set_id, entropy_coding_mode_flag, num_ref_idx-10_ default-active- minusl, num-ref-idx-11-default-active- Miner1, pic_init_qp_minus26, constrained_intra_pred_flag, adaptive_loop_filter-enable_flag, adaptive_loop_filter_pattern_idx, adaptive_loop_filter_period, respectively, ll denotes the name of the syntax unit that needs to be written to the stream.
  • the adaptive_loop_filter_enable_flag is used to identify whether all fragments in the image are allowed to use ALF.
  • ALF cannot be used for all fragments in the image. In this case, it can be considered to correspond to a special ALF mode, which means that all fragments in the image are not available.
  • ALF Adaptive—loop—filter—enable—When the value of flag is 1, all fragments in the image can use ALF.
  • Adaptive_loop—filter_pattern—idx is used to identify the ALF mode used by all fragments in the image.
  • adaptive_loop_filter_pattern—idx can be the index number of each ALF mode (such as 0, 1, 2 in Table 2). 3) Specifically, the correspondence between the index number of each ALF mode and the identifier mode of the slice layer ALF information is as shown in Table 2.
  • the POC value of the image in which the fragment is located can be directly calculated according to the relevant parameters in the parameter set and the fragment header information.
  • the relevant parameters in the slice layer information may include: the value of the semantic unit such as pic_order_cnt_type and log2_max_pic_order-cnt-lsb-minus4 in the sequence parameter set, and the semantics in the slice header information Unit pic—order—cnt—lsb.
  • Adaptive_loop—filter_period is used to identify the refresh rate of ALF, that is, in the order of playback. Every (adaptive-loop-filter_period - 1) image allows ALF to be used for the next image.
  • the value of adaptive_loop_filter_pattern_idx is 3, the value of adaptive_loop_filter_period needs to be set in PPS.
  • the refresh period of the ALF may be pre-configured according to specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability.
  • the terminal device when the terminal device detects that the battery is fully charged (such as 80% power remaining), it can directly inform the encoder to use a refresh cycle with a smaller value (such as 4, 8, etc.) to obtain a higher compression code.
  • Efficiency when the terminal device detects that the battery is low (such as 20% power remaining), it can directly inform the encoder to use a larger refresh period (such as 16, 32, etc.) to minimize the power consumption of the encoder, and Guarantee a certain coding efficiency.
  • the above ALF identification information is decoded by using the binary representation method given by "Descriptor" in Table 1, and the binary symbols read from the code stream are converted into the values of the corresponding syntax unit items.
  • the process of parsing the ALF identification information added by the decoder in the PPS includes the following steps:
  • the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to u(l) to obtain the value corresponding to the syntax unit adaptive_loop_filter-enable_flag, and the value obtained by ⁇ 1 is assigned to Variable in the data structure of the PPS layer adaptive_loop_filter-enable_flag;
  • the decoder determines whether the value of the variable adaptive_loop_filter_enable_flag is 1, if yes, executing S203; if not, ending the ALF identification information parsing process of the PPS in the code stream;
  • the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to ue(v) to obtain the value corresponding to the syntax unit adaptive_loop_filter_pattern_idx, and the value obtained by ⁇ 1 is assigned to the PPS layer.
  • the decoder determines whether the value of the variable adaptive_loop_filter_pattem_idx is 3, and if yes, executing S205, and continuing to parse the ALF identification information; otherwise, ending the PPS in the code stream ALF identification information parsing process;
  • the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to ue(v) to obtain the value corresponding to the syntax unit adaptive_loop_filter_period, and assigns the obtained value to the PPS layer data structure.
  • the variable adaptive_loop_filter_period ends the ALF identification information parsing process of the PPS in the code stream.
  • the fragmentation layer ALF information identification manner is as shown in Table 3.
  • the 27th-35th behavior adds the ALF identification information to the slice layer.
  • Alf_param() is the data structure of the filter-related parameters in the slice layer.
  • the "Descriptor" column gives the binary representation of the values of the syntax units in the slice layer.
  • the parsing of the ALF identification information in the slice layer information is a decoding method using the binary representation method given by "Descriptor" in Table 3, converting the binary symbols read from the code stream into Corresponds to the value of the syntax unit item.
  • the process of parsing the ALF identification information in the fragmentation layer information may specifically include the following steps:
  • the decoder obtains the value of the ALF related syntax element adaptive_loop_filter-enable_flag in the PPS, and passes the value to the corresponding variable adaptive_loop_filter_enable_flag in the slice layer data structure;
  • the decoder determines whether the value of the variable adaptive_loop_filter_enable_flag is 1, if yes, step S303 is performed; otherwise, the parsing process of the ALF identification information in the slice layer information is ended;
  • the decoder obtains the ALF related syntax unit in the PPS Adaptive_loop—filter_pattern—value of idx, and pass its value to the corresponding variable adaptive_loop_filter_pattern_idx in the slice layer data structure;
  • the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 0, if yes, execute S308; if not, execute S305;
  • the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 1, and whether the current fragment is an intra-coded fragment, and if so, executing S308; if not, executing S306;
  • the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 2, and whether the value of the corresponding variable of the syntax unit nal_ref_idc in the NAL data unit of the current fragment is not equal to 0, if , then execute S308; if not, execute S307;
  • the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 3, and whether the POC value of the image of the current fragment is an integer multiple of the value of the variable adaptive_loop_filter_period in the data structure of the PPS layer. If yes, execute S308; if not, end the parsing process of the ALF identification information in the slice layer information;
  • the decoder parses the relevant parameters of the ALF in the slice layer, and the current process ends.
  • the decoder parses the relevant parameters of the ALF in the fragmentation layer.
  • the related parameters of the ALF may include: Whether the identification information of the ALF parameter, the ALF related filter parameter, the ACL layer ALF control identification information, etc. exist in the slice layer code stream, and the information is included in the data structure alf_param().
  • the decoder obtains the value of each syntax unit by using a decoding method corresponding to the binary representation method of each syntax unit in the data structure alf_param(). And pass its value to the corresponding variable in the data structure.
  • the encoder of this embodiment encodes an input video source using a single ALF mode to suit The trade-off between the codec rate and the codec's computational complexity and coding efficiency should be used.
  • the specific process of encoding once using a single ALF mode includes the following steps:
  • the sending end determines an ALF mode used when the encoder performs encoding.
  • the primary basis for determining the ALF mode by the transmitting end includes, but is not limited to, one or more of the following factors: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, and source coding rate.
  • the receiving end processing capability, etc. enables the selection of an ALF mode with a compromise between complexity and coding efficiency.
  • the specific application requirement is a system performance indicator, a transmission network capability, and a terminal processing capability, which are proposed for ensuring the user experience of the receiving end in the video communication application, and may be mainly included to ensure the quality of the user experience.
  • Set parameter limits such as end-to-end delay, compression efficiency, etc.
  • the available computing resources and storage resources of the encoding process may include: processor load, available memory storage capacity, power supply system status (such as AC power) Parameters such as power supply, battery power and remaining power, and energy consumption status of the whole machine. These parameters can be obtained through the status monitoring and detection module in the terminal.
  • the video source characteristics are related parameters for reflecting the statistical characteristics of the video source.
  • the method may include: an image activity degree, a coding complexity, a parameter reflecting a motion severity, a parameter reflecting a scene switching, and the like; the source coding code rate is specifically a target code of a source compression coding determined according to a channel state and the like. Rate; the receiving end processing capability includes The estimated information or the estimated information indicating the available computing resources, the power supply mode, and the energy consumption of the whole device at the receiving end, and the estimated information may be estimated according to an application scenario (such as a mobile video application on the mobile terminal).
  • an application scenario such as a mobile video application on the mobile terminal.
  • an ALF mode used by the encoder to perform encoding may be directly configured on the transmitting end according to actual application requirements.
  • the transmitting end determines that the ALF mode configured by itself is the ALF mode used when the encoder performs encoding.
  • the ALF mode may be any one shown in Table 2 in Embodiment 1, or In the first embodiment, the value of adaptive_loop_filter-enable_flag is 0, which means that ALF mode is not available for all fragments in the image.
  • the encoder generates a parameter set corresponding to the ALF mode, where the parameter set includes ALF identification information of the ALF mode, and allocates a parameter set index number for identifying the parameter set for the generated parameter set;
  • the encoder performs encoding according to the generated parameter set.
  • the encoder writes the information of the parameter set into the code stream, writes the parameter set index number into the slice layer header information in the current coding unit, and determines the filtering used by the coding in the slice layer coding process. And writing parameters of the filter to the slice header information.
  • the process of determining the filter used for encoding may be implemented by an existing method, such as a slice layer block/sub-region filter selection method based on rate distortion criterion, or may be described in the following fourth embodiment. Method implementation.
  • the coding unit may be an image of an image currently being subjected to encoding processing or a slice of an image currently being encoded.
  • the ALF mode mentioned in this embodiment is based on the ALF mode mentioned in the first embodiment.
  • the code stream obtained by the encoder coding can be decoded by the decoding method provided in Embodiment 1. .
  • the encoder of this embodiment uses a plurality of ALF modes to encode the input video source to accommodate the tradeoff between the available source code rate, the codec's computational complexity, and the coding efficiency.
  • the specific process of performing coding in multiple ALF modes may include the following steps:
  • each of the ALF modes includes five ALF modes, which are respectively four ALF modes shown in Table 2 of the first embodiment, and corresponding to the value of the adaptive_loop_filter_enable_flag in the first embodiment. , means that ALF mode of ALF is not available for all shards in the image.
  • the ALF mode and the parameter set are - corresponding, or a multi-corresponding relationship, that is, corresponding to an ALF mode, one or more parameter sets may be generated. Specifically, for the ALF mode 3 of Table 2 in the first embodiment, a plurality of parameter sets corresponding to different ALF refresh periods can be generated.
  • the foregoing ALF mode may be configured in advance on the sending end, that is, the ALF identification information of each ALF mode is pre-configured to the transmitting end, so that the encoder can generate corresponding multiple according to each ALF mode configured in the sending end. Parameter sets.
  • the sending end determines, for the encoder, an initially used ALF mode, where the encoder determines an initially used parameter set according to the ALF mode determined by the sending end.
  • the specific implementation process of the ALF mode used by the transmitting end to determine the initial use of the encoder is similar to the specific implementation process of the S401 in the second embodiment, and details are not described herein.
  • the encoder encodes the current coding unit according to the currently used parameter set. Specifically, the encoder writes information about the currently used parameter set into the code stream, and the parameter set is used in the slice layer coding process. The parameter set index number is written into the slice header information in the current coding unit, and the filter used for encoding is determined, and the parameters of the filter are written to the slice header information.
  • the encoder For the first coding unit, the encoder writes information of the initially used parameter set to the code stream, and writes the parameter set index number of the parameter set to the first coding unit in the slice layer coding process.
  • the header information of each slice a filter used for encoding is determined, and parameters of the filter are written to the slice header information.
  • the encoder determines whether the input video sequence has been encoded, and if so, the encoder call ends; if not, continues to execute S505.
  • the input video sequence can be determined by judging whether there is an uncoded coding unit. Whether the column is encoded or not.
  • the coding unit may be an image. Since the image is divided into one or more slices before encoding, the encoding unit may also be a slice of the image.
  • the sender dynamically monitors the change of available resources in the encoding process, and obtains available resource information in the encoding process.
  • the encoder dynamically determines whether to adjust the ALF mode used in the encoding process according to the available resource information obtained by the sending end. If yes, proceed to S507; otherwise, return to S503; where the available resource is in the second embodiment S401. Determine the factors on which the ALF mode is based. Specifically, the encoder can determine the ALF mode under the current available resource condition by using the same method as the second embodiment S401. If the ALF mode currently determined by the encoder is different from the ALF mode currently being used, it is determined that the ALF mode needs to be adjusted. If the ALF mode currently determined by the encoder is the same as the ALF mode currently being used, it is determined that the ALF mode is not required. Adjust the ALF mode.
  • the encoder verifies whether the currently determined parameter set corresponding to the ALF mode exists, and if yes, continues S509, otherwise, continues to S508;
  • the encoder verifies whether the currently determined parameter set corresponding to the ALF mode exists, and specifically includes: verifying whether the parameter set includes the ALF identification information of the currently determined ALF mode, and if yes, the parameter set corresponding to the currently determined ALF mode. Exist; otherwise, the parameter set corresponding to the currently determined ALF mode does not exist.
  • the currently determined ALF mode is the ALF mode 3 shown in Table 2 in the first embodiment
  • the parameter set contains a variable adaptive_loop_filter_pattern_idx with a value of 3
  • the parameter set contains Adaptive—loop—filter_period and adaptive—loop—whether the value of filter_period is the same as the preset ALF refresh period; If yes, the parameter set corresponding to the currently determined ALF mode exists. Otherwise, there is no parameter set corresponding to the currently determined ALF mode.
  • the encoder generates a parameter set corresponding to the ALF mode, and allocates a parameter set index sequence number to the generated parameter set.
  • variable adaptive_loop_filter_pattern_idx has a value of 3 and contains variables Adaptive—loop—filter_period and the variable adaptive_loop—filter_period have the same value as the preset ALF refresh period.
  • the encoder adjusts the currently used parameter set to the parameter set corresponding to the currently determined ALF mode, and jumps to step S503.
  • This embodiment can be applied to applications where the computing resources of the transmitting end are sufficient and the sensitivity to the complexity is low, but the computing capacity of the receiving end is limited and the complexity control is high.
  • mobile handheld TV video download and playback of mobile terminals, and the like.
  • the ALF mode mentioned in this embodiment is based on the ALF mode mentioned in the first embodiment.
  • the code stream obtained by the encoder coding can be decoded by the decoding method provided in Embodiment 1. .
  • This embodiment describes in detail the implementation process of selecting a filter in the encoding process.
  • determining a specific process of the filter used in the encoding process may include the following steps:
  • the encoder groups all candidate ALFs according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks.
  • the grouping process of the encoder to the candidate filter may include: according to the complexity The candidate filters are sorted in order from low to high, and each candidate filter bank corresponding to different complexity segments is obtained, and then each candidate filter in the candidate filter group is sequentially performed according to the denoising performance from high to low. Sort
  • the candidate filters are sequentially sorted according to the denoising ability from high to low, and each candidate filter group corresponding to different denoising capability segments is obtained, and then in the candidate filter group according to the complexity from low to high. Each candidate filter is sorted.
  • the filter complexity includes: computational complexity (such as processing the number of basic data operations required for addition, multiplication, and shifting per pixel), storage complexity (such as processing the required storage space per pixel), and the like. Numerical calculation related factors.
  • the complexity and denoising performance of the filter can be evaluated based on the type of filter itself. For example, in general, high-order filters have better denoising ability than low-order filters; same-order filters, filters with high coefficient precision and high precision are better than those with low coefficient accuracy and precision. . High-order filters are more complex than low-order filters; for the same-order filters, filters with high coefficient accuracy and high precision are more complex than filters with low coefficient accuracy and precision.
  • the complexity and denoising performance of the filter can also be evaluated based on existing statistical data or performance statistics accumulated during the encoding process. For example, statistical analysis can be performed on the denoising ability or complexity of each candidate filter according to empirical data obtained from a large number of offline statistics; according to the reduction of image distortion before and after filtering processing in the encoding process and the number of filter coefficient encoding bit overhead, the filter The complexity or denoising performance is evaluated.
  • the specific implementation process is a common technical tool in the field, and will not be described here.
  • the encoder calculates an image importance parameter of the current coding unit.
  • the coding unit may be an image or a slice of an image.
  • the image importance parameter is used to indicate the effect of each coding unit on the overall coding efficiency of the video sequence. For example, the importance of intra-coded pictures is usually higher than the inter-predictive coded picture; low time The level of bidirectional predictive coded pictures is of higher importance than the same type of pictures of high temporal levels.
  • the image importance parameter may be determined according to factors such as an image coding type, a parameter on the motion compensation prediction loop accuracy, an image activity degree, and the like.
  • the image importance parameter may be a value directly calculated according to an algorithm, for example, an image activity parameter calculated using an average absolute error; or may be a score value obtained by evaluating an image according to a common rule, such as intra prediction coding.
  • the image has the highest importance coefficient, and the inter-frame predictive coded image is of the second most important importance; for the same type of image, the image importance can be further distinguished according to the video content of the image, for example, for an image that is also intra-predictive coded,
  • the image at the scene switch has an image importance that is higher than the image importance of the image at the non-scene switch.
  • the encoder selects a filter used for encoding according to the calculated image importance parameter and the obtained one or more candidate filter groups for the current coding unit.
  • the encoder first determines a candidate filter bank of the current coding unit according to the calculated image importance parameter, and then selects a filter to be used for the current coding unit from the determined candidate filter group.
  • the process of selecting, by the encoder, the filter used for encoding the current coding unit according to the calculated image importance parameter and the obtained one or more candidate filter groups may include:
  • a filter with a matching complexity is selected in the group as the filter used by the current coding unit.
  • a filter with relatively high denoising performance is selected, and for an image with low image importance, a filter with relatively low denoising performance can be selected.
  • a filter with relatively high denoising performance is selected, and for an image with low image importance, a filter with relatively low denoising performance can be selected.
  • This embodiment can be applied to the case where both the transmitting end and the receiving end have sufficient computing resources and low sensitivity to complexity, but have certain requirements for real-time performance.
  • digital TV interactive web TV
  • IPTV IPTV
  • Embodiment 5 is taken as an example for description in this embodiment, the method for selecting a filter in this embodiment can also be used in other loop filtering applications, such as SAO.
  • Embodiment 5 is taken as an example for description in this embodiment, the method for selecting a filter in this embodiment can also be used in other loop filtering applications, such as SAO.
  • a plurality of ALF modes and encoder complexity allocation methods are used in combination to encode to meet the tradeoff between the available source coding rate, the codec's computational complexity, and the coding efficiency.
  • a detailed description of the process of encoding the video image multiple times is provided.
  • the process of encoding the video image twice in this embodiment may include the following steps:
  • the encoder performs the first encoding on the input video sequence according to the parameter set. Specifically, the specific implementation process of the first encoding of the video sequence by the encoder is as follows: Embodiment 2, Embodiment 3, Embodiment 4 As shown, it is not mentioned here.
  • the first encoding process may be a complete encoding process, or may be a partial encoding process.
  • the first encoding process is usually a partial encoding process that does not include an output stream step.
  • the encoder obtains information such as a source characteristic parameter and an encoder control auxiliary parameter in the first encoding process, and according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the first encoding process, Determining the ALF mode used by each image or each video segment at the time of the second encoding;
  • the encoder may further determine an encoding module parameter in the second encoding process according to the obtained source characteristic parameter, the encoder control auxiliary parameter, and the like in the first encoding process.
  • the encoding module parameters may include: a length of a group of pictures (GOP, Group Of Pictures) and an encoding type of each image in the GOP (such as intra prediction, inter-frame unidirectional prediction, inter-frame bidirectional prediction, etc.), Filter parameters further determined using the coding unit of ALF, as well as other encoder control parameters, such as quantization parameters and the like.
  • the image coding type is related to the first loop filtering mode and the second loop filtering mode in the first embodiment.
  • the source characteristic parameter may include: image activity degree, scene switching image position, The degree of motion between images in each scene segment.
  • the encoder control assistance parameter may include: applicability of each coding prediction, block mode to the motion region of each image or video segment, different images or different video segments; encoder for each image or video segment Applicability, complexity, and coding efficiency of the content area, the degree of motion between images, or between video segments; each ALF mode for each image or each video segment content region, each prediction encoding type of image or each video segment Applicability, complexity, coding efficiency, etc.
  • the encoder control auxiliary parameter is mainly used to describe the adaptability of different coding tools (such as prediction, block mode, ALF mode, etc.) to video segments, images, and regions of different texture features in different characteristics of the input video sequence. It is thought that the second encoding process determines the encoding tools and parameters used for different texture feature regions in different video segments, images, and images, such as selecting a uni-directional inter prediction mode for the still scene portion and selecting a frame for the motion severe scene. Intra prediction mode; When using the third loop filtering mode, set a smaller refresh period value for the video segment with a fast scene change, and set a larger refresh period value for the video segment with slow scene change.
  • different coding tools such as prediction, block mode, ALF mode, etc.
  • the encoder may divide the input video sequence into a plurality of video segments according to factors such as scene change, motion severity, and the like according to information such as a source characteristic parameter and an encoder control auxiliary parameter obtained in the first encoding process.
  • the input video sequence can be divided into multiple images.
  • the ALF mode of each image or each video segment is determined by the method of determining the ALF mode in the second embodiment or the third embodiment.
  • S704 The encoder re-assigns the parameter set index number to each parameter set corresponding to the ALF mode determined by S703.
  • the encoder sorts the ALF modes according to the number of times of use of each ALF mode determined in the second encoding process after the first encoding process, according to the number of times, and according to the sorting result. And re-assigning the parameter set index number to the parameter set corresponding to each ALF mode. Specifically, the parameter set index number of the parameter set corresponding to the previous ALF mode is smaller, so that the number of bits of the parameter set index number can be saved, and the subsequent parameters are reduced. The time and resources required for the index index number to be written into the slice header information are conducive to saving resources.
  • the encoder selects each parameter set after the parameter set index sequence number according to the S704, determines an ALF mode used by each image or each video segment when the second encoding is determined by S703, and selects in the first encoding process.
  • the filter completes the second encoding of the input video sequence and outputs the code stream obtained by the second encoding.
  • the encoder determines a parameter set used when encoding each image or each video segment according to the ALF mode used by each image or each video segment at the second encoding determined by S703, and each image or each video region is used.
  • the parameter set used by the segment is written into the code stream, and the parameter set index number of the parameter set is written into the slice header information of each image or each video segment, and the filter selected in the first encoding process
  • the relevant parameters are written into the slice header information of each image or each video segment.
  • the encoder may encode the image or the slice of the image as a coding unit.
  • the specific implementation process is similar to the coding process in the foregoing Embodiment 2 and/or Embodiment 3, and details are not described herein again.
  • This embodiment can be applied to applications in which both the transmitting end and the receiving end have sufficient computing resources and low sensitivity to complexity.
  • digital TV and IPTV have been used for on-demand playback, movie-on-demand, and high-definition digital home theater.
  • This embodiment can also be applied to applications where the computing resources of the transmitting end are sufficient and the sensitivity to the complexity is low, but the computing power of the receiving end is limited and the complexity control is high.
  • the ALF mode mentioned in this embodiment is the same as the ALF mode in the first embodiment.
  • the code stream obtained by the encoder in this embodiment can be decoded by the decoding method provided in the first embodiment.
  • the embodiment provides an electronic device, and the electronic device may include a decoder provided by the present invention, and the decoder may decode the loop filter identification information by using a specific implementation process of the first embodiment.
  • the electronic device may further include an encoder provided by the present invention, and the encoding is implemented by the methods provided in Embodiment 2 to Embodiment 5.
  • the electronic device of the embodiment may be a related stream generating device and a receiving playing device in a video communication application, for example, a mobile phone, a computer, a server, a set top box, a portable mobile terminal, a digital television, a digital video camera, or the like.
  • a video communication application for example, a mobile phone, a computer, a server, a set top box, a portable mobile terminal, a digital television, a digital video camera, or the like.
  • the sending end is configured to send video information
  • the receiving end is configured to receive video information.
  • the above embodiments may be used arbitrarily in combination or separately.

Abstract

Disclosed is a loop filtering encoding method. The method comprises: setting a loop filtering mode for indicating an adopted manner for loop filtering during encoding; generating a parameter set according to the loop filtering mode; and performing encoding according to the generated parameter set. Correspondingly, a loop filtering decoding method, encoder, decoder and an electronic apparatus are further disclosed. The present invention implements the optimization and distribution of the complexity among images during the encoding and decoding, thereby enhancing the compromised performance between the encoder and decoder complexity and the encoding efficiency.

Description

环路滤波编解码方法及装置 技术领域  Loop filter codec method and device
本发明涉及视频压缩编码技术, 尤其涉及一种环路滤波编解码方法及 装置。 背景技术  The present invention relates to video compression coding techniques, and in particular, to a loop filtering codec method and apparatus. Background technique
目前, 环路滤波的典型应用是自适应环路滤波器( ALF , Adaptive Loop Filter )。 以 ALF为例对现有的环路滤波方法进行说明。 在视频压缩编码中, 编码器和解码器通过使用 ALF对解码恢复图像进行滤波, 以进一步降低恢 复图像的量化噪声, 提高恢复图像质量。 由于解码恢复图像将用作运动补 偿预测过程的参考图像, 因此, ALF还可有助于提高运动预测的效率, 提 高编码效率。  Currently, a typical application of loop filtering is an adaptive loop filter (ALF). The existing loop filtering method will be described by taking ALF as an example. In video compression coding, the encoder and decoder filter the decoded restored image by using ALF to further reduce the quantization noise of the restored image and improve the restored image quality. Since the decoded restored image will be used as a reference image for the motion compensation prediction process, ALF can also help to improve the efficiency of motion prediction and improve coding efficiency.
现有技术对 ALF相关信息的编码方法主要可以包括如下步驟: 步驟 1 , 在序列参数集( SPS , Sequence Parameter Set ) 中编码当前视频序列是否可 使用 ALF的标识信息和必要的参数信息。如果允许使用 ALF标识信息, 则 执行步驟 2; 否则, ALF相关信息编码结束。 步驟 2, 在分片 (slice ) 的头 信息中编码当前分片是否使用 ALF的标识信息。如果当前分片使用 ALF的 标识信息, 则执行步驟 3; 否则, 该分片的 ALF相关信息编码过程结束。 步驟 3 , 在分片头信息中进一步编码 ALF的其它相关信息, 如滤波器形状、 滤波器系数、 编码单元(CU, Coding Unit ) ALF控制信息等。  The encoding method of the ALF related information in the prior art may mainly include the following steps: Step 1: In the sequence parameter set (SPS, Sequence Parameter Set), whether the current video sequence can use the ALF identification information and the necessary parameter information. If the ALF identification information is allowed, go to step 2; otherwise, the ALF related information is encoded. Step 2: In the header information of the slice, encode whether the current fragment uses the identification information of the ALF. If the current fragment uses the identification information of the ALF, step 3 is performed; otherwise, the ALF related information encoding process of the fragment ends. Step 3: further encode other related information of the ALF, such as a filter shape, a filter coefficient, a coding unit (CU, Coding Unit), ALF control information, and the like.
实际测试表明, 使用 ALF可有效提高编码效率。 但采用 SPS整体 ALF 标识的滤波方法, 其计算、 存储复杂度很大。 特别地, 对于使用 ALF的解 码器, ALF所带来的复杂度平均可达 70%。 某些典型配置下, ALF所带来 的平均解码复杂度甚至可高达 90%。 尽管编码器使用了分片层自适应 ALF 控制方法, 仍不能有效地在复杂度与编码效率之间取得折衷, 无法充分发 挥 ALF对编码效率的贡献。 具体地, 现有的环路滤波方法主要存在如下缺 第第一一,, 采采用用 SSPPSS整整体体 AALLFF标标识识的的方方法法,, 尽尽管管可可以以为为编编码码器器 AALLFF模模块块 的的优优化化提提供供较较大大的的灵灵活活度度,, 但但并并不不能能有有效效地地提提供供解解码码器器复复杂杂度度可可伸伸缩缩性性,, 不不能能灵灵活活控控制制复复杂杂度度和和编编码码效效率率之之间间的的折折衷衷性性能能。。 另另外外,, 对对于于要要求求低低计计算算 复复杂杂度度的的编编解解码码应应用用,, 编编码码器器往往往往采采用用 ""整整体体关关闭闭 AALLFF"" 的的方方法法以以控控制制编编 解解码码复复杂杂度度,, 以以至至于于不不能能充充分分利利用用 AALLFF对对编编码码效效率率的的贡贡献献。。 The actual test shows that the use of ALF can effectively improve the coding efficiency. However, the filtering method using the SPS overall ALF identification has a large computational and storage complexity. In particular, for decoders using ALF, ALF brings an average of 70% complexity. In some typical configurations, the average decoding complexity of ALF can be as high as 90%. Although the encoder uses slice layer adaptive ALF The control method still cannot effectively achieve a compromise between complexity and coding efficiency, and cannot fully exert the contribution of ALF to coding efficiency. Specifically, the existing loop filtering method mainly has the following first one, and adopts the method of using the SSPPSS whole body AALLFF mark identification method, and although the tube can be used as the code encoder The optimization of the AALLFF module block provides a greater flexibility for the larger, but it does not provide an efficient and efficient way to provide the decoupling code for complex complexity and cocoa. Stretching and contracting, can not be flexible and flexible control of the complex complexity and the efficiency of coding and coding efficiency. . In addition, for the encoding and decoding decoded code for calculating the complex complexity of the low and low calculations, the codec is often used to close the whole body. The method of closing AALLFF"" is to edit and decode the complex complexity of the decoding code, so as to be able to fully utilize the AALLFF to encode the code efficiency rate. Contribute to contribute. .
第第二二,, 由由于于使使用用序序列列参参数数集集整整体体标标识识的的方方法法编编码码 ""是是否否使使用用 AALLFF"" 的的 标标识识信信息息,, 在在为为控控制制复复杂杂度度而而仅仅需需对对某某些些图图像像、、 或或图图像像组组、、 或或某某个个时时间间段段 内内的的图图像像使使用用 AALLFF时时,,其其它它图图像像的的相相关关分分片片头头信信息息中中仍仍需需要要编编码码 AALLFF相相关关 的的标标识识信信息息,, 以以至至于于码码流流中中存存在在不不必必要要的的信信息息冗冗余余。。  The second and second, by the method of encoding the code "" by using the method of identifying the whole sequence of the parameter sequence set parameter set, whether or not to use the mark of AALLFF"" Information message, when it is necessary to control the complex complexity of the control, only need to be on some certain image images, or or image image groups, or some time The picture image in the inter-segment segment makes it necessary to use the code AALLFF in the phase-related information of the other relevant picture image. The identification information of the identification information is such that, in the code stream, the information stored in the code stream is redundant and unnecessary. .
第第三三,, AALLFF对对编编码码效效率率的的贡贡献献主主要要体体现现在在降降低低图图像像量量化化噪噪声声和和提提高高运运 动动补补偿偿预预测测参参考考图图像像质质量量两两个个方方面面,, 且且后后者者往往往往起起主主导导作作用用。。 就就运运动动补补偿偿 预预测测过过程程而而言言,, 现现有有语语法法单单元元可可反反映映图图像像对对该该处处理理过过程程效效率率的的影影响响。。 而而现现 有有方方法法采采用用序序列列参参数数整整体体标标识识,, 未未能能充充分分使使用用可可利利用用的的 AALLFF与与现现有有语语法法单单 元元之之间间的的隐隐含含推推导导方方法法,, 来来节节省省不不必必要要的的信信息息冗冗余余。。 发发明明内内容容  The third third, AALLFF's contribution to the coding efficiency efficiency of the coding is mainly reflected in the reduction of the low image image quantized noise noise and the improvement of the high movement movement compensation compensation The pre-predictive reference reference image has two or two aspects of image quality, and the latter often tends to play a leading role. . As far as the process of motion compensation compensation is concerned, the current process efficiency rate of the single-element cocoa reflection image image pair is processed. The impact of the sound. . However, the existing method has adopted the whole sequence label identification with the sequence parameter parameters, and has not been able to fully subdivide the AALLFF used with the use of cocoa and the existing language. The ambiguity between the grammar method and the unit cell includes the method of deriving the guide method, which saves the redundant information of the letter information that is not necessary. . Invent the contents of the invention
有有鉴鉴于于此此,, 本本发发明明的的主主要要目目的的在在于于提提供供一一种种环环路路滤滤波波编编解解码码方方法法及及装装 置置,, 以以解解决决现现有有的的环环路路滤滤波波方方法法不不能能有有效效地地在在复复杂杂度度与与编编码码效效率率之之间间取取得得 折折衷衷的的问问题题。。  In view of this, the main main objective of the present invention is to provide a method for encoding and decoding a code method for a loop loop filter filter and a device arrangement. , in order to solve the problem, the existing loop circuit filtering filter wave method can not effectively and effectively between the complex complexity and the code efficiency rate Take a questionable question that has been compromised. .
为为达达到到上上述述目目的的,, 本本发发明明的的技技术术方方案案是是这这样样实实现现的的::  In order to achieve the above stated objectives, the technical solution of the present invention is realized in this way:
本本发发明明提提供供了了一一种种环环路路滤滤波波编编码码方方法法,, 所所述述方方法法包包括括::  The present invention provides a method for a loop loop filter filtering code encoding code method, and the method includes:
设设置置用用于于指指示示环环路路滤滤波波在在编编码码过过程程中中使使用用方方式式的的环环路路滤滤波波模模式式;; * 在上述方案中, 所述方法为: The setting is used to indicate that the loop circuit filter filter wave is in the process of coding and code passing process, and the ring loop filter filter mode is used in the process mode; In the above solution, the method is:
确定两种或两种以上能够用于编码过程的所述环路滤波模式; 对于所述各环路滤波模式, 分别生成包含有所述环路滤波模式的环路 滤波标识信息的一个或多个参数集;  Determining two or more of the loop filtering modes that can be used in the encoding process; for each of the loop filtering modes, generating one or more of the loop filtering identification information including the loop filtering mode, respectively Parameter set
确定当前编码过程中所使用的环路滤波模式并根据当前编码过程中所 使用环路滤波模式对应的参数集, 进行编码。  The loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
在上述方案中, 所述两种或两种以上环路滤波模式包括如下环路滤波 模式中的任意两种或两种以上:  In the above solution, the two or more loop filtering modes include any two or more of the following loop filtering modes:
表示允许每个分片使用环路滤波的第零环路滤波模式;  Represents a zeroth loop filtering mode that allows loop filtering for each slice;
表示仅允许帧内编码分片使用环路滤波的第一环路滤波模式; 表示仅允许在用于帧间预测参考的图像中的分片使用环路滤波的第二 环路滤波模式;  Representing a first loop filtering mode that allows only intra-coded slices to use loop filtering; represents a second loop filtering mode that allows loop filtering only for slices in the image used for inter prediction reference;
表示在分片的图像序号 (POC )值为环路滤波刷新周期的整数倍时, 允许在所述分片使用环路滤波的第三环路滤波模式;  Representing a third loop filtering mode that allows loop filtering in the slice when the sliced picture number (POC) value is an integer multiple of the loop filter refresh period;
表示所有分片均不允许使用环路滤波的第四环路滤波模式。  Indicates that the fourth loop filtering mode that uses loop filtering is not allowed for all slices.
在上述方案中, 所述方法为:  In the above solution, the method is:
确定当前编码过程所使用的环路滤波模式;  Determining the loop filtering mode used by the current encoding process;
生成包含有所确定环路滤波模式的环路滤波标识信息的参数集; 根据所生成的参数集, 进行编码。  Generating a parameter set containing loop filter identification information having a determined loop filtering mode; encoding according to the generated parameter set.
在上述方案中, 所述环路滤波模式为如下环路滤波模式中的任意一种: 表示允许每个分片使用环路滤波的第零环路滤波模式;  In the above solution, the loop filtering mode is any one of the following loop filtering modes: indicating a zeroth loop filtering mode that allows loop filtering for each slice;
表示仅允许帧内编码分片使用环路滤波的第一环路滤波模式; 表示仅允许在用于帧间预测参考的图像中的分片使用环路滤波的第二 环路滤波模式; 表示在分片的 POC值为环路滤波刷新周期的整数倍时, 允许在所述分 片使用环路滤波的第三环路滤波模式; Representing a first loop filtering mode that allows only intra-coded slices to use loop filtering; represents a second loop filtering mode that allows loop filtering only for slices in an image used for inter prediction reference; Representing a third loop filtering mode that allows loop filtering in the slice when the POC value of the slice is an integer multiple of the loop filter refresh period;
表示所有分片均不允许使用环路滤波的第四环路滤波模式。  Indicates that the fourth loop filtering mode that uses loop filtering is not allowed for all slices.
在上述方案中, 所述确定用于指示环路滤波在编码过程中使用方式的 环路滤波模式, 为: 根据下述因素中的一种或多种: 具体应用需求、 编码 过程的可用计算资源与存储资源、 视频信源特性、 信源编码码率、 接收端 处理能力, 确定用于指示环路滤波在编码过程中使用方式的环路滤波模式。  In the above solution, the determining a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process is: according to one or more of the following factors: specific application requirements, available computing resources of the encoding process And a storage resource, a video source characteristic, a source coding rate, and a receiving end processing capability, and determining a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process.
在上述方案中, 所述生成包含有所述环路滤波模式的环路滤波标识信 息的参数集之后, 所述方法还包括: 为所生成的参数集分配用于标识所述 参数集的参数集索引序号。  In the above solution, after the generating the parameter set including the loop filtering identification information of the loop filtering mode, the method further includes: allocating a parameter set for identifying the parameter set to the generated parameter set. Index number.
在上述方案中, 所述根据所生成的参数集, 进行编码, 包括: 将所述 参数集的信息写入码流, 在分片层编码过程中将所述参数集索引序号写入 当前编码单元中的分片层头信息, 并确定编码使用的滤波器, 将所述滤波 器的参数写入到所述分片层头信息。  In the above solution, the encoding according to the generated parameter set includes: writing information of the parameter set into a code stream, and writing the parameter set index number into the current coding unit in a slice layer encoding process. The slice header information in the slice, and the filter used for encoding is determined, and the parameters of the filter are written to the slice header information.
在上述方案中, 所述确定编码使用的滤波器, 包括:  In the above solution, the determining the filter used for encoding includes:
根据各候选滤波器的复杂度与去噪声性能, 对所有候选滤波器进行分 组, 得到一个或多个候选滤波器组;  All candidate filters are grouped according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks;
计算得到当前编码单元的图像重要性参数;  Calculating an image importance parameter of the current coding unit;
根据计算得到的图像重要性参数、 以及所得到的一个或多个候选滤波 器组, 为当前编码单元选择编码使用的滤波器。  A filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
在上述方案中, 所述方法还包括: 险证当前编码单元进行编码时所确 定的环路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波模式 是否相同; 如果不是, 则调整当前使用的参数集; 如果是, 则不调整当前 使用的参数集。  In the above solution, the method further includes: determining, by the risk, whether the loop filtering mode determined by the current coding unit is the same as the loop filtering mode determined when the previous coding unit performs coding; if not, adjusting The currently used parameter set; if it is, the currently used parameter set is not adjusted.
在上述方案中, 所述调整当前使用的参数集, 包括: 验证对应当前编 码单元进行编码时所确定环路滤波模式的参数集是否存在, 如果是, 直接 将当前使用的参数集调整为当前编码单元进行编码时所确定环路滤波模式 对应的参数集; 如果不是, 生成当前编码单元进行编码时所确定环路滤波 模式对应的参数集, 并将当前使用的参数集调整为当前编码单元进行编码 时所确定环路滤波模式对应的参数集。 In the above solution, the adjusting the currently used parameter set includes: verifying the current corresponding Whether the parameter set of the loop filtering mode is determined when the code unit performs coding, and if so, directly adjusts the currently used parameter set to a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding; if not, generates The current coding unit performs a parameter set corresponding to the loop filtering mode determined by the coding unit, and adjusts the currently used parameter set to a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding.
在上述方案中, 所述险证当前编码单元进行编码时所确定的环路滤波 模式, 与上一个编码单元进行编码时所确定的环路滤波模式是否相同之前, 所述方法还包括: 动态监控当前编码过程中可用资源的变化情况, 获得当 前编码过程中的可用资源信息; 根据所述可用资源信息, 确定当前编码单 元进行编码时的环路滤波模式。  In the above solution, before the risk filtering mode determined by the current coding unit is encoded, whether the loop filtering mode determined when the previous coding unit performs coding is the same, the method further includes: The current resource information in the current encoding process is obtained, and the available resource information in the current encoding process is obtained. According to the available resource information, the loop filtering mode when the current coding unit performs encoding is determined.
在上述方案中, 所述方法还包括: 根据所获得的上一次编码过程中的 信源特性参数、 和编码器控制辅助参数, 确定当前编码过程中各图像或各 视频区段使用的环路滤波模式; 根据所述当前编码过程中各图像或各视频 区段所使用环路滤波模式对应的参数集, 分别对所述各图像或各视频区段 进行编码。  In the above solution, the method further includes: determining loop filtering used by each image or each video segment in the current encoding process according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the last encoding process. Mode: encoding each image or each video segment according to a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process.
在上述方案中, 所述方法还包括: 为当前编码过程中各图像或各视频 区段所使用环路滤波模式对应的参数集重新分配参数集索引序号;  In the above solution, the method further includes: reallocating a parameter set index sequence number for a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process;
根据所述当前编码过程中各图像或各视频区段所使用环路滤波模式对 应的参数集, 分别对所述各图像或各视频区段进行编码, 为: 根据所述重 新分配参数集索引序号后得到的各参数集, 分别对所述各图像或各视频区 段进行编码。  And respectively encoding, according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process, the image or each video segment is: according to the reassignment parameter set index sequence number Each of the obtained parameter sets respectively encodes each of the images or video segments.
在上述方案中, 所述为当前编码过程中各图像或各视频区段所使用环 路滤波模式对应的参数集重新分配参数集索引序号, 包括:  In the above solution, the parameter set index number is reassigned to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process, including:
根据所述各图像或各视频区段的环路滤波模式在当前编码过程中使用 次数, 按照使用次数由多到少, 对所述各环路滤波模式进行排序; 按照所述各环路滤波模式的排序顺序, 为所述各环路滤波模式对应的 参数集, 依次分配数值由 d、到大的参数集索引序号。 And sorting the loop filtering modes according to how many times the loop filtering mode of each image or each video segment is used in the current encoding process, according to how many times of use; According to the sorting order of the loop filtering modes, the parameter sets corresponding to the loop filtering modes are sequentially assigned index numbers of d to large parameter sets.
本发明还提供了一种编码器, 所述编码器包括: 确定模块、 生成模块 和编码模块; 其中,  The present invention also provides an encoder, the encoder comprising: a determining module, a generating module, and an encoding module;
确定模块, 用于设置用于指示环路滤波在编码过程中使用方式的环路 滤波模式;  a determining module, configured to set a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process;
生成模块, 用于根据所述确定模块设置的环路滤波模式, 生成参数集; 编码模块, 用于根据所述生成模块生成的参数集, 进行编码。  a generating module, configured to generate a parameter set according to the loop filtering mode set by the determining module; and an encoding module, configured to perform encoding according to the parameter set generated by the generating module.
在上述方案中, 所述确定模块, 还用于确定两种或两种以上能够用于 编码过程的所述环路滤波模式;  In the above solution, the determining module is further configured to determine two or more types of the loop filtering modes that can be used in the encoding process;
生成模块, 还用于对于所述确定模块所确定的各环路滤波模式, 分别 生成包含有所述环路滤波模式的环路滤波标识信息的一个或多个参数集; 编码模块, 还用于确定当前编码过程中所使用的环路滤波模式并根据 当前编码过程中所使用环路滤波模式对应的参数集, 进行编码。  a generating module, configured to generate, for each loop filtering mode determined by the determining module, one or more parameter sets respectively including loop filtering identification information of the loop filtering mode; and an encoding module, further used for The loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
在上述方案中, 所述确定模块, 还用于确定当前编码过程所使用的环 路滤波模式;  In the above solution, the determining module is further configured to determine a loop filtering mode used by the current encoding process;
生成模块, 还用于生成包含有所述确定模块所确定环路滤波模式的环 路滤波标识信息的参数集;  a generating module, configured to generate a parameter set including loop filtering identifier information of a loop filtering mode determined by the determining module;
编码模块, 还用于根据所述生成模块生成的参数集, 进行编码。  The encoding module is further configured to perform encoding according to the parameter set generated by the generating module.
在上述方案中, 所述确定模块, 还用于根据下述因素中的一种或多种, 确定用于指示环路滤波在编码过程中使用方式的环路滤波模式: 具体应用 需求、 编码过程的可用计算资源与存储资源、 视频信源特性、 信源编码码 率、 接收端处理能力。  In the above solution, the determining module is further configured to determine, according to one or more of the following factors, a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process: specific application requirements, an encoding process Available computing resources and storage resources, video source characteristics, source code rate, and receiver processing capabilities.
在上述方案中, 所述生成模块, 还用于为所生成的参数集分配用于标 识所述参数集的参数集索引序号; 所述编码模块, 还用于将所述参数集的信息写入码流, 在分片层编码 过程中将所述参数集索引序号写入当前编码单元中的分片层头信息, 并确 定编码使用的滤波器, 将所述滤波器的参数写入到所述分片层头信息。 In the above solution, the generating module is further configured to allocate, to the generated parameter set, a parameter set index sequence number for identifying the parameter set; The encoding module is further configured to write the information of the parameter set into the code stream, and write the parameter set index number into the slice layer header information in the current coding unit in the slice layer coding process, and determine the code. A filter is used to write parameters of the filter to the slice header information.
在上述方案中, 所述编码模块, 还用于采用如下方法确定编码使用的 滤波器:  In the above solution, the encoding module is further configured to determine a filter used for encoding by using the following method:
根据各候选滤波器的复杂度与去噪声性能, 对所有候选滤波器进行分 组, 得到一个或多个候选滤波器组;  All candidate filters are grouped according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks;
计算得到当前编码单元的图像重要性参数;  Calculating an image importance parameter of the current coding unit;
根据计算得到的图像重要性参数、 以及所得到的一个或多个候选滤波 器组, 为当前编码单元选择编码使用的滤波器。  A filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
在上述方案中, 所述编码器还包括险证模块和调整模块, 其中, 调整模块, 用于调整当前使用的参数集;  In the above solution, the encoder further includes a risk module and an adjustment module, wherein the adjustment module is configured to adjust a currently used parameter set;
验证模块, 用于验证当前编码单元进行编码时所确定的环路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波模式是否相同, 并在不相 同时, 启动所述调整模块。  And a verification module, configured to verify whether the loop filtering mode determined when the current coding unit performs coding is the same as the loop filtering mode determined when the previous coding unit performs coding, and starts the adjustment module without being identical.
在上述方案中, 所述调整模块, 还用于险证对应当前编码单元进行编 码时所确定环路滤波模式的参数集是否存在, 如果是, 直接将当前使用的 参数集调整为当前编码单元进行编码时所确定环路滤波模式对应的参数 集; 如果不是, 通过所述生成模块生成当前编码单元进行编码时所确定环 路滤波模式对应的参数集, 并将当前使用的参数集调整为当前编码单元进 行编码时所确定环路滤波模式对应的参数集。  In the above solution, the adjusting module is further configured to: if the risk parameter corresponds to a parameter set of the loop filtering mode determined by the current coding unit, if yes, directly adjust the currently used parameter set to the current coding unit. And a parameter set corresponding to the loop filtering mode determined by the encoding; if not, generating, by the generating module, a parameter set corresponding to the loop filtering mode determined by the current encoding unit, and adjusting the currently used parameter set to the current encoding The parameter set corresponding to the loop filtering mode determined when the unit performs encoding.
在上述方案中, 所述确定模块, 还用于根据所获得的上一次编码过程 中的信源特性参数、 和编码器控制辅助参数, 确定当前编码过程中各图像 或各视频区段使用的环路滤波模式;  In the above solution, the determining module is further configured to determine, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a ring used by each image or each video segment in the current encoding process. Road filtering mode
所述编码模块, 还用于根据所述确定模块所确定的、 当前编码过程中 各图像或各视频区段所使用环路滤波模式对应的参数集, 分别对所述各图 像或各视频区段进行编码。 The encoding module is further configured to determine, according to the determining module, a current encoding process Each image or each video segment is encoded by a parameter set corresponding to a loop filtering mode used by each image or each video segment.
本发明还提供了一种环路滤波解码方法, 所述方法包括:  The invention also provides a loop filter decoding method, the method comprising:
对参数集相关码流中环路滤波模式的环路滤波标识信息进行解码; 对分片层中环路滤波模式的环路滤波标识信息进行解码;  Decoding the loop filtering identification information of the loop filtering mode in the parameter set related code stream; decoding the loop filtering identification information of the loop filtering mode in the slice layer;
其中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。 在上述方案中, 所述对参数集相关码流中环路滤波模式的环路滤波标 识信息进行解码, 包括: 读取参数集相关码流中的比特, 得到用于标识所 述环路滤波标识信息的各语法单元的取值, 并将所述各语法单元的取值赋 给所述参数集数据结构中的对应变量。  The loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process. In the foregoing solution, the decoding, by the loop filter identification mode, in the loop filter mode of the parameter set related code stream, includes: reading bits in the parameter set related code stream, and obtaining the loop filter identification information used to identify the loop filter identification information The values of the syntax units are assigned, and the values of the syntax units are assigned to corresponding variables in the parameter set data structure.
在上述方案中, 所述对分片层中环路滤波模式的环路滤波标识信息进 行解码, 包括: 获得所述参数集中用于标识所述环路滤波标识信息的各语 法单元的取值, 并将所述语法单元的取值传递给分片层数据结构的对应变 量。  In the foregoing solution, the decoding, by the loop filtering identifier information of the loop filtering mode in the fragmentation layer, includes: obtaining values of the syntax units used to identify the loop filtering identifier information in the parameter set, and Passing the value of the syntax unit to the corresponding variable of the slice layer data structure.
在上述方案中, 所述方法还包括: 根据解码得到的环路滤波标识信息, 对分片层中的环路滤波器相关参数进行解析。  In the above solution, the method further includes: parsing the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
本发明还提供了一种解码器, 所述解码器包括: 第一解码单元和第二 解码单元, 其中,  The present invention also provides a decoder, the decoder comprising: a first decoding unit and a second decoding unit, wherein
第一解码单元, 用于对参数集相关码流中环路滤波模式的环路滤波标 识信息进行解码;  a first decoding unit, configured to decode loop filter identification information of a loop filtering mode in a parameter set related code stream;
第二解码单元, 用于对分片层中环路滤波模式的环路滤波标识信息进 行解码;  a second decoding unit, configured to decode loop filter identification information of a loop filtering mode in the slice layer;
其中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。 在上述方案中, 所述第一解码单元, 还用于读取参数集相关码流中的 比特, 得到用于标识所述环路滤波标识信息的各语法单元的取值, 并将所 述各语法单元的取值赋给所述参数集数据结构中的对应变量。 The loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process. In the foregoing solution, the first decoding unit is further configured to: read a bit in a parameter set related code stream, and obtain a value of each syntax unit used to identify the loop filter identification information, and The values of the syntax units are assigned to corresponding variables in the parameter set data structure.
在上述方案中, 所述第二解码单元, 还用于获得所述参数集中用于标 识所述环路滤波标识信息的各语法单元的取值, 并将所述语法单元的取值 传递给分片层数据结构的对应变量。  In the foregoing solution, the second decoding unit is further configured to obtain a value of each syntax unit used to identify the loop filtering identifier information in the parameter set, and transmit the value of the syntax unit to a point. The corresponding variable of the slice data structure.
在上述方案中, 所述第二解码单元, 还用于根据解码得到的环路滤波 标识信息, 对分片层中的环路滤波器相关参数进行解析。  In the above solution, the second decoding unit is further configured to parse the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
本发明还提供了一种电子设备,所述电子设备包括编码器和 /或解码器, 其中, 所述编码器包括确定模块、 生成模块和编码模块, 确定模块用于设 置用于指示环路滤波在编码过程中使用方式的环路滤波模式; 生成模块用 于根据所述确定模块设置的环路滤波模式, 生成参数集; 编码模块用于根 据所述生成模块生成的参数集, 进行编码;  The present invention also provides an electronic device, the electronic device comprising an encoder and/or a decoder, wherein the encoder comprises a determining module, a generating module and an encoding module, and the determining module is configured to set a loop filtering a loop filtering mode used in the encoding process; the generating module is configured to generate a parameter set according to the loop filtering mode set by the determining module; and the encoding module is configured to perform encoding according to the parameter set generated by the generating module;
所述解码器包括第一解码单元和第二解码单元, 第一解码单元, 用于 对参数集相关码流中环路滤波模式的环路滤波标识信息进行解码; 第二解 码单元, 用于对分片层中环路滤波模式的环路滤波标识信息进行解码; 其 中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。  The decoder includes a first decoding unit and a second decoding unit, where the first decoding unit is configured to decode the loop filtering identification information of the loop filtering mode in the parameter set related code stream; and the second decoding unit is configured to perform the splitting The loop filtering identification information of the loop filtering mode in the slice layer is decoded; wherein the loop filtering mode is used to indicate the manner in which the loop filtering is used in the encoding process.
本发明提供的环路滤波编解码方法及装置中, 通过生成对应编码过程 所确定环路滤波模式的参数集, 并根据所生成的参数集, 进行编码, 从而 可以通过根据视频应用预设的一种或多种环路滤波模式进行编码, 实现了 编码、 解码过程中图像间复杂度的优化分配, 提高了编解码器复杂度与编 码效率之间的折衷性能。  The loop filtering codec method and apparatus provided by the present invention generates a parameter set of a loop filtering mode determined by a corresponding encoding process, and performs encoding according to the generated parameter set, so that a preset according to the video application can be One or more loop filtering modes are encoded, which realizes optimal allocation of inter-image complexity in the process of encoding and decoding, and improves the tradeoff between codec complexity and coding efficiency.
此外, 本发明还使用现有语义将图像重要性、 处理复杂度等因素的隐 含推导应用于环路滤波的编解码过程, 降低环路滤波相关头信息开销。  In addition, the present invention also uses the existing semantics to apply the implicit derivation of factors such as image importance and processing complexity to the coding and decoding process of the loop filtering, and reduces the overhead of the loop filtering related header information.
此外, 本发明还可以在编码过程中动态调整环路滤波模式, 以便于在 不同重要性图像之间进行环路滤波的复杂度分配, 提高编解码器计算复杂 度和编码效率的折衷性能。 附图说明 In addition, the present invention can dynamically adjust the loop filtering mode during the encoding process, so as to facilitate the complexity of loop filtering between different importance images, and improve the competing performance of the codec computational complexity and coding efficiency. DRAWINGS
图 1为本发明环路滤波编码方法的实现流程图;  1 is a flowchart of an implementation of a loop filter encoding method according to the present invention;
图 2为本发明实施例一中对 PPS中所添加的 ALF标识信息进行解析的 流程图;  2 is a flowchart of parsing ALF identification information added in a PPS according to Embodiment 1 of the present invention;
图 3为本发明实施例一中解析分片层信息中 ALF标识信息的流程图; 图 4为本发明实施例二采用单一的 ALF模式进行一次编码的实现流程 图;  FIG. 3 is a flowchart of analyzing ALF identification information in slice layer information according to Embodiment 1 of the present invention; FIG. 4 is a flowchart showing implementation of coding once in a single ALF mode according to Embodiment 2 of the present invention;
图 5为本发明实施例三采用多种 ALF模式进行一次编码的实现流程图; 图 6为本发明实施例四确定编码过程所使用滤波器的实现流程图; 图 7为本发明实施例五对视频图像进行两次编码的实现流程图。 具体实施方式  FIG. 5 is a flowchart of implementing one-time coding in multiple ALF modes according to Embodiment 3 of the present invention; FIG. 6 is a flowchart of implementing a filter used in determining an encoding process according to Embodiment 4 of the present invention; FIG. 7 is a flowchart of Embodiment 5 of the present invention; A flowchart for implementing the encoding of the video image twice. detailed description
本发明中所涉及的 "复杂度与编码效率之间的折衷" 及其类似或相关 表述包含如下三个方面含义: 第一, 编码效率的提高是以合理的复杂度增 加甚至降低为代价获取的; 复杂度的降低是以可忽略的编码效率损失甚至 编码效率提高为代价获取的。 第二, 编码器或解码器合理分配计算、 储存 等资源, 以合理的复杂度增加甚至降低的前提下, 提高编码效率; 或在编 码效率损失可忽略甚至有所提高的前提下, 降低编码器或解码器的整体复 杂度。 第三, 编码器或解码器在编码或解码不同图像、 不同分片、 不同基 本编码单元过程中使用复杂度不同的处理方法, 以合理的整体复杂度增加 甚至降低为代价获得编码效率的提高, 或以可忽略的编码效率损失甚至编 码效率提高为代价, 降低编码器或解码器的整体复杂度。  The "compromise between complexity and coding efficiency" and its similar or related expressions involved in the present invention include the following three aspects: First, the improvement of coding efficiency is obtained at the expense of reasonable complexity increase or even decrease. The reduction in complexity is obtained at the expense of negligible loss of coding efficiency or even increased coding efficiency. Second, the encoder or the decoder allocates resources such as calculation and storage reasonably, and increases the coding efficiency under the premise of increasing or even decreasing the complexity; or reducing the encoder under the premise that the loss of coding efficiency is negligible or even improved. Or the overall complexity of the decoder. Third, the encoder or the decoder uses a processing method with different complexity in encoding or decoding different images, different shards, and different basic coding units, and obtains an increase in coding efficiency at the cost of a reasonable overall complexity increase or even decrease. The overall complexity of the encoder or decoder is reduced at the expense of negligible loss of coding efficiency or even increased coding efficiency.
本发明的基本思想是: 根据视频通信的应用设置多种用于指示环路滤 波使用方式的环路滤波模式, 并生成对应所述各环路滤波模式的多个参数 集; 根据所述多个参数集中与当前编码过程的环路滤波模式对应的参数集, 进行编码。 如此, 能够实现编码器复杂度分配和优化, 编码过程中在不同 重要性图像之间进行环路滤波的复杂度分配, 提高编解码器计算复杂度和 编码效率的折衷性能, 减少码流中的信息冗余。 The basic idea of the present invention is: setting a plurality of loop filtering modes for indicating a loop filtering usage manner according to an application of video communication, and generating a plurality of parameter sets corresponding to the loop filtering modes; The parameter set is encoded in a parameter set corresponding to the loop filtering mode of the current encoding process. In this way, encoder complexity allocation and optimization can be achieved, and the encoding process is different. The complexity of loop filtering between importance images increases the trade-off performance of codec computational complexity and coding efficiency, and reduces information redundancy in the code stream.
本发明的环路滤波编码方法, 参照图 1所示, 主要可以包括以下步驟: 步驟 101 :设置用于指示环路滤波在编码过程中使用方式的环路滤波模 式;  The loop filter coding method of the present invention, as shown in FIG. 1, may mainly include the following steps: Step 101: Set a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process;
步驟 102: 根据所述环路滤波模式, 生成参数集;  Step 102: Generate a parameter set according to the loop filtering mode.
步驟 103 : 根据所生成的参数集, 进行编码。  Step 103: Perform coding according to the generated parameter set.
其中, 所述参数集为某些包含有图像公共参数的数据结构、 图像解码 过程中使用分片头信息标识的参数集中的标记和参数。 例如, 序列参数集、 图像参数集、 或具有类似应用性质的数据结构。  The parameter set is a data structure including some image common parameters, and a flag and a parameter set in the parameter set identified by the slice header information in the image decoding process. For example, a sequence parameter set, an image parameter set, or a data structure with similar application properties.
具体地, 所述方法可以通过以下两种方式实现:  Specifically, the method can be implemented in the following two manners:
第一, 确定两种或两种以上能够用于编码过程的所述环路滤波模式; 对于所述各环路滤波模式, 分别生成包含有所述环路滤波模式的环路 滤波标识信息的一个或多个参数集; 确定当前编码过程中所使用的环路滤 波模式并根据当前编码过程中所使用环路滤波模式对应的参数集, 进行编 码。  First, determining two or more of the loop filtering modes that can be used in the encoding process; for each of the loop filtering modes, respectively generating one of loop filtering identification information including the loop filtering mode Or a plurality of parameter sets; determining a loop filtering mode used in the current encoding process and encoding according to a parameter set corresponding to the loop filtering mode used in the current encoding process.
第二, 确定当前编码过程所使用的环路滤波模式; 生成包含有所确定 环路滤波模式的环路滤波标识信息的参数集; 根据所生成的参数集, 进行 编码。  Second, determining a loop filtering mode used in the current encoding process; generating a parameter set including loop filtering identification information of the determined loop filtering mode; and encoding according to the generated parameter set.
其中, 所述环路滤波模式的环路滤波标识信息包含有用于指示环路滤 波标识方式的参数, 或包含有用于指示环路滤波标识方式的参数和所述参 数的辅助参数。 其中, 用于指示环路滤波标识方式的参数可以包括用于标 识是否允许图像中所有分片使用环路滤波的参数和用于标识图像中所有分 片使用环路滤波的方式的参数; 所述辅助参数具体为用于标识图像中所有 分片使用环路滤波的方式的参数的辅助参数, 可以包括环路滤波的刷新周 期等。 The loop filtering identifier information of the loop filtering mode includes a parameter for indicating a loop filtering identifier manner, or a parameter for indicating a loop filtering identifier manner and an auxiliary parameter of the parameter. The parameter used to indicate the loop filtering identification mode may include a parameter for identifying whether to allow all fragments in the image to use loop filtering, and a parameter for identifying a manner in which all fragments in the image use loop filtering; The auxiliary parameter is specifically an auxiliary parameter for identifying a parameter of a manner in which all slices in the image use loop filtering, and may include a refresh cycle of loop filtering. Period.
所述环路滤波模式可以根据分片层、 编码单元层等码流组织中其它语 法单元进行构造。 在分片的编码过程中, 仅在构造条件成立的情况下, 允 许使用环路滤波。 所述环路滤波模式可以是如下环路滤波模式中的一种或 多种: 表示允许每个分片使用环路滤波的第零环路滤波模式, 表示仅允许 帧内编码分片使用环路滤波的第一环路滤波模式, 表示仅允许在用于帧间 预测参考的图像中的分片使用环路滤波的第二环路滤波模式, 表示在分片 的图像序号 (POC, Picture Order Count )值为环路滤波刷新周期的整数倍 时, 允许在所述分片使用环路滤波的第三环路滤波模式, 表示所有分片均 不允许使用环路滤波的第四环路滤波模式。  The loop filtering mode may be constructed according to other syntax units in a code stream organization such as a slice layer or a coding unit layer. In the encoding process of the slice, loop filtering is allowed only when the construction conditions are true. The loop filtering mode may be one or more of the following loop filtering modes: indicating a zeroth loop filtering mode that allows loop filtering for each slice, indicating that only intra-coded slices are allowed to use the loop The filtered first loop filtering mode, indicating that only the second loop filtering mode of the loop filtering is used for the slice in the image used for the inter prediction reference, indicating the image sequence number (POC, Picture Order Count) in the slice When the value is an integer multiple of the loop filtering refresh period, the third loop filtering mode that uses loop filtering in the slice is allowed to indicate that all slices are not allowed to use the fourth loop filtering mode of loop filtering.
其中, 第零环路滤波模式: 每个分片均允许使用环路滤波, 根据档次 ( Profile )和级别 (Level ) 中的限制条件, 使用分片层自适应技术确定滤 波器参数和使用环路滤波的图像区域, 适用于要求高编码效率、 且编解码 器容许使用高复杂度算法。 例如, 使用 PC的非实时视频下载或点播, 家庭 影院等。  The zero-loop filtering mode: loop filtering is allowed for each slice, and the filter parameters and loops are determined using slice layer adaptive techniques according to the constraints in the profile and level. The filtered image area is suitable for high coding efficiency and the codec allows the use of high complexity algorithms. For example, use a PC for non-real-time video downloads or on-demand, home theater, and more.
第一环路滤波模式: 仅帧内编码分片允许使用环路滤波, 根据档次和 级别中的限制条件, 使用分片层自适应技术确定滤波器参数和使用环路滤 波的图像区域, 适用于低解码复杂度或低编码复杂度的应用, 如移动终端 视频播放、 便携式摄像机等。  First loop filtering mode: Only intra-coded slices allow the use of loop filtering, using slice layer adaptive techniques to determine filter parameters and image regions using loop filtering, depending on the constraints in the grade and level, Applications with low decoding complexity or low coding complexity, such as mobile terminal video playback, camcorders, etc.
第二环路滤波模式: 仅帧间预测参考的图像中的分片允许使用环路滤 波, 根据档次和级别中的限制条件, 使用分片层自适应技术确定滤波器参 数和使用环路滤波的图像区域。 该模式适用于中等复杂度的解码或编码应 用。  Second loop filtering mode: Fragmentation in an image only for inter prediction reference allows the use of loop filtering, using slice layer adaptive techniques to determine filter parameters and using loop filtering, depending on the constraints in the grade and level Image area. This mode is suitable for medium complexity decoding or coding applications.
第三环路滤波模式: 周期性环路滤波刷新模式, 仅当分片的 POC值为 环路滤波刷新周期的整数倍时, 允许在该分片的编码、 解码过程中使用环 路滤波, 并根据档次和级别中的限制条件, 使用分片层自适应技术确定滤 波器参数和使用环路滤波的图像区域。 该模式可通过进一步设置环路滤波 刷新周期, 应用于低、 中、 高复杂度的解码和编码应用。 该模式的环路滤 波标识信息需要包含辅助参数, 该辅助参数是环路滤波刷新周期。 Third loop filtering mode: Periodic loop filter refresh mode, which allows the ring to be used in the encoding and decoding process of the fragment only when the POC value of the fragment is an integer multiple of the loop filtering refresh period. Path filtering, and using slice layer adaptive techniques to determine filter parameters and image regions using loop filtering, depending on the constraints in the grade and level. This mode can be applied to low, medium and high complexity decoding and coding applications by further setting the loop filter refresh period. The loop filtering identification information of the mode needs to include an auxiliary parameter, which is a loop filtering refresh period.
其中, 对于所述两种或两种以上的环路滤波模式中任意一种环路滤波 模式, 可以生成对应所述环路滤波模式的一个或多个参数集。 例如, 对于 上述的第三环路滤波模式, 可以根据环路滤波刷新周期的不同, 生成多个 参数集。 对于上述的第零环路滤波模式、 第一环路滤波模式和第二环路滤 波模式, 对应每个环路滤波模式, 可以生成一个对应的参数集。  Wherein, for any one of the two or more loop filtering modes, one or more parameter sets corresponding to the loop filtering mode may be generated. For example, for the third loop filtering mode described above, a plurality of parameter sets may be generated according to different loop filtering refresh periods. For the zeroth loop filtering mode, the first loop filtering mode, and the second loop filtering mode described above, a corresponding parameter set may be generated corresponding to each loop filtering mode.
其中, 可以根据下述因素中的一种或多种: 具体应用需求、 编码过程 的可用计算资源与存储资源、 视频信源特性、 信源编码码率、 接收端处理 能力, 确定用于指示环路滤波在编码过程中使用方式的环路滤波模式。  Wherein, it may be determined according to one or more of the following factors: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability, and are determined for the indication ring. The path filtering uses a loop filtering mode in the encoding process.
其中, 生成包含有所述环路滤波模式的环路滤波标识信息的参数集之 后, 还为所生成的参数集分配用于标识所述参数集的参数集索引序号。  After generating a parameter set including the loop filter identification information of the loop filtering mode, a parameter set index number for identifying the parameter set is also allocated to the generated parameter set.
具体地, 根据所生成的参数集, 进行编码, 可以包括: 将所述参数集 的信息写入码流, 在分片层编码过程中将所述参数集索引序号写入当前编 码单元中的分片层头信息, 并确定编码使用的滤波器, 将所述滤波器的参 数写入到所述分片层头信息。  Specifically, performing coding according to the generated parameter set may include: writing information of the parameter set into a code stream, and writing the parameter set index sequence number into a current coding unit in a slice layer coding process. The slice header information, and a filter used for encoding is determined, and parameters of the filter are written to the slice header information.
这里, 所述确定编码使用的滤波器的过程, 可以包括: 根据各候选滤 波器的复杂度与去噪声性能, 对所有候选滤波器进行分组, 得到一个或多 个候选滤波器组; 计算得到当前编码单元的图像重要性参数; 根据计算得 到的图像重要性参数、 以及所得到的一个或多个候选滤波器组, 为当前编 码单元选择编码使用的滤波器。 此外, 还可以通过现有的使用分片层候选 环路滤波器选择与控制方法, 确定编码使用的滤波器。  Here, the process of determining a filter used for encoding may include: grouping all candidate filters according to complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks; An image importance parameter of the coding unit; a filter used for encoding the current coding unit is selected based on the calculated image importance parameter and the resulting one or more candidate filter banks. In addition, it is also possible to determine the filter used for encoding by using the existing slice layer candidate loop filter selection and control method.
这里, 将所述滤波器的参数写入所述分片头信息中, 是将用于表示分 片层码流中是否存在环路滤波参数的标识信息、 环路滤波相关滤波器参数、Here, the parameters of the filter are written into the slice header information, which will be used to represent the points. Whether there is identification information of the loop filter parameter, loop filter related filter parameters, and
CU层 ALF控制标识信息等。 其中, 环路滤波相关滤波器参数相关码流也 可能出现在参数集(如 PPS或其它包含图像 /分片公共信息的参数集) 中。 这里, 以分片层码流为例进行说明。 CU layer ALF controls identification information and the like. Among them, the loop filter correlation filter parameter related code stream may also appear in the parameter set (such as PPS or other parameter set containing image/slice common information). Here, the slice layer code stream is taken as an example for description.
其中, 环路滤波相关滤波器参数可以包括滤波器自适应方法、 滤波器 系数、 滤波器类型信息、 滤波器系数预测编码方法等, CU层 ALF控制标 识信息可以包括是否使用滤波器 CU层控制的标识信息、滤波器 CU层控制 方法及相关 CU是否使用滤波器进行滤波操作的标识信息等。  The loop filter related filter parameters may include a filter adaptation method, a filter coefficient, a filter type information, a filter coefficient predictive coding method, and the like, and the CU layer ALF control identification information may include whether to use the filter CU layer control. Identification information, filter CU layer control method, and identification information of whether or not the relevant CU uses a filter to perform a filtering operation.
其中, 所述方法还可以包括: 险证当前编码单元进行编码时所确定的 环路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波模式是否 相同; 如果不是, 则调整当前使用的参数集; 如果是, 则不调整当前使用 的参数集。  The method may further include: determining, by the risk, whether the loop filtering mode determined by the current coding unit is the same as the loop filtering mode determined when the previous coding unit performs coding; if not, adjusting the current use The parameter set; if it is, the currently used parameter set is not adjusted.
具体地, 验证对应当前编码单元进行编码时所确定环路滤波模式的参 数集是否存在, 如果是, 直接将当前使用的参数集调整为当前编码单元进 行编码时所确定环路滤波模式对应的参数集; 如果不是, 生成当前编码单 元进行编码时所确定环路滤波模式对应的参数集, 并将当前使用的参数集 调整为当前编码单元进行编码时所确定环路滤波模式对应的参数集。  Specifically, verifying whether a parameter set corresponding to the loop filtering mode determined by the current coding unit is encoded exists, and if yes, directly adjusting the currently used parameter set to a parameter corresponding to the loop filtering mode determined by the current coding unit for encoding If not, generating a parameter set corresponding to the loop filtering mode determined by the current coding unit for encoding, and adjusting the currently used parameter set to a parameter set corresponding to the loop filtering mode determined by the current coding unit for encoding.
这里, 险证当前编码单元进行编码时所确定的环路滤波模式, 与上一 个编码单元进行编码时所确定的环路滤波模式是否相同之前, 还可以动态 监控当前编码过程中可用资源的变化情况, 获得当前编码过程中的可用资 源信息; 根据所述可用资源信息, 确定当前编码单元进行编码时的环路滤 波模式。  Here, the loop filtering mode determined when the current coding unit performs coding is still dynamically monitored for the change of available resources in the current encoding process before the loop filtering mode determined when the previous coding unit performs encoding is the same. Obtaining the available resource information in the current encoding process; determining, according to the available resource information, a loop filtering mode when the current coding unit performs encoding.
其中, 所述方法还可以包括: 根据所获得的上一次编码过程中的信源 特性参数、 和编码器控制辅助参数, 确定当前编码过程中各图像或各视频 区段使用的环路滤波模式; 根据所述当前编码过程中各图像或各视频区段 所使用环路滤波模式对应的参数集, 分别对所述各图像或各视频区段进行 编码。 The method may further include: determining, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a loop filtering mode used by each image or each video segment in the current encoding process; According to each image or each video segment in the current encoding process Each of the images or video segments is encoded separately using a parameter set corresponding to the loop filtering mode.
这里, 还可以为当前编码过程中各图像或各视频区段所使用环路滤波 模式对应的参数集重新分配参数集索引序号; 根据所述重新分配参数集索 引序号后得到的各参数集, 分别对所述各图像或各视频区段进行编码。  Here, the parameter set index number may be re-allocated for the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process; and each parameter set obtained by re-allocating the parameter set index number is respectively Each of the images or video segments is encoded.
具体地, 根据所述各图像或各视频区段的环路滤波模式在当前编码过 程中的使用次数, 按照使用次数由多到少, 对所述各环路滤波模式进行排 序; 按照所述各环路滤波模式的排序顺序, 为所述各环路滤波模式对应的 参数集, 依次分配数值由 d、到大的参数集索引序号。  Specifically, according to the number of times the loop filtering mode of each image or each video segment is used in the current encoding process, the loop filtering modes are sorted according to the number of times of use; The sorting order of the loop filtering mode is to sequentially assign a parameter number of d to a large parameter set index number for the parameter set corresponding to each loop filtering mode.
相应的, 本发明还提供了一种编码器, 所述编码器包括: 确定模块、 生成模块和编码模块; 其中, 确定模块, 用于设置用于指示环路滤波在编 码过程中使用方式的环路滤波模式; 生成模块, 用于根据所述确定模块设 置的环路滤波模式, 生成参数集; 编码模块, 用于根据所述生成模块生成 的参数集, 进行编码。  Correspondingly, the present invention further provides an encoder, where the encoder includes: a determining module, a generating module, and an encoding module; wherein, the determining module is configured to set a ring for indicating a manner in which the loop filtering is used in the encoding process. a filtering module, configured to generate a parameter set according to the loop filtering mode set by the determining module, and an encoding module, configured to perform encoding according to the parameter set generated by the generating module.
具体地, 所述确定模块, 还用于确定两种或两种以上能够用于编码过 程的所述环路滤波模式; 生成模块, 还用于对于所述确定模块所确定的各 环路滤波模式, 分别生成包含有所述环路滤波模式的环路滤波标识信息的 一个或多个参数集; 编码模块, 还用于确定当前编码过程中所使用的环路 滤波模式并根据当前编码过程中所使用环路滤波模式对应的参数集, 进行 编码。  Specifically, the determining module is further configured to determine two or more types of the loop filtering modes that can be used in the encoding process, and the generating module is further configured to use the loop filtering mode determined by the determining module. Generating, respectively, one or more parameter sets including loop filtering identification information of the loop filtering mode; the encoding module is further configured to determine a loop filtering mode used in the current encoding process and according to the current encoding process The coding is performed using a parameter set corresponding to the loop filtering mode.
具体地, 所述确定模块, 还用于确定当前编码过程所使用的环路滤波 模式; 生成模块, 还用于生成包含有所述确定模块所确定环路滤波模式的 环路滤波标识信息的参数集; 编码模块, 还用于根据所述生成模块生成的 参数集, 进行编码。  Specifically, the determining module is further configured to determine a loop filtering mode used by the current encoding process, and the generating module is further configured to generate a parameter that includes loop filtering identifier information of the loop filtering mode determined by the determining module. The encoding module is further configured to perform encoding according to the parameter set generated by the generating module.
其中, 所述确定模块, 还用于根据下述因素中的一种或多种, 确定用 于指示环路滤波在编码过程中使用方式的环路滤波模式: 具体应用需求、 编码过程的可用计算资源与存储资源、 视频信源特性、 信源编码码率、 接 收端处理能力。 The determining module is further configured to determine according to one or more of the following factors: The loop filtering mode indicating the manner in which the loop filtering is used in the encoding process: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability.
其中, 所述生成模块, 还用于为所生成的参数集分配用于标识所述参 数集的参数集索引序号; 所述编码模块, 还用于将所述参数集的信息写入 码流, 在分片层编码过程中将所述参数集索引序号写入当前编码单元中的 分片层头信息, 并确定编码使用的滤波器, 将所述滤波器的参数写入到所 述分片层头信息。  The generating module is further configured to allocate a parameter set index number for identifying the parameter set to the generated parameter set; the encoding module is further configured to write the information of the parameter set into the code stream, Writing the parameter set index number into the slice header information in the current coding unit in the slice layer encoding process, and determining a filter used for encoding, and writing parameters of the filter to the slice layer Header information.
其中, 所述编码模块, 还用于采用如下方法确定编码使用的滤波器: 根据各候选滤波器的复杂度与去噪声性能, 对所有候选滤波器进行分组, 得到一个或多个候选滤波器组; 计算得到当前编码单元的图像重要性参数; 根据计算得到的图像重要性参数、 以及所得到的一个或多个候选滤波器组 , 为当前编码单元选择编码使用的滤波器。  The coding module is further configured to determine, by using the following method, a filter used for coding: grouping all candidate filters according to complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks. Calculating an image importance parameter of the current coding unit; selecting a filter used for encoding for the current coding unit according to the calculated image importance parameter and the obtained one or more candidate filter banks.
其中, 所述编码器还包括验证模块和调整模块, 其中, 调整模块, 用 于调整当前使用的参数集; 验证模块, 用于验证当前编码单元进行编码时 所确定的环路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波 模式是否相同, 并在不相同时, 启动所述调整模块。  The encoder further includes a verification module and an adjustment module, where the adjustment module is configured to adjust a currently used parameter set; and the verification module is configured to verify a loop filtering mode determined when the current coding unit performs coding, and Whether the loop filtering modes determined by one coding unit when encoding are the same, and when they are not the same, the adjustment module is started.
具体地, 所述调整模块, 还用于险证对应当前编码单元进行编码时所 确定环路滤波模式的参数集是否存在, 如果是, 直接将当前使用的参数集 调整为当前编码单元进行编码时所确定环路滤波模式对应的参数集; 如果 不是, 通过所述生成模块生成当前编码单元进行编码时所确定环路滤波模 式对应的参数集, 并将当前使用的参数集调整为当前编码单元进行编码时 所确定环路滤波模式对应的参数集。  Specifically, the adjusting module is further configured to: if the risk parameter corresponds to a parameter set of the loop filtering mode determined by the current coding unit, if yes, directly adjusting the currently used parameter set to the current coding unit for encoding And determining, by the generating module, a parameter set corresponding to the loop filtering mode determined by the current coding unit, and adjusting the currently used parameter set to the current coding unit The parameter set corresponding to the loop filtering mode determined at the time of encoding.
其中, 确定模块, 还用于根据所获得的上一次编码过程中的信源特性 参数和编码器控制辅助参数, 确定当前编码过程中各图像或各视频区段使 用的环路滤波模式; 所述编码模块, 还用于根据所述确定模块所确定的、 当前编码过程中各图像或各视频区段所使用环路滤波模式对应的参数集, 分别对所述各图像或各视频区段进行编码。 The determining module is further configured to determine, according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the last encoding process, each image or each video segment in the current encoding process a looping filter mode; the encoding module is further configured to: according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process determined by the determining module, respectively Each image or each video segment is encoded.
本发明还提供了一种对应上述编码方法的环路滤波解码方法, 所述方 法包括: 对参数集相关码流中环路滤波模式的环路滤波标识信息进行解码; 对分片层中环路滤波模式的环路滤波标识信息进行解码; 其中, 所述环路 滤波模式用于指示环路滤波在编码过程中的使用方式。  The present invention further provides a loop filter decoding method corresponding to the above coding method, the method comprising: decoding loop filter identification information of a loop filter mode in a parameter set related code stream; and performing a loop filter mode in a slice layer The loop filtering identification information is decoded; wherein the loop filtering mode is used to indicate the manner in which the loop filtering is used in the encoding process.
具体地, 所述对参数集相关码流中环路滤波模式的环路滤波标识信息 进行解码, 包括: 读取参数集相关码流中的比特, 得到用于标识所述环路 滤波标识信息的各语法单元的取值, 并将所述各语法单元的取值赋给所述 参数集数据结构中的对应变量。  Specifically, the decoding, in the loop filter mode, the loop filter identification information in the parameter set related code stream, includes: reading bits in the parameter set related code stream, and obtaining each of the loop filter identification information used to identify the loop filter identification information The values of the syntax units are assigned, and the values of the syntax units are assigned to corresponding variables in the parameter set data structure.
所述对分片层中环路滤波模式的环路滤波标识信息进行解码, 包括: 获得所述参数集中用于标识所述环路滤波标识信息的各语法单元的取值, 并将所述语法单元的取值传递给分片层数据结构的对应变量。  Decoding the loop filter identification information of the loop filtering mode in the slice layer, including: obtaining values of the syntax units used to identify the loop filter identification information in the parameter set, and using the syntax unit The value is passed to the corresponding variable of the slice layer data structure.
其中, 所述方法还包括: 根据解码得到的环路滤波标识信息, 对分片 层中的环路滤波器相关参数进行解析。  The method further includes: parsing the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
相应的, 本发明还提供了一种解码器, 所述解码器包括: 第一解码单 元和第二解码单元, 其中, 第一解码单元, 用于对参数集相关码流中环路 滤波模式的环路滤波标识信息进行解码; 第二解码单元, 用于对分片层中 环路滤波模式的环路滤波标识信息进行解码; 其中, 所述环路滤波模式用 于指示环路滤波在编码过程中的使用方式。  Correspondingly, the present invention further provides a decoder, the decoder comprising: a first decoding unit and a second decoding unit, where the first decoding unit is configured to loop a loop filtering mode in a parameter set related code stream The second filtering unit is configured to decode the loop filtering identification information of the loop filtering mode in the slice layer, where the loop filtering mode is used to indicate that the loop filtering is in the encoding process. How to use it.
具体地, 所述第一解码单元, 还用于读取参数集相关码流中的比特, 得到用于标识所述环路滤波标识信息的各语法单元的取值, 并将所述各语 法单元的取值赋给所述参数集数据结构中的对应变量。  Specifically, the first decoding unit is further configured to: read a bit in a parameter set related code stream, obtain a value of each syntax unit used to identify the loop filter identification information, and use the syntax unit The value is assigned to the corresponding variable in the parameter set data structure.
具体地, 所述第二解码单元, 还用于获得所述参数集中用于标识所述 环路滤波标识信息的各语法单元的取值, 并将所述语法单元的取值传递给 分片层数据结构的对应变量。 Specifically, the second decoding unit is further configured to obtain the parameter set for identifying the The loop filter identifies the value of each syntax unit of the information, and passes the value of the syntax unit to the corresponding variable of the slice layer data structure.
其中, 所述第二解码单元, 还用于根据解码得到的环路滤波标识信息, 对分片层中的环路滤波器相关参数进行解析。  The second decoding unit is further configured to parse the loop filter related parameters in the slice layer according to the decoded loop filter identification information.
以下将以环路滤波的应用之 ALF 为例, 对各实施例方法进行说 明。 其它环路滤波应用 (如像素点自适应加性偏移量补偿 (SAO, Sample Adaptive Offset ) )也可使用本发明方法及相应实施例取得复杂度与编码效 率之间的折衷。  The method of each embodiment will be described below by taking the ALF of the loop filtering application as an example. Other loop filtering applications (e.g., Sample Adaptive Offset Compensation (SAO)) can also achieve a trade-off between complexity and coding efficiency using the method of the present invention and corresponding embodiments.
实施例一  Embodiment 1
本实施例中, 详细说明上述环路滤波模式在参数集和分片层头信息的 组织和标识方法, 以及解码器对码流中对应所述环路滤波模式的环路滤波 标识信息的解析方法。  In this embodiment, the method for identifying and configuring the loop filter mode in the parameter set and the slice header information, and the method for analyzing the loop filter identification information corresponding to the loop filter mode in the code stream by the decoder are described in detail. .
本实施例中, 以在图像参数集( PPS , Picture Para meter Set ) 中使用变 长编码的方法标识对应所述 ALF模式的 ALF标识信息为例,说明环路滤波 模式在参数集的组织和标识方法。 类似的, 也可以在其它参数集的数据结 构中对环路滤波模式进行组合和标识。  In this embodiment, the ALF identification information corresponding to the ALF mode is identified by using a method of variable length coding in a picture parameter set (PPS, Picture Parameter Set) as an example to illustrate the organization and identification of the loop filter mode in the parameter set. method. Similarly, loop filtering modes can be combined and identified in the data structure of other parameter sets.
其中, 所述 ALF标识信息包括用于指示 ALF标识方式的参数, 或者包 含用于指示 ALF标识方式的参数和该参数的辅助参数。例如,用于指示 ALF 标识方式的参数可以包括表 1 中的 adaptive— loop— filter— enable— flag 和 adaptive— loop— filter_pattern—idx , 所述参数的辅助参数可以是表 1 中的 adaptive— loop— filter_period。 只有在表 2所示的 ALF模式 3的 ALF标识信 息中需要包含辅助参数。  The ALF identification information includes a parameter for indicating an ALF identification mode, or a parameter for indicating an ALF identification mode and an auxiliary parameter of the parameter. For example, the parameters used to indicate the ALF identification mode may include adaptive_loop_filter_enable_flag and adaptive_loop_filter_pattern_idx in Table 1, and the auxiliary parameters of the parameter may be adaptive_loop in Table 1. Filter_period. Only the auxiliary parameters need to be included in the ALF identification information of ALF mode 3 shown in Table 2.
具体地,本实施例中 ALF标识信息在 PPS中的标识方式如下表 1所示。 pic_parameter— set— rbsp( ) { Descriptor pic_parameter— set— id ue(v) seq_parameter— set— id ue(v) entropy— coding— mode— flag u(l) Specifically, the manner of identifying the ALF identification information in the PPS in this embodiment is as shown in Table 1. Pic_parameter— set— rbsp( ) { Descriptor pic_parameter— set— id ue(v) seq_parameter— set— id ue(v) entropy— coding— mode—flag u(l)
num—ref—idx— 10— default— active— minusl ue(v) num ref idx 11 default active minusl ue(v) pic_init_qp_minus26 se(v) constrained— intra_pred— flag u(l)  Num—ref—idx— 10— default— active— minusl ue(v) num ref idx 11 default active minusl ue(v) pic_init_qp_minus26 se(v) constrained—intra_pred—flag u(l)
adaptive— loop— filter— enable— flag u(l)  Adaptive— loop— filter— enable—flag u(l)
if (adaptive— loop— filter— enable— flag) {  If (adaptive- loop-filter-enable-flag) {
adaptive— loop— filter_pattern— idx ue(v) if (adaptive— loop— filter_pattern— idx == 3) {  Adaptive— loop— filter_pattern— idx ue(v) if (adaptive— loop— filter_pattern— idx == 3) {
adaptive— loop— filter_period ue(v)  Adaptive— loop— filter_period ue(v)
}  }
}  }
rbsp— trailing— bits( )  Rbsp— trailing— bits( )
}  }
表 1  Table 1
在表 1 中, 所添加的 ALF 标识信息如第 9-15 行所示, "描述符 ( Descriptor )" 栏给出了各语法单元取值的二进制表示方法。  In Table 1, the added ALF identification information is shown in lines 9-15, and the "Descriptor" column gives a binary representation of the values of each syntax unit.
表 1 中 , pic_parameter— set— id 、 seq_parameter— set— id 、 entropy— coding— mode— flag 、 num— ref— idx— 10— default— active— minusl 、 num— ref— idx— 11— default— active— minusl 、 pic_init_qp_minus26 、 constrained— intra_pred— flag 、 adaptive— loop— filter— enable— flag 、 adaptive— loop— filter_pattern— idx、 adaptive— loop— filter_period分另 ll表示需要写 入码流的语法单元的名称。  In Table 1, pic_parameter_set_id, seq_parameter_set_id, entropy_coding_mode_flag, num_ref_idx-10_ default-active- minusl, num-ref-idx-11-default-active- Miner1, pic_init_qp_minus26, constrained_intra_pred_flag, adaptive_loop_filter-enable_flag, adaptive_loop_filter_pattern_idx, adaptive_loop_filter_period, respectively, ll denotes the name of the syntax unit that needs to be written to the stream.
具体地, adaptive— loop— filter— enable— flag用于标识是否允许图像中的所 有分片使用 ALF。 在 adaptive— loop— filter— enable— flag的值为 0时, 图像中 所有分片均不可使用 ALF, 此时, 可以认为对应一种特殊的 ALF模式, 该 ALF 模 式 表 示 图 像 中 所 有 分 片 不 可 使 用 ALF ; adaptive— loop— filter— enable— flag的值为 1时,图像中所有分片均可使用 ALF。 adaptive— loop— filter_pattern—idx用于标识图像中所有分片所使用的 ALF 模式, adaptive— loop— filter_pattern—idx的值可以为各 ALF模式的索引序号 (如表 2中的 0、 1、 2、 3 ), 具体地,各 ALF模式的索引序号与分片层 ALF 信息标识方式的对应关系如表 2所示。 Specifically, the adaptive_loop_filter_enable_flag is used to identify whether all fragments in the image are allowed to use ALF. When the value of adaptive_loop_filter-enable_flag is 0, ALF cannot be used for all fragments in the image. In this case, it can be considered to correspond to a special ALF mode, which means that all fragments in the image are not available. ALF ; Adaptive—loop—filter—enable—When the value of flag is 1, all fragments in the image can use ALF. Adaptive_loop—filter_pattern—idx is used to identify the ALF mode used by all fragments in the image. The value of adaptive_loop_filter_pattern—idx can be the index number of each ALF mode (such as 0, 1, 2 in Table 2). 3) Specifically, the correspondence between the index number of each ALF mode and the identifier mode of the slice layer ALF information is as shown in Table 2.
Figure imgf000022_0001
Figure imgf000022_0001
表 2  Table 2
其中, 分片所在图像的 POC值可以根据参数集、 分片头信息中的相关 参数直接计算得到。 这里, 分片层信息中的相关参数可以包括: 序列参数 集中 pic— order— cnt— type和 log2—max_pic— order— cnt—lsb—minus4等语义单元 的取值、 分片层头信息中的语义单元 pic— order— cnt— lsb。  The POC value of the image in which the fragment is located can be directly calculated according to the relevant parameters in the parameter set and the fragment header information. Here, the relevant parameters in the slice layer information may include: the value of the semantic unit such as pic_order_cnt_type and log2_max_pic_order-cnt-lsb-minus4 in the sequence parameter set, and the semantics in the slice header information Unit pic—order—cnt—lsb.
adaptive— loop— filter_period用于标识 ALF的刷新率, 即按照播放顺序, 每隔 (adaptive— loop— filter_period - 1)幅图像,允许对紧接着的图像使用 ALF。 在 adaptive— loop— filter_pattern—idx 的值为 3 时, 需要在 PPS 中设置 adaptive— loop— filter_period的值。 其中, ALF的刷新周期可以根据具体应用 需求、 编码过程的可用计算资源与存储资源、 视频信源特性、 信源编码码 率、 接收端处理能力等因素预先配置。 例如, 对于移动视频应用, 终端设 备检测到电池电量充足(如 80%电量剩余) 时, 可直接告知编码器使用取 值较小的刷新周期(如 4、 8等) 以获得较高的压缩编码效率; 反之, 终端 设备检测到电池电量不足(如 20%电量剩余) 时, 可直接告知编码器使用 取值较大的刷新周期 (如 16、 32等), 以尽量降低编码器电量消耗, 并保 证一定的编码效率。 Adaptive_loop—filter_period is used to identify the refresh rate of ALF, that is, in the order of playback. Every (adaptive-loop-filter_period - 1) image allows ALF to be used for the next image. When the value of adaptive_loop_filter_pattern_idx is 3, the value of adaptive_loop_filter_period needs to be set in PPS. The refresh period of the ALF may be pre-configured according to specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability. For example, for a mobile video application, when the terminal device detects that the battery is fully charged (such as 80% power remaining), it can directly inform the encoder to use a refresh cycle with a smaller value (such as 4, 8, etc.) to obtain a higher compression code. Efficiency; on the other hand, when the terminal device detects that the battery is low (such as 20% power remaining), it can directly inform the encoder to use a larger refresh period (such as 16, 32, etc.) to minimize the power consumption of the encoder, and Guarantee a certain coding efficiency.
上述 ALF标识信息的解码是通过采用表 1 中 "Descriptor" 给出的二 进制表示方法的译码方式, 将从码流中读取的二进制符号转换为对应语法 单元项的取值。 具体地, 如图 2所示, 解码器对 PPS中所添加的 ALF标识 信息进行解析的流程, 具体包括如下步驟:  The above ALF identification information is decoded by using the binary representation method given by "Descriptor" in Table 1, and the binary symbols read from the code stream are converted into the values of the corresponding syntax unit items. Specifically, as shown in FIG. 2, the process of parsing the ALF identification information added by the decoder in the PPS includes the following steps:
S201 , 解码器读取 PPS相关码流中的比特, 使用 u(l)所对应的译码方 法得到语法单元 adaptive— loop— filter— enable— flag对应的取值,并^1得到的值 赋给 PPS层数据结构中的变量 adaptive— loop— filter— enable— flag; S201, the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to u(l) to obtain the value corresponding to the syntax unit adaptive_loop_filter-enable_flag, and the value obtained by ^ 1 is assigned to Variable in the data structure of the PPS layer adaptive_loop_filter-enable_flag;
5202 ,解码器判断变量 adaptive_loop_filter_enable_flag的取值是否为 1 , 如果是, 则执行 S203; 如果不是, 则结束码流中 PPS的 ALF标识信息解析 过程;  5202, the decoder determines whether the value of the variable adaptive_loop_filter_enable_flag is 1, if yes, executing S203; if not, ending the ALF identification information parsing process of the PPS in the code stream;
5203 , 解码器读取 PPS相关码流中的比特, 使用 ue(v)所对应的译码方 法得到语法单元 adaptive— loop— filter_pattern—idx对应的取值,并^1得到的值 赋给 PPS层数据结构中的变量 adaptive— loop— filter_pattern—idx; 5203, the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to ue(v) to obtain the value corresponding to the syntax unit adaptive_loop_filter_pattern_idx, and the value obtained by ^ 1 is assigned to the PPS layer. The variable in the data structure adaptive_loop_filter_pattern_idx;
5204,解码器判断变量 adaptive— loop— filter_pattem—idx的取值是否为 3 , 如果是, 则执行 S205 , 继续解析 ALF标识信息; 否则, 结束码流中 PPS 的 ALF标识信息解析过程; 5204, the decoder determines whether the value of the variable adaptive_loop_filter_pattem_idx is 3, and if yes, executing S205, and continuing to parse the ALF identification information; otherwise, ending the PPS in the code stream ALF identification information parsing process;
S205 , 解码器读取 PPS相关码流中的比特, 使用 ue(v)所对应的译码方 法得到语法单元 adaptive— loop— filter_period对应的取值,并将得到的值赋给 PPS层数据结构中的变量 adaptive— loop— filter_period, 并结束码流中 PPS的 ALF标识信息解析过程。  S205, the decoder reads the bit in the PPS-related code stream, and uses the decoding method corresponding to ue(v) to obtain the value corresponding to the syntax unit adaptive_loop_filter_period, and assigns the obtained value to the PPS layer data structure. The variable adaptive_loop_filter_period, and ends the ALF identification information parsing process of the PPS in the code stream.
根据 PPS中的 ALF标识信息、 各 ALF模式对应的分片层 ALF信息标 识方式, 分片层 ALF信息标识方式如表 3所示。 According to the ALF identification information in the PPS and the fragmentation layer ALF information identification manner corresponding to each ALF mode, the fragmentation layer ALF information identification manner is as shown in Table 3.
Figure imgf000025_0001
Figure imgf000025_0001
alf_param() } Alf_param() }
}  }
if( deblocking— filter— control_present— flag ) {  If( deblocking— filter— control_present— flag ) {
disable— deblocking— filter— idc ue(v) if( disable— deblocking— filter— idc != 1 ) {  Disable— deblocking—filter— idc ue(v) if( disable— deblocking— filter— idc != 1 ) {
slice— alpha— cO— offset— div2 se(v) slice— beta— offset— div2 se(v) Slice— alpha— cO— offset— div2 se(v) slice— beta—offset— div2 se(v)
} }
}  }
if( slice— type = = B )  If( slice_ type = = B )
collocated— from— 10— flag u(l)  Collocated— from— 10 — flag u(l)
} else  } else
if( entropy— coding— mode— flag && slice— type != I)  If( entropy— coding— mode— flag && slice— type != I)
cabac init idc ue(v)  Cabac init idc ue(v)
}  }
表 3  table 3
表 3中, 第 27-35行为添加到分片层中的 ALF标识信息。 alf_param() 为分片层中滤波器相关参数的数据结构, "Descriptor"栏给出了分片层中各 语法单元取值的二进制表示方法。  In Table 3, the 27th-35th behavior adds the ALF identification information to the slice layer. Alf_param() is the data structure of the filter-related parameters in the slice layer. The "Descriptor" column gives the binary representation of the values of the syntax units in the slice layer.
分片层头信息的解码过程中, 分片层信息中 ALF标识信息的解析是使 用表 3中 "Descriptor" 给出的二进制表示方法的译码方法将从码流中读取 的二进制符号转换为对应语法单元项的取值。 具体地, 如图 3 所示, 解析 分片层信息中 ALF标识信息的流程具体可以包括如下步驟:  In the decoding process of the slice header information, the parsing of the ALF identification information in the slice layer information is a decoding method using the binary representation method given by "Descriptor" in Table 3, converting the binary symbols read from the code stream into Corresponds to the value of the syntax unit item. Specifically, as shown in FIG. 3, the process of parsing the ALF identification information in the fragmentation layer information may specifically include the following steps:
S301 , 解 码 器 获 得 PPS 中 ALF 相 关 语 法 单 元 adaptive— loop— filter— enable— flag的取值, 并将其值传递给分片层数据结构中 相应变量 adaptive— loop— filter— enable— flag;  S301, the decoder obtains the value of the ALF related syntax element adaptive_loop_filter-enable_flag in the PPS, and passes the value to the corresponding variable adaptive_loop_filter_enable_flag in the slice layer data structure;
S302,解码器判断所述变量 adaptive_loop_filter_enable_flag的取值是否 为 1 , 如果是, 则执行步驟 S303 ; 否则, 结束分片层信息中 ALF标识信息 的解析过程;  S302, the decoder determines whether the value of the variable adaptive_loop_filter_enable_flag is 1, if yes, step S303 is performed; otherwise, the parsing process of the ALF identification information in the slice layer information is ended;
S303 , 解 码 器 获 得 PPS 中 ALF 相 关 语 法 单 元 adaptive— loop— filter_pattern—idx的取值, 并将其值传递给分片层数据结构中 相应变量 adaptive— loop— filter_pattern—idx; S303, the decoder obtains the ALF related syntax unit in the PPS Adaptive_loop—filter_pattern—value of idx, and pass its value to the corresponding variable adaptive_loop_filter_pattern_idx in the slice layer data structure;
S304,解码器判断所述变量 adaptive— loop— filter_pattern—idx的取值是否 为 0, 如果是, 则执行 S308; 如果不是, 执行 S305;  S304, the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 0, if yes, execute S308; if not, execute S305;
S305 ,解码器判断所述变量 adaptive— loop— filter_pattern—idx的取值是否 为 1 , 并且当前分片是否是帧内编码分片, 如果是, 则执行 S308; 如果不 是, 执行 S306;  S305, the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 1, and whether the current fragment is an intra-coded fragment, and if so, executing S308; if not, executing S306;
5306,解码器判断所述变量 adaptive— loop— filter_pattern—idx的取值是否 为 2、 且当前分片所在 NAL数据单元中语法单元 nal— ref— idc对应变量的取 值是否不等于 0, 如果是, 则执行 S308; 如果不是, 执行 S307;  5306, the decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 2, and whether the value of the corresponding variable of the syntax unit nal_ref_idc in the NAL data unit of the current fragment is not equal to 0, if , then execute S308; if not, execute S307;
5307,解码器判断所述变量 adaptive— loop— filter_pattern—idx的取值是否 为 3、 且当前分片所在图像的 POC 值是否为 PPS 层数据结构中变量 adaptive— loop— filter_period取值的整数倍, 如果是, 执行 S308; 如果不是, 结束分片层信息中 ALF标识信息的解析过程;  5307. The decoder determines whether the value of the variable adaptive_loop_filter_pattern_idx is 3, and whether the POC value of the image of the current fragment is an integer multiple of the value of the variable adaptive_loop_filter_period in the data structure of the PPS layer. If yes, execute S308; if not, end the parsing process of the ALF identification information in the slice layer information;
S308 , 解码器解析分片层中 ALF的相关参数, 当前流程结束。  S308. The decoder parses the relevant parameters of the ALF in the slice layer, and the current process ends.
具体地, 根据分片层中的 ALF标识信息, 判断需要解析分片层中 ALF 的相关参数, 则解码器解析分片层中 ALF的相关参数, 这里, ALF的相关 参数可以包括:用于表示分片层码流中是否存在 ALF参数的标识信息、 ALF 相关滤波器参数、 CU层 ALF控制标识信息等, 这些信息均包含在数据结 构 alf_param()中。  Specifically, according to the ALF identification information in the fragmentation layer, it is determined that the relevant parameters of the ALF in the fragmentation layer need to be parsed, and the decoder parses the relevant parameters of the ALF in the fragmentation layer. Here, the related parameters of the ALF may include: Whether the identification information of the ALF parameter, the ALF related filter parameter, the ACL layer ALF control identification information, etc. exist in the slice layer code stream, and the information is included in the data structure alf_param().
其中, 上述分片层信息中 ALF标识信息的解析过程中, 所述解码器使 用数据结构 alf_param()中各语法单元取值的二进制表示方法对应的译码方 法, 获得各语法单元的取值, 并将其取值传递给该数据结构中对应变量。  In the parsing process of the ALF identification information in the slice layer information, the decoder obtains the value of each syntax unit by using a decoding method corresponding to the binary representation method of each syntax unit in the data structure alf_param(). And pass its value to the corresponding variable in the data structure.
实施例二  Embodiment 2
本实施例的编码器使用单一的 ALF模式对输入视频源进行编码, 以适 应可用信源编码码率、 编解码器对计算复杂度和编码效率之间的折衷要求, 如图 4所示, 采用单一的 ALF模式进行一次编码的具体流程, 包括如下步 驟: The encoder of this embodiment encodes an input video source using a single ALF mode to suit The trade-off between the codec rate and the codec's computational complexity and coding efficiency should be used. As shown in Figure 4, the specific process of encoding once using a single ALF mode includes the following steps:
S401 , 发送端确定编码器进行编码时使用的 ALF模式;  S401. The sending end determines an ALF mode used when the encoder performs encoding.
具体地, 发送端确定 ALF模式的主要依据包括但不限于下述因素中的 一种或多种: 具体应用需求、 编码过程的可用计算资源与存储资源、 视频 信源特性、 信源编码码率、 接收端处理能力等, 如此, 便能够选择复杂度 与编码效率之间折衷性能适中的 ALF模式。  Specifically, the primary basis for determining the ALF mode by the transmitting end includes, but is not limited to, one or more of the following factors: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, and source coding rate. The receiving end processing capability, etc., enables the selection of an ALF mode with a compromise between complexity and coding efficiency.
其中, 所述具体应用需求为视频通信应用中用于保证接收端用户体验 而提出的系统性能指标、 用于系统控制的传输网络能力和终端处理能力等 信息, 主要可以包括为保证用户体验质量所设置的参数限制, 如端到端时 延、 压缩效率等参数; 所述编码过程的可用计算资源与存储资源主要可以 包括: 处理器的负荷、 可用存储器的存储容量、 供电系统状态 (如交流电 源供电、 电池供电及剩余电量)、 整机能耗状态等参数, 这些参数均可通过 终端中的状态监测和检测模块获得; 所述视频信源特性为用于反映视频信 源统计特性的相关参数, 主要可以包括: 图像活动度、 编码复杂度、 反映 运动剧烈程度的参数、 反映场景切换的参数等; 所述信源编码码率具体为 根据信道状态等因素确定的信源压缩编码的目标码率; 所述接收端处理能 力包括用于表示接收端的可用计算资源、 供电方式、 整机能耗等因素的确 切信息或估计信息, 该估计信息可根据应用场景 (如手机终端上的移动视 频应用)估计得到。  The specific application requirement is a system performance indicator, a transmission network capability, and a terminal processing capability, which are proposed for ensuring the user experience of the receiving end in the video communication application, and may be mainly included to ensure the quality of the user experience. Set parameter limits, such as end-to-end delay, compression efficiency, etc. The available computing resources and storage resources of the encoding process may include: processor load, available memory storage capacity, power supply system status (such as AC power) Parameters such as power supply, battery power and remaining power, and energy consumption status of the whole machine. These parameters can be obtained through the status monitoring and detection module in the terminal. The video source characteristics are related parameters for reflecting the statistical characteristics of the video source. The method may include: an image activity degree, a coding complexity, a parameter reflecting a motion severity, a parameter reflecting a scene switching, and the like; the source coding code rate is specifically a target code of a source compression coding determined according to a channel state and the like. Rate; the receiving end processing capability includes The estimated information or the estimated information indicating the available computing resources, the power supply mode, and the energy consumption of the whole device at the receiving end, and the estimated information may be estimated according to an application scenario (such as a mobile video application on the mobile terminal).
或者, 可以根据实际应用需要, 直接在发送端配置编码器进行编码时 所使用的一种 ALF模式, 此时,发送端确定自身所配置的 ALF模式为编码 器进行编码时使用的 ALF模式。  Alternatively, an ALF mode used by the encoder to perform encoding may be directly configured on the transmitting end according to actual application requirements. At this time, the transmitting end determines that the ALF mode configured by itself is the ALF mode used when the encoder performs encoding.
这里, 所述 ALF模式可以是实施例一中表 2所示的任意一种, 也可以 是实施例一中 adaptive— loop— filter— enable— flag的值为 0时对应的、表示图像 中所有分片均不可使用 ALF的 ALF模式。 Here, the ALF mode may be any one shown in Table 2 in Embodiment 1, or In the first embodiment, the value of adaptive_loop_filter-enable_flag is 0, which means that ALF mode is not available for all fragments in the image.
5402, 编码器生成对应所述 ALF模式的参数集, 该参数集中包含有所 述 ALF模式的 ALF标识信息,并为所生成的参数集分配用于标识所述参数 集的参数集索引序号;  S402, the encoder generates a parameter set corresponding to the ALF mode, where the parameter set includes ALF identification information of the ALF mode, and allocates a parameter set index number for identifying the parameter set for the generated parameter set;
5403 , 编码器根据所生成的参数集, 进行编码。  5403. The encoder performs encoding according to the generated parameter set.
具体地, 编码器将所述参数集的信息写入码流, 在分片层编码过程中 将所述参数集索引序号写入当前编码单元中的分片层头信息, 并确定编码 使用的滤波器, 将所述滤波器的参数写入到所述分片层头信息。  Specifically, the encoder writes the information of the parameter set into the code stream, writes the parameter set index number into the slice layer header information in the current coding unit, and determines the filtering used by the coding in the slice layer coding process. And writing parameters of the filter to the slice header information.
这里, 确定编码使用的滤波器的过程, 可以通过现有的方法实现, 典 型方法如基于率失真准则的分片层分块 /分区域滤波器选择方法, 也可以通 过下述实施例四所述的方法实现。  Here, the process of determining the filter used for encoding may be implemented by an existing method, such as a slice layer block/sub-region filter selection method based on rate distortion criterion, or may be described in the following fourth embodiment. Method implementation.
这里, 编码单元可以是当前正在进行编码处理的图像或当前正在编码 处理的图像的分片。  Here, the coding unit may be an image of an image currently being subjected to encoding processing or a slice of an image currently being encoded.
需要说明的是, 本实施例中所提到的 ALF模式是基于实施例一中所提 到的 ALF模式, 本实施例中编码器编码得到的码流可以通过实施例一提供 的解码方法进行解码。  It should be noted that the ALF mode mentioned in this embodiment is based on the ALF mode mentioned in the first embodiment. In this embodiment, the code stream obtained by the encoder coding can be decoded by the decoding method provided in Embodiment 1. .
实施例三  Embodiment 3
本实施例的编码器综合使用多种 ALF模式对输入视频源进行编码, 以 适应可用信源编码码率、 编解码器对计算复杂度和编码效率之间的折衷要 求。  The encoder of this embodiment uses a plurality of ALF modes to encode the input video source to accommodate the tradeoff between the available source code rate, the codec's computational complexity, and the coding efficiency.
如图 5所示, 采用多种 ALF模式进行一次编码的具体流程, 可以包括 如下步驟:  As shown in FIG. 5, the specific process of performing coding in multiple ALF modes may include the following steps:
S501 , 编码器生成对应各 ALF模式的多个参数集, 并为所生成的各参 数集分配参数集索引序号; 具体地, 所述各 ALF模式包括 5种 ALF模式, 分别是实施例一表 2 所示的 4种 ALF模式, 和实施例一中 adaptive— loop— filter— enable— flag的值 为 0时对应的、 表示图像中所有分片均不可使用 ALF的 ALF模式。 S501. The encoder generates a plurality of parameter sets corresponding to each ALF mode, and allocates a parameter set index sequence number for each generated parameter set. Specifically, each of the ALF modes includes five ALF modes, which are respectively four ALF modes shown in Table 2 of the first embodiment, and corresponding to the value of the adaptive_loop_filter_enable_flag in the first embodiment. , means that ALF mode of ALF is not available for all shards in the image.
其中, 所述 ALF模式与所述参数集为——对应、 或一多对应的关系, 即对应一种 ALF模式, 可以生成一种或多种参数集。 特殊地, 对于实施例 一中表 2的 ALF模式 3 , 可以生成对应不同 ALF刷新周期的多个参数集。  The ALF mode and the parameter set are - corresponding, or a multi-corresponding relationship, that is, corresponding to an ALF mode, one or more parameter sets may be generated. Specifically, for the ALF mode 3 of Table 2 in the first embodiment, a plurality of parameter sets corresponding to different ALF refresh periods can be generated.
在步驟 501之前, 可以预先在发送端配置上述各 ALF模式, 即将上述 各 ALF模式的 ALF标识信息预先配置到发送端,如此,编码器可以根据发 送端中配置的各 ALF模式, 生成对应的多个参数集。  Before the step 501, the foregoing ALF mode may be configured in advance on the sending end, that is, the ALF identification information of each ALF mode is pre-configured to the transmitting end, so that the encoder can generate corresponding multiple according to each ALF mode configured in the sending end. Parameter sets.
5502, 发送端为编码器确定初始使用的 ALF模式, 所述编码器根据所 述发送端确定的 ALF模式, 确定初始使用的参数集;  S502: The sending end determines, for the encoder, an initially used ALF mode, where the encoder determines an initially used parameter set according to the ALF mode determined by the sending end.
这里, 发送端为编码器确定初始使用的 ALF模式的具体实现过程与实 施例二中 S401的具体实现过程相似, 不再赘述。  Here, the specific implementation process of the ALF mode used by the transmitting end to determine the initial use of the encoder is similar to the specific implementation process of the S401 in the second embodiment, and details are not described herein.
5503 , 编码器根据当前所使用的参数集, 对当前编码单元进行编码; 具体地, 编码器将当前所使用的参数集的信息写入码流, 在分片层编 码过程中将所述参数集的参数集索引序号写入当前编码单元中的分片层头 信息, 并确定编码使用的滤波器, 将所述滤波器的参数写入到所述分片层 头信息。  S503. The encoder encodes the current coding unit according to the currently used parameter set. Specifically, the encoder writes information about the currently used parameter set into the code stream, and the parameter set is used in the slice layer coding process. The parameter set index number is written into the slice header information in the current coding unit, and the filter used for encoding is determined, and the parameters of the filter are written to the slice header information.
对于第一个编码单元, 编码器将所确定初始使用的参数集的信息写入 码流, 在分片层编码过程中将所述参数集的参数集索引序号写入第一个编 码单元包含的各分片的头信息中, 并确定编码使用的滤波器, 将所述滤波 器的参数写入到所述分片层头信息。  For the first coding unit, the encoder writes information of the initially used parameter set to the code stream, and writes the parameter set index number of the parameter set to the first coding unit in the slice layer coding process. In the header information of each slice, a filter used for encoding is determined, and parameters of the filter are written to the slice header information.
5504, 编码器判断输入的视频序列是否已编码完成, 如果是, 则编码 器调用结束; 如果不是, 继续执行 S505。  5504, the encoder determines whether the input video sequence has been encoded, and if so, the encoder call ends; if not, continues to execute S505.
这里, 可以通过判断是否存在未编码的编码单元, 确定输入的视频序 列是否编码完成。 Here, the input video sequence can be determined by judging whether there is an uncoded coding unit. Whether the column is encoded or not.
这里, 所述编码单元可以是图像。 由于在编码前是将图像划分为一个 或多个分片, 因此, 所述编码单元还可以是图像的一个分片。  Here, the coding unit may be an image. Since the image is divided into one or more slices before encoding, the encoding unit may also be a slice of the image.
5505 , 发送端动态监控编码过程中可用资源的变化情况, 获得编码过 程中的可用资源信息。  5505. The sender dynamically monitors the change of available resources in the encoding process, and obtains available resource information in the encoding process.
5506, 编码器根据发送端获得的可用资源信息, 动态判断是否调整编 码过程中所使用的 ALF模式, 如果是, 则继续 S507; 否则, 返回 S503; 这里, 所述可用资源为实施例二 S401中确定 ALF模式所依据的因素。 具体地, 所述编码器可采用与实施例二 S401相同的方法, 确定当前可 用资源条件下的 ALF模式。如果所述编码器当前确定的 ALF模式、与当前 正在使用的 ALF模式不同, 则判断需要调整 ALF模式,如果所述编码器当 前确定的 ALF模式、 与当前正在使用的 ALF模式相同, 判断不需要调整 ALF模式。  5506, the encoder dynamically determines whether to adjust the ALF mode used in the encoding process according to the available resource information obtained by the sending end. If yes, proceed to S507; otherwise, return to S503; where the available resource is in the second embodiment S401. Determine the factors on which the ALF mode is based. Specifically, the encoder can determine the ALF mode under the current available resource condition by using the same method as the second embodiment S401. If the ALF mode currently determined by the encoder is different from the ALF mode currently being used, it is determined that the ALF mode needs to be adjusted. If the ALF mode currently determined by the encoder is the same as the ALF mode currently being used, it is determined that the ALF mode is not required. Adjust the ALF mode.
5507, 编码器验证当前确定的 ALF模式对应的参数集是否存在, 如果 是, 则继续 S509, 否则, 继续 S508;  5507, the encoder verifies whether the currently determined parameter set corresponding to the ALF mode exists, and if yes, continues S509, otherwise, continues to S508;
例如, 所述 ALF模式未在先前的过程中使用时, 可能会不存在对应该 ALF模式的参数集。  For example, when the ALF mode is not used in the previous process, there may be no parameter set corresponding to the ALF mode.
具体地, 编码器验证当前确定的 ALF模式对应的参数集是否存在, 具 体包括: 验证是否有参数集包含当前所确定 ALF模式的 ALF标识信息,如 果是, 则对应当前所确定 ALF模式的参数集存在; 否则, 对应当前所确定 ALF模式的参数集不存在。  Specifically, the encoder verifies whether the currently determined parameter set corresponding to the ALF mode exists, and specifically includes: verifying whether the parameter set includes the ALF identification information of the currently determined ALF mode, and if yes, the parameter set corresponding to the currently determined ALF mode. Exist; otherwise, the parameter set corresponding to the currently determined ALF mode does not exist.
例如,如果当前确定的 ALF模式为实施例一中表 2所示的 ALF模式 3 , 则将验证是否有参数集包含的变量 adaptive— loop— filter_pattern—idx取值为 3 、 以 及 该 参 数 集 是 否 包 含 adaptive— loop— filter_period 和 adaptive— loop— filter_period的取值是否与预设的 ALF刷新周期相同; 如果 是, 则当前确定的 ALF模式对应的参数集存在, 否则, 不存在与当前确定 的 ALF模式对应的参数集。 For example, if the currently determined ALF mode is the ALF mode 3 shown in Table 2 in the first embodiment, it will be verified whether the parameter set contains a variable adaptive_loop_filter_pattern_idx with a value of 3, and whether the parameter set contains Adaptive—loop—filter_period and adaptive—loop—whether the value of filter_period is the same as the preset ALF refresh period; If yes, the parameter set corresponding to the currently determined ALF mode exists. Otherwise, there is no parameter set corresponding to the currently determined ALF mode.
5508, 编码器生成对应所述 ALF模式的参数集, 并为所生成的参数集 分配参数集索引序号;  S508. The encoder generates a parameter set corresponding to the ALF mode, and allocates a parameter set index sequence number to the generated parameter set.
例如,如果当前确定的 ALF模式为实施例一中表 2所示的 ALF模式 3 , 则 生 成 满 足 如 下 条 件 的 参 数 集 : 所 包 含 的 变 量 adaptive— loop— filter_pattern—idx 取 值 为 3 、 且 包 含 变 量 adaptive— loop— filter_period和该变量 adaptive— loop— filter_period的取值与预 设的 ALF刷新周期相同。  For example, if the currently determined ALF mode is the ALF mode 3 shown in Table 2 in the first embodiment, a parameter set that satisfies the following conditions is generated: The included variable adaptive_loop_filter_pattern_idx has a value of 3 and contains variables Adaptive—loop—filter_period and the variable adaptive_loop—filter_period have the same value as the preset ALF refresh period.
5509, 编码器将当前使用的参数集调整为当前所确定 ALF模式对应的 参数集, 并跳转至步驟 S503。  S509. The encoder adjusts the currently used parameter set to the parameter set corresponding to the currently determined ALF mode, and jumps to step S503.
本实施例可应用于发送端计算资源充足、 对复杂度敏感度较低, 但接 收端计算能力有限、 对复杂度控制有较高要求的应用。 例如, 移动手持电 视、 移动终端的视频下载播放等。  This embodiment can be applied to applications where the computing resources of the transmitting end are sufficient and the sensitivity to the complexity is low, but the computing capacity of the receiving end is limited and the complexity control is high. For example, mobile handheld TV, video download and playback of mobile terminals, and the like.
需要说明的是, 本实施例中所提到的 ALF模式是基于实施例一中所提 到的 ALF模式, 本实施例中编码器编码得到的码流可以通过实施例一提供 的解码方法进行解码。  It should be noted that the ALF mode mentioned in this embodiment is based on the ALF mode mentioned in the first embodiment. In this embodiment, the code stream obtained by the encoder coding can be decoded by the decoding method provided in Embodiment 1. .
实施例四  Embodiment 4
本实施例对编码过程中选择滤波器的实现过程做详细说明。  This embodiment describes in detail the implementation process of selecting a filter in the encoding process.
具体地, 如图 6所示, 确定编码过程所使用滤波器的具体流程, 可以 包括如下步驟:  Specifically, as shown in FIG. 6, determining a specific process of the filter used in the encoding process may include the following steps:
S601 , 编码器在确定所使用的 ALF模式后, 根据各候选滤波器的复杂 度与去噪声性能, 对所有候选 ALF进行分组, 得到一个或多个候选滤波器 组;  S601. After determining the used ALF mode, the encoder groups all candidate ALFs according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks.
具体地, 所述编码器对候选滤波器的分组过程, 可以包括: 根据复杂 度由低到高依次对候选滤波器进行排序, 得到对应不同复杂度区段的各候 选滤波器组, 再按照去噪声性能由高到低依次对所述候选滤波器组中各候 选滤波器进行排序; Specifically, the grouping process of the encoder to the candidate filter may include: according to the complexity The candidate filters are sorted in order from low to high, and each candidate filter bank corresponding to different complexity segments is obtained, and then each candidate filter in the candidate filter group is sequentially performed according to the denoising performance from high to low. Sort
或者, 根据去噪声能力由高到低依次对候选滤波器进行排序, 得到对 应不同去噪声能力区段的各候选滤波器组, 再按照复杂度有低到高依次对 所述候选滤波器组中各候选滤波器进行排序。  Or, the candidate filters are sequentially sorted according to the denoising ability from high to low, and each candidate filter group corresponding to different denoising capability segments is obtained, and then in the candidate filter group according to the complexity from low to high. Each candidate filter is sorted.
其中, 所述滤波器复杂度包括: 计算复杂度(如处理每像素所需加法、 乘法、 移位等基本数据操作的数量)、 存储复杂度(如处理每像素所需存储 空间大小)等与数值运算相关因素。  The filter complexity includes: computational complexity (such as processing the number of basic data operations required for addition, multiplication, and shifting per pixel), storage complexity (such as processing the required storage space per pixel), and the like. Numerical calculation related factors.
所述滤波器的复杂度和去噪声性能可以根据滤波器本身的类别进行评 估。 例如, 通常情况下, 高阶滤波器的去噪声能力优于低阶滤波器; 同阶 滤波器, 系数精度和运算精度高的滤波器其去噪声能力优于低系数精度和 运算精度的滤波器。 高阶滤波器的复杂度高于低阶滤波器; 同阶滤波器, 系数精度和运算精度高的滤波器其复杂度高于低系数精度和运算精度的滤 波器。  The complexity and denoising performance of the filter can be evaluated based on the type of filter itself. For example, in general, high-order filters have better denoising ability than low-order filters; same-order filters, filters with high coefficient precision and high precision are better than those with low coefficient accuracy and precision. . High-order filters are more complex than low-order filters; for the same-order filters, filters with high coefficient accuracy and high precision are more complex than filters with low coefficient accuracy and precision.
所述滤波器的复杂度和去噪声性能还可以根据已有统计数据或编码过 程中积累的性能统计数据进行评估。 例如, 可以根据大量离线统计获得的 经验数据, 对各候选滤波器去噪声能力或复杂度进行统计分析; 根据编码 过程中滤波处理前后图像失真的下降和滤波器系数编码比特开销数, 对滤 波器的复杂度或去噪声性能进行评估。 具体实现过程为本领域常用技术手 段, 在此不再赘述。  The complexity and denoising performance of the filter can also be evaluated based on existing statistical data or performance statistics accumulated during the encoding process. For example, statistical analysis can be performed on the denoising ability or complexity of each candidate filter according to empirical data obtained from a large number of offline statistics; according to the reduction of image distortion before and after filtering processing in the encoding process and the number of filter coefficient encoding bit overhead, the filter The complexity or denoising performance is evaluated. The specific implementation process is a common technical tool in the field, and will not be described here.
S602 , 编码器计算得到当前编码单元的图像重要性参数。  S602. The encoder calculates an image importance parameter of the current coding unit.
这里, 所述编码单元可以是图像或图像的分片。  Here, the coding unit may be an image or a slice of an image.
所述图像重要性参数用于表示各编码单元对视频序列整体编码效率的 影响。 例如, 帧内编码图像的重要性通常高于帧间预测编码图像; 低时间 等级的双向预测编码图像的重要性高于高时间等级的同类型图像等。 The image importance parameter is used to indicate the effect of each coding unit on the overall coding efficiency of the video sequence. For example, the importance of intra-coded pictures is usually higher than the inter-predictive coded picture; low time The level of bidirectional predictive coded pictures is of higher importance than the same type of pictures of high temporal levels.
所述图像重要性参数可根据图像编码类型、 图像对运动补偿预测环路 精度影响的参数、 图像活动度等因素进行确定。 图像重要性参数可以是根 据某种算法直接计算得到的数值, 例如使用平均绝对误差计算得到的图像 活动度参数; 也可以是根据常用规则对图像进行评估后得到的评分数值, 例如帧内预测编码图像的重要性系数最高, 帧间预测编码图像重要性次之; 对于同类型的图像, 可以进一步根据图像的视频内容对图像重要性进行区 分, 例如对于同为帧内预测编码的图像, 可认为位于场景切换处的图像其 图像重要性高于非场景切换处图像的图像重要性。  The image importance parameter may be determined according to factors such as an image coding type, a parameter on the motion compensation prediction loop accuracy, an image activity degree, and the like. The image importance parameter may be a value directly calculated according to an algorithm, for example, an image activity parameter calculated using an average absolute error; or may be a score value obtained by evaluating an image according to a common rule, such as intra prediction coding. The image has the highest importance coefficient, and the inter-frame predictive coded image is of the second most important importance; for the same type of image, the image importance can be further distinguished according to the video content of the image, for example, for an image that is also intra-predictive coded, The image at the scene switch has an image importance that is higher than the image importance of the image at the non-scene switch.
使用已有能够反映图像对整体编码效率影响的方法均可用于本实施例 中对图像重要性进行量化。  The use of existing methods capable of reflecting the effect of the image on the overall coding efficiency can be used to quantify the importance of the image in this embodiment.
S603 , 编码器根据计算得到的图像重要性参数、 以及所得到的一个或 多个候选滤波器组, 为当前编码单元选择编码使用的滤波器。  S603. The encoder selects a filter used for encoding according to the calculated image importance parameter and the obtained one or more candidate filter groups for the current coding unit.
具体地, 所述编码器首先根据计算得到的图像重要性参数, 确定当前 编码单元的候选滤波器组, 再从所确定的候选滤波器组中为当前编码单元 选择要使用的滤波器。  Specifically, the encoder first determines a candidate filter bank of the current coding unit according to the calculated image importance parameter, and then selects a filter to be used for the current coding unit from the determined candidate filter group.
其中, 所述编码器根据计算得到的图像重要性参数、 以及所得到的一 个或多个候选滤波器组, 为当前编码单元选择编码使用的滤波器的过程可 以包括:  The process of selecting, by the encoder, the filter used for encoding the current coding unit according to the calculated image importance parameter and the obtained one or more candidate filter groups may include:
首先根据可用计算资源与存储资源, 从对应不同复杂度区段的各候选 滤波器组中选择一个候选滤波器组, 然后, 再根据所述图像重要性参数, 从所选择的候选滤波器组中选择一个去噪声能力相匹配的滤波器, 作为当 前编码单元使用的滤波器。  First, selecting a candidate filter bank from each candidate filter bank corresponding to different complexity segments according to available computing resources and storage resources, and then, according to the image importance parameter, from the selected candidate filter bank. Select a filter that matches the noise cancellation capability and use it as the filter for the current coding unit.
或者, 首先根据可用计算资源与存储资源, 从对应不同复杂度区段的 各候选滤波器组中选择一个候选滤波器组, 然后, 再根据所述图像重要性 参数, 从所选择的候选滤波器组中选择多个去噪声能力与所需去噪声能力 相接近的滤波器作为候选, 然后使用现有的基于率失真准则的分片层环路 滤波器选择方法从候选滤波器中选择当前编码单元使用的滤波器。 Or first selecting a candidate filter bank from each candidate filter bank corresponding to different complexity segments according to available computing resources and storage resources, and then, according to the image importance a parameter, selecting, from the selected candidate filter bank, a plurality of filters whose denoising ability is close to the required denoising capability, and then using the existing slice-based loop filter selection method based on the rate distortion criterion The filter used by the current coding unit is selected from the candidate filters.
或者, 首先根据所述图像重要性参数, 从对应不同去噪声能力区段的 各候选滤波器组中选择一个候选滤波器组, 然后, 再根据可用计算资源与 存储资源, 从所述候选滤波器组中选择复杂度相匹配的滤波器, 作为当前 编码单元使用的滤波器。  Or first selecting a candidate filter bank from each candidate filter bank corresponding to different denoising capability segments according to the image importance parameter, and then, from the candidate filter according to available computing resources and storage resources. A filter with a matching complexity is selected in the group as the filter used by the current coding unit.
或者, 首先根据所述图像重要性参数, 从对应不同去噪声能力区段的 各候选滤波器组中选择一个候选滤波器组, 然后, 再根据可用计算资源与 存储资源 , 从所述候选滤波器组中选择多个复杂度与所需复杂度要求相接 近的滤波器作为候选, 然后使用现有的基于率失真准则的分片层环路滤波 器选择方法从候选滤波器中选择当前编码单元使用的滤波器。  Or first selecting a candidate filter bank from each candidate filter bank corresponding to different denoising capability segments according to the image importance parameter, and then, from the candidate filter according to available computing resources and storage resources. Selecting a plurality of filters whose complexity is close to the required complexity requirement is selected as a candidate, and then using the existing slice-based loop filter selection method based on rate distortion criterion to select the current coding unit from the candidate filters. Filter.
具体地, 对于图像重要性高的图像, 选择去噪声性能相对较高的滤波 器, 对于图像重要性低的图像, 可以选择去噪声性能相对较低的滤波器。 可用计算资源和存储资源相对较多时, 可以选择复杂度较高的滤波器, 可 用计算资源和存储资源相对较少时, 可以选择复杂度较低的滤波器。  Specifically, for an image with high image importance, a filter with relatively high denoising performance is selected, and for an image with low image importance, a filter with relatively low denoising performance can be selected. When there are relatively many available computing resources and storage resources, you can select a filter with higher complexity. When the computing resources and storage resources are relatively small, you can select a filter with lower complexity.
特别地, 其它根据本实施例所描述的复杂度、 去噪声性能、 图像重要 性参数及与三者类似的性能度量指标对候选滤波器进行分组、 并使用低编 码层优化工具(如基于率失真准则的分片层环路滤波器选择方法)从候选 滤波器组中选择所使用滤波器, 均可归属于本实施例。  In particular, other complexity, denoising performance, image importance parameters, and performance metrics similar to those described in the present embodiment are used to group candidate filters and use low coding layer optimization tools (eg, rate-based distortion). The sliced layer loop filter selection method of the criterion) selecting the filter used from the candidate filter banks can be attributed to the present embodiment.
本实施例可应用于发送端和接收端均计算资源充足、 对复杂度敏感度 较低, 但对实时性有一定要求的情况。 例如, 数字电视, 交互式网络电视 This embodiment can be applied to the case where both the transmitting end and the receiving end have sufficient computing resources and low sensitivity to complexity, but have certain requirements for real-time performance. For example, digital TV, interactive web TV
( IPTV )等。 (IPTV), etc.
本实施例虽然以 ALF为例进行说明, 但本实施例中选择滤波器的方法 同样可以用于其他的环路滤波应用中, 如 SAO中。 实施例五 Although the ALF is taken as an example for description in this embodiment, the method for selecting a filter in this embodiment can also be used in other loop filtering applications, such as SAO. Embodiment 5
本实施例中, 综合使用多种的 ALF模式和编码器复杂度分配方法进行 编码, 以适应可用信源编码码率、 编解码器对计算复杂度和编码效率之间 的折衷要求。 本实施例中, 对需要对视频图像进行多次编码的过程做了详 细说明。  In this embodiment, a plurality of ALF modes and encoder complexity allocation methods are used in combination to encode to meet the tradeoff between the available source coding rate, the codec's computational complexity, and the coding efficiency. In this embodiment, a detailed description of the process of encoding the video image multiple times is provided.
具体地, 如图 7所示, 本实施例中对视频图像两次编码的流程, 可以 包括如下步驟:  Specifically, as shown in FIG. 7, the process of encoding the video image twice in this embodiment may include the following steps:
5701 , 与 S501完全相同;  5701, identical to S501;
5702, 编码器根据所述参数集, 对输入的视频序列进行第一次编码; 具体地, 编码器对视频序列进行第一次编码的具体实现过程如实施例 二、 实施例三、 实施例四所示, 在此不再赞述。  5702. The encoder performs the first encoding on the input video sequence according to the parameter set. Specifically, the specific implementation process of the first encoding of the video sequence by the encoder is as follows: Embodiment 2, Embodiment 3, Embodiment 4 As shown, it is not mentioned here.
这里, 第一次编码过程可以是一个完整的编码流程, 也可以是部分编 码流程, 如第一次编码过程通常是不包含输出码流步驟的部分编码流程。  Here, the first encoding process may be a complete encoding process, or may be a partial encoding process. For example, the first encoding process is usually a partial encoding process that does not include an output stream step.
5703 , 编码器获得第一次编码过程中的信源特性参数、 编码器控制辅 助参数等信息, 并根据所获得的第一次编码过程中的信源特性参数、 编码 器控制辅助参数等信息, 确定第二次编码时各图像或各视频区段所使用的 ALF模式;  5703, the encoder obtains information such as a source characteristic parameter and an encoder control auxiliary parameter in the first encoding process, and according to the obtained source characteristic parameter and the encoder control auxiliary parameter in the first encoding process, Determining the ALF mode used by each image or each video segment at the time of the second encoding;
这里, 所述编码器还可根据所获得的第一次编码过程中的信源特性参 数、 编码器控制辅助参数等信息, 确定第二次编码过程中的编码模块参数。  Here, the encoder may further determine an encoding module parameter in the second encoding process according to the obtained source characteristic parameter, the encoder control auxiliary parameter, and the like in the first encoding process.
其中, 所述编码模块参数可以包括: 图像组(GOP, Group Of Pictures ) 的长度及 GOP中各图像的编码类型 (如帧内预测、 帧间单向预测、 帧间双 向预测等)、为可使用 ALF的编码单元进一步确定的滤波器参数、以及其它 编码器控制参数, 如量化参数等。 其中的图像编码类型与实施例一中的第 一环路滤波模式、 第二环路滤波模式有关。  The encoding module parameters may include: a length of a group of pictures (GOP, Group Of Pictures) and an encoding type of each image in the GOP (such as intra prediction, inter-frame unidirectional prediction, inter-frame bidirectional prediction, etc.), Filter parameters further determined using the coding unit of ALF, as well as other encoder control parameters, such as quantization parameters and the like. The image coding type is related to the first loop filtering mode and the second loop filtering mode in the first embodiment.
其中, 所述信源特性参数可以包括: 图像活动度、 场景切换图像位置、 各场景区段内图像间运动程度等。 The source characteristic parameter may include: image activity degree, scene switching image position, The degree of motion between images in each scene segment.
所述编码器控制辅助参数可以包括: 各编码预测、 分块模式对各图像 或视频区段内容区域、 不同图像或不同视频区段间运动程度的适用性; 编 码器对各图像或视频区段内容区域、 各图像间或各视频区段间运动程度的 适用性、 复杂度、 编码效率; 各 ALF模式对各图像或各视频区段内容区域、 不同预测编码类型的各图像或各视频区段的适用性、 复杂度、 编码效率等。  The encoder control assistance parameter may include: applicability of each coding prediction, block mode to the motion region of each image or video segment, different images or different video segments; encoder for each image or video segment Applicability, complexity, and coding efficiency of the content area, the degree of motion between images, or between video segments; each ALF mode for each image or each video segment content region, each prediction encoding type of image or each video segment Applicability, complexity, coding efficiency, etc.
所述编码器控制辅助参数主要用于描述不同编码工具(如预测、 分块 模式, ALF模式等)对输入视频序列不同特性的视频段、 图像、 图像中不 同纹理特征的区域的适用能力, 用以为第二次编码过程确定对各不同视频 区段、 图像、 图像中不同纹理特征区域所使用的编码工具及其参数, 如为 静止场景部分选用单向帧间预测模式、 为运动剧烈场景选用帧内预测模式; 在使用第三环路滤波模式时, 为场景变化快的视频区段设置较小的刷新周 期值, 为场景变化慢的视频区段设置较大的刷新周期值。  The encoder control auxiliary parameter is mainly used to describe the adaptability of different coding tools (such as prediction, block mode, ALF mode, etc.) to video segments, images, and regions of different texture features in different characteristics of the input video sequence. It is thought that the second encoding process determines the encoding tools and parameters used for different texture feature regions in different video segments, images, and images, such as selecting a uni-directional inter prediction mode for the still scene portion and selecting a frame for the motion severe scene. Intra prediction mode; When using the third loop filtering mode, set a smaller refresh period value for the video segment with a fast scene change, and set a larger refresh period value for the video segment with slow scene change.
所述编码器可根据第一次编码过程中获得的信源特性参数、 编码器控 制辅助参数等信息, 按照场景变化、 运动剧烈程度等因素将输入的视频序 列划分为多个视频区段。 或者, 也可以将输入的视频序列分为多个图像。 采用实施例二或实例三中确定 ALF模式的方式确定各图像或各视频区段的 ALF模式。  The encoder may divide the input video sequence into a plurality of video segments according to factors such as scene change, motion severity, and the like according to information such as a source characteristic parameter and an encoder control auxiliary parameter obtained in the first encoding process. Alternatively, the input video sequence can be divided into multiple images. The ALF mode of each image or each video segment is determined by the method of determining the ALF mode in the second embodiment or the third embodiment.
S704, 编码器为 S703所确定使用的 ALF模式对应的各参数集, 重新 分配参数集索引序号。  S704: The encoder re-assigns the parameter set index number to each parameter set corresponding to the ALF mode determined by S703.
具体地, 编码器根据在第一次编码过程后所确定的各 ALF模式在第二 次编码过程中的使用次数, 按照次数由多到少, 对所述各 ALF模式进行排 序, 并根据排序结果, 重新为所述各 ALF模式对应的参数集分配参数集索 引序号。 具体地, 排序在前的 ALF模式所对应的参数集分配数值小的参数 集索引序号, 如此, 能够节省参数集索引序号的比特数, 减少后续将参数 集索引序号写入分片层头信息需要的时间和资源, 有利于节省资源。 Specifically, the encoder sorts the ALF modes according to the number of times of use of each ALF mode determined in the second encoding process after the first encoding process, according to the number of times, and according to the sorting result. And re-assigning the parameter set index number to the parameter set corresponding to each ALF mode. Specifically, the parameter set index number of the parameter set corresponding to the previous ALF mode is smaller, so that the number of bits of the parameter set index number can be saved, and the subsequent parameters are reduced. The time and resources required for the index index number to be written into the slice header information are conducive to saving resources.
S705 , 编码器根据所述 S704重新分配参数集索引序号后的各参数集、 S703所确定第二次编码时各图像或各视频区段所使用的 ALF模式、以及第 一次编码过程中选择的滤波器, 完成对输入视频序列的第二次编码, 并输 出第二次编码得到的码流。  S705. The encoder selects each parameter set after the parameter set index sequence number according to the S704, determines an ALF mode used by each image or each video segment when the second encoding is determined by S703, and selects in the first encoding process. The filter completes the second encoding of the input video sequence and outputs the code stream obtained by the second encoding.
具体地, 编码器根据 S703所确定第二次编码时各图像或各视频区段使 用的 ALF模式, 确定对各图像或各视频区段进行编码时使用的参数集, 将 各图像或各视频区段使用的参数集写入码流, 并将所述参数集的参数集索 引序号写入各图像或各视频区段的分片层头信息中, 以及将第一次编码过 程中所选择滤波器的相关参数写入各图像或各视频区段的分片层头信息。  Specifically, the encoder determines a parameter set used when encoding each image or each video segment according to the ALF mode used by each image or each video segment at the second encoding determined by S703, and each image or each video region is used. The parameter set used by the segment is written into the code stream, and the parameter set index number of the parameter set is written into the slice header information of each image or each video segment, and the filter selected in the first encoding process The relevant parameters are written into the slice header information of each image or each video segment.
这里, 编码器可以以图像或图像的分片为编码单元进行编码。 具体实 现过程与上述实施例二和 /或实施例三中的编码过程相似, 在此不再赘述。  Here, the encoder may encode the image or the slice of the image as a coding unit. The specific implementation process is similar to the coding process in the foregoing Embodiment 2 and/or Embodiment 3, and details are not described herein again.
本实施例可应用于发送端和接收端均计算资源充足、 对复杂度敏感度 较低的应用。 例如, 数字电视和 IPTV的过往节目点播回放、 电影点播、 高 清数字家庭影院等。 本实施例还可以应用于发送端计算资源充足、 对复杂 度敏感度较低, 但接收端计算能力有限、 对复杂度控制有较高要求的应用。 例如, 移动终端的视频下载播放、 电影点播、 移动电视过往节目点播回放 等。  This embodiment can be applied to applications in which both the transmitting end and the receiving end have sufficient computing resources and low sensitivity to complexity. For example, digital TV and IPTV have been used for on-demand playback, movie-on-demand, and high-definition digital home theater. This embodiment can also be applied to applications where the computing resources of the transmitting end are sufficient and the sensitivity to the complexity is low, but the computing power of the receiving end is limited and the complexity control is high. For example, video downloading and playback of a mobile terminal, movie on demand, live TV on-demand playback, and the like.
需要说明的是,本实施例中所提到的 ALF模式与实施例一中的 ALF模 式相同, 本实施例中编码器编码得到的码流可以通过实施例一提供的解码 方法进行解码。  It should be noted that the ALF mode mentioned in this embodiment is the same as the ALF mode in the first embodiment. The code stream obtained by the encoder in this embodiment can be decoded by the decoding method provided in the first embodiment.
实施例六  Embodiment 6
本实施例提供一种电子设备, 所述电子设备可以包括为本发明所提供 的解码器, 该解码器可以通过实施例一的具体实现过程对环路滤波标识信 息进行解码。 所述电子设备还可以包括本发明所提供的编码器, 通过实施例二到实 施例五中所提供的方法, 实现编码。 The embodiment provides an electronic device, and the electronic device may include a decoder provided by the present invention, and the decoder may decode the loop filter identification information by using a specific implementation process of the first embodiment. The electronic device may further include an encoder provided by the present invention, and the encoding is implemented by the methods provided in Embodiment 2 to Embodiment 5.
具体地, 本实施例的电子设备可以是视频通信应用中相关码流生成设 备和接收播放设备, 例如, 手机、 计算机、 服务器、 机顶盒、 便携式移动 终端、 数字电视、 数字摄像机等。  Specifically, the electronic device of the embodiment may be a related stream generating device and a receiving playing device in a video communication application, for example, a mobile phone, a computer, a server, a set top box, a portable mobile terminal, a digital television, a digital video camera, or the like.
需要说明的是, 所述发送端用于发送视频信息, 接收端用于接收视频 信息。 上述各实施例可以任意结合使用, 也可以单独实施。  It should be noted that the sending end is configured to send video information, and the receiving end is configured to receive video information. The above embodiments may be used arbitrarily in combination or separately.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、 一种环路滤波编码方法, 其特征在于, 所述方法包括:  A loop filter coding method, the method comprising:
设置用于指示环路滤波在编码过程中使用方式的环路滤波模式; 根据所述环路滤波模式, 生成参数集;  Setting a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process; generating a parameter set according to the loop filtering mode;
根据所生成的参数集, 进行编码。  Encoding is performed based on the generated parameter set.
2、根据权利要求 1所述环路滤波编码方法,其特征在于, 所述方法为: 确定两种或两种以上能够用于编码过程的所述环路滤波模式; 对于所述各环路滤波模式, 分别生成包含有所述环路滤波模式的环路 滤波标识信息的一个或多个参数集;  The loop filter encoding method according to claim 1, wherein the method is: determining two or more loop filtering modes that can be used in an encoding process; filtering the loops a mode, respectively generating one or more parameter sets including loop filter identification information of the loop filtering mode;
确定当前编码过程中所使用的环路滤波模式并根据当前编码过程中所 使用环路滤波模式对应的参数集, 进行编码。  The loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
3、 根据权利要求 2所述环路滤波编码方法, 其特征在于, 所述两种或 两种以上环路滤波模式包括如下环路滤波模式中的任意两种或两种以上: 表示允许每个分片使用环路滤波的第零环路滤波模式;  3. The loop filter encoding method according to claim 2, wherein the two or more loop filtering modes comprise any two or more of the following loop filtering modes: Fragmentation uses a zero-loop filtering mode of loop filtering;
表示仅允许帧内编码分片使用环路滤波的第一环路滤波模式; 表示仅允许在用于帧间预测参考的图像中的分片使用环路滤波的第二 环路滤波模式;  Representing a first loop filtering mode that allows only intra-coded slices to use loop filtering; represents a second loop filtering mode that allows loop filtering only for slices in the image used for inter prediction reference;
表示在分片的图像序号 POC值为环路滤波刷新周期的整数倍时, 允许 在所述分片使用环路滤波的第三环路滤波模式;  Indicates that when the image sequence number POC of the slice is an integer multiple of the loop filter refresh period, the third loop filter mode that uses loop filtering in the slice is allowed;
表示所有分片均不允许使用环路滤波的第四环路滤波模式。  Indicates that the fourth loop filtering mode that uses loop filtering is not allowed for all slices.
4、根据权利要求 1所述环路滤波编码方法,其特征在于, 所述方法为: 确定当前编码过程所使用的环路滤波模式;  The loop filtering and encoding method according to claim 1, wherein the method is: determining a loop filtering mode used by a current encoding process;
生成包含有所确定环路滤波模式的环路滤波标识信息的参数集; 根据所生成的参数集, 进行编码。  Generating a parameter set containing loop filter identification information having a determined loop filtering mode; encoding according to the generated parameter set.
5、 根据权利要求 4所述环路滤波编码方法, 其特征在于, 所述环路滤 波模式为如下环路滤波模式中的任意一种: The loop filter encoding method according to claim 4, wherein the loop filter The wave mode is any of the following loop filtering modes:
表示允许每个分片使用环路滤波的第零环路滤波模式;  Represents a zeroth loop filtering mode that allows loop filtering for each slice;
表示仅允许帧内编码分片使用环路滤波的第一环路滤波模式; 表示仅允许在用于帧间预测参考的图像中的分片使用环路滤波的第二 环路滤波模式;  Representing a first loop filtering mode that allows only intra-coded slices to use loop filtering; represents a second loop filtering mode that allows loop filtering only for slices in the image used for inter prediction reference;
表示在分片的 POC值为环路滤波刷新周期的整数倍时, 允许在所述分 片使用环路滤波的第三环路滤波模式;  Representing a third loop filtering mode that allows loop filtering in the slice when the POC value of the slice is an integer multiple of the loop filter refresh period;
表示所有分片均不允许使用环路滤波的第四环路滤波模式。  Indicates that the fourth loop filtering mode that uses loop filtering is not allowed for all slices.
6、 根据权利要求 1所述环路滤波编码方法, 其特征在于, 所述确定用 于指示环路滤波在编码过程中使用方式的环路滤波模式, 为:  The loop filter encoding method according to claim 1, wherein the determining a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process is:
根据下述因素中的一种或多种: 具体应用需求、 编码过程的可用计算 资源与存储资源、 视频信源特性、 信源编码码率、 接收端处理能力, 确定 用于指示环路滤波在编码过程中使用方式的环路滤波模式。  According to one or more of the following factors: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability, determined to indicate loop filtering in The loop filtering mode used in the encoding process.
7、 根据权利要求 1至 6任一项所述环路滤波编码方法, 其特征在于, 所述生成包含有所述环路滤波模式的环路滤波标识信息的参数集之后, 所 述方法还包括: 为所生成的参数集分配用于标识所述参数集的参数集索引 序号。  The loop filter coding method according to any one of claims 1 to 6, wherein after the generating the parameter set including the loop filter identification information of the loop filter mode, the method further includes : Assign the parameter set index number used to identify the parameter set to the generated parameter set.
8、 根据权利要求 7所述环路滤波编码方法, 其特征在于, 所述根据所 生成的参数集, 进行编码, 包括: 将所述参数集的信息写入码流, 在分片 层编码过程中将所述参数集索引序号写入当前编码单元中的分片层头信 息, 并确定编码使用的滤波器, 将所述滤波器的参数写入到所述分片层头 信息。  The loop filter encoding method according to claim 7, wherein the encoding according to the generated parameter set comprises: writing information of the parameter set into a code stream, in a slice layer encoding process The parameter set index number is written into the slice header information in the current coding unit, and the filter used for encoding is determined, and the parameters of the filter are written to the slice header information.
9、 根据权利要求 8所述环路滤波编码方法, 其特征在于, 所述确定编 码使用的滤波器, 包括:  The loop filter coding method according to claim 8, wherein the determining the filter used by the coding comprises:
根据各候选滤波器的复杂度与去噪声性能, 对所有候选滤波器进行分 组, 得到一个或多个候选滤波器组; All candidate filters are divided according to the complexity and denoising performance of each candidate filter. Grouping, obtaining one or more candidate filter banks;
计算得到当前编码单元的图像重要性参数;  Calculating an image importance parameter of the current coding unit;
根据计算得到的图像重要性参数、 以及所得到的一个或多个候选滤波 器组, 为当前编码单元选择编码使用的滤波器。  A filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
10、 根据权利要求 1、 2、 3、 4、 5、 6、 8、 或 9所述环路滤波编码方法, 其特征在于, 所述方法还包括: 验证当前编码单元进行编码时所确定的环 路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波模式是否相 同; 如果不是, 则调整当前使用的参数集; 如果是, 则不调整当前使用的  The loop filter coding method according to claim 1, 2, 3, 4, 5, 6, 8, or 9, wherein the method further comprises: verifying a loop determined by the current coding unit when performing coding The path filtering mode is the same as the loop filtering mode determined when encoding by the previous coding unit; if not, the currently used parameter set is adjusted; if yes, the currently used parameter is not adjusted.
11、 根据权利要求 10所述环路滤波编码方法, 其特征在于, 所述调整 当前使用的参数集, 包括: 验证对应当前编码单元进行编码时所确定环路 滤波模式的参数集是否存在, 如果是, 直接将当前使用的参数集调整为当 前编码单元进行编码时所确定环路滤波模式对应的参数集; 如果不是, 生 成当前编码单元进行编码时所确定环路滤波模式对应的参数集, 并将当前 使用的参数集调整为当前编码单元进行编码时所确定环路滤波模式对应的 The loop filter encoding method according to claim 10, wherein the adjusting the currently used parameter set comprises: verifying whether a parameter set corresponding to the loop filtering mode determined by the current coding unit is encoded, if Yes, directly adjusting the currently used parameter set to a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding; if not, generating a parameter set corresponding to the loop filtering mode determined when the current coding unit performs coding, and Adjusting the currently used parameter set to correspond to the loop filtering mode determined by the current coding unit for encoding
12、 根据权利要求 10所述环路滤波编码方法, 其特征在于, 所述验证 当前编码单元进行编码时所确定的环路滤波模式, 与上一个编码单元进行 编码时所确定的环路滤波模式是否相同之前, 所述方法还包括: 动态监控 当前编码过程中可用资源的变化情况, 获得当前编码过程中的可用资源信 息; 根据所述可用资源信息, 确定当前编码单元进行编码时的环路滤波模 式。 The loop filter encoding method according to claim 10, wherein the loop filtering mode determined when the current encoding unit performs encoding is verified, and the loop filtering mode determined when encoding by the previous encoding unit Before the method is the same, the method further includes: dynamically monitoring a change of available resources in the current encoding process, obtaining available resource information in the current encoding process; determining, according to the available resource information, loop filtering when encoding the current coding unit mode.
13、 根据权利要求 1、 2、 3、 4、 5、 6、 8、 9、 10、 11、 或 12所述环路 滤波编码方法, 其特征在于, 所述方法还包括:  The method of claim 1, wherein the method further comprises:
根据所获得的上一次编码过程中的信源特性参数、 和编码器控制辅助 参数, 确定当前编码过程中各图像或各视频区段使用的环路滤波模式; 根据所述当前编码过程中各图像或各视频区段所使用环路滤波模式对 应的参数集, 分别对所述各图像或各视频区段进行编码。 According to the obtained source characteristic parameters in the last encoding process, and encoder control assistance a parameter, determining a loop filtering mode used by each image or each video segment in the current encoding process; according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process, respectively Each image or each video segment is encoded.
14、 根据权利要求 13所述环路滤波编码方法, 其特征在于,  14. The loop filter encoding method according to claim 13, wherein:
所述方法还包括: 为当前编码过程中各图像或各视频区段所使用环路 滤波模式对应的参数集重新分配参数集索引序号;  The method further includes: reallocating a parameter set index number for a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process;
根据所述当前编码过程中各图像或各视频区段所使用环路滤波模式对 应的参数集, 分别对所述各图像或各视频区段进行编码, 为: 根据所述重 新分配参数集索引序号后得到的各参数集, 分别对所述各图像或各视频区 段进行编码。  And respectively encoding, according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process, the image or each video segment is: according to the reassignment parameter set index sequence number Each of the obtained parameter sets respectively encodes each of the images or video segments.
15、 根据权利要求 14所述环路滤波编码方法, 其特征在于, 所述为当 前编码过程中各图像或各视频区段所使用环路滤波模式对应的参数集重新 分配参数集索引序号, 包括:  The loop filter encoding method according to claim 14, wherein the parameter set index number is reassigned to a parameter set corresponding to a loop filtering mode used by each image or each video segment in the current encoding process, including :
根据所述各图像或各视频区段的环路滤波模式在当前编码过程中使用 次数, 按照使用次数由多到少, 对所述各环路滤波模式进行排序;  And sorting the loop filtering modes according to how many times the loop filtering mode of each image or each video segment is used in the current encoding process, according to the number of uses;
按照所述各环路滤波模式的排序顺序, 为所述各环路滤波模式对应的 参数集, 依次分配数值由 d、到大的参数集索引序号。  According to the sorting order of the loop filtering modes, the parameter sets corresponding to the loop filtering modes are sequentially assigned index numbers of d to large parameter sets.
16、 一种编码器, 其特征在于, 所述编码器包括: 确定模块、 生成模 块和编码模块; 其中,  An encoder, the encoder comprising: a determining module, a generating module, and an encoding module; wherein
确定模块, 用于设置用于指示环路滤波在编码过程中使用方式的环路 滤波模式;  a determining module, configured to set a loop filtering mode for indicating a manner in which loop filtering is used in the encoding process;
生成模块, 用于根据所述确定模块设置的环路滤波模式, 生成参数集; 编码模块, 用于根据所述生成模块生成的参数集, 进行编码。  a generating module, configured to generate a parameter set according to the loop filtering mode set by the determining module; and an encoding module, configured to perform encoding according to the parameter set generated by the generating module.
17、 根据权利要求 16所述的编码器, 其特征在于,  17. The encoder of claim 16 wherein:
所述确定模块, 还用于确定两种或两种以上能够用于编码过程的所述 环路滤波模式; The determining module is further configured to determine that the two or more types are capable of being used in the encoding process Loop filtering mode;
生成模块, 还用于对于所述确定模块所确定的各环路滤波模式, 分别 生成包含有所述环路滤波模式的环路滤波标识信息的一个或多个参数集; 编码模块, 还用于确定当前编码过程中所使用的环路滤波模式并根据 当前编码过程中所使用环路滤波模式对应的参数集, 进行编码。  a generating module, configured to generate, for each loop filtering mode determined by the determining module, one or more parameter sets respectively including loop filtering identification information of the loop filtering mode; and an encoding module, further used for The loop filtering mode used in the current encoding process is determined and encoded according to the parameter set corresponding to the loop filtering mode used in the current encoding process.
18、 根据权利要求 16所述的编码器, 其特征在于,  18. The encoder of claim 16 wherein:
所述确定模块, 还用于确定当前编码过程所使用的环路滤波模式; 生成模块, 还用于生成包含有所述确定模块所确定环路滤波模式的环 路滤波标识信息的参数集;  The determining module is further configured to determine a loop filtering mode used by the current encoding process; the generating module is further configured to generate a parameter set that includes loop filtering identifier information of the loop filtering mode determined by the determining module;
编码模块, 还用于根据所述生成模块生成的参数集, 进行编码。  The encoding module is further configured to perform encoding according to the parameter set generated by the generating module.
19、 根据权利要求 16、 17或 18所述的编码器, 其特征在于, 所述确定模块, 还用于根据下述因素中的一种或多种, 确定用于指示 环路滤波在编码过程中使用方式的环路滤波模式: 具体应用需求、 编码过 程的可用计算资源与存储资源、 视频信源特性、 信源编码码率、 接收端处 理能力。  The encoder according to claim 16, 17 or 18, wherein the determining module is further configured to determine, according to one or more of the following factors, that the loop filtering is used in the encoding process. The loop filtering mode used in the mode: specific application requirements, available computing resources and storage resources of the encoding process, video source characteristics, source coding rate, and receiving end processing capability.
20、 根据权利要求 16所述的编码器, 其特征在于,  20. The encoder of claim 16 wherein:
所述生成模块, 还用于为所生成的参数集分配用于标识所述参数集的 参数集索引序号;  The generating module is further configured to allocate, to the generated parameter set, a parameter set index sequence number for identifying the parameter set;
所述编码模块, 还用于将所述参数集的信息写入码流, 在分片层编码 过程中将所述参数集索引序号写入当前编码单元中的分片层头信息, 并确 定编码使用的滤波器, 将所述滤波器的参数写入到所述分片层头信息。  The encoding module is further configured to write the information of the parameter set into the code stream, and write the parameter set index number into the slice layer header information in the current coding unit in the slice layer coding process, and determine the code. A filter is used to write parameters of the filter to the slice header information.
21、 根据权利要求 16所述的编码器, 其特征在于, 所述编码模块, 还 用于采用如下方法确定编码使用的滤波器:  The encoder according to claim 16, wherein the encoding module is further configured to determine a filter used for encoding by using the following method:
根据各候选滤波器的复杂度与去噪声性能, 对所有候选滤波器进行分 组, 得到一个或多个候选滤波器组; 计算得到当前编码单元的图像重要性参数; All candidate filters are grouped according to the complexity and denoising performance of each candidate filter to obtain one or more candidate filter banks; Calculating an image importance parameter of the current coding unit;
根据计算得到的图像重要性参数、 以及所得到的一个或多个候选滤波 器组, 为当前编码单元选择编码使用的滤波器。  A filter used for encoding is selected for the current coding unit based on the calculated image importance parameter and the resulting one or more candidate filter sets.
22、 根据权利要求 16所述的编码器, 其特征在于, 所述编码器还包括 验证模块和调整模块, 其中,  The encoder according to claim 16, wherein the encoder further includes a verification module and an adjustment module, where
调整模块, 用于调整当前使用的参数集;  An adjustment module for adjusting a currently used parameter set;
验证模块, 用于验证当前编码单元进行编码时所确定的环路滤波模式, 与上一个编码单元进行编码时所确定的环路滤波模式是否相同, 并在不相 同时, 启动所述调整模块。  And a verification module, configured to verify whether the loop filtering mode determined when the current coding unit performs coding is the same as the loop filtering mode determined when the previous coding unit performs coding, and starts the adjustment module without being identical.
23、 根据权利要求 22所述的编码器, 其特征在于,  23. The encoder of claim 22, wherein
所述调整模块, 还用于验证对应当前编码单元进行编码时所确定环路 滤波模式的参数集是否存在, 如果是, 直接将当前使用的参数集调整为当 前编码单元进行编码时所确定环路滤波模式对应的参数集; 如果不是, 通 过所述生成模块生成当前编码单元进行编码时所确定环路滤波模式对应的 参数集, 并将当前使用的参数集调整为当前编码单元进行编码时所确定环 路滤波模式对应的参数集。  The adjusting module is further configured to verify whether a parameter set corresponding to the loop filtering mode determined by the current coding unit is present, and if yes, directly adjusting the currently used parameter set to a loop determined by the current coding unit for encoding a parameter set corresponding to the filtering mode; if not, generating, by the generating module, a parameter set corresponding to the loop filtering mode determined by the current coding unit for encoding, and adjusting the currently used parameter set to be determined by the current coding unit for encoding The parameter set corresponding to the loop filtering mode.
24、 根据权利要求 16、 17、 18、 20、 21、 22、 或 23所述的编码器, 其 特征在于,  24. An encoder according to claim 16, 17, 18, 20, 21, 22, or 23, characterized in that
所述确定模块, 还用于根据所获得的上一次编码过程中的信源特性参 数、 和编码器控制辅助参数, 确定当前编码过程中各图像或各视频区段使 用的环路滤波模式;  The determining module is further configured to determine, according to the obtained source characteristic parameter in the last encoding process, and the encoder control auxiliary parameter, a loop filtering mode used by each image or each video segment in the current encoding process;
所述编码模块, 还用于根据所述确定模块所确定的、 当前编码过程中 各图像或各视频区段所使用环路滤波模式对应的参数集, 分别对所述各图 像或各视频区段进行编码。  The encoding module is further configured to: respectively, according to the parameter set corresponding to the loop filtering mode used by each image or each video segment in the current encoding process determined by the determining module, respectively, for each image or each video segment Encode.
25、 一种环路滤波解码方法, 其特征在于, 所述方法包括: 对参数集相关码流中环路滤波模式的环路滤波标识信息进行解码; 对分片层中环路滤波模式的环路滤波标识信息进行解码; 25. A loop filter decoding method, the method comprising: Decoding the loop filtering identification information of the loop filtering mode in the parameter set related code stream; decoding the loop filtering identification information of the loop filtering mode in the slice layer;
其中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。 The loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process.
26、 根据权利要求 25所述环路滤波解码方法, 其特征在于, 所述对参 数集相关码流中环路滤波模式的环路滤波标识信息进行解码, 包括: The loop filter decoding method according to claim 25, wherein the decoding of the loop filter identification information of the loop filter mode in the parameter set related code stream comprises:
读取参数集相关码流中的比特, 得到用于标识所述环路滤波标识信息 的各语法单元的取值, 并将所述各语法单元的取值赋给所述参数集数据结 构中的对应变量。  Reading the bits in the parameter set related code stream, obtaining values of the syntax units for identifying the loop filter identification information, and assigning the values of the syntax units to the parameter set data structure Corresponding variable.
27、 根据权利要求 25所述环路滤波解码方法, 其特征在于, 所述对分 片层中环路滤波模式的环路滤波标识信息进行解码, 包括:  The loop filter decoding method according to claim 25, wherein the decoding of the loop filter identification information of the loop filtering mode in the slice layer comprises:
获得所述参数集中用于标识所述环路滤波标识信息的各语法单元的取 值, 并将所述语法单元的取值传递给分片层数据结构的对应变量。  Obtaining values of the syntax units for identifying the loop filter identification information in the parameter set, and passing the values of the syntax unit to corresponding variables of the slice layer data structure.
28、 根据权利要求 25至 27任一项所述环路滤波解码方法, 其特征在 于, 所述方法还包括: 根据解码得到的环路滤波标识信息, 对分片层中的 环路滤波器相关参数进行解析。  The loop filter decoding method according to any one of claims 25 to 27, wherein the method further comprises: correlating a loop filter in the slice layer according to the loop filter identification information obtained by decoding The parameters are parsed.
29、 一种解码器, 其特征在于, 所述解码器包括: 第一解码单元和第 二解码单元, 其中,  A decoder, the decoder comprising: a first decoding unit and a second decoding unit, wherein
第一解码单元, 用于对参数集相关码流中环路滤波模式的环路滤波标 识信息进行解码;  a first decoding unit, configured to decode loop filter identification information of a loop filtering mode in a parameter set related code stream;
第二解码单元, 用于对分片层中环路滤波模式的环路滤波标识信息进 行解码;  a second decoding unit, configured to decode loop filter identification information of a loop filtering mode in the slice layer;
其中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。 The loop filtering mode is used to indicate the manner in which loop filtering is used in the encoding process.
30、 根据权利要 29所述的解码器, 其特征在于, 所述第一解码单元, 还用于读取参数集相关码流中的比特, 得到用于标识所述环路滤波标识信 息的各语法单元的取值, 并将所述各语法单元的取值赋给所述参数集数据 结构中的对应变量。 The decoder according to claim 29, wherein the first decoding unit is further configured to read bits in a parameter set related code stream, to obtain each of the loop filter identification information used to identify the loop filter identification information. a value of a syntax unit, and assigning values of the syntax units to the parameter set data Corresponding variables in the structure.
31、 根据权利要 29所述的解码器, 其特征在于, 所述第二解码单元, 还用于获得所述参数集中用于标识所述环路滤波标识信息的各语法单元的 取值, 并将所述语法单元的取值传递给分片层数据结构的对应变量。  The decoder according to claim 29, wherein the second decoding unit is further configured to obtain values of the syntax units used to identify the loop filter identification information in the parameter set, and Passing the value of the syntax unit to the corresponding variable of the slice layer data structure.
32、 根据权利要求 29至 31任一项所述的解码器, 其特征在于, 所述 第二解码单元, 还用于根据解码得到的环路滤波标识信息, 对分片层中的 环路滤波器相关参数进行解析。  The decoder according to any one of claims 29 to 31, wherein the second decoding unit is further configured to filter the loop in the slice layer according to the decoded loop filter identification information. The relevant parameters of the device are parsed.
33、 一种电子设备, 其特征在于, 所述电子设备包括编码器和 /或解码 器, 其中,  An electronic device, comprising: an encoder and/or a decoder, wherein
所述编码器包括确定模块、 生成模块和编码模块, 确定模块用于设置 用于指示环路滤波在编码过程中使用方式的环路滤波模式; 生成模块用于 根据所述确定模块设置的环路滤波模式, 生成参数集; 编码模块用于根据 所述生成模块生成的参数集, 进行编码;  The encoder includes a determining module, a generating module, and an encoding module, the determining module is configured to set a loop filtering mode for indicating a manner in which the loop filtering is used in the encoding process; and the generating module is configured to use the loop set according to the determining module a filtering mode, generating a parameter set; the encoding module is configured to perform encoding according to the parameter set generated by the generating module;
所述解码器包括第一解码单元和第二解码单元, 第一解码单元, 用于 对参数集相关码流中环路滤波模式的环路滤波标识信息进行解码; 第二解 码单元, 用于对分片层中环路滤波模式的环路滤波标识信息进行解码; 其 中, 所述环路滤波模式用于指示环路滤波在编码过程中的使用方式。  The decoder includes a first decoding unit and a second decoding unit, where the first decoding unit is configured to decode the loop filtering identification information of the loop filtering mode in the parameter set related code stream; and the second decoding unit is configured to perform the splitting The loop filtering identification information of the loop filtering mode in the slice layer is decoded; wherein the loop filtering mode is used to indicate the manner in which the loop filtering is used in the encoding process.
PCT/CN2012/073111 2011-06-28 2012-03-27 Loop filtering encoding and decoding methods and devices WO2013000304A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110176657.X 2011-06-28
CN201110176657.XA CN102857746B (en) 2011-06-28 2011-06-28 Loop filtering decoding method and device

Publications (1)

Publication Number Publication Date
WO2013000304A1 true WO2013000304A1 (en) 2013-01-03

Family

ID=47403889

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/073111 WO2013000304A1 (en) 2011-06-28 2012-03-27 Loop filtering encoding and decoding methods and devices

Country Status (2)

Country Link
CN (1) CN102857746B (en)
WO (1) WO2013000304A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140072033A1 (en) * 2011-06-10 2014-03-13 Mediatek Inc. Method and Apparatus of Scalable Video Coding
KR102059084B1 (en) * 2012-10-18 2019-12-24 브이아이디 스케일, 인크. Decoding complexity for mobile multimedia streaming
US10334253B2 (en) * 2013-04-08 2019-06-25 Qualcomm Incorporated Sample adaptive offset scaling based on bit-depth
CN112087639B (en) * 2015-05-28 2022-05-31 寰发股份有限公司 Method and device for managing decoding image buffer
CN107809638B (en) * 2017-11-09 2020-03-17 广东技术师范学院 Filtering processing method and system based on camera image video mixed subject
CN108024117A (en) * 2017-11-29 2018-05-11 广东技术师范学院 A kind of method and system that loop filtering processing is carried out to video flowing
CN113039792A (en) * 2019-03-07 2021-06-25 Oppo广东移动通信有限公司 Loop filtering implementation method, device and computer storage medium
KR20210145749A (en) * 2019-04-16 2021-12-02 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 Adaptive Loop Filtering for Video Coding
AU2020270246A1 (en) * 2019-05-04 2021-12-02 Huawei Technologies Co., Ltd. An encoder, a decoder and corresponding methods using an adaptive loop filter
CN113841397A (en) * 2019-05-15 2021-12-24 现代自动车株式会社 Image encoding and decoding method and device
CN112135133B (en) * 2020-01-13 2022-03-01 杭州海康威视数字技术股份有限公司 Encoding method, decoding method, device, equipment and machine readable storage medium
US11563963B2 (en) 2020-05-19 2023-01-24 Qualcomm Incorporated Determining whether to code picture header data of pictures of video data in slice headers

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558680A (en) * 2004-01-16 2004-12-29 北京工业大学 A simplified loop filtering method for video coding
JP2006114979A (en) * 2004-10-12 2006-04-27 Canon Inc Image coding apparatus and method thereof
US20100061444A1 (en) * 2008-09-11 2010-03-11 On2 Technologies Inc. System and method for video encoding using adaptive segmentation
EP2293567A2 (en) * 2008-06-13 2011-03-09 Samsung Electronics Co., Ltd. Image-encoding method and a device therefor, and image-decoding method and a device therefor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060078049A1 (en) * 2004-10-13 2006-04-13 Nokia Corporation Method and system for entropy coding/decoding of a video bit stream for fine granularity scalability
KR100728031B1 (en) * 2006-01-23 2007-06-14 삼성전자주식회사 Method and apparatus for deciding encoding mode for variable block size motion estimation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558680A (en) * 2004-01-16 2004-12-29 北京工业大学 A simplified loop filtering method for video coding
JP2006114979A (en) * 2004-10-12 2006-04-27 Canon Inc Image coding apparatus and method thereof
EP2293567A2 (en) * 2008-06-13 2011-03-09 Samsung Electronics Co., Ltd. Image-encoding method and a device therefor, and image-decoding method and a device therefor
US20100061444A1 (en) * 2008-09-11 2010-03-11 On2 Technologies Inc. System and method for video encoding using adaptive segmentation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LU, WEN ET AL.: "H.264-based Adaptive In-loop Filter Algorithm with Multi-modes", COMPUTER SCIENCE, vol. 35, no. 7, July 2008 (2008-07-01), pages 137 - 141 *

Also Published As

Publication number Publication date
CN102857746A (en) 2013-01-02
CN102857746B (en) 2017-03-29

Similar Documents

Publication Publication Date Title
WO2013000304A1 (en) Loop filtering encoding and decoding methods and devices
KR101962183B1 (en) Method for encoding/decoding an intra prediction mode and apparatus for the same
US8294603B2 (en) System and method for providing high throughput entropy coding using syntax element partitioning
US20120082235A1 (en) Coding and decoding utilizing context model selection with adaptive scan pattern
US9635374B2 (en) Systems and methods for coding video data using switchable encoders and decoders
KR20160007564A (en) Tuning video compression for high frame rate and variable frame rate capture
CN112243128B (en) Inter-layer prediction method and method of transmitting bit stream
WO2012122798A1 (en) Encoding method and device, and decoding method and device
KR101925681B1 (en) Parallel video processing using multicore system
TW201507439A (en) Video encoding method and apparatus, and non-transitory computer-readable recording medium
US9172967B2 (en) Coding and decoding utilizing adaptive context model selection with zigzag scan
CN114467306A (en) Image prediction method, encoder, decoder, and storage medium
CN111787330B (en) Coding method supporting decoding compression frame buffer self-adaptive distribution and application
WO2013056577A1 (en) Intra-frame prediction mode encoder and decoder, method thereof, and electronic device
US20190356911A1 (en) Region-based processing of predicted pixels
WO2013048033A1 (en) Method and apparatus for encoding/decoding intra prediction mode
JP2015510354A (en) Method and apparatus for using very low delay mode of virtual reference decoder
GB2521117A (en) Method of encoding or decoding a video frame
EP1686806A2 (en) Content distribution/reception device, content transmission/reception system, content distribution/reception method, and content distribution/reception program
Nightingale et al. Priority-based methods for reducing the impact of packet loss on HEVC encoded video streams
JP2010516100A (en) Method and apparatus for video error concealment in multi-view coded video using high level syntax
KR20110052527A (en) Method and apparatus for video encoding/decoding using adaptive codeword assignment to syntax element
KR101307406B1 (en) Encoding/decoding apparatus with reference frame compression
KR20120138430A (en) Apparatus and method of encoding and decoding for hierarchicalintra prediction
Kim et al. Unequal Loss Protection Mechanism for Wi-Fi based Broadcasting system using a Video Quality Prediction Model

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

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

Country of ref document: EP

Kind code of ref document: A1